Dan,

the env. vars. are also available in 1.1.x :
   http://www.openser.org/docs/modules/1.1.x/exec.html#AEN33

the buffer that is sent to the script by exec_msg() is the original received buffer, so it does not contain any of your script changes.

regards,
bogdan

Dan-Cristian Bogos wrote:
Hi Bogdan,

Till 1.2.x will be stable, I have to use 1.1.0 in my production,
therefore I cannot use the new features from 1.2.x (even if I am keen
of doing this).

About the external script, I am passing the full message to the
external script, and I have considered that this is after I have done
the ruri modification through avps. I have tried also by using strip()
and prefix() functions from the core, but got the same result: my
changes were not applied when echoing the message to the external
script.

As I have wrote also to users mailing list, here is my routing flow:


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("/scripts/echo_message");
t_newtran();
t_reply("200", "OK");
t_release();
exit;

Thxs in advance,
Dan

On 2/15/07, Bogdan-Andrei Iancu <[EMAIL PROTECTED]> wrote:
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
> [email protected]
> http://openser.org/cgi-bin/mailman/listinfo/users
>





_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to