<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <tt>Hi Nick,<br>
      <br>
      The BYE is not properly formed and rejected by script - in the 200
      OK of the INVITE, you can see that your opensips is doing
      Record-Routing, but the BYE does not contain the corresponding
      Route hdr, so SIP routing is impossible.<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>
    <br>
    On 04/09/2013 08:05 PM, Nick Khamis wrote:
    <blockquote
cite="mid:CAGWRaZb-rNa=sGYTfOY48YTi4yEzeRwO59GzWRHpr3V0ZUyRpw@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hello Everyone,
        <div><br>
        </div>
        <div style="">I saw an earlier post about this issue:&nbsp;<a
            moz-do-not-send="true"
href="http://www.mail-archive.com/users@lists.opensips.org/msg23052.html">http://www.mail-archive.com/users@lists.opensips.org/msg23052.html</a></div>
        <div style=""><br>
        </div>
        <div style="">And was wondering if there was anything we can do
          on our end to fix this problem? It seems that providers are
          not obligated to maintain RR? When the caller (internal)
          initiates the BYE everything is ok, but not the case when the
          callee (external) initiates the BYE.</div>
        <div style=""><br>
        </div>
        <div style=""><a moz-do-not-send="true"
            href="http://192.168.2.5">192.168.2.5</a>: OpenSIPS</div>
        <div style=""><a moz-do-not-send="true"
            href="http://192.168.2.10">192.168.2.10</a>: Asterisk</div>
        <div style=""><a moz-do-not-send="true"
            href="http://70.10.163.44">70.10.163.44</a>: Public IP<br>
        </div>
        <div style=""><a moz-do-not-send="true"
            href="http://108.59.2.133">108.59.2.133</a>: Service
          Provider<br>
        </div>
        <div style=""><br>
        </div>
        <div style=""><br>
        </div>
        <div style="">
          <div>U 2013/04/09 12:17:02.920454 <a moz-do-not-send="true"
              href="http://192.168.2.10:5060">192.168.2.10:5060</a>
            -&gt; <a moz-do-not-send="true"
              href="http://192.168.2.5:5060">192.168.2.5:5060</a></div>
          <div>SIP/2.0 200 OK.</div>
          <div>Via: SIP/2.0/UDP
192.168.2.5;branch=z9hG4bKac2e.554c6e93.0;received=192.168.2.5;rport=5060.</div>
          <div>Via: SIP/2.0/UDP
192.168.2.11:5060;rport=5060;received=192.168.2.11;branch=z9hG4bK42f3f16e7BC15DF1.</div>
          <div>Record-Route:
            <a class="moz-txt-link-rfc2396E" href="sip:192.168.2.5;lr;did=392.62562fb2">&lt;sip:192.168.2.5;lr;did=392.62562fb2&gt;</a>.</div>
          <div>From: "1001" &lt;<a moz-do-not-send="true"
              href="mailto:sip%3A1001@server.example.com">sip:1001@server.example.com</a>&gt;;tag=FCA0BFC0-B585477D.</div>
          <div>To: &lt;<a moz-do-not-send="true"
              href="mailto:sip%3A15178342008@server.example.com">sip:15178342008@server.example.com</a>;user=phone&gt;;tag=as0a76fcde.</div>
          <div>Call-ID: <a moz-do-not-send="true"
              href="mailto:595ad334-f06e97fa-3bbc8137@192.168.2.11">595ad334-f06e97fa-3bbc8137@192.168.2.11</a>.</div>
          <div>CSeq: 1 INVITE.</div>
          <div>Server: Asterisk PBX UNKNOWN__and_probably_unsupported.</div>
          <div>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER,
            SUBSCRIBE, NOTIFY, INFO, PUBLISH.</div>
          <div>Supported: replaces, timer.</div>
          <div>Contact: &lt;<a moz-do-not-send="true"
              href="http://sip:15178342008@192.168.2.10:5060">sip:15178342008@192.168.2.10:5060</a>&gt;.</div>
          <div>Content-Type: application/sdp.</div>
          <div>Content-Length: 312.</div>
          <div>.</div>
          <div>v=0.</div>
          <div>o=root 1860889533 1860889534 IN IP4 192.168.2.10.</div>
          <div>s=Asterisk PBX UNKNOWN__and_probably_unsupported.</div>
          <div>c=IN IP4 192.168.2.10.</div>
          <div>t=0 0.</div>
          <div>m=audio 60646 RTP/AVP 18 101.</div>
          <div>a=rtpmap:18 G729/8000.</div>
          <div>a=fmtp:18 annexb=no.</div>
          <div>a=rtpmap:101 telephone-event/8000.</div>
          <div>a=fmtp:101 0-16.</div>
          <div>a=silenceSupp:off - - - -.</div>
          <div>a=ptime:20.</div>
          <div>a=sendrecv.</div>
          <div>
            <br>
          </div>
          <div>ACC: transaction answered:
