Hi Bogdan,<br><br>I've changed mu script to execute all of the uac_replace only on branch route, and it'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"><<a href="mailto:antonio@voicetechnology.com.br">antonio@voicetechnology.com.br</a>></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't understood that the changes made in the main branch is inherited by the new ones.<br><br>I'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"><<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>></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>
> Dear All,<br>
><br>
> I'm getting the From/To header inconsistnet after a<br>
> uac_replace_from/to, I'm using uac_replace_from/to one time in the<br>
> main Route, and and another on a BranchRoute after got a failure in<br>
> the first branch.<br>
</div>=> you do 2 changes for the branch (global change and per-branch change)<br>
<div><br>
><br>
> As i could understand in the UAC documentation it's not possible to<br>
> call the replace function more then once in a branch, but it's not may<br>
> case I'm creating a new branch on the failure route, and calling the<br>
> 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("1");<br>
t_on_branch("1");<br>
t_relay();<br>
<div>}<br>
<br>
branch_route[1] {<br>
uac_replace_from("", "sip:$avp(s:from)@$fd");<br>
uac_replace_to("", "sip:$avp(s:to)@$td");<br>
}<br>
<br>
</div><div>failure_route[1] {<br>
t_on_branch("1");<br>
if(!next_routing()) {<br>
t_reply("$err.rcode", "$err.rreason");<br>
exit;<br>
}<br>
</div> t_relay();<br>
}<br>
<br>
<br>
Regards,<br>
Bogdan<br>
<div>><br>
> The request generated for the second GW (Branch route) generates the<br>
> From/To header wrongly, the header becomes the first branch value<br>
> concatenated with the second branch value, see bellow:<br>
><br>
> From: *<a href="mailto:sip%3A111133445566@192.168.191.105" target="_blank">sip:111133445566@192.168.191.105</a><br>
</div>> <mailto:<a href="mailto:sip%253A111133445566@192.168.191.105" target="_blank">sip%3A111133445566@192.168.191.105</a>><a href="mailto:sip%3A221133445566@192.168.191.105" target="_blank">sip:221133445566@192.168.191.105</a><br>
> <mailto:<a href="mailto:sip%253A221133445566@192.168.191.105" target="_blank">sip%3A221133445566@192.168.191.105</a>>*;tag=BSHdtMPF6bZNkSKa7YW3PsS1hWtAdLJC.<br>
<div>> To: *<a href="mailto:sip%3A110001888888@192.168.191.105" target="_blank">sip:110001888888@192.168.191.105</a><br>
</div>> <mailto:<a href="mailto:sip%253A110001888888@192.168.191.105" target="_blank">sip%3A110001888888@192.168.191.105</a>>**<a href="mailto:sip%3A220001888888@192.168.191.105" target="_blank">sip:220001888888@192.168.191.105</a><br>
> <mailto:<a href="mailto:sip%253A220001888888@192.168.191.105" target="_blank">sip%3A220001888888@192.168.191.105</a>>*.<br>
<div>><br>
> The red values are the first branch values, and the blue values are<br>
> the second branch values.<br>
><br>
> Does anybody has some idea to help me? Am I making something wrong?<br>
><br>
> [1] -------------------------------------------------<br>
> route{<br>
> ...<br>
> uac_replace_from("", "sip:$avp(s:from)@$fd");<br>
> uac_replace_to("", "sip:$avp(s:to)@$td");<br>
> ...<br>
><br>
> if (!t_relay()) {<br>
> sl_reply_error();<br>
> };<br>
> }<br>
><br>
><br>
> failure_route[1] {<br>
> t_on_branch("1");<br>
> if(!next_routing()) {<br>
> t_reply("$err.rcode", "$err.rreason");<br>
> exit;<br>
> }<br>
> append_branch();<br>
><br>
> if (!t_relay()) {<br>
> sl_reply_error();<br>
> };<br>
> }<br>
><br>
> branch_route[1] {<br>
> ...<br>
> uac_replace_from("", "sip:$avp(s:from)@$fd");<br>
> uac_replace_to("", "sip:$avp(s:to)@$td");<br>
> ...<br>
> }<br>
><br>
> Best regards,<br>
><br>
> Antonio Anderson Souza<br>
> Voice Technology<br>
> <a href="http://www.antonioams.com" target="_blank">http://www.antonioams.com</a><br>
</div><div><div></div><div>> ------------------------------------------------------------------------<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>
><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>