<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <tt>Hi Ben,<br>
      <br>
      Thanks for the clarification. I labeled this as a bug, as whatever
      you do in the script, you cannot get the desired (which is valid)
      behavior. I got the ticker, we will try to get it fixed shortly.<br>
      <br>
      Regards,<br>
      <br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 27.06.2016 18:06, Newlin, Ben wrote:<br>
    </div>
    <blockquote cite="mid:DB51D08D-37A2-47DD-A319-7C752AAD7B2B@inin.com"
      type="cite">
      <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;}
/* 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";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Courier;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:Calibri;
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:Calibri;
        color:windowtext;}
span.EmailStyle21
        {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>
      <div class="WordSection1">
        <p class="MsoNormal"><span style="font-size:11.0pt">Did you mean
            to say if you set it in request route?<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></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?<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt">I will open
            a bug. Thanks.<o:p></o:p></span></p>
        <div>
          <div>
            <p class="MsoNormal"><span
                style="font-size:10.5pt;color:black"><o:p> </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> </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
              <a class="moz-txt-link-rfc2396E" 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>"Newlin, Ben" <a class="moz-txt-link-rfc2396E" href="mailto:Ben.Newlin@inin.com">&lt;Ben.Newlin@inin.com&gt;</a>,
              <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org">"users@lists.opensips.org"</a>
              <a class="moz-txt-link-rfc2396E" 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<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> </o:p></span></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  bug report on the GITHUB tracker, please
              ?<br>
              <br>
              Regards,<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 moz-do-not-send="true" 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"> </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"> </span><o:p></o:p></p>
              <div>
                <div>
                  <p class="MsoNormal"><span
                      style="font-size:10.5pt;color:black"> </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"> </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 moz-do-not-send="true"
                      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 moz-do-not-send="true"
                      href="mailto:users@lists.opensips.org">"users@lists.opensips.org"</a>
                    <a moz-do-not-send="true"
                      href="mailto:users@lists.opensips.org">&lt;users@lists.opensips.org&gt;</a>,
                    "Newlin, Ben"
                    <a moz-do-not-send="true"
                      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&quot;,&quot;serif&quot;"> </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>
                    <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 moz-do-not-send="true" 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"> </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"> </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"> </span><o:p></o:p></p>
                    <p class="MsoNormal"><span style="font-size:11.0pt">[1]
                        <a moz-do-not-send="true"
                          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"> </span><o:p></o:p></p>
                    <p class="MsoNormal"><span style="font-size:11.0pt"> </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&quot;,&quot;serif&quot;"><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 moz-do-not-send="true" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><o:p></o:p></pre>
                    <pre><a moz-do-not-send="true" 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&quot;,&quot;serif&quot;"> </span><o:p></o:p></p>
                </div>
              </div>
            </blockquote>
            <p class="MsoNormal"><span style="font-family:&quot;Times
                New Roman&quot;,&quot;serif&quot;"><o:p> </o:p></span></p>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>