Many thanks Ovidiu,<br><br>I will try that and get back to the community.<br><br>Regards<br>Alex<br><br><br><br><div class="gmail_quote">On Sat, May 7, 2011 at 11:16 PM, Ovidiu Sas <span dir="ltr">&lt;<a href="mailto:osas@voipembedded.com">osas@voipembedded.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Just set the RURI to the value that you want and then call append_brach().<br>
Everything that&#39;s in RURI will be appended as a new branch.<br>
<br>
After that, reset the RURI to it&#39;s original value: revert_uri().<br>
<br>
Regards,<br>
<font color="#888888">Ovidiu Sas<br>
</font><div><div></div><div class="h5"><br>
On Sat, May 7, 2011 at 12:37 PM, alex pappas &lt;<a href="mailto:rebel.pappas@gmail.com">rebel.pappas@gmail.com</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt; Thanks for the replay.<br>
&gt; I already tried the $ru with $var and it works fine but the main problem is<br>
&gt; the append_branch.<br>
&gt;<br>
&gt; I&#39;m trying to create a redirect function with the append_branch dynamically<br>
&gt; filled in.<br>
&gt;<br>
&gt; Any suggestion on that?<br>
&gt;<br>
&gt; Thanks<br>
&gt;<br>
&gt; Alex<br>
&gt;<br>
&gt;<br>
&gt; On Fri, May 6, 2011 at 6:31 PM, Iņaki Baz Castillo &lt;<a href="mailto:ibc@aliax.net">ibc@aliax.net</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; 2011/5/6 alex pappas &lt;<a href="mailto:rebel.pappas@gmail.com">rebel.pappas@gmail.com</a>&gt;:<br>
&gt;&gt; &gt; I&#39;m trying the following and i get error:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; $var(new_uri) = &quot;sip:&quot; +$avp(s:term_prefix) +$rU +&quot;@&quot;<br>
&gt;&gt; &gt; +$avp(s:gw_address);<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; rewriteuri=($var(new_uri));  OR append_branch($var(new_uri));<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; But it seems that it does not like the variable. The documentation says<br>
&gt;&gt; &gt; that<br>
&gt;&gt; &gt; rewriteuri get a string so i don&#39;t understand why does not work<br>
&gt;&gt;<br>
&gt;&gt; You are not passing a string to erwriteuri() function, but a<br>
&gt;&gt; pseudo-variable containing a string as value. It&#39;s not the same (not<br>
&gt;&gt; at least in kamailio/sip-router configuration DSL language).<br>
&gt;&gt;<br>
&gt;&gt; However you can use:<br>
&gt;&gt;<br>
&gt;&gt;  $ru = $var(new_uri);<br>
&gt;&gt;<br>
&gt;&gt; as $ru pseudo-variable (request URI) does allow dynamic assignement.<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Iņaki Baz Castillo<br>
&gt;&gt; &lt;<a href="mailto:ibc@aliax.net">ibc@aliax.net</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt;&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt;&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
&gt;<br>
&gt;<br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br>