<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Ben,<br>
      <br>
      <tt>The match_dialog() doe<tt>s not <tt>uses or rel<tt>y on the
              loose<tt>_route() functionality<tt> - <tt>I br<tt>iefly
                      checked the code <tt>in 1.11<tt>; but if you have
                          some logs to <tt>show it oth<tt>erwise, do <tt>not
                                hes<tt>itate to share wit<tt>h me (of
                                    course, if you are 100<tt>% sure you
                                      do not al<tt>so call loose_route()
                                        from sc<tt>ritp ;) ).<br>
                                          <br>
                                          <tt><tt>Reg<tt>ards,</tt></tt></tt><br>
                                        </tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></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 04.10.2016 16:03, Newlin, Ben wrote:<br>
    </div>
    <blockquote cite="mid:28C2F9EC-A0D2-45F9-B742-551F5491CAD3@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)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Arial;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@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:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Courier New \, serif ";}
@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;
        font-family:Calibri;
        color:windowtext;}
span.EmailStyle25
        {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">Yes, that is
            what you suggested before. My comments below were stating
            that that does not work. Specifically, “</span><span
            style="font-size:11.0pt">the match_dialog function must do
            loose routing on its own” because even when I only call
            match_dialog() from the script, I can still see the
            loose_route processing being triggered in the logs.</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>
          <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>Tuesday, October 4, 2016 at 5:28 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>,
              OpenSIPS users mailling list
              <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] Record-Route and
              Dialog topology_hiding()<o:p></o:p></span></p>
        </div>
        <div>
          <p class="MsoNormal"><span style="font-family:&quot;Times New
              Roman&quot;"><o:p> </o:p></span></p>
        </div>
        <p class="MsoNormal"><tt><span style="font-size:10.0pt">Ben,</span></tt><span
            style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><br>
            <br>
            <tt>In 1.11, if you do TH, you should use match_dialog()
              function and not loose_route() at all.</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 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 30.09.2016 16:21, 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">No
              problem.</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">Thanks,
              but I am not using 2.2 and not using the topology_hiding
              module. I am using the Dialog module with the
              topology_hiding function in 1.11.</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>Friday, September 30, 2016 at 4:39 AM<br>
                <b>To: </b>"Newlin, Ben" <a moz-do-not-send="true"
                  href="mailto:Ben.Newlin@inin.com">&lt;Ben.Newlin@inin.com&gt;</a>,
                OpenSIPS users mailling list
                <a moz-do-not-send="true"
                  href="mailto:users@lists.opensips.org">&lt;users@lists.opensips.org&gt;</a><br>
                <b>Subject: </b>Re: [OpenSIPS-Users] Record-Route and
                Dialog topology_hiding()</span><o:p></o:p></p>
          </div>
          <div>
            <p class="MsoNormal"><span style="font-family:&quot;Times
                New Roman \, serif &quot;"> </span><o:p></o:p></p>
          </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 \,
              serif &quot;"><br>
              <br>
            </span><tt><span style="font-size:10.0pt">Sorry, I missed
                your email :(.</span></tt><span
              style="font-size:10.0pt;font-family:&quot;Courier New \,
              serif &quot;"><br>
              <br>
            </span><tt><span style="font-size:10.0pt">But you should not
                do match_dialog, but topology_hiding_match()</span></tt><span
              style="font-size:10.0pt;font-family:&quot;Courier New \,
              serif &quot;"><br>
            </span><tt><span style="font-size:10.0pt">    <a
                  moz-do-not-send="true"
href="http://www.opensips.org/html/docs/modules/2.2.x/topology_hiding.html#id293644">http://www.opensips.org/html/docs/modules/2.2.x/topology_hiding.html#id293644</a></span></tt><span
              style="font-size:10.0pt;font-family:&quot;Courier New \,
              serif &quot;"><br>
            </span><tt><span style="font-size:10.0pt">This is not
                require any loose_route() or so.</span></tt><span
              style="font-size:10.0pt;font-family:&quot;Courier New \,
              serif &quot;"><br>
              <br>
            </span><tt><span style="font-size:10.0pt">Best regards,    </span></tt><span
              style="font-size:10.0pt;font-family:&quot;Courier New \,
              serif &quot;"><br>
              <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 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 05.08.2016 17:22, 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">Bogdan,</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">Just as
                an update, this does not work. The match_dialog function
                must do loose routing on its own and even though I call
                remove_hf(“Route”) before match_dialog(), it still
                processes the Route header on the incoming message. So
                match_dialog returns true, but the TH refactoring is not
                applied and $du is set to the IP from the incoming
                message’s Route header, which is my server.</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, August 1, 2016 at 7:13 AM<br>
                  <b>To: </b>"Newlin, Ben" <a moz-do-not-send="true"
                    href="mailto:Ben.Newlin@inin.com">&lt;Ben.Newlin@inin.com&gt;</a>,
                  OpenSIPS users mailling list
                  <a moz-do-not-send="true"
                    href="mailto:users@lists.opensips.org">&lt;users@lists.opensips.org&gt;</a><br>
                  <b>Subject: </b>Re: [OpenSIPS-Users] Record-Route and
                  Dialog topology_hiding()</span><o:p></o:p></p>
            </div>
            <div>
              <p class="MsoNormal"><span style="font-family:&quot;Times
                  New Roman \, serif &quot;"> </span><o:p></o:p></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 \, serif &quot;"><br>
                    <br>
                  </span><tt><span style="font-size:10.0pt">I see your
                      problem here. So, let's explore this:</span></tt><span
                    style="font-size:10.0pt;font-family:&quot;Courier
                    New \, serif &quot;"><br>
                  </span><tt><span style="font-size:10.0pt">1) for
                      sending the call to carrier, on OpenSIPS, you do
                      TH (with advertise) resulting in a Contact with
                      the public IP of the SBC.</span></tt><span
                    style="font-size:10.0pt;font-family:&quot;Courier
                    New \, serif &quot;"><br>
                  </span><tt><span style="font-size:10.0pt">2) also,
                      manually add a RR header with the private IP of
                      OpenSIPS.</span></tt><span
                    style="font-size:10.0pt;font-family:&quot;Courier
                    New \, serif &quot;"><br>
                  </span><tt><span style="font-size:10.0pt">3) send call
                      to SBC, which will add its own RR stuff.</span></tt><span
                    style="font-size:10.0pt;font-family:&quot;Courier
                    New \, serif &quot;"><br>
                    <br>
                  </span><tt><span style="font-size:10.0pt">Now, on the
                      sequential request from Carrier, the RURI will
                      contain the Contact of OpenSIPS (the pub IP of
                      SBC), some Route hdrs due the SBC and the Route we
                      added on OpenSIPS.</span></tt><span
                    style="font-size:10.0pt;font-family:&quot;Courier
                    New \, serif &quot;"><br>
                  </span><tt><span style="font-size:10.0pt">- when
                      request gets to SBC, the SBC will do loose route,
                      consume its Route headers, and it will use the
                      next available Route which points to the priv IP
                      of OpenSIPS (and it will not use the public IP in
                      RURI for routing)</span></tt><span
                    style="font-size:10.0pt;font-family:&quot;Courier
                    New \, serif &quot;"><br>
                  </span><tt><span style="font-size:10.0pt">- requests
                      gets to OpenSIPS, simply remove_hf() and Route
                      headers (do not do any loose_route() as it is
                      useless) and hit th_matching -&gt; this will
                      refactor the request (RURI, Contact, Route) for
                      the leg on the other side -&gt; this should be
                      fine.</span></tt><span
                    style="font-size:10.0pt;font-family:&quot;Courier
                    New \, serif &quot;"><br>
                    <br>
                  </span><tt><span style="font-size:10.0pt">For the
                      other direction (still sequential), you do
                      th_matching on OpenSIPS and nothing more. This
                      will send a request holding the Routes due the
                      SBC, a Contact with the public IP and and RURI
                      pointing probably to the carrier.</span></tt><span
                    style="font-size:10.0pt;font-family:&quot;Courier
                    New \, serif &quot;"><br>
                    <br>
                  </span><tt><span style="font-size:10.0pt">Shortly you
                      do standard TH, but on outbound scenario, add a
                      fake RR header to trick the SBC to route the
                      sequential to your OpenSIPS.</span></tt><span
                    style="font-size:10.0pt;font-family:&quot;Courier
                    New \, serif &quot;"><br>
                    <br>
                  </span><tt><span style="font-size:10.0pt">Does it make
                      sense ? </span></tt><span
                    style="font-size:10.0pt;font-family:&quot;Courier
                    New \, serif &quot;"><br>
                    <br>
                    <br>
                  </span><tt><span style="font-size:10.0pt">Regards,</span></tt><span
                    style="font-size:10.0pt;font-family:&quot;Courier
                    New \, serif &quot;"><br>
                    <br>
                    <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 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 29.07.2016 18:05, 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">Here
                      is the scenario:</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">My
                      servers are only listening on a private IP
                      address. There is a public address on our SBC. I
                      have a carrier that requires that the Contact IP
                      address matches the public address we provided to
                      them. So when I do TH on my server I have to also
                      do set_advertised_address to advertise the public
                      address in the Contact header. Sequential requests
                      use the Contact as the Request URI and the SBC is
                      doing RR so all requests will come back through
                      it. When the SBC receives a sequential request it
                      strips its Route headers and forwards to the
                      Request URI (previous Contact URI). But that URI
                      now points back to the SBC, so it cannot deliver
                      the request. If my server could Record-Route the
                      initial request with its private address, the SBC
                      would be able to route the request back to it.</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">Here
                      is a trace of my scenario:
                      <a moz-do-not-send="true"
                        href="http://pastebin.com/x927mFtq">http://pastebin.com/x927mFtq</a>.
                      I created it with SIPp so some endpoints are on
                      the same IPs but with different ports. The public
                      IP is 192.168.99.100, with port 7060 representing
                      the PSTN carrier and port 5060 the SBC. The
                      private IP is 10.0.2.15, with port 5060 being the
                      SBC again and port 6060 being my server. You can
                      see that the ACK cannot be delivered correctly to
                      my server with this configuration.</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">The
                      problem here stems from the fact that Topology
                      Hiding should really be done at the edge of the
                      network in order to be most effective. But my
                      OpenSIPS server doesn’t sit on the Edge of the
                      network, it is behind an SBC. So TH is complicated
                      by the fact that my OpenSIPS has no public IP of
                      its own and must advertise the public IP of the
                      SBC instead, but future requests must still be
                      routable into the private network. I am really
                      using TH to hide the two ends of the call from
                      each other, not to hide my internal network
                      topology.</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>Friday, July 29, 2016 at 8:40 AM<br>
                        <b>To: </b>"Newlin, Ben" <a
                          moz-do-not-send="true"
                          href="mailto:Ben.Newlin@inin.com">&lt;Ben.Newlin@inin.com&gt;</a>,
                        OpenSIPS users mailling list
                        <a moz-do-not-send="true"
                          href="mailto:users@lists.opensips.org">&lt;users@lists.opensips.org&gt;</a><br>
                        <b>Subject: </b>Re: [OpenSIPS-Users]
                        Record-Route and Dialog topology_hiding()</span><o:p></o:p></p>
                  </div>
                  <div>
                    <p class="MsoNormal"><span
                        style="font-family:&quot;Times New Roman \,
                        serif &quot;"> </span><o:p></o:p></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 \, serif &quot;"><br>
                          <br>
                        </span><tt><span style="font-size:10.0pt">Sorry
                            to disagree, but IMHO they do exclude one
                            each other.
                          </span></tt><span
                          style="font-size:10.0pt;font-family:&quot;Courier
                          New \, serif &quot;"><br>
                          <br>
                        </span><tt><span style="font-size:10.0pt">Adding
                            RR to TH should not be seen as a way of
                            fixing some broken TH scenarios (with
                            advertise).</span></tt><span
                          style="font-size:10.0pt;font-family:&quot;Courier
                          New \, serif &quot;"><br>
                        </span><tt><span style="font-size:10.0pt">So,
                            let me try to understand what is not working
                            for you. You do TH and advertise. In this
                            case, normally, in the Contact headers
                            generated by OpenSIPS (as a result of TH),
                            it should be the TH interface, right ? What
                            exactly seems to be the problem ? do you
                            have a trace to show the issues ?</span></tt><span
