[Freeswitch-users] Asterisk and Freeswitch: Destination keeps ringing when caller cancels calls

Alfonso Pinto elhodred at gmail.com
Wed Apr 1 15:36:28 PDT 2009


Hi guys,

I've using asterisk as PSTN gateway. When a call arrives from PSTN, I
send the call to freeswitch and this route the call to a SIP gateway.

When caller cancels the  call (hangups before callee answers), I get
this on asterisk CLI:

chan_sip.c:13056 handle_response: Remote host can't match request
CANCEL to call '271c0dad41cc80456b8de2133dc80b2e at 1.1.1.1'. Giving up.

I'm using asterisk 1.4.23.1 and freeswitch 1.0.3

This is the sip call flow:

u 2009/04/01 21:59:26.402934 2.2.2.2:5060 -> 1.1.1.1:5060
INVITE sip:666666666 at 1.1.1.1 SIP/2.0.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bK2707ceb1;rport.
From: "999999999" <sip:999999999 at 1.1.1.1>;tag=as26208773.
To: <sip:666666666 at 1.1.1.1>.
Contact: <sip:999999999 at 2.2.2.2>.
Call-ID: 271c0dad41cc80456b8de2133dc80b2e at 1.1.1.1.
CSeq: 102 INVITE.
User-Agent: Asterisk PBX.
Max-Forwards: 70.
Date: Wed, 01 Apr 2009 21:03:12 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY.
Supported: replaces.
Content-Type: application/sdp.
Content-Length: 265.
.
v=0.
o=root 29347 29347 IN IP4 2.2.2.2.
s=session.
c=IN IP4 2.2.2.2.
t=0 0.
m=audio 13846 RTP/AVP 18 101.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=no.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.
a=sendrecv.


U 2009/04/01 21:59:26.403717 1.1.1.1:5060 -> 2.2.2.2:5060
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bK2707ceb1;rport=5060.
From: "999999999" <sip:999999999 at 1.1.1.1>;tag=as26208773.
To: <sip:666666666 at 1.1.1.1>.
Call-ID: 271c0dad41cc80456b8de2133dc80b2e at 1.1.1.1.
CSeq: 102 INVITE.
User-Agent: FreeSWITCH-mod_sofia/1.0.3-hacked.
Content-Length: 0.
.


U 2009/04/01 21:59:26.414810 1.1.1.1:5060 -> 2.2.2.2:5060
SIP/2.0 407 Proxy Authentication Required.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bK2707ceb1;rport=5060.
From: "999999999" <sip:999999999 at 1.1.1.1>;tag=as26208773.
To: <sip:666666666 at 1.1.1.1>;tag=ceKFmNU84B90c.
Call-ID: 271c0dad41cc80456b8de2133dc80b2e at 1.1.1.1.
CSeq: 102 INVITE.
User-Agent: FreeSWITCH-mod_sofia/1.0.3-hacked.
Accept: application/sdp.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE,
NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH.
Supported: timer, precondition, path, replaces.
Allow-Events: talk, presence, dialog, call-info, sla,
include-session-description, presence.winfo, message-summary, refer.
Proxy-Authenticate: Digest realm="1.1.1.1",
nonce="5df21692-1f08-11de-9d06-83e4a6e70df7", algorithm=MD5,
qop="auth".
Content-Length: 0.
.


U 2009/04/01 21:59:26.415395 2.2.2.2:5060 -> 1.1.1.1:5060
ACK sip:666666666 at 1.1.1.1 SIP/2.0.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bK2707ceb1;rport.
From: "999999999" <sip:999999999 at 1.1.1.1>;tag=as26208773.
To: <sip:666666666 at 1.1.1.1>;tag=ceKFmNU84B90c.
Contact: <sip:999999999 at 2.2.2.2>.
Call-ID: 271c0dad41cc80456b8de2133dc80b2e at 1.1.1.1.
CSeq: 102 ACK.
User-Agent: Asterisk PBX.
Max-Forwards: 70.
Content-Length: 0.
.


