<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div dir="auto">I think you are mixing 2 different approaches of achieving the same:</div></div><div dir="auto"><br></div><div>1- Use: fix_nated_contact() --> Will *modify* the contact header and *replace* current ip:port with correct ip:port.</div><div><br></div><div>2- Use: set_contact_alias() in conjunction with handle_ruri_alias() --> <span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">set_contact_alias w</span>ill *add an alias* with correct ip:port but will not *modify* the current ip:port sent by the UAC.  <span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">handle_ruri_alias wi</span>ll search for an alias in the RURI and if found, it will remove it and *set $du accordingly*.You will not see the contact with correct ip:port in RURI but routing will be sent to correct ip:port ($du).</div><div><br></div><div>This is a high level explanation, but I hope it helps you understand what is going on. If you print $du in the logs after calling <span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">handle_ruri_alias() you should see what you expect (if you previously called <span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">set_contact_alias)... Or you can call set_contact_alias on not call <span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">handle_ruri_alias. Two ways of doing the same.</span></span></span></div><div><br><div class="gmail_quote"><div dir="ltr">On Sat, Sep 1, 2018 at 04:47 Wilkins, Steve <<a href="mailto:swwilkins@mitre.org" target="_blank">swwilkins@mitre.org</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_-492489607069486808m_-4048189374587943674WordSection1">
<p class="MsoNormal">Good Morning All,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">The following Incoming request came in =><u></u><u></u></p>
<p class="MsoNormal">SIP Incoming Request: [[BYE <a href="http://sip:2406506175@20.20.20.20:5060" target="_blank">sip:2406506175@20.20.20.20:<wbr>5060</a>;<b>alias=10.10.10.5~55157</b>~2 SIP/2.0<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I called <b>handle_ruri_alias(),</b> and expected the destination and port to be set to
<b><a href="http://10.10.10.5:55157" target="_blank">10.10.10.5:55157</a></b>, but it was not.<u></u><u></u></p>
<p class="MsoNormal">It was left <a href="http://20.20.20.20:5060" target="_blank">20.20.20.20:5060</a>.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Is my thinking correct or is there another way to set the destination and port to the alias?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks All!,<u></u><u></u></p>
<p class="MsoNormal">-Steve<u></u><u></u></p>
</div>
</div>

______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
</blockquote></div></div>
</div></div></div></div>