style="font-size:10.0pt;font-family:&quot;Courier New \, serif &quot;"><br>
                          <br>
                        </span><tt><span style="font-size:10.0pt">Regards,</span></tt><span
style="font-size:10.0pt;font-family:&quot;Courier New \, serif &quot;"><br>
                          <br>
                          <br>
                          <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 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.07.2016 16:05,
                          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 understand that
                            normally you would not need RR with TH, but
                            the two concepts are not mutually exclusive
                            in SIP. As I said, I have a need to
                            Record-Route the call on my server as I am
                            advertising a different address than I am
                            listening on. This means that TH will
                            populate the Contact header with the
                            advertised address and if I cannot
                            Record-Route with the actual address then I
                            will not receive sequential requests.</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>Wednesday, July 27, 2016 at
                              3:59 AM<br>
                              <b>To: </b>OpenSIPS users mailling list <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]
                              Record-Route and Dialog topology_hiding()</span><o:p></o:p></p>
                        </div>
                        <div>
                          <p class="MsoNormal"><span
                              style="font-family:&quot;Times New Roman
                              \, serif &quot;"> </span><o:p></o:p></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 \, serif &quot;"><br>
                                <br>
                              </span><tt><span style="font-size:10.0pt">As
                                  I mentioned in different thread, TH is
                                  not compatible with the RR mechanism.
                                  If you do TH, your OpenSIPS will act
                                  as and end point (from SIP
                                  perspective), so there will be no
                                  Route/RR headers at all. So no need to
                                  do loose_route or so. You just do TH
                                  matching for the sequential requests
                                  and nothing more.</span></tt><span
                                style="font-size:10.0pt;font-family:&quot;Courier
                                New \, serif &quot;"><br>
                                <br>
                              </span><tt><span style="font-size:10.0pt">Regards,</span></tt><span