U 2009/04/01 21:59:26.415648 2.2.2.2:5060 -> 1.1.1.1:5060
INVITE sip:666666666 at 1.1.1.1 SIP/2.0.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bK176746ff;rport.
From: "999999999" <sip:999999999 at 1.1.1.1>;tag=as26208773.
To: <sip:666666666 at 1.1.1.1>.
Contact: <sip:999999999 at 2.2.2.2>.
Call-ID: 271c0dad41cc80456b8de2133dc80b2e at 1.1.1.1.
CSeq: 103 INVITE.
User-Agent: Asterisk PBX.
Max-Forwards: 70.
Proxy-Authorization: Digest username="asterisk02", realm="1.1.1.1",
algorithm=MD5, uri="sip:666666666 at 1.1.1.1",
nonce="5df21692-1f08-11de-9d06-83e4a6e70df7",
response="cb57576192b001f79bd03ebb8bb57d0a", qop=auth,
cnonce="47efcad4", nc=00000001.
Date: Wed, 01 Apr 2009 21:03:12 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY.
Supported: replaces.
Content-Type: application/sdp.
Content-Length: 265.
.
v=0.
o=root 29347 29348 IN IP4 2.2.2.2.
s=session.
c=IN IP4 2.2.2.2.
t=0 0.
m=audio 13846 RTP/AVP 18 101.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=no.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.
a=sendrecv.


U 2009/04/01 21:59:26.416181 1.1.1.1:5060 -> 2.2.2.2:5060
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bK176746ff;rport=5060.
From: "999999999" <sip:999999999 at 1.1.1.1>;tag=as26208773.
To: <sip:666666666 at 1.1.1.1>.
Call-ID: 271c0dad41cc80456b8de2133dc80b2e at 1.1.1.1.
CSeq: 103 INVITE.
User-Agent: FreeSWITCH-mod_sofia/1.0.3-hacked.
Content-Length: 0.
.


U 2009/04/01 21:59:26.426298 1.1.1.1:5060 -> 3.3.3.3:5060
INVITE sip:666666666 at 3.3.3.3 SIP/2.0.
Via: SIP/2.0/UDP 1.1.1.1;rport;branch=z9hG4bKr8XpNg0cgpSSB.
Max-Forwards: 69.
From: "999999999" <sip:559066555 at 3.3.3.3;transport=udp>;tag=e050QBXFZXN6K.
To: <sip:666666666 at 3.3.3.3>.
Call-ID: 5df4fd12-1f08-11de-9d06-83e4a6e70df7.
CSeq: 113193247 INVITE.
Contact: <sip:gw+primus at 1.1.1.1:5060;transport=udp>.
User-Agent: FreeSWITCH-mod_sofia/1.0.3-hacked.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE,
NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH.
Supported: timer, precondition, path, replaces.
Allow-Events: talk, presence, dialog, call-info, sla,
include-session-description, presence.winfo, message-summary, refer.
Content-Type: application/sdp.
Content-Disposition: session.
Content-Length: 387.
Remote-Party-ID: "999999999" <sip:999999999 at 3.3.3.3>;screen=yes;privacy=off.
.
v=0.
o=FreeSWITCH 1342987860622345384 4847837355494891206 IN IP4 1.1.1.1.
s=FreeSWITCH.
c=IN IP4 1.1.1.1.
t=0 0.
m=audio 31050 RTP/AVP 18 4 3 9 0 8 101 13.
a=rtpmap:18 G729/8000.
a=rtpmap:4 G723/8000.
a=rtpmap:3 GSM/8000.
a=rtpmap:9 G722/8000.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=rtpmap:13 CN/8000.
a=ptime:20.


