[SR-Users] rewriteuri and append_branch with variables

alex pappas rebel.pappas at gmail.com
Sat May 7 23:01:03 CEST 2011


Many thanks Ovidiu,

I will try that and get back to the community.

Regards
Alex



On Sat, May 7, 2011 at 11:16 PM, Ovidiu Sas <osas at voipembedded.com> wrote:

> Just set the RURI to the value that you want and then call append_brach().
> Everything that's in RURI will be appended as a new branch.
>
> After that, reset the RURI to it's original value: revert_uri().
>
> Regards,
> Ovidiu Sas
>
> On Sat, May 7, 2011 at 12:37 PM, alex pappas <rebel.pappas at gmail.com>
> wrote:
> > Hi,
> > Thanks for the replay.
> > I already tried the $ru with $var and it works fine but the main problem
> is
> > the append_branch.
> >
> > I'm trying to create a redirect function with the append_branch
> dynamically
> > filled in.
> >
> > Any suggestion on that?
> >
> > Thanks
> >
> > Alex
> >
> >
> > On Fri, May 6, 2011 at 6:31 PM, Iñaki Baz Castillo <ibc at aliax.net>
> wrote:
> >>
> >> 2011/5/6 alex pappas <rebel.pappas at gmail.com>:
> >> > I'm trying the following and i get error:
> >> >
> >> > $var(new_uri) = "sip:" +$avp(s:term_prefix) +$rU +"@"
> >> > +$avp(s:gw_address);
> >> >
> >> > rewriteuri=($var(new_uri));  OR append_branch($var(new_uri));
> >> >
> >> > But it seems that it does not like the variable. The documentation
> says
> >> > that
> >> > rewriteuri get a string so i don't understand why does not work
> >>
> >> You are not passing a string to erwriteuri() function, but a
> >> pseudo-variable containing a string as value. It's not the same (not
> >> at least in kamailio/sip-router configuration DSL language).
> >>
> >> However you can use:
> >>
> >>  $ru = $var(new_uri);
> >>
> >> as $ru pseudo-variable (request URI) does allow dynamic assignement.
> >>
> >> --
> >> Iñaki Baz Castillo
> >> <ibc at aliax.net>
> >>
> >> _______________________________________________
> >> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> >> sr-users at lists.sip-router.org
> >> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> >
> >
> > _______________________________________________
> > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> > sr-users at lists.sip-router.org
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> >
> >
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110508/7e5d9e8a/attachment-0001.htm>


More information about the sr-users mailing list