<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>are you sure that the Route is like that? The lr parameter and
      received should be between angle brakets <> along with the
      sip uri.</p>
    <p>Maybe you should paste here the full REGISTER sent to sip server
      after adding the path as well as the INVITE received later. You
      can replace the IP addresses that are sensitive for you, but keel
      everything else as it is in order to see if there is something
      wrong in the headers.</p>
    <p>Btw, the To header has nothing to do with routing, the R-URI will
      be also relevant in this case.</p>
    <p>Is kamailio listening directly on a public ip?<br>
    </p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 20.07.17 17:18, Iskren Hadzhinedev
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:6dea34b0-c326-da12-c49a-3feef9b9f55c@ikiji.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <p>Hello,</p>
      <p>I have a kamailio proxy in front of FreeSWITCH.</p>
      <p>Whenever FreeSWITCH initiates the dialog (e.g. sends an
        INVITE), kamailio doesn't use the 'received' parameter and it
        forwards to the RFC1918 IP address. The initial INVITE from
        FreeSWITCH has the following headers:</p>
      <tt>To: <a class="moz-txt-link-rfc2396E"
          href="sip:1001@192.168.1.200:5063" moz-do-not-send="true"><sip:1001@192.168.1.200:5063></a></tt><tt><br>
      </tt><tt>Route: <a class="moz-txt-link-rfc2396E"
          href="sip:1.2.3.4" moz-do-not-send="true"><sip:1.2.3.4></a>;lr;received=<a
          class="moz-txt-link-freetext" href="sip:5.6.7.8:5063"
          moz-do-not-send="true">sip:5.6.7.8:5063</a></tt><br>
      <br>
      Where <tt>1.2.3.4</tt> is the kamailio public IP and<tt> 5.6.7.8</tt>
      is the public IP of the UAC behind NAT.<br>
      I have <tt>modparam("path", "use_received", 1)</tt> in my config
      file and to my understanding that should be sufficient to route to
      the proper IP, but kamailio keeps sending INVITEs to <tt>192.168.1.200</tt>.<br>
      <br>
      Can anyone tell me what am I missing?<br>
      Thanks!<br>
      <br>
      Kind regards,<br>
      Iskren<br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>