style="font-size:10.0pt;font-family:&quot;Courier New \, serif &quot;"><br>
                                <br>
                                <br>
                                <br>
                                <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 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 22.07.2016 16:48,
                                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">Hi,</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 Dialog module with
                                  topology_hiding() in my server and I
                                  have a need to Record-Route the call
                                  on my server as I am advertising a
                                  different address than I am listening
                                  on. I have found what I believe is an
                                  inconsistency in the handling of
                                  Record-Route within the Dialog
                                  topology_hiding functionality. The
                                  topology_hiding isn’t a true B2BUA,
                                  but it does set up different
                                  parameters for the incoming UAC and
                                  outgoing UAS sides of the call for the
                                  Via headers, Record-Route and Route
                                  headers, and the Contact header(s).</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">The problem
                                  is that the record_route() and
                                  loose_route() functions operate on
                                  different sides of the call. The
                                  record_route() function will only add
                                  a Record-Route header to the outgoing
                                  UAS side of the call. And since the
                                  record_route() function cannot be
                                  called from onreply_route, but is no
                                  way to add a Record-Route header to
                                  the UAC side of the call.</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">On the other
                                  hand, the loose_route() function only
                                  operates on the incoming UAC side of
                                  the call and there is no way to
                                  perform loose_route() on the UAS side
                                  of the call.</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">So there is a
                                  situation where Record-Route headers
                                  can only be added on the outgoing UAS
                                  side, but the associated Route headers
                                  can only be removed on the incoming
                                  UAC side (where they won’t exist since
                                  they can’t be added) and any added
                                  headers on the UAS side cannot be
                                  processed properly due to the lack of
                                  loose_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">I can provide
                                  further information if this is
                                  unclear. It should be easily
                                  reproducible by attempting to use
                                  record_route in a topology_hiding
                                  scenario. The route is added to the
                                  outbound leg, but is not removed by
                                  loose_route so the message is looped
                                  back every time.</span><o:p></o:p></p>
                              <div>
                                <p class="MsoNormal"
                                  style="line-height:16.8pt;background:white"><span
