[SR-Users] rewriteuri and append_branch with variables

Iñaki Baz Castillo ibc at aliax.net
Fri May 6 17:31:59 CEST 2011


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>



More information about the sr-users mailing list