<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Rodrigo,<br>
      <br>
      Try adding in your script:<br>
      <br>
      alias="xxx.xxx.xxx.xxx"<br>
      <br>
      Regards,<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 13.01.2016 19:53, Rodrigo Pimenta
      Carvalho wrote:<br>
    </div>
    <blockquote
cite="mid:BY2PR02MB16552DCED73D05DEAB7271BFB5CB0@BY2PR02MB1655.namprd02.prod.outlook.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
        <p>Dear OpenSIPS-users;</p>
        <p><br>
        </p>
        <p>My OpenSIPS is behind a NAT. The public IP is xxx.xxx.xxx.xx.
          <br>
        </p>
        <p>So, I have configured advertised_address="xxx.xxx.xxx.xx" in
          my OpenSIPS.</p>
        <p><br>
        </p>
        <p>It seems that such new configurations takes appropriated
          effect, because a <i>
            Record</i>-<i>Route</i> header field in a SIP OK message
          (for a call that was answered) contains the IP xxx.xxx.xxx.xx,
          when it arrives to the caller (OpenSIPS adds Record-Rout
          xxx.xxx.xxx.xx when the SIP INVITE is forwarded).
          <br>
        </p>
        <p><br>
        </p>
        <p>So, when the caller receives that SIP OK it sends the SIP ACK
          to IP xxx.xxx.xxx.xx, port 5060. Then OpenSIPS receives the
          SIP ACK that has Route header field containing the IP
          xxx.xxx.xxx.xx.</p>
        <p><br>
        </p>
        <p>Now the problem: OpenSIPS refuses the SIP ACK as this message
          was to another proxy and forward it. As log as the route is
          xxx.xxx.xxx.xx, the SIP ACK returns to OpenSIPS that forward
          it again. It becomes a loop.
          <br>
        </p>
        <p><br>
        </p>
        <p>How to solve this issue? I think there is an error in my
          OpenSIPS.cfg file.</p>
        <p>Any hint?</p>
        <p>--------------------------------------------------------------------------------------------------------------------------</p>
        <p><br>
        </p>
        <p>Some details from the log is here:</p>
        <p><br>
        </p>
        <p><font color="#006fc9"><br>
          </font></p>
        <p><font color="#006fc9"><br>
          </font></p>
        <p><font color="#006fc9">Jan 13 17:15:28 [680]
            DBG:core:check_self: host != me<br>
            Jan 13 17:15:28 [680] DBG:rr:after_loose: Topmost URI is NOT
            myself<br>
            Jan 13 17:15:28 [680] DBG:rr:after_loose: URI to be
            processed:
            'sip:xxx.xxx.xxx.xx;transport=tcp;lr;nat=yes;did=de2.a332f873'<br>
            Jan 13 17:15:28 [680] DBG:rr:after_loose: Next URI is a
            loose router<br>
            Jan 13 17:15:28 [680] DBG:rr:run_rr_callbacks: callback id 1
            entered with
            &lt;transport=tcp;lr;nat=yes;did=de2.a332f873&gt;<br>
            Jan 13 17:15:28 [680] DBG:dialog:dlg_onroute: Route param
            'did' not found<br>
            Jan 13 17:15:28 [680] DBG:core:parse_headers: flags=58<br>
            Jan 13 17:15:28 [680] DBG:core:parse_to_param: tag=f97c143e<br>
            Jan 13 17:15:28 [680] DBG:core:parse_to: end of header
            reached, state=29<br>
            Jan 13 17:15:28 [680] DBG:core:parse_to: display={"6003"},
            ruri={<a class="moz-txt-link-abbreviated" href="mailto:sip:6003@192.168.XXX.XXX;transport=TCP">sip:6003@192.168.XXX.XXX;transport=TCP</a>}<br>
            Jan 13 17:15:28 [680] DBG:dialog:get_dlg: input
            ci=&lt;iGu3D2Ej0BIXJF18BzYQKA..&gt;(24),
            tt=&lt;f97c143e&gt;(8), ft=&lt;Zw5eZ5e&gt;(7)<br>
            Jan 13 17:15:28 [680] DBG:dialog:get_dlg: no dialog
            callid='iGu3D2Ej0BIXJF18BzYQKA..' found<br>
            Jan 13 17:15:28 [680] DBG:dialog:dlg_onroute: Callid
            'iGu3D2Ej0BIXJF18BzYQKA..' not found<br>
            Jan 13 17:15:28 [680] DBG:rr:add_rr_param: adding (;nat=yes)<br>
            Jan 13 17:15:28 [680] DBG:tm:t_newtran: transaction on
            entrance=0xffffffff<br>
            Jan 13 17:15:28 [680] DBG:core:parse_headers:
            flags=ffffffffffffffff<br>
            Jan 13 17:15:28 [680] DBG:core:parse_headers: flags=78<br>
            Jan 13 17:15:28 [680] DBG:tm:t_lookup_request: start
            searching: hash=21281, isACK=1<br>
            Jan 13 17:15:28 [680] DBG:tm:matching_3261: RFC3261
            transaction matching failed<br>
            Jan 13 17:15:28 [680] DBG:tm:t_lookup_request: no
            transaction found<br>
            Jan 13 17:15:28 [680] DBG:tm:t_relay_to: forwarding ACK</font><br>
          <br>
        </p>
        <p><br>
        </p>
        <p><br>
        </p>
        <p><br>
        </p>
        <p><br>
        </p>
        <p><br>
        </p>
        <p><br>
        </p>
        <p>Best regards.<br>
        </p>
        <p> <br>
        </p>
        <br>
        <br>
        <div id="Signature">
          <div name="divtagdefaultwrapper"
            style="font-family:Calibri,Arial,Helvetica,sans-serif;
            font-size:; margin:0">
            <div class="BodyFragment"><font size="2">
                <div class="PlainText">RODRIGO PIMENTA CARVALHO<br>
                  Inatel Competence Center<br>
                  Software<br>
                  Ph: +55 35 3471 9200 RAMAL 979<br>
                </div>
              </font></div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>