[Users] Message dispatching to local scripts - problem in modifying the RURI

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Feb 15 17:25:54 CET 2007


Hi Dan,

how are you accessing the ruri from the external script? maybe you 
should use the env vars set by openser - see:
    http://www.openser.org/docs/modules/1.2.x/exec.html#AEN33

guess SIP_RURI is what you need.

regards,
bogdan

Dan-Cristian Bogos wrote:
> Guys,
>
> I've got a problem with MESSAGE processing.
> I am trying to push an avp to replace $ru before dispatching the
> message to a local script. I can log the modification of the ru
> successful with xlog, but, as soon as I will send the message to the
> local script, it looks like the changes are dropped and to the script
> will be presented the original message. Any ideea why? Are the changes
> not applied for messages not forwarded out, and dispached locally?
>
> In my routing I have:
>
> if (avp_check("$avp(s:message_dst)","re/sip:00.*/g")) {
>     avp_subst("$avp(s:message_dst)/g", "/sip:00(.*)/sip:+\1/");
>     xlog("I have changed the destination from sip:00 into sip:+ and avp
> is $avp(s:message_dst)");
>     };
>
> if (!avp_pushto("$ru","$avp(s:message_dst)")) {
>     sl_send_reply("403", "Cannot set destination from AVP");
>     exit;
>     };
>
> exec_msg("echo_message");
> t_newtran();
> t_reply("200", "OK");
> t_release();
> exit;
>
> I appreciate any kind of advice.
>
> Thxs,
> Dan
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>





More information about the Users mailing list