<!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>Nick,<br>
      <br>
      I do not know what is the topology of your SIP network, but the
      idea is that the BYE received by OpenSIPS does not contain proper
      routing information - now, either the BYE was wrongly generated by
      the end point, either it was wrongly changed on the way (if there
      are more hops between that end point and 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>
    <br>
    On 04/09/2013 09:23 PM, Nick Khamis wrote:
    <blockquote
cite="mid:CAGWRaZY2Ua9baP7uzS+Z++tnKHGZDZb+-Ujw-6R1SKrcTNMQnQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">On Tue, Apr 9, 2013 at 1:22 PM, Bogdan-Andrei Iancu
        <span dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span>
        wrote:<br>
        <div class="gmail_extra">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
              0.8ex; border-left: 1px solid rgb(204, 204, 204);
              padding-left: 1ex;">
              <div 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 cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                <div>
                  <div class="h5"> <br>
                    On 04/09/2013 08:05 PM, Nick Khamis wrote: </div>
                </div>
                <blockquote type="cite">
                  <div>
                    <div class="h5">
                      <div dir="ltr">Hello Everyone,
                        <div><br>
                        </div>
                        <div>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"
                            target="_blank">http://www.mail-archive.com/users@lists.opensips.org/msg23052.html</a></div>
                        <div><br>
                        </div>
                        <div>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><br>
                        </div>
                        <div><a moz-do-not-send="true"
                            href="http://192.168.2.5" target="_blank">192.168.2.5</a>:
                          OpenSIPS</div>
                        <div><a moz-do-not-send="true"
                            href="http://192.168.2.10" target="_blank">192.168.2.10</a>:
                          Asterisk</div>
                        <div><a moz-do-not-send="true"
                            href="http://70.10.163.44" target="_blank">70.10.163.44</a>:
                          Public IP<br>
                        </div>
                        <div><a moz-do-not-send="true"
                            href="http://108.59.2.133" target="_blank">108.59.2.133</a>:
                          Service Provider<br>
                        </div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div>
                          <div>U 2013/04/09 12:17:02.920454 <a
                              moz-do-not-send="true"
                              href="http://192.168.2.10:5060"
                              target="_blank">192.168.2.10:5060</a>
                            -&gt; <a moz-do-not-send="true"
                              href="http://192.168.2.5:5060"
                              target="_blank">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 moz-do-not-send="true">&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"
                              target="_blank">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"
                              target="_blank">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"
                              target="_blank">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"
                              target="_blank">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"
                              target="_blank">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"
                              target="_blank">192.168.2.5:5060</a> -&gt;
                            <a moz-do-not-send="true"
                              href="http://192.168.2.11:5060"
                              target="_blank">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 moz-do-not-send="true">&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"
                              target="_blank">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"
                              target="_blank">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"
                              target="_blank">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"
                              target="_blank">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"
                              target="_blank">108.59.2.133:5060</a>
                            -&gt; <a moz-do-not-send="true"
                              href="http://192.168.2.5:5060"
                              target="_blank">192.168.2.5:5060</a></div>
                          <div>BYE <a moz-do-not-send="true"
                              href="http://sip:1001@70.10.163.44:5060"
                              target="_blank">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"
                              target="_blank">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"
                              target="_blank">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"
                              target="_blank">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"
                              target="_blank">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" target="_blank">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"
                              target="_blank">192.168.2.5:5060</a> -&gt;
                            <a moz-do-not-send="true"
                              href="http://108.59.2.133:5060"
                              target="_blank">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"
                              target="_blank">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"
                              target="_blank">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"
                              target="_blank">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>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><br>
                          </div>
                          <div><br>
                          </div>
                          <div>
                            <div>U 2013/04/09 12:52:52.109611 <a
                                moz-do-not-send="true"
                                href="http://192.168.2.10:5060"
                                target="_blank">192.168.2.10:5060</a>
                              -&gt; <a moz-do-not-send="true"
                                href="http://108.59.2.133:5060"
                                target="_blank">108.59.2.133:5060</a></div>
                            <div>INVITE <a moz-do-not-send="true"
                                href="mailto:sip%3A001110215178342008@sbc.voxbeam.com"
                                target="_blank">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"
                                target="_blank">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"
                                target="_blank">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"
                                target="_blank">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"
                                target="_blank">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>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>Is adding topology hiding functionality
                              a&nbsp;cumbersome&nbsp;task...</div>
                            <div><br>
                            </div>
                            <div>Thanks in Advance,</div>
                            <div><br>
                            </div>
                            <div>N.</div>
                            <div><br>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                  <pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                </blockquote>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
        <div class="gmail_extra"><br>
        </div>
        <div class="gmail_extra" style="">Is our asterisk server not
          relaying the RR along with the INVITE? If so, can we configure
          the PBX to do so using one of it's variables? * Mailing list
          CC'ed in this email...</div>
        <div class="gmail_extra" style=""><br>
        </div>
        <div class="gmail_extra" style=""><br>
        </div>
        <div class="gmail_extra" style="">N.</div>
      </div>
    </blockquote>
  </body>
</html>