U 2009/04/01 21:59:26.505833 3.3.3.3:5060 -> 1.1.1.1:5060
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP 1.1.1.1;rport;branch=z9hG4bKr8XpNg0cgpSSB.
From: "999999999" <sip:559066555 at 3.3.3.3;transport=udp>;tag=e050QBXFZXN6K.
To: <sip:666666666 at 3.3.3.3>;tag=731C8E54-1862.
Date: Fri, 05 Jan 2001 07:46:57 GMT.
Call-ID: 5df4fd12-1f08-11de-9d06-83e4a6e70df7.
Server: Cisco-SIPGateway/IOS-12.x.
CSeq: 113193247 INVITE.
Allow-Events: telephone-event.
Content-Length: 0.
.


U 2009/04/01 21:59:40.281136 3.3.3.3:5060 -> 1.1.1.1:5060
SIP/2.0 183 Session Progress.
Via: SIP/2.0/UDP 1.1.1.1;rport;branch=z9hG4bKr8XpNg0cgpSSB.
From: "999999999" <sip:559066555 at 3.3.3.3;transport=udp>;tag=e050QBXFZXN6K.
To: <sip:666666666 at 3.3.3.3>;tag=731C8E54-1862.
Date: Fri, 05 Jan 2001 07:46:57 GMT.
Call-ID: 5df4fd12-1f08-11de-9d06-83e4a6e70df7.
Server: Cisco-SIPGateway/IOS-12.x.
CSeq: 113193247 INVITE.
Allow-Events: telephone-event.
Contact: <sip:666666666 at 3.3.3.3:5060>.
Content-Disposition: session;handling=required.
Content-Type: application/sdp.
Content-Length: 300.
.
v=0.
o=CiscoSystemsSIP-GW-UserAgent 6896 7915 IN IP4 3.3.3.3.
s=SIP Call.
c=IN IP4 3.3.3.3.
t=0 0.
m=audio 19398 RTP/AVP 18 13 101.
c=IN IP4 3.3.3.3.
a=rtpmap:18 G729/8000.
a=rtpmap:13 CN/8000.
a=fmtp:18 annexb=no.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:40.


U 2009/04/01 21:59:40.325170 1.1.1.1:5060 -> 2.2.2.2:5060
SIP/2.0 183 Session Progress.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bK176746ff;rport=5060.
From: "999999999" <sip:999999999 at 1.1.1.1>;tag=as26208773.
To: <sip:666666666 at 1.1.1.1>;tag=DQc8Ngcc2mZKr.
Call-ID: 271c0dad41cc80456b8de2133dc80b2e at 1.1.1.1.
CSeq: 103 INVITE.
Contact: <sip:mod_sofia at 1.1.1.1:5060;transport=udp>.
User-Agent: FreeSWITCH-mod_sofia/1.0.3-hacked.
Accept: application/sdp.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE,
NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH.
Supported: timer, precondition, path, replaces.
Allow-Events: talk, presence, dialog, call-info, sla,
include-session-description, presence.winfo, message-summary, refer.
Content-Type: application/sdp.
Content-Disposition: session.
Content-Length: 292.
.
v=0.
o=FreeSWITCH 2480261112724725981 6822082830258713617 IN IP4 1.1.1.1.
s=FreeSWITCH.
c=IN IP4 1.1.1.1.
t=0 0.
m=audio 20620 RTP/AVP 18 101.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=no.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.


U 2009/04/01 21:59:44.342267 2.2.2.2:5060 -> 1.1.1.1:5060
CANCEL sip:666666666 at 1.1.1.1 SIP/2.0.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bK3912e266;rport.
From: "999999999" <sip:999999999 at 1.1.1.1>;tag=as26208773.
To: <sip:666666666 at 1.1.1.1>.
Call-ID: 271c0dad41cc80456b8de2133dc80b2e at 1.1.1.1.
CSeq: 103 CANCEL.
User-Agent: Asterisk PBX.
Max-Forwards: 70.
Content-Length: 0.
.


