Hello all,
I also have this SIP CANCEL problem and have inverstigated the problem a bit but am not sure if the problem lies in the sipgate proxy or asterisk:
1.) This only happens when you CANCEL an INVITE (obviously) the INVITE is shown below.
2.) sipgate sends a 183 Session Prgress response message to asterisk shown below as an example.
3.) To hand up Asterisk sends a CANCEL message to sipgate and it is happy and acknowledges.
4.) The called parties phone contiunes to ring (incorrectly)!
5.) The problem happens because the CANCEL SIP line contains a different contact to the original INVITE massage which according to the SIP RFC 3261 is illegal.
from RFC 3261 chapter 9.1
"The Request-URI, Call-ID, To, the numeric part of CSeq, and From header fields in the CANCEL request MUST be identical to those in the request being cancelled, including tags."
I assume the Request-URI in this case is defined as sip:[EMAIL PROTECTED] in my exaple INVITE message. The CANCEL contains the URI which can be found in the 183 Session Progress message set to be sip:[EMAIL PROTECTED]
Asterisk chan_sip has the following code part that handles all other SIP/2.0 messages (e.g. not specifically processed) in function handle_request():
} else if (!strcasecmp(cmd, "SIP/2.0")) {
extract_uri(p, req);The function extract_uri updates the URI of the current context, as this has changed in the 183 Session Progress then the URI used in the CANCEL message also changes.
My conclusion is the Asterisk probably handles this wrongly as it does not happen with soft phones (they use the original INVITE URI). I have curently commented out the code part and it fixes the problem I have described BUT I do not know enough about the code to say why it was included in the first place! So it would be nice to submit this problem to the developer to get his answer and let us know what he/she thinks should happen. Does anyone know how to submit this kind of request?
Let me know your opinions.
Ian Hailey.
INVITE sip:[EMAIL PROTECTED] SIP/2.0 Via: SIP/2.0/UDP 217.187.52.208:5060;branch=z9hG4bK748c9b3f From: "5337478" <sip:[EMAIL PROTECTED]>;tag=as31d0bbe0 To: <sip:[EMAIL PROTECTED]> Contact: <sip:[EMAIL PROTECTED]> Call-ID: [EMAIL PROTECTED] CSeq: 102 INVITE User-Agent: Asterisk PBX Date: Fri, 13 Aug 2004 05:50:48 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER Content-Type: application/sdp Content-Length: 243
SIP/2.0 183 Session Progress Via: SIP/2.0/UDP 217.187.52.208:5060;branch=z9hG4bK748c9b3f From: "5337478" <sip:[EMAIL PROTECTED]>;tag=as31d0bbe0 To: <sip:[EMAIL PROTECTED]>;tag=as0deea40d Call-ID: [EMAIL PROTECTED] CSeq: 102 INVITE User-Agent: Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER Contact: <sip:[EMAIL PROTECTED]> Content-Type: application/sdp Content-Length: 240
CANCEL sip:[EMAIL PROTECTED] SIP/2.0 Via: SIP/2.0/UDP 217.187.52.208:5060;branch=z9hG4bK748c9b3f From: "5337478" <sip:[EMAIL PROTECTED]>;tag=as31d0bbe0 To: <sip:[EMAIL PROTECTED]> Contact: <sip:[EMAIL PROTECTED]> Call-ID: [EMAIL PROTECTED] CSeq: 102 CANCEL User-Agent: Asterisk PBX Content-Length: 0
Florian Rau wrote:
Hi,
Well, the Problem is not the ZAP Channel but the SIP Channel, because it occurs no matter what channel I use the phone outside. Maybe this graph is more descriptive:
1. ZAP or SIP ==> 2. Asterisk ==> 3. SIP (thru internet, provider sipgate) ==> 4. PSTN
The connections on 1. hang up correctly, as seen in the log, but the SIP connection of 3. does NOT hangup.
Regards, Florian
PS: Believe me, I'm searching for over one week in the whole internet for a solution, but did not find it.
----- Original Message ----- From: "Jean-Yves Avenard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 30, 2004 11:46 PM
Subject: Re: [Asterisk-Users] SIP connections do not hang up
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
If you just bothered to search this list in the past 12 hours, you would have found a solution around that:
to summarize:
Add in zapata.conf: busydetect=yes busycount=6
The maximum it will take for asterisk to see the person hanged-up is after 6 busy dial-tones.
On 31/07/2004, at 6:58 AM, Florian Rau wrote:
I'm calling from inside (either X-Lite using SIP channel or a ISDN telephone using Zap Channel) using sipgate to a number in public network. When I'm hanging up before the other person picked up the phone, the line is not closed correctly. The phone keeps on ringing until timeout (of Sipgate I assume) and it even costs my money, if the other person picks up the ringing phone, even if I already hung up.
- --- Jean-Yves Avenard Hydrix Pty Ltd - Embedding the net www.hydrix.com | fax +61 3 95093717 | phone +61 3 9509 3724 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin)
iD8DBQFBCsHLXeDVKqIr3GURArjyAJ9p97F/wWIiIesaYo85QfHut8zbzQCgj2l2 uuKZxyJoaSmpI9V9I+ojnJc= =Y8jQ -----END PGP SIGNATURE-----
_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