style="font-size:9.0pt;font-family:Arial;color:#666666"> </span><o:p></o:p></p>
                              </div>
                              <div>
                                <p class="MsoNormal"
                                  style="line-height:16.8pt;background:white"><b><span
style="font-size:10.0pt;font-family:Arial;color:#155570">Ben Newlin</span></b><b><span
style="font-size:10.0pt;font-family:Arial;color:#666666"> </span></b><span
style="font-size:10.0pt;font-family:Arial;color:#666666">| Sr Voice
                                    Network Engineer, PureCloud</span><o:p></o:p></p>
                              </div>
                              <div>
                                <p class="MsoNormal"
                                  style="line-height:16.8pt;background:white"><span
style="font-size:10.0pt;font-family:Arial;color:#666666">phone &amp; fax
                                    +1.317.957.1009 | </span><span
                                    style="font-size:10.0pt;font-family:Arial;color:#0585A7"><a
                                      moz-do-not-send="true"
                                      href="mailto:ben.newlin@inin.com">ben.newlin@inin.com</a> </span><o:p></o:p></p>
                              </div>
                              <div>
                                <p class="MsoNormal"
                                  style="line-height:16.8pt;background:white"><span
style="font-size:9.0pt;font-family:Arial;color:#666666;border:solid
                                    windowtext 1.0pt;padding:0in"><img
                                      moz-do-not-send="true"
                                      id="_x0000_i1025"
                                      src="cid:Word%20Work%20File%20D_.jpg"
                                      alt=" removed by sender."
                                      border="0" height="21" width="196"></span><o:p></o:p></p>
                              </div>
                              <div>
                                <p class="MsoNormal"
                                  style="line-height:12.0pt;background:white"><span
