<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Courier New";
        panose-1:2 7 3 9 2 2 5 2 4 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Times New Roman \, serif ";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:Calibri;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Courier;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:Calibri;
        color:windowtext;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:Calibri;
        color:windowtext;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:Calibri;
        color:windowtext;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:Calibri;
        color:windowtext;}
span.EmailStyle24
        {mso-style-type:personal-reply;
        font-family:Calibri;
        color:windowtext;}
span.msoIns
        {mso-style-type:export-only;
        mso-style-name:"";
        text-decoration:underline;
        color:teal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body bgcolor="white" lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">No. I am using topology_hiding on my private nodes, so the intent of using set_advertised_address was to have the Contact and other headers contain the public node’s IP after topology_hiding. Instead I removed
 the set_advertised_address on the private nodes and I record_route on the public nodes. This makes the calls route properly as before, but it exposes the private node’s IP in Contact and other headers. It was not desired, but it’s not a big deal especially
 since the logic and routing is much cleaner this way.<o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black"><o:p>&nbsp;</o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black">Ben Newlin</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:black">From: </span></b><span style="color:black">Bogdan-Andrei Iancu &lt;bogdan@opensips.org&gt;<br>
<b>Date: </b>Tuesday, June 28, 2016 at 5:45 AM<br>
<b>To: </b>&quot;Newlin, Ben&quot; &lt;Ben.Newlin@inin.com&gt;, &quot;users@lists.opensips.org&quot; &lt;users@lists.opensips.org&gt;<br>
<b>Subject: </b>Re: [OpenSIPS-Users] ACK after set_advertised_address contains wrong address in VIA header<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"><o:p>&nbsp;</o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><tt><span style="font-size:10.0pt">Hi Ben,</span></tt><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><br>
<br>
<tt>You mean you used the record_route_preset ?</tt><br>
<br>
<tt>Regards,</tt><br>
<br>
</span><o:p></o:p></p>
<pre>Bogdan-Andrei Iancu<o:p></o:p></pre>
<pre>OpenSIPS Founder and Developer<o:p></o:p></pre>
<pre><a href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><o:p></o:p></pre>
<div>
<p class="MsoNormal">On 27.06.2016 20:02, Newlin, Ben wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:11.0pt">I have opened issue #917 on Github [1].</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I should mention that I have worked around this problem by deciding to use Record-Routes instead of set_advertised_address. It is much cleaner, even though it does expose my private IPs. However, I have kept
 this configuration in case you need me to perform any tests or get tracing/logs. Thanks!</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">[1] <a href="https://github.com/OpenSIPS/opensips/issues/917">
https://github.com/OpenSIPS/opensips/issues/917</a></span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black">&nbsp;</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black">Ben Newlin</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;</span><o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:black">From: </span></b><span style="color:black">&quot;Newlin, Ben&quot;
<a href="mailto:Ben.Newlin@inin.com">&lt;Ben.Newlin@inin.com&gt;</a><br>
<b>Date: </b>Monday, June 27, 2016 at 11:06 AM<br>
<b>To: </b>Bogdan-Andrei Iancu <a href="mailto:bogdan@opensips.org">&lt;bogdan@opensips.org&gt;</a>,
<a href="mailto:users@lists.opensips.org">&quot;users@lists.opensips.org&quot;</a> <a href="mailto:users@lists.opensips.org">
&lt;users@lists.opensips.org&gt;</a><br>
<b>Subject: </b>Re: [OpenSIPS-Users] ACK after set_advertised_address contains wrong address in VIA header</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Times New Roman \, serif &quot;">&nbsp;</span><o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Did you mean to say if you set it in request route?</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I should clarify that when I am setting the advertised address the second time it is of course happening in failure_route as the first request has failed at that point. Perhaps that is the issue?</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I will open a bug. Thanks.</span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black">&nbsp;</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black">Ben Newlin</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;</span><o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:black">From: </span></b><span style="color:black">Bogdan-Andrei Iancu
<a href="mailto:bogdan@opensips.org">&lt;bogdan@opensips.org&gt;</a><br>
<b>Date: </b>Monday, June 27, 2016 at 10:41 AM<br>
<b>To: </b>&quot;Newlin, Ben&quot; <a href="mailto:Ben.Newlin@inin.com">&lt;Ben.Newlin@inin.com&gt;</a>,
<a href="mailto:users@lists.opensips.org">&quot;users@lists.opensips.org&quot;</a> <a href="mailto:users@lists.opensips.org">
&lt;users@lists.opensips.org&gt;</a><br>
<b>Subject: </b>Re: [OpenSIPS-Users] ACK after set_advertised_address contains wrong address in VIA header</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Times New Roman \, serif &quot;">&nbsp;</span><o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">Hi Ben,<br>
<br>
If you set the advertised host / port in branch route, it will have impact over the entire transaction (all branches). So, any local replies (CANCEL and ACK) that are constructed by OpenSIPS (for any branch) will use the same set of advertised values. Which
 is of course wrong. Let us come up with the fix (as idea and code).<br>
<br>
Could you open a&nbsp; bug report on the GITHUB tracker, please ?<br>
<br>
Regards,<br>
<br>
<br>
<br>
<br>
<o:p></o:p></p>
<pre>Bogdan-Andrei Iancu<o:p></o:p></pre>
<pre>OpenSIPS Founder and Developer<o:p></o:p></pre>
<pre><a href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><o:p></o:p></pre>
<div>
<p class="MsoNormal">On 27.06.2016 15:45, Newlin, Ben wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:11.0pt">I always set the advertised address in request route.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Also as the original issue noted the second INVITE does go out with the correct advertised address in the VIA. It is only the local ACK for the failed second request that contains the wrong address in the
 VIA. So set_advertised_address appears to be working, but the local generated ACK is not using that address.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;</span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black">&nbsp;</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black">Ben Newlin</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;</span><o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:black">From: </span></b><span style="color:black">Bogdan-Andrei Iancu
<a href="mailto:bogdan@opensips.org">&lt;bogdan@opensips.org&gt;</a><br>
<b>Date: </b>Monday, June 27, 2016 at 5:37 AM<br>
<b>To: </b><a href="mailto:users@lists.opensips.org">&quot;users@lists.opensips.org&quot;</a>
<a href="mailto:users@lists.opensips.org">&lt;users@lists.opensips.org&gt;</a>, &quot;Newlin, Ben&quot;
<a href="mailto:Ben.Newlin@inin.com">&lt;Ben.Newlin@inin.com&gt;</a><br>
<b>Subject: </b>Re: [OpenSIPS-Users] ACK after set_advertised_address contains wrong address in VIA header</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Times New Roman \, serif &quot;">&nbsp;</span><o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">Hi Ben,<br>
<br>
Where in the script do you do the first advertise_address ? In the request route or in a branch route ?<br>
<br>
Regards,<br>
<br>
<br>
<br>
<br>
<o:p></o:p></p>
<pre>Bogdan-Andrei Iancu<o:p></o:p></pre>
<pre>OpenSIPS Founder and Developer<o:p></o:p></pre>
<pre><a href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><o:p></o:p></pre>
<div>
<p class="MsoNormal">On 25.06.2016 03:41, Newlin, Ben wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:11.0pt">I have run into the same problem that was described in this previous post [1], however it doesn’t appear it was ever solved at the time.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I am using the dispatcher module to route calls to external carriers and I am using set_advertised_address to set the outgoing public address prior to sending the request. If the first destination returns
 failure, the ACK is sent correctly. Then I select a different destination and set a different public address using set_advertised_address. If this second call also fails, the ACK that is sent out uses the first advertised address, not the current on for the
 request.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Has anyone figured this out? I am using 1.11.6.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">[1] <a href="http://lists.opensips.org/pipermail/users/2014-August/029779.html">
http://lists.opensips.org/pipermail/users/2014-August/029779.html</a></span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:black">Ben Newlin</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:&quot;Times New Roman \, serif &quot;"><br>
<br>
<br>
<br>
<br>
<br>
</span><o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Users mailing list<o:p></o:p></pre>
<pre><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><o:p></o:p></pre>
<pre><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><span style="font-family:&quot;Times New Roman \, serif &quot;">&nbsp;</span><o:p></o:p></p>
</div>
</div>
</blockquote>
<p class="MsoNormal"><span style="font-family:&quot;Times New Roman \, serif &quot;">&nbsp;</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</blockquote>
<p class="MsoNormal"><span style="font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"><o:p>&nbsp;</o:p></span></p>
</div>
</div>
</div>
</body>
</html>