<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Daniel,<br>
      <br>
      Actually, on the A side, you have another proxy ( see the Record
      Route with 172.20.17.11 in the INVITE). OpenSIPS tries to send the
      BYE to the RR header, but that is private. A SIP proxy, if sending
      traffic to public Internet, should not use at all private IPs.<br>
      <br>
      Bottom line, the broken link in your scenario is the </tt><tt>172.20.17.11
      proxy before your opensips.<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 23.04.2016 00:12, Daniel Zanutti
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAN0jgiPRn9DAEaB6xN5Lzq381V7-BQ7QFi-aahQBovipTd8+Dg@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi
        <div><br>
        </div>
        <div>I'm facing an strange issue when my Opensips instance hangs
          up a call, generating BYE to both sides (timeout on dialog
          module or rtpproxy). The BYE is sent to both sides but A side
          is behind NAT and the BYE is sent to the local IP address and
          not to the public one.</div>
        <div><br>
        </div>
        <div>See trace bellow:</div>
        <div><br>
        </div>
        <div>Customer -&gt; Opensips</div>
        <div><br>
        </div>
        <div>
          <div><b>U <a moz-do-not-send="true"
                href="http://200.200.200.200:27923">200.200.200.200:27923</a>
              -&gt; <a moz-do-not-send="true"
                href="http://199.199.199.199:5060">199.199.199.199:5060</a></b></div>
          <div>INVITE <a moz-do-not-send="true"
              href="mailto:sip%3A551133333333@plat.test.com">sip:551133333333@plat.test.com</a>
            SIP/2.0</div>
          <div>Record-Route:
            &lt;sip:172.20.17.11;lr;ftag=7db6f42e;did=769.5ee54854&gt;</div>
          <div>Via: SIP/2.0/UDP
            172.20.17.11:5060;branch=z9hG4bKb99a.3c0442d4.0</div>
          <div>Via: SIP/2.0/UDP
172.28.0.12:57744;received=172.28.0.12;branch=z9hG4bK-524287-1---08559406a5e9137b;rport=57744</div>
          <div>Max-Forwards: 68</div>
          <div>Contact:
            <a class="moz-txt-link-rfc2396E" href="mailto:sip:100111@172.28.0.12:57744;rinstance=b4a1be0f56d73cfd">&lt;sip:100111@172.28.0.12:57744;rinstance=b4a1be0f56d73cfd&gt;</a></div>
          <div>To: &lt;<a moz-do-not-send="true"
              href="mailto:sip%3A551133333333@plat.test.com">sip:551133333333@plat.test.com</a>&gt;</div>
          <div>From: &lt;<a moz-do-not-send="true"
              href="mailto:sip%3A100111@172.20.17.11">sip:100111@172.20.17.11</a>&gt;;tag=7db6f42e</div>
          <div>Call-ID: 79961NjFjMjY2MDhiYjhhNDYyN2UyMWZiMzFiNWM5NzBkNTM</div>
          <div>CSeq: 2 INVITE</div>
          <div>Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE,
            REFER, INFO, OPTIONS, MESSAGE</div>
          <div>Content-Type: application/sdp</div>
          <div>Supported: replaces</div>
          <div>User-Agent: X-Lite release 4.9.3 stamp 79961</div>
          <div>Content-Length: 333</div>
          <div>P-hint: NAT</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>BYE Opensips -&gt; Customer</div>
          <div><br>
          </div>
          <div><b>U <a moz-do-not-send="true"
                href="http://199.199.199.199:5060">199.199.199.199:5060</a>
              -&gt; <font color="#ff0000"><a moz-do-not-send="true"
                  href="http://172.20.17.11:5060">172.20.17.11:5060</a></font></b></div>
          <div>BYE
            <a class="moz-txt-link-abbreviated" href="mailto:sip:100111@200.200.200.200:27923;rinstance=b4a1be0f56d73cfd">sip:100111@200.200.200.200:27923;rinstance=b4a1be0f56d73cfd</a>
            SIP/2.0</div>
          <div>Via: SIP/2.0/UDP
            199.199.199.199:5060;branch=z9hG4bKe99a.e1c423a3.0</div>
          <div>To: &lt;<a moz-do-not-send="true"
              href="mailto:sip%3A100111@172.20.17.11">sip:100111@172.20.17.11</a>&gt;;tag=7db6f42e</div>
          <div>From: &lt;<a moz-do-not-send="true"
              href="mailto:sip%3A551133333333@plat.test.com">sip:551133333333@plat.test.com</a>&gt;;tag=as4088ffc9</div>
          <div>CSeq: 1 BYE</div>
          <div>Call-ID: 79961NjFjMjY2MDhiYjhhNDYyN2UyMWZiMzFiNWM5NzBkNTM</div>
          <div>Route:
            &lt;sip:172.20.17.11;lr;ftag=7db6f42e;did=769.5ee54854&gt;</div>
          <div>Max-Forwards: 70</div>
          <div>Content-Length: 0</div>
          <div>User-Agent: Softswitch</div>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>On the initial invite, I fixed the Contact using
          fix_nated_contact() and signalling works fine between A and B
          sides, the problem is happening when Opensips hangup the call,
          because A side doesnt receive the BYE.</div>
        <div><br>
        </div>
        <div>Do you guys have an idea on how to fix this? Maybe is it a
          bug?</div>
        <div><br>
        </div>
        <div>Thanks</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </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>