<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 25.04.2019 17:11, Mark Farmer wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOvQDetSrJD-FHyLGG6f8y9JaF9=ZV6Aw-J-k_LT8sJbm4j=7Q@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div dir="ltr">
              <div dir="ltr">
                <div dir="ltr">
                  <div dir="ltr">
                    <div dir="ltr">
                      <div dir="ltr">
                        <div dir="ltr">
                          <div dir="ltr">
                            <div dir="ltr">Thanks so much for helping
                              with this.
                              <div><br>
                              </div>
                              <div>I have applied the suggested config
                                but the result is the same. OpenSIPS
                                routes the RE-INVITE to itself and it
                                never gets routed back to the Asterisk
                                box.</div>
                              <div>If the 2nd Route header in the
                                RE-INVITE is the IP of the other
                                interface - will that not always be the
                                case? It's as though the 2nd Route
                                header needs to be changed to have the
                                IP of the Asterisk server.</div>
                              <div><br>
                              </div>
                              <div>Sanitized RE-INVITE from provider:</div>
                              <div><br>
                              </div>
                              <div>
                                <div>INVITE <a
                                    href="http://sip:asterisk@my.host.name:5060"
                                    moz-do-not-send="true">sip:asterisk@my.host.name:5060</a>
                                  SIP/2.0</div>
                                <br>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <p><tt>If OpenSIPS identifies "my.host.name:5060" as a local domain,
        this will screw up the routing,<br>
        as it will go from loose (RFC 3261) to strict (old, deprecated
        RFC 2543 mechanism).  Notice how<br>
        its not preserving the R-URI when it routes to itself as should
        happen with RFC 3261 routing,<br>
        because it has fallen back to RFC 2543 routing.<br>
      </tt></p>
    <p><tt>Your provider needs to follow RFC 3261 and use as Re-INVITE
        Request-URI the exact Contact<br>
        advertised by the caller: <a class="moz-txt-link-rfc2396E" href="mailto:sip:asterisk@10.98.0.102:5060"><sip:asterisk@10.98.0.102:5060></a>,
        and not confuse your routing engine<br>
        with a random target such as:</tt><tt> INVITE
        <a class="moz-txt-link-abbreviated" href="mailto:sip:asterisk@my.host.name:5060">sip:asterisk@my.host.name:5060</a>.</tt></p>
    <pre class="moz-signature" cols="72">-- 
Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
  </body>
</html>