U 2009/04/01 21:59:44.342568 1.1.1.1:5060 -> 2.2.2.2:5060
SIP/2.0 481 Call/Transaction Does Not Exist.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bK3912e266;rport=5060.
From: "999999999" <sip:999999999 at 1.1.1.1>;tag=as26208773.
To: <sip:666666666 at 1.1.1.1>;tag=DQc8Ngcc2mZKr.
Call-ID: 271c0dad41cc80456b8de2133dc80b2e at 1.1.1.1.
CSeq: 103 CANCEL.
Content-Length: 0.
.


U 2009/04/01 22:00:01.758748 3.3.3.3:5060 -> 1.1.1.1:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 1.1.1.1;rport;branch=z9hG4bKr8XpNg0cgpSSB.
From: "999999999" <sip:559066555 at 3.3.3.3;transport=udp>;tag=e050QBXFZXN6K.
To: <sip:666666666 at 3.3.3.3>;tag=731C8E54-1862.
Date: Fri, 05 Jan 2001 07:46:57 GMT.
Call-ID: 5df4fd12-1f08-11de-9d06-83e4a6e70df7.
Server: Cisco-SIPGateway/IOS-12.x.
CSeq: 113193247 INVITE.
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER,
SUBSCRIBE, NOTIFY, INFO.
Allow-Events: telephone-event.
Contact: <sip:666666666 at 3.3.3.3:5060>.
Content-Type: application/sdp.
Content-Length: 300.
.
v=0.
o=CiscoSystemsSIP-GW-UserAgent 6896 7915 IN IP4 3.3.3.3.
s=SIP Call.
c=IN IP4 3.3.3.3.
t=0 0.
m=audio 19398 RTP/AVP 18 13 101.
c=IN IP4 3.3.3.3.
a=rtpmap:18 G729/8000.
a=rtpmap:13 CN/8000.
a=fmtp:18 annexb=no.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:40.


U 2009/04/01 22:00:01.759460 1.1.1.1:5060 -> 3.3.3.3:5060
ACK sip:666666666 at 3.3.3.3:5060 SIP/2.0.
Via: SIP/2.0/UDP 1.1.1.1;rport;branch=z9hG4bKttg8r61Ka85yj.
Max-Forwards: 70.
From: "999999999" <sip:559066555 at 3.3.3.3;transport=udp>;tag=e050QBXFZXN6K.
To: <sip:666666666 at 3.3.3.3>;tag=731C8E54-1862.
Call-ID: 5df4fd12-1f08-11de-9d06-83e4a6e70df7.
CSeq: 113193247 ACK.
Contact: <sip:gw+primus at 1.1.1.1:5060;transport=udp>.
Content-Length: 0.
.


U 2009/04/01 22:00:01.779058 1.1.1.1:5060 -> 2.2.2.2:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bK176746ff;rport=5060.
From: "999999999" <sip:999999999 at 1.1.1.1>;tag=as26208773.
To: <sip:666666666 at 1.1.1.1>;tag=DQc8Ngcc2mZKr.
Call-ID: 271c0dad41cc80456b8de2133dc80b2e at 1.1.1.1.
CSeq: 103 INVITE.
Contact: <sip:mod_sofia at 1.1.1.1:5060;transport=udp>.
User-Agent: FreeSWITCH-mod_sofia/1.0.3-hacked.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE,
NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH.
Supported: timer, precondition, path, replaces.
Allow-Events: talk, presence, dialog, call-info, sla,
include-session-description, presence.winfo, message-summary, refer.
Content-Type: application/sdp.
Content-Disposition: session.
Content-Length: 292.
.
v=0.
o=FreeSWITCH 2480261112724725981 6822082830258713617 IN IP4 1.1.1.1.
s=FreeSWITCH.
c=IN IP4 1.1.1.1.
t=0 0.
m=audio 20620 RTP/AVP 18 101.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=no.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.