timestamp=1365524222;method=INVITE;from_tag=FCA0BFC0-B585477D;to_tag=as0a76fcde;call_id=<a
              moz-do-not-send="true"
              href="mailto:595ad334-f06e97fa-3bbc8137@192.168.2.11">595ad334-f06e97fa-3bbc8137@192.168.2.11</a>;code=200;reason=OK</div>
          <div><br>
          </div>
          <div>U 2013/04/09 12:17:02.939608 <a moz-do-not-send="true"
              href="http://192.168.2.5:5060">192.168.2.5:5060</a> -&gt;
            <a moz-do-not-send="true" href="http://192.168.2.11:5060">192.168.2.11:5060</a></div>
          <div>SIP/2.0 200 OK.</div>
          <div>Via: SIP/2.0/UDP
192.168.2.11:5060;rport=5060;received=192.168.2.11;branch=z9hG4bK42f3f16e7BC15DF1.</div>
          <div>Record-Route:
            <a class="moz-txt-link-rfc2396E" href="sip:192.168.2.5;lr;did=392.62562fb2">&lt;sip:192.168.2.5;lr;did=392.62562fb2&gt;</a>.</div>
          <div>From: "1001" &lt;<a moz-do-not-send="true"
              href="mailto:sip%3A1001@server.example.com">sip:1001@server.example.com</a>&gt;;tag=FCA0BFC0-B585477D.</div>
          <div>To: &lt;<a moz-do-not-send="true"
              href="mailto:sip%3A15178342008@server.example.com">sip:15178342008@server.example.com</a>;user=phone&gt;;tag=as0a76fcde.</div>
          <div>Call-ID: <a moz-do-not-send="true"
              href="mailto:595ad334-f06e97fa-3bbc8137@192.168.2.11">595ad334-f06e97fa-3bbc8137@192.168.2.11</a>.</div>
          <div>CSeq: 1 INVITE.</div>
          <div>Server: Asterisk PBX UNKNOWN__and_probably_unsupported.</div>
          <div>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER,
            SUBSCRIBE, NOTIFY, INFO, PUBLISH.</div>
          <div>Supported: replaces, timer.</div>
          <div>Contact: &lt;<a moz-do-not-send="true"
              href="http://sip:15178342008@192.168.2.10:5060">sip:15178342008@192.168.2.10:5060</a>&gt;.</div>
          <div>Content-Type: application/sdp.</div>
          <div>Content-Length: 329.</div>
          <div>.</div>
          <div>v=0.</div>
          <div>o=root 1860889533 1860889534 IN IP4 192.168.2.10.</div>
          <div>s=Asterisk PBX UNKNOWN__and_probably_unsupported.</div>
          <div>c=IN IP4 192.168.2.5.</div>
          <div>t=0 0.</div>
          <div>m=audio 31148 RTP/AVP 18 101.</div>
          <div>a=rtpmap:18 G729/8000.</div>
          <div>a=fmtp:18 annexb=no.</div>
          <div>a=rtpmap:101 telephone-event/8000.</div>
          <div>a=fmtp:101 0-16.</div>
          <div>a=silenceSupp:off - - - -.</div>
          <div>a=ptime:20.</div>
          <div>a=sendrecv.</div>
          <div>
            a=nortpproxy:yes.</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>U 2013/04/09 12:17:06.988918 <a moz-do-not-send="true"
              href="http://108.59.2.133:5060">108.59.2.133:5060</a>
            -&gt; <a moz-do-not-send="true"
              href="http://192.168.2.5:5060">192.168.2.5:5060</a></div>
          <div>BYE <a moz-do-not-send="true"
              href="http://sip:1001@70.10.163.44:5060">sip:1001@70.10.163.44:5060</a>
            SIP/2.0.</div>
          <div>Max-Forwards: 64.</div>
          <div>To: "1001" &lt;<a moz-do-not-send="true"
              href="mailto:sip%3A1001@70.10.163.44">sip:1001@70.10.163.44</a>&gt;;tag=as4b40d9b4.</div>
          <div>From: &lt;<a moz-do-not-send="true"
              href="mailto:sip%3A001110215178342008@sbc.voxbeam.com">sip:001110215178342008@sbc.voxbeam.com</a>&gt;;tag=3574513019-870807.</div>
          <div>Reason: Q.850;cause=16;text="".</div>
          <div>Call-ID: <a moz-do-not-send="true"
              href="http://705605f129adbf5a38b5a0ff72de8f39@70.10.163.44:5060">705605f129adbf5a38b5a0ff72de8f39@70.10.163.44:5060</a>.</div>
          <div>CSeq: 2 BYE.</div>
          <div>Allow: INVITE, BYE, OPTIONS, CANCEL, ACK, REGISTER,
            NOTIFY, INFO, REFER, SUBSCRIBE, PRACK, UPDATE.</div>
          <div>Via: SIP/2.0/UDP
            108.59.2.133;branch=z9hG4bK2deb.8bfd0b06.0.</div>
          <div>Contact: &lt;<a moz-do-not-send="true"
              href="mailto:sip%3Acallee@108.59.2.133">sip:callee@108.59.2.133</a>;did=e9e.a6618961&gt;.</div>
          <div>Allow-Events: as-feature-event.</div>
          <div>Allow-Events: call-info.</div>
          <div>Allow-Events: presence.</div>
          <div>Allow-Events: line-seize.</div>
          <div>Allow-Events: dialog.</div>
          <div>Allow-Events: refer.</div>
          <div>Allow-Events: message-summary.</div>
          <div>Content-Length: 0.</div>
          <div>.</div>
          <div><br>
          </div>
          <div>Forcing RPORT: <a moz-do-not-send="true"
              href="mailto:sip%3A001110215178342008@sbc.voxbeam.com">sip:001110215178342008@sbc.voxbeam.com</a></div>
          <div><br>
          </div>
          <div>U 2013/04/09 12:17:06.989421 <a moz-do-not-send="true"
              href="http://192.168.2.5:5060">192.168.2.5:5060</a> -&gt;
            <a moz-do-not-send="true" href="http://108.59.2.133:5060">108.59.2.133:5060</a></div>
          <div>SIP/2.0 404 Not here.</div>
          <div>To: "1001" &lt;<a moz-do-not-send="true"
              href="mailto:sip%3A1001@70.10.163.44">sip:1001@70.10.163.44</a>&gt;;tag=as4b40d9b4.</div>
          <div>From: &lt;<a moz-do-not-send="true"
              href="mailto:sip%3A001110215178342008@sbc.voxbeam.com">sip:001110215178342008@sbc.voxbeam.com</a>&gt;;tag=3574513019-870807.</div>
          <div>Call-ID: <a moz-do-not-send="true"
              href="http://705605f129adbf5a38b5a0ff72de8f39@70.10.163.44:5060">705605f129adbf5a38b5a0ff72de8f39@70.10.163.44:5060</a>.</div>
          <div>CSeq: 2 BYE.</div>
          <div>Via: SIP/2.0/UDP
