<div dir="ltr">Hi Khaled, <div><br></div><div><div>I can try to show you the way, but to walk is up to you ;-).<br></div><div><br></div><div class="gmail_extra"><div dir="ltr">Flavio E. Goncalves</div></div></div><div class="gmail_extra">

<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 bgcolor="white" lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="color:#1f497d">Yes,<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal">
<span style="color:#1f497d">I am in need to change it every time I send the call to different trunk ,<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f497d">Is there a way to restore the original header before changing it second time as I try  <u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Uac_restore_to() before uac_replace_to but it didn’t work  too <u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal">
<span style="color:#1f497d">Regards<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext"> <a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a> [mailto:<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a>] <b>On Behalf Of </b>Stefano Pisani<br>
<b>Sent:</b> Wednesday, June 19, 2013 4:33 PM</span></p><div class="im"><br><b>To:</b> OpenSIPS users mailling list<br></div><div class="im"><b>Subject:</b> Re: [OpenSIPS-Users] uac_replace_to problem<u></u><u></u></div><p>
</p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Hi ,</p><div><div class="h5"><br>have you changed to twice?<br>This happens if you try to use uac_replace_to (or uac_replace_from) twice.<br>
<br>s<br><br>Il 19/06/2013 15.18, M.Khaled W Chehab ha scritto:<u></u><u></u></div></div><p></p></div><div><div class="h5"><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><p class="MsoNormal"><span style="color:#1f497d">while i am using uac_replace_to in failover route branch i can find that TO header is not changed(sip user part ) but appended an new raw  as I want it to be To: &quot;971552448304&quot; &lt;sip: <a href="mailto:808971552448304@xx.xx.xx.55" target="_blank">808971552448304@xx.xx.xx.55</a>&gt;</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:#1f497d">SIP to address: <a href="mailto:sip:835822971552448304@xx.xx.xx.55sip:808971552448304@xx.xx.xx.55" target="_blank">sip:835822971552448304@xx.xx.xx.55sip:808971552448304@xx.xx.xx.55</a></span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">SIP to address User Part: 835822971552448304</span><u></u><u></u></p><p class="MsoNormal"><span style="color:#1f497d">SIP to address Host Part: xx.xx.xx.55sip</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">SIP to address Host Port: <a href="mailto:808971552448304@xx.xx.xx.55" target="_blank">808971552448304@xx.xx.xx.55</a></span><u></u><u></u></p><p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:#1f497d">please advice </span><u></u><u></u></p><p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">regards</span><u></u><u></u></p><p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> M.Khaled W Chehab [<a href="mailto:kchehab@icucall.com" target="_blank">mailto:kchehab@icucall.com</a>] <br>
<b>Sent:</b> Wednesday, June 19, 2013 2:41 PM<br><b>To:</b> <a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a><br><b>Cc:</b> <a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a><br>
<b>Subject:</b> uac_replace_to problem </span><u></u><u></u></p></div></div><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">Hi,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"> </span><u></u><u></u></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 </span><u></u><u></u></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)</span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">After do_routing(,)</span><u></u><u></u></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 ,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">but when calls fails on gw1 ,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 </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">That target gw1 </span><u></u><u></u></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</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;"> </span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">loadmodule &quot;uac.so&quot;</span><u></u><u></u></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;)</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">uac_replace_to(&quot;$avp(dst)&quot;,&quot;<a>sip:$var(prefix)$avp(dst)@$td</a>&quot;);</span><u></u><u></u></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;);</span><u></u><u></u></p><p class="MsoNormal">
<span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">on failure_route[1] {</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">.</span><u></u><u></u></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;)) {</span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">                             #xlog(&quot;------------route6-------\n&quot;);</span><u></u><u></u></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          </span><u></u><u></u></p><p class="MsoNormal" style="text-autospace:none">
<span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">                                       route(6);</span><u></u><u></u></p><p class="MsoNormal" style="text-autospace:none"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">                                                 </span><u></u><u></u></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">                    } </span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">Route[6]{</span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">.</span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">$rU = $var(prefix) + $avp(dst);</span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">uac_replace_to(&quot;<a>sip:$var(prefix)$avp(dst)@$td</a>&quot;);</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">}</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">Regards</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"><br>
<br><br><u></u><u></u></span></p><pre>_______________________________________________<u></u><u></u></pre><pre>Users mailing list<u></u><u></u></pre><pre><a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><u></u><u></u></pre>
<pre><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><u></u><u></u></pre></blockquote><p class="MsoNormal"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"><u></u> <u></u></span></p>
</div></div></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>