Hi Bogdan,<br><br>I&#39;ve changed mu script to execute all of the uac_replace only on branch route, and it&#39;s working perfectly.<br><br>Thank you very much for the help.<br><br>Best regards,<br><br clear="all">Antonio Anderson Souza<br>
Voice Technology<br><a href="http://www.antonioams.com">http://www.antonioams.com</a><br>
<br><br><div class="gmail_quote">On Thu, Jun 10, 2010 at 5:59 PM, Antonio Anderson Souza <span dir="ltr">&lt;<a href="mailto:antonio@voicetechnology.com.br">antonio@voicetechnology.com.br</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Bogdan,<br><br>Thank you very much for the explanation, I haven&#39;t understood that the changes made in the main branch is inherited by the new ones.<br><br>I&#39;ll change my logic to concentrate the changes in the Branch route, and provide a feedback to the list.<br>

<br>Thank you very much!<div class="im"><br><br clear="all">Antonio Anderson Souza<br>Voice Technology<br><a href="http://www.antonioams.com" target="_blank">http://www.antonioams.com</a><br>
<br><br></div><div><div></div><div class="h5"><div class="gmail_quote">On Thu, Jun 10, 2010 at 5:13 PM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Antonio,<br>
<br>
OpenSIPS allows you to do only one TO / FROM change per branch.<br>
<br>
Changes you do in main Route are inherited by all future branches<br>
(including default branch 0).  Changes you do in branch route will<br>
affect only that branch<br>
<div><br>
Antonio Anderson Souza wrote:<br>
&gt; Dear All,<br>
&gt;<br>
&gt; I&#39;m getting the From/To header inconsistnet after a<br>
&gt; uac_replace_from/to, I&#39;m using uac_replace_from/to one time in the<br>
&gt; main Route, and and another on a BranchRoute after got a failure in<br>
&gt; the first branch.<br>
</div>=&gt; you do 2 changes for the branch (global change and per-branch change)<br>
<div><br>
&gt;<br>
&gt; As i could understand in the UAC documentation it&#39;s not possible to<br>
&gt; call the replace function more then once in a branch, but it&#39;s not may<br>
&gt; case I&#39;m creating a new branch on the failure route, and calling the<br>
&gt; replace from the branch route, follow the script snippet bellow [1]:<br>
<br>
</div>use also branch route for changing the first branch. and only branch<br>
route (if you want to do changes per branch:<br>
<br>
route {<br>
    t_on_failure(&quot;1&quot;);<br>
    t_on_branch(&quot;1&quot;);<br>
    t_relay();<br>
<div>}<br>
<br>
branch_route[1] {<br>
   uac_replace_from(&quot;&quot;, &quot;sip:$avp(s:from)@$fd&quot;);<br>
   uac_replace_to(&quot;&quot;, &quot;sip:$avp(s:to)@$td&quot;);<br>
}<br>
<br>
</div><div>failure_route[1] {<br>
  t_on_branch(&quot;1&quot;);<br>
  if(!next_routing()) {<br>
    t_reply(&quot;$err.rcode&quot;, &quot;$err.rreason&quot;);<br>
    exit;<br>
  }<br>
</div>  t_relay();<br>
}<br>
<br>
<br>
Regards,<br>
Bogdan<br>
<div>&gt;<br>
&gt; The request generated for the second GW (Branch route) generates the<br>
&gt; From/To header wrongly, the header becomes the first branch value<br>
&gt; concatenated with the second branch value, see bellow:<br>
&gt;<br>
&gt; From: *<a href="mailto:sip%3A111133445566@192.168.191.105" target="_blank">sip:111133445566@192.168.191.105</a><br>
</div>&gt; &lt;mailto:<a href="mailto:sip%253A111133445566@192.168.191.105" target="_blank">sip%3A111133445566@192.168.191.105</a>&gt;<a href="mailto:sip%3A221133445566@192.168.191.105" target="_blank">sip:221133445566@192.168.191.105</a><br>

&gt; &lt;mailto:<a href="mailto:sip%253A221133445566@192.168.191.105" target="_blank">sip%3A221133445566@192.168.191.105</a>&gt;*;tag=BSHdtMPF6bZNkSKa7YW3PsS1hWtAdLJC.<br>
<div>&gt; To: *<a href="mailto:sip%3A110001888888@192.168.191.105" target="_blank">sip:110001888888@192.168.191.105</a><br>
</div>&gt; &lt;mailto:<a href="mailto:sip%253A110001888888@192.168.191.105" target="_blank">sip%3A110001888888@192.168.191.105</a>&gt;**<a href="mailto:sip%3A220001888888@192.168.191.105" target="_blank">sip:220001888888@192.168.191.105</a><br>

&gt; &lt;mailto:<a href="mailto:sip%253A220001888888@192.168.191.105" target="_blank">sip%3A220001888888@192.168.191.105</a>&gt;*.<br>
<div>&gt;<br>
&gt; The red values are the first branch values, and the blue values are<br>
&gt; the second branch values.<br>
&gt;<br>
&gt; Does anybody has some idea to help me? Am I making something wrong?<br>
&gt;<br>
&gt; [1] -------------------------------------------------<br>
&gt; route{<br>
&gt;   ...<br>
&gt;   uac_replace_from(&quot;&quot;, &quot;sip:$avp(s:from)@$fd&quot;);<br>
&gt;   uac_replace_to(&quot;&quot;, &quot;sip:$avp(s:to)@$td&quot;);<br>
&gt;   ...<br>
&gt;<br>
&gt;   if (!t_relay()) {<br>
&gt;     sl_reply_error();<br>
&gt;   };<br>
&gt; }<br>
&gt;<br>
&gt;<br>
&gt; failure_route[1] {<br>
&gt;   t_on_branch(&quot;1&quot;);<br>
&gt;   if(!next_routing()) {<br>
&gt;     t_reply(&quot;$err.rcode&quot;, &quot;$err.rreason&quot;);<br>
&gt;     exit;<br>
&gt;   }<br>
&gt;   append_branch();<br>
&gt;<br>
&gt;   if (!t_relay()) {<br>
&gt;     sl_reply_error();<br>
&gt;   };<br>
&gt; }<br>
&gt;<br>
&gt; branch_route[1] {<br>
&gt;   ...<br>
&gt;   uac_replace_from(&quot;&quot;, &quot;sip:$avp(s:from)@$fd&quot;);<br>
&gt;   uac_replace_to(&quot;&quot;, &quot;sip:$avp(s:to)@$td&quot;);<br>
&gt;   ...<br>
&gt; }<br>
&gt;<br>
&gt; Best regards,<br>
&gt;<br>
&gt; Antonio Anderson Souza<br>
&gt; Voice Technology<br>
&gt; <a href="http://www.antonioams.com" target="_blank">http://www.antonioams.com</a><br>
</div><div><div></div><div>&gt; ------------------------------------------------------------------------<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;<br>
<br>
<br>
--<br>
Bogdan-Andrei Iancu<br>
<a href="http://www.voice-system.ro" target="_blank">www.voice-system.ro</a><br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>