<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Be sure you checked the two types of ack requests: hop-by-hop (for
    negative replies, where the contact is not important at all) and
    end-to-end (which is for a 200ok).<br>
    <br>
    Also, even not required by rfc, some UA implementations can be
    broken.<br>
    <br>
    Anyhow, if you tested and doesn't help, I would try to use
    record_route() for ACK. If that doesn't help, you will need the help
    of the provider to tell you why it doesn't send the BYE.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 05/09/14 12:55, Yuriy Gorlichenko
      wrote:<br>
    </div>
    <blockquote
cite="mid:CABSP_VeLbLjkVQOKohmsOjGwdHm3fBMsgBQpDtuV1rwvxDaA7w@mail.gmail.com"
      type="cite">
      <div dir="ltr">RFC not specified Contack header at ACK... So
        anyway I already tried it yesterday))  Unsuccessfull...</div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">2014-09-05 12:54 GMT+04:00
          Daniel-Constantin Mierla <span dir="ltr"><<a
              moz-do-not-send="true" href="mailto:miconda@gmail.com"
              target="_blank">miconda@gmail.com</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> Hello,<br>
              <br>
              I noticed that the ACK is missing the Contact header --
              not sure if specs mention anything about being mandatory
              or not, but you can try to get the contact there.<br>
              <br>
              Cheers,<br>
              Daniel
              <div>
                <div class="h5"><br>
                  <br>
                  <div>On 05/09/14 08:37, Yuriy Gorlichenko wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <div dir="ltr">Hello All. I have kamailio with
                      provider connection (trunk)<br>
                      When I call to external number through my provider
                      call extablished Ok. But when i try hangup call
                      from external number no BYE sended to me. When I
                      hangup call from my kamailio (internal num) I send
                      by to exteral number and it respond me Ok so
                      session if fully complete. I guess that BYE from
                      external number not recieves to me because I have
                      wrong routing header fields at my INVITe  or ACK
                      messages, but can not find any information what
                      what header must recieve info to external number
                      where send BYE at hangup or thomething like this. <br>
                      <br>
                      This is my little dump for situation wherer I
                      hangup from internal number and BYE finished
                      successfully:<br>
                      <br>
                      <br>
                      <br>
                      <div>
                        <div>IP my.kamailio.com.5068 >
                          my.proider.com.5060: UDP, length 1599</div>
                        <div>E....< .@.'.</div>
                        <div>...6........G.RINVITE <a
                            moz-do-not-send="true"
                            href="http://sip:12345678900@my.provider.com:5060"
                            target="_blank">sip:12345678900@my.provider.com:5060</a>
                          SIP/2.0</div>
                        <div>Record-Route: <a moz-do-not-send="true"><sip:my.kamailio.com:5068;nat=yes;ftag=as5872f19e;lr=on></a></div>
                        <div>Via: SIP/2.0/UDP
my.kamailio.com:5068;branch=z9hG4bK5c63.57e9ba848fadd4e228caa4445baf9d76.2</div>
                        <div>Via: SIP/2.0/UDP
                          my.client.internal.ip:50600;branch=z9hG4bK4d90cebf;rport=50600</div>
                        <div>Max-Forwards: 70</div>
                        <div>From: <<a moz-do-not-send="true"
                            href="mailto:sip%3ATrunkNum@my.provider.com"
                            target="_blank">sip:TrunkNum@my.provider.com</a>>;tag=as5872f19e</div>
                        <div>To: <<a moz-do-not-send="true"
                            href="http://sip:12345678900@my.provider.com:5068"
                            target="_blank">sip:12345678900@my.provider.com:5068</a>></div>
                        <div>Contact:<<a moz-do-not-send="true"
                            href="http://TrunkNum@my.kamailio.com:5068"
                            target="_blank">TrunkNum@my.kamailio.com:5068</a>></div>
                        <div>Call-ID: <a moz-do-not-send="true"
