<div dir="ltr"><div><div>BTW, looks like you doing uac_replace_to twice. once in global, and once in a per-branch route.<br></div><div>You can do it only once, I'm sure you see something about this in the syslog.<br><br>
</div>try what Flavio suggested, so do these changes only in the branch route.<br><br></div>-Laszlo<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/6/19 M.Khaled W Chehab <span dir="ltr"><<a href="mailto:kchehab@icucall.com" target="_blank">kchehab@icucall.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="EN-US"><div><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: "971552448304" <sip: 808971552448304@xx.xx.xx.55><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">SIP to address: sip:835822971552448304@xx.xx.xx.55sip:808971552448304@xx.xx.xx.55<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">SIP to address User Part: 835822971552448304<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f497d">SIP to address Host Part: xx.xx.xx.55sip<u></u><u></u></span></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><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><p class="MsoNormal"><span style="color:#1f497d">please advice <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:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> M.Khaled W Chehab [mailto:<a href="mailto:kchehab@icucall.com" target="_blank">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 <u></u><u></u></span></p></div></div><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">I am running opensips 1.8.3 with do_routing module <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">A dial_rule prefix has 3 trunk gateways ( gw1,gw2,gw3)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">After do_routing(,)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">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:"Verdana","sans-serif""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">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 <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">That target gw1 <u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">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:"Courier New""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Verdana","sans-serif"">loadmodule "uac.so"<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">modparam("uac","restore_mode","auto")<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">uac_replace_to("$avp(dst)","<a>sip:$var(prefix)$avp(dst)@$td</a>");<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Verdana","sans-serif""> t_on_failure("1");<u></u><u></u></span></p><p class="MsoNormal">
<span style="font-family:"Verdana","sans-serif""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">on failure_route[1] {<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">.<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Verdana","sans-serif"">if (!t_check_status("487")) {<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Verdana","sans-serif""> #xlog("------------route6-------\n");<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none">
<span style="font-family:"Verdana","sans-serif""> $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:"Verdana","sans-serif""> route(6);<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Verdana","sans-serif""> <u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Verdana","sans-serif""> } <u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Route[6]{<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">$rU = $var(prefix) + $avp(dst);<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">uac_replace_to("<a>sip:$var(prefix)$avp(dst)@$td</a>");<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">}<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Regards<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""><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>