style="font-size:10.0pt;font-family:Arial;color:#0585A7"><a
                                      moz-do-not-send="true"
                                      href="http://www.inin.com">www.inin.com</a></span><o:p></o:p></p>
                              </div>
                              <p class="MsoNormal"> <o:p></o:p></p>
                              <p class="MsoNormal"><span
                                  style="font-family:&quot;Times New
                                  Roman \, serif &quot;"><br>
                                  <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 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
                                \, serif &quot;"> </span><o:p></o:p></p>
                          </div>
                        </div>
                      </blockquote>
                      <p class="MsoNormal"><span
                          style="font-family:&quot;Times New Roman \,
                          serif &quot;"> </span><o:p></o:p></p>
                    </div>
                  </div>
                </blockquote>
                <p class="MsoNormal"><span
                    style="font-family:&quot;Times New Roman \, serif
                    &quot;"> </span><o:p></o:p></p>
              </div>
            </div>
          </blockquote>
          <p class="MsoNormal"><span style="font-family:&quot;Times New
              Roman \, serif &quot;"><br>
              <br>
              <br>
            </span><o:p></o:p></p>
        </blockquote>
        <p class="MsoNormal"><span style="font-family:&quot;Times New
            Roman&quot;"><br>
            <br>
            <o:p></o:p></span></p>
      </div>
    </blockquote>
    <br>
  </body>
</html>