108.59.2.133;received=108.59.2.133;rport=5060;branch=z9hG4bK2deb.8bfd0b06.0.</div>
          <div>Content-Length: 0.</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div style="">Or is asterisk the&nbsp;culprit? Looking at the
            forwarded INVITE (on the asterisk server), I see that the RR
            has been re-written, as opposed to appended when contacting
            the provider:</div>
          <div style=""><br>
          </div>
          <div style=""><br>
          </div>
          <div style="">
            <div>U 2013/04/09 12:52:52.109611 <a moz-do-not-send="true"
                href="http://192.168.2.10:5060">192.168.2.10:5060</a>
              -&gt; <a moz-do-not-send="true"
                href="http://108.59.2.133:5060">108.59.2.133:5060</a></div>
            <div>INVITE <a moz-do-not-send="true"
                href="mailto:sip%3A001110215178342008@sbc.voxbeam.com">sip:001110215178342008@sbc.voxbeam.com</a>
              SIP/2.0.</div>
            <div>Via:
              SIP/2.0/UDP&nbsp;70.10.163.44:5060;branch=z9hG4bK75a764b9;rport.</div>
            <div>Max-Forwards: 70.</div>
            <div>From: "1001" &lt;<a moz-do-not-send="true"
                href="mailto:sip%3A1001@70.10.163.44">sip:1001@70.10.163.44</a>&gt;;tag=as234a7f7d.</div>
            <div>To: &lt;<a moz-do-not-send="true"
                href="mailto:sip%3A001110215178342008@sbc.voxbeam.com">sip:001110215178342008@sbc.voxbeam.com</a>&gt;.</div>
            <div>Contact: &lt;<a moz-do-not-send="true"
                href="http://sip:1001@70.10.163.44:5060">sip:1001@70.10.163.44:5060</a>&gt;.</div>
            <div>Call-ID: <a moz-do-not-send="true"
                href="http://5a5fb47111cadd6146746c4446a1790c@70.10.163.44:5060">5a5fb47111cadd6146746c4446a1790c@70.10.163.44:5060</a>.</div>
            <div>CSeq: 102 INVITE.</div>
            <div>User-Agent: Asterisk PBX
              UNKNOWN__and_probably_unsupported.</div>
            <div>Date: Tue, 09 Apr 2013 16:52:52 GMT.</div>
            <div>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER,
              SUBSCRIBE, NOTIFY, INFO, PUBLISH.</div>
            <div>Supported: replaces, timer.</div>
            <div>Content-Type: application/sdp.</div>
            <div>
              Content-Length: 310.</div>
            <div>.</div>
            <div>v=0.</div>
            <div>o=root 731333659 731333659 IN IP4 70.10.163.44.</div>
            <div>s=Asterisk PBX UNKNOWN__and_probably_unsupported.</div>
            <div>c=IN IP4 70.10.163.44.</div>
            <div>t=0 0.</div>
            <div>m=audio 30434 RTP/AVP 18 101.</div>
            <div>a=rtpmap:18 G729/8000.</div>
            <div>a=fmtp:18 annexb=no.</div>
            <div>a=rtpmap:101 telephone-event/8000.</div>
            <div>a=fmtp:101 0-16.</div>
            <div>a=silenceSupp:off - - - -.</div>
            <div>a=ptime:20.</div>
            <div>a=sendrecv.</div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div style="">Can we get an externally initiated BYE working
              in an OpenSIPS-&gt;Asterisk integration? If so, some
              suggestions would be appreciated. Maybe just really the
              non-loose route BYE to asterisk?</div>
            <div style="">Is adding topology hiding functionality
              a&nbsp;cumbersome&nbsp;task...</div>
            <div style=""><br>
            </div>
            <div style="">Thanks in Advance,</div>
            <div style=""><br>
            </div>
            <div style="">N.</div>
            <div><br>
            </div>
          </div>
        </div>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
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>
  </body>
</html>