<div dir="ltr">Hi Khaleb, <div><br></div><div>Set uac_replace_to and uac_replace_from in a branch_route. <br><div><br></div></div><div class="gmail_extra"><div><div dir="ltr">Flavio E. Goncalves<br><div><br></div></div></div>

<br><br><div class="gmail_quote">2013/6/19 M.Khaled W Chehab <span dir="ltr">&lt;<a href="mailto:kchehab@icucall.com" target="_blank">kchehab@icucall.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">Hi,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">I am running opensips 1.8.3 with  do_routing module <u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">A dial_rule prefix has 3 trunk gateways ( gw1,gw2,gw3)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">After do_routing(,)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">I am setting the $rU and fixing  the To Tag header using uac_replace_to( and the call go to gw1 with correct TO tag as I set it ,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">but when calls fails on gw1 ,</span><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">then  I set the $rU in route[6] to go to second in route and it goes with bad TO header, since it goes with the same To header in the 1<sup>st</sup> invite <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">That target gw1 <u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">1-how to fix the To header in the second invite to gw2<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">loadmodule &quot;uac.so&quot;<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">modparam(&quot;uac&quot;,&quot;restore_mode&quot;,&quot;auto&quot;)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">uac_replace_to(&quot;$avp(dst)&quot;,&quot;sip:$var(prefix)$avp(dst)@$td&quot;);<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">                                       t_on_failure(&quot;1&quot;);<u></u><u></u></span></p><p class="MsoNormal">
<span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">on failure_route[1] {<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">.<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">if (!t_check_status(&quot;487&quot;)) {<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">                             #xlog(&quot;------------route6-------\n&quot;);<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none">
<span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">                             $avp(failure_count) = $avp(failure_count) + 1;  #480|486|603          <u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none">
<span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">                                       route(6);<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">                                                 <u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">                    } <u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">Route[6]{<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">$rU = $var(prefix) + $avp(dst);<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">uac_replace_to(&quot;sip:$var(prefix)$avp(dst)@$td&quot;);<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">}<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">Regards<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><u></u> <u></u></span></p></div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">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></blockquote></div><br></div></div>