<div dir="ltr"><div class="gmail_default" style="font-size:small">Would you consider altering my script for a fee?</div><div class="gmail_default" style="font-size:small">I am having to use two computers for what I should need only one.</div><div class="gmail_default" style="font-size:small">I can pay you via Paypal.</div><div class="gmail_default" style="font-size:small">If the first attempt fails I need to alter the "From" and then try the failover route.</div><div class="gmail_default" style="font-size:small">Please contact me via email <a href="mailto:venefax@gmail.com">venefax@gmail.com</a></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Philip<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 23, 2020 at 10:55 AM Ben Newlin <<a href="mailto:Ben.Newlin@genesys.com">Ben.Newlin@genesys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div class="gmail-m_3100636779636823392WordSection1">
<p class="MsoNormal">I am guessing you are also calling uac_replace_from from the request_route during initial message processing. This is altering the original request, so that when you try to do so again in failure_route (which processes the original request,
not the response) you get a double value.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">You should be doing the uac_replace_from actions in a branch route, so that the changes they make to the From header are specific to the branch. This way when you end up in failure_route you have the original request with the original From,
not a previously altered version, and you can then make new changes in a branch route for the new branch.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal"><span style="color:black">Ben Newlin </span><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12pt;color:black">From: </span></b><span style="font-size:12pt;color:black">Users <<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a>> on behalf of Saint Michael <<a href="mailto:venefax@gmail.com" target="_blank">venefax@gmail.com</a>><br>
<b>Reply-To: </b>OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
<b>Date: </b>Sunday, February 23, 2020 at 5:29 AM<br>
<b>To: </b>"<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>" <<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
<b>Subject: </b>[OpenSIPS-Users] Change From on failure_route fails to work<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">failure_route[FAILOVER] {<br>
if(t_check_status("487")) {<br>
xlog("L_INFO", "Request was cancelled");<br>
exit;<br>
}<br>
uac_replace_from("0000000000)","<a href="mailto:sip%3A0000000000@8.8.8.8" target="_blank">sip:0000000000@8.8.8.8</a>");<br>
$rd = "2.2.2.2";<br>
$rp = 5060; <br>
t_relay();<br>
exit;<br>
}<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">The code above fails because the old data does not get replaced with the new one, but the new one is appended.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">Is there a workaround? I need to do this for business reasons.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">I tried removing the >From header and creating a new one with the same tag and the new name, but it fails, since the From cannot be treated as a new user-header.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt"><u></u> <u></u></span></p>
</div>
</div>
</div>
</div>
_______________________________________________<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" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>