U 2009/04/01 22:00:01.780198 2.2.2.2:5060 -> 1.1.1.1:5060
ACK sip:mod_sofia at 1.1.1.1:5060;transport=udp SIP/2.0.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bK3de2cb0a;rport.
From: "999999999" <sip:999999999 at 1.1.1.1>;tag=as26208773.
To: <sip:666666666 at 1.1.1.1>;tag=DQc8Ngcc2mZKr.
Contact: <sip:999999999 at 2.2.2.2>.
Call-ID: 271c0dad41cc80456b8de2133dc80b2e at 1.1.1.1.
CSeq: 103 ACK.
User-Agent: Asterisk PBX.
Max-Forwards: 70.
Content-Length: 0.
.


U 2009/04/01 22:00:01.780214 2.2.2.2:5060 -> 1.1.1.1:5060
BYE sip:mod_sofia at 1.1.1.1:5060;transport=udp SIP/2.0.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bK3871369b;rport.
From: "999999999" <sip:999999999 at 1.1.1.1>;tag=as26208773.
To: <sip:666666666 at 1.1.1.1>;tag=DQc8Ngcc2mZKr.
Call-ID: 271c0dad41cc80456b8de2133dc80b2e at 1.1.1.1.
CSeq: 104 BYE.
User-Agent: Asterisk PBX.
Max-Forwards: 70.
Proxy-Authorization: Digest username="asterisk02", realm="1.1.1.1",
algorithm=MD5, uri="sip:mod_sofia at 1.1.1.1:5060",
nonce="5df21692-1f08-11de-9d06-83e4a6e70df7",
response="21ee4a61f1751494e2e96254dd007a4c", qop=auth,
cnonce="6bc43301", nc=00000002.
Content-Length: 0.
.


U 2009/04/01 22:00:01.780814 1.1.1.1:5060 -> 2.2.2.2:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bK3871369b;rport=5060.
From: "999999999" <sip:999999999 at 1.1.1.1>;tag=as26208773.
To: <sip:666666666 at 1.1.1.1>;tag=DQc8Ngcc2mZKr.
Call-ID: 271c0dad41cc80456b8de2133dc80b2e at 1.1.1.1.
CSeq: 104 BYE.
User-Agent: FreeSWITCH-mod_sofia/1.0.3-hacked.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE,
NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH.
Supported: timer, precondition, path, replaces.
Content-Length: 0.
.


U 2009/04/01 22:00:01.802580 1.1.1.1:5060 -> 3.3.3.3:5060
BYE sip:666666666 at 3.3.3.3:5060 SIP/2.0.
Via: SIP/2.0/UDP 1.1.1.1;rport;branch=z9hG4bKU390t1jQ7gvHe.
Max-Forwards: 70.
From: "999999999" <sip:559066555 at 3.3.3.3;transport=udp>;tag=e050QBXFZXN6K.
To: <sip:666666666 at 3.3.3.3>;tag=731C8E54-1862.
Call-ID: 5df4fd12-1f08-11de-9d06-83e4a6e70df7.
CSeq: 113193248 BYE.
Contact: <sip:gw+primus at 1.1.1.1:5060;transport=udp>.
User-Agent: FreeSWITCH-mod_sofia/1.0.3-hacked.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE,
NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH.
Supported: timer, precondition, path, replaces.
Reason: Q.850;cause=16;text="NORMAL_CLEARING".
Content-Length: 0.
.


U 2009/04/01 22:00:01.873399 3.3.3.3:5060 -> 1.1.1.1:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 1.1.1.1;rport;branch=z9hG4bKU390t1jQ7gvHe.
From: "999999999" <sip:559066555 at 3.3.3.3;transport=udp>;tag=e050QBXFZXN6K.
To: <sip:666666666 at 3.3.3.3>;tag=731C8E54-1862.
Date: Fri, 05 Jan 2001 07:47:32 GMT.
Call-ID: 5df4fd12-1f08-11de-9d06-83e4a6e70df7.
Server: Cisco-SIPGateway/IOS-12.x.
Content-Length: 0.
CSeq: 113193248 BYE.
.

Please, can somebody tell me what is happening?.

Thanks in advance.

Regards.



More information about the Freeswitch-users mailing list