href="mailto:42b819d45c08c9d304343bf976c5b405@my.client.internal.ip:50600"
                            target="_blank">42b819d45c08c9d304343bf976c5b405@my.client.internal.ip:50600</a></div>
                        <div>CSeq: 102 INVITE</div>
                        <div>User-Agent: Asterisk PBX 12.5.0</div>
                        <div>Date: Thu, 04 Sep 2014 21:53:13 GMT</div>
                        <div>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE,
                          REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH,
                          MESSAGE</div>
                        <div>Supported: replaces, timer</div>
                        <div>Content-Type: application/sdp</div>
                        <div>Content-Length: 544</div>
                        <div>Proxy-Authorization: Digest
                          username="TrunkNum", realm="<a
                            moz-do-not-send="true"
                            href="http://my.provider.com"
                            target="_blank">my.provider.com</a>",
                          nonce="VAjgfVQI31EsekTXtYjBzKa59XFSJB5P",
                          uri="<a moz-do-not-send="true"
                            href="http://sip:12345678900@my.provider.com:5060"
                            target="_blank">sip:12345678900@my.provider.com:5060</a>",

                          qop=auth, nc=00000001, cnonce="3619116795",
                          response="f5bc1d8125dd9e448d2e73764823adee",
                          algorithm=MD5</div>
                        <div><br>
                        </div>
                        <div>v=0</div>
                        <div>o=root 1022912010 1022912010 IN IP4 <a
                            moz-do-not-send="true"
                            href="http://my.kamailio.com"
                            target="_blank">my.kamailio.com</a></div>
                        <div>s=Asterisk PBX 12.5.0</div>
                        <div>c=IN IP4 <a moz-do-not-send="true"
                            href="http://my.kamailio.com"
                            target="_blank">my.kamailio.com</a></div>
                        <div>t=0 0</div>
                        <div>a=ice-lite</div>
                        <div>m=audio 30032 RTP/AVP 0 3 8 101</div>
                        <div>a=rtpmap:0 PCMU/8000</div>
                        <div>a=rtpmap:3 GSM/8000</div>
                        <div>a=rtpmap:8 PCMA/8000</div>
                        <div>a=rtpmap:101 telephone-event/8000</div>
                        <div>a=fmtp:101 0-16</div>
                        <div>a=ptime:20</div>
                        <div>a=maxptime:150</div>
                        <div>a=sendrecv</div>
                        <div>a=rtcp:30033</div>
                        <div>a=ice-ufrag:3o8JrqkF</div>
                        <div>a=ice-pwd:m8q4khQT8NKSABqeUkKs7ed8ClR2</div>
                        <div>a=candidate:TgT1dfTnI3kBgWQ</div>
                        <div><br>
                        </div>
                        <div>IP my.proider.com.5060 >
                          my.kamailio.com.5068: UDP, length 1882</div>
                        <div>E..... ./...6...</div>
                        <div>........b..SIP/2.0 200 OK</div>
                        <div>Via: SIP/2.0/UDP
                          my.kamailio.com:5068;rport=5068;received=<a
                            moz-do-not-send="true"
                            href="http://my.kamailio.com"
                            target="_blank">my.kamailio.com</a>;branch=z9hG4bK5c63.57e9ba848fadd4e228caa4445baf9d76.2</div>
                        <div>Via: SIP/2.0/UDP
                          my.client.internal.ip:50600;branch=z9hG4bK4d90cebf;rport=50600</div>
                        <div>Record-Route: <sip:<a
                            moz-do-not-send="true"
                            href="http://my.proider.com" target="_blank">my.proider.com</a>;lr=on;ftag=as5872f19e></div>
                        <div>Record-Route: <a moz-do-not-send="true"><sip:my.kamailio.com:5068;nat=yes;ftag=as5872f19e;lr=on></a></div>
                        <div>From: <<a moz-do-not-send="true"
                            href="mailto:sip%3ATrunkNum@my.provider.com"
                            target="_blank">sip:TrunkNum@my.provider.com</a>>;tag=as5872f19e</div>
                        <div>To: <<a moz-do-not-send="true"
                            href="http://sip:12345678900@my.provider.com:5068"
                            target="_blank">sip:12345678900@my.provider.com:5068</a>>;tag=5rF0FNamQ99gH</div>
                        <div>Call-ID: <a moz-do-not-send="true"
href="mailto:42b819d45c08c9d304343bf976c5b405@my.client.internal.ip:50600"
                            target="_blank">42b819d45c08c9d304343bf976c5b405@my.client.internal.ip:50600</a></div>
                        <div>CSeq: 102 INVITE</div>
                        <div>Contact: <a moz-do-not-send="true"><sip:12345678900@externail.number.end.ip:5060;transport=udp></a></div>
                        <div>User-Agent: provider agent</div>
                        <div>Allow: INVITE, ACK, BYE, CANCEL, OPTIONS,
                          MESSAGE, INFO, UPDATE, REFER, NOTIFY</div>
                        <div>Supported: timer, precondition, path,
                          replaces</div>
                        <div>Allow-Events: talk, hold, conference, refer</div>
                        <div>Content-Type: application/sdp</div>
                        <div>Content-Disposition: session</div>
                        <div>Content-Length: 746</div>
                        <div>X-provider agentOutboundGateway: <a
                            moz-do-not-send="true"
                            href="mailto:sip%3A5574012345678900@62.93.147.149"
                            target="_blank">sip:5574012345678900@62.93.147.149</a></div>
                        <div>X-provider agentOutboundCarrierID:
                          23705946361020</div>
                        <div>X-provider agentCarrierRate: 0.20180</div>
                        <div>X-provider agentCloudRate: 0.00300</div>
                        <div>Remote-Party-ID: "Outbound Call" <<a
                            moz-do-not-send="true"
                            href="mailto:sip%3A5060@my.provider.com"
                            target="_blank">sip:5060@my.provider.com</a>>;party=calling;privacy=off;screen=no</div>
                        <div><br>
                        </div>
                        <div>v=0</div>
                        <div>o=FreeSWITCH 1409844386 1409844387 IN IP4
                          externail.number.end.ip</div>
                        <div>s=FreeSWITCH</div>
                        <div>c=IN IP4 externail.number.end.ip</div>
                        <div>t=0 0</div>
                        <div>a=msid-semantic: WMS
                          hQBNQPw0VjJInvOA0H6HPZyePNO0IIqP</div>
                        <div>m=audio 23216 RTP/AVP 0 101</div>
                        <div>a=rtpmap:0 PCMU/8000</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=ssrc:2990874569 cname:pRs5xP</div>
                        <div><br>
                        </div>
                        <div> </div>
                        <div><br>
                        </div>
                        <div> </div>
                        <div><br>
                        </div>
                        <div>IP my.kamailio.com.5068 >
                          my.proider.com.5060: UDP, length 596</div>
                        <div><a moz-do-not-send="true"
                            href="mailto:E..p.@..@.K%5C" target="_blank">E..p.@..@.K\</a></div>
                        <div>...6........\`.ACK <a
                            moz-do-not-send="true">sip:12345678900@externail.number.end.ip:5060;transport=udp</a>
                          SIP/2.0</div>
                        <div>Via: SIP/2.0/UDP
my.kamailio.com:5068;branch=z9hG4bK5c63.8c0bfc7de0669f1b8252b97b8431b2e1.0</div>
                        <div>Via: SIP/2.0/UDP
                          my.client.internal.ip:50600;branch=z9hG4bK5420b559;rport=50600</div>
                        <div>Route: <sip:<a moz-do-not-send="true"
                            href="http://my.proider.com" target="_blank">my.proider.com</a>;lr=on;ftag=as5872f19e></div>
                        <div>Max-Forwards: 70</div>
                        <div>From: <<a moz-do-not-send="true"
                            href="mailto:sip%3ATrunkNum@sip.callsion.com"
                            target="_blank">sip:TrunkNum@sip.callsion.com</a>>;tag=as5872f19e</div>
                        <div>To: <<a moz-do-not-send="true"
                            href="http://sip:12345678900@my.provider.com:5068"
                            target="_blank">sip:12345678900@my.provider.com:5068</a>>;tag=5rF0FNamQ99gH</div>
                        <div>Call-ID: <a moz-do-not-send="true"
href="mailto:42b819d45c08c9d304343bf976c5b405@my.client.internal.ip:50600"
                            target="_blank">42b819d45c08c9d304343bf976c5b405@my.client.internal.ip:50600</a></div>
                        <div>CSeq: 102 ACK</div>
                        <div>User-Agent: Asterisk PBX 12.5.0</div>
                        <div>Content-Length: 0</div>
                        <div><br>
                        </div>
                        <div> </div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div> </div>
                        <div><br>
                        </div>
                        <div> </div>
                        <div><br>
                        </div>
                        <div>IP my.kamailio.com.5068 >
                          my.proider.com.5060: UDP, length 617</div>
                        <div><a moz-do-not-send="true"
                            href="mailto:E....D..@.KC" target="_blank">E....D..@.KC</a></div>
                        <div>...6........q.ZBYE <a
                            moz-do-not-send="true">sip:12345678900@externail.number.end.ip:5060;transport=udp</a>
                          SIP/2.0</div>
                        <div>Via: SIP/2.0/UDP
my.kamailio.com:5068;branch=z9hG4bK6c63.3deda3c1fee0ef86d7eae9549dd1b194.0</div>
                        <div>Via: SIP/2.0/UDP
                          my.client.internal.ip:50600;branch=z9hG4bK65e48b85;rport=50600</div>
                        <div>Route: <sip:<a moz-do-not-send="true"
                            href="http://my.proider.com" target="_blank">my.proider.com</a>;lr=on;ftag=as5872f19e></div>
                        <div>Max-Forwards: 70</div>
                        <div>From: <<a moz-do-not-send="true"
                            href="mailto:sip%3ATrunkNum@sip.callsion.com"
                            target="_blank">sip:TrunkNum@sip.callsion.com</a>>;tag=as5872f19e</div>
                        <div>To: <<a moz-do-not-send="true"
                            href="http://sip:12345678900@my.provider.com:5068"
                            target="_blank">sip:12345678900@my.provider.com:5068</a>>;tag=5rF0FNamQ99gH</div>
                        <div>Call-ID: <a moz-do-not-send="true"
href="mailto:42b819d45c08c9d304343bf976c5b405@my.client.internal.ip:50600"
                            target="_blank">42b819d45c08c9d304343bf976c5b405@my.client.internal.ip:50600</a></div>
                        <div>CSeq: 103 BYE</div>
                        <div>User-Agent: Asterisk PBX 12.5.0</div>
                        <div>X-Asterisk-HangupCause: Normal Clearing</div>
                        <div>X-Asterisk-HangupCauseCode: 16</div>
                        <div>Content-Length: 0</div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div>IP my.proider.com.5060 >
                          my.kamailio.com.5068: UDP, length 568</div>
                        <div>E..T....-.676...</div>
                        <div>........@..SIP/2.0 200 OK</div>
                        <div>Via: SIP/2.0/UDP
                          my.kamailio.com:5068;received=<a
                            moz-do-not-send="true"
                            href="http://my.kamailio.com"
                            target="_blank">my.kamailio.com</a>;branch=z9hG4bK6c63.3deda3c1fee0ef86d7eae9549dd1b194.0</div>
                        <div>Via: SIP/2.0/UDP
                          my.client.internal.ip:50600;branch=z9hG4bK65e48b85;rport=50600</div>
                        <div>From: <<a moz-do-not-send="true"
                            href="mailto:sip%3ATrunkNum@sip.callsion.com"
                            target="_blank">sip:TrunkNum@sip.callsion.com</a>>;tag=as5872f19e</div>
                        <div>To: <<a moz-do-not-send="true"
                            href="http://sip:12345678900@my.provider.com:5068"
                            target="_blank">sip:12345678900@my.provider.com:5068</a>>;tag=5rF0FNamQ99gH</div>
                        <div>Call-ID: <a moz-do-not-send="true"
href="mailto:42b819d45c08c9d304343bf976c5b405@my.client.internal.ip:50600"
                            target="_blank">42b819d45c08c9d304343bf976c5b405@my.client.internal.ip:50600</a></div>
                        <div>CSeq: 103 BYE</div>
                        <div>User-Agent: provider agent</div>
                        <div>Allow: INVITE, ACK, BYE, CANCEL, OPTIONS,
                          MESSAGE, INFO, UPDATE, REFER, NOTIFY</div>
                        <div>Supported: timer, precondition, path,
                          replaces</div>
                        <div>Content-Length: 0<br>
                          <br>
                          <br>
                          <br>
                          <br>
                          Thanks for help.</div>
                      </div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre>
                <span class="HOEnZb"><font color="#888888"> </font></span></blockquote>
              <span class="HOEnZb"><font color="#888888"> <br>
                  <pre cols="72">-- 
Daniel-Constantin Mierla
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Next Kamailio Advanced Trainings 2014 - <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
Sep 22-25, Berlin, Germany</pre>
                </font></span></div>
            <br>
            _______________________________________________<br>
            SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
            mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
              target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Next Kamailio Advanced Trainings 2014 - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Sep 22-25, Berlin, Germany</pre>
  </body>
</html>