Summary: | ASTERISK-16986: (Call Completion / SIP) Asterisk Server Fails To Send A Response To A Re-Subscribe After The Expires Timer Matures | ||
Reporter: | George Konopacki (georgekonopacki) | Labels: | |
Date Opened: | 2010-11-19 08:24:11.000-0600 | Date Closed: | 2011-02-15 10:18:47.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/Subscriptions |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | We have successfully subscribed for call completion and have received a NOTIFY message with cc-queued in its message body. The phone / uri we are monitoring as this point does not have any activity. Eventually the expires timer matures in our client, so our client re-subscribes. The Asterisk server does NOT send a response back to our client! We know that the Asterisk server does successfully update its expiry timer for the subscription because when the phone / uri we are monitoring becomes available, the Asterisk server then sends a NOTIFY with cc-ready in the message body. This bug appears to be in the file chan_sip.c in the function ‘handle_request_subscribe’ around line 23354. | ||
Comments: | By: Mark Michelson (mmichelson) 2010-11-19 10:38:31.000-0600 Sounds like an oversight to me. I'll see if I can find the proper solution for this. By: Digium Subversion (svnbot) 2011-02-15 10:13:59.000-0600 Repository: asterisk Revision: 307879 U branches/1.8/channels/chan_dahdi.c U branches/1.8/channels/chan_sip.c U branches/1.8/channels/sig_pri.c U branches/1.8/channels/sig_pri.h U branches/1.8/include/asterisk/ccss.h U branches/1.8/main/ccss.c ------------------------------------------------------------------------ r307879 | rmudgett | 2011-02-15 10:13:57 -0600 (Tue, 15 Feb 2011) | 37 lines No response sent for SIP CC subscribe/resubscribe request. Asterisk does not send a response if we try to subscribe for call completion after we have received a 180 Ringing. You can only subscribe for call completion when the call has been cleared. When we receive the 180 Ringing, for this call, its call-completion state is 'CC_AVAILABLE'. If we then send a subscribe message to Asterisk, it trys to change the call-completion state to 'CC_CALLER_REQUESTED'. Because this is an invalid state change, it just ignores the message. The only state Asterisk will accept our subscribe message is in the 'CC_CALLER_OFFERED' state. Asterisk will go into the 'CC_CALLER_OFFERED' when the SIP client clears the call by sending a CANCEL. Asterisk should always send a response. Even if its a negative one. The fix is to allow for the CCSS core to notify a CC agent that a failure has occurred when CC is requested. The "ack" callback is replaced with a "respond" callback. The "respond" callback has a parameter indicating either a successful response or a specific type of failure that may need to be communicated to the requester. (closes issue ASTERISK-16985) Reported by: GeorgeKonopacki Tested by: mmichelson, rmudgett JIRA SWP-2633 (closes issue ASTERISK-16986) Reported by: GeorgeKonopacki Tested by: mmichelson JIRA SWP-2634 ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=307879 By: Digium Subversion (svnbot) 2011-02-15 10:18:46.000-0600 Repository: asterisk Revision: 307883 _U trunk/ U trunk/channels/chan_dahdi.c U trunk/channels/chan_sip.c U trunk/channels/sig_pri.c U trunk/channels/sig_pri.h U trunk/include/asterisk/ccss.h U trunk/main/ccss.c ------------------------------------------------------------------------ r307883 | rmudgett | 2011-02-15 10:18:45 -0600 (Tue, 15 Feb 2011) | 44 lines Merged revisions 307879 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r307879 | rmudgett | 2011-02-15 10:13:55 -0600 (Tue, 15 Feb 2011) | 37 lines No response sent for SIP CC subscribe/resubscribe request. Asterisk does not send a response if we try to subscribe for call completion after we have received a 180 Ringing. You can only subscribe for call completion when the call has been cleared. When we receive the 180 Ringing, for this call, its call-completion state is 'CC_AVAILABLE'. If we then send a subscribe message to Asterisk, it trys to change the call-completion state to 'CC_CALLER_REQUESTED'. Because this is an invalid state change, it just ignores the message. The only state Asterisk will accept our subscribe message is in the 'CC_CALLER_OFFERED' state. Asterisk will go into the 'CC_CALLER_OFFERED' when the SIP client clears the call by sending a CANCEL. Asterisk should always send a response. Even if its a negative one. The fix is to allow for the CCSS core to notify a CC agent that a failure has occurred when CC is requested. The "ack" callback is replaced with a "respond" callback. The "respond" callback has a parameter indicating either a successful response or a specific type of failure that may need to be communicated to the requester. (closes issue ASTERISK-16985) Reported by: GeorgeKonopacki Tested by: mmichelson, rmudgett JIRA SWP-2633 (closes issue ASTERISK-16986) Reported by: GeorgeKonopacki Tested by: mmichelson JIRA SWP-2634 ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=307883 |