Summary: | ASTERISK-12343: [patch] Add support to handle incoming out-of-dialog SIP NOTIFY requests for "message-summary" event package | ||
Reporter: | Ashutosh Apte (asteriskrocks) | Labels: | |
Date Opened: | 2008-07-08 15:34:31 | Date Closed: | 2009-10-27 08:35:47 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/NewFeature |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) Asterisk_logging_mwi.txt ( 1) bug_13028_chan_sip_external_mwi_20090707.patch ( 2) chan_sip_mwi_notify.patch ( 3) chan_sip_mwi_notify.patch2 ( 4) chan_sip.patch | |
Description: | The existing Asterisk code rejects all incoming out of dialog SIP NOTIFY requests with a "489 Bad Request" response. This feature adds support for handling NOTIFY requests with "message-summary" event package. This will allow third party telephone switches and voicemail systems to set and clear MWI lamps to SIP phones configured on Asterisk. With this change, Asterisk code will not reject an incoming out of dialog NOTIFY request by default. It will examine the "Event" header and "Content-Type" header before sending a response. If the event package is "message-sumary" and the content type is "application/simple-message-summary", then Asterisk will process the request further. Asterisk will attempt to ascertain if the intended destination has subscribed for "message-summary". If an active subscription is found, a NOTIFY request will be generated based on the subscription dialog. If no subscription is found, then an unsolicited NOTIFY request will be generated. In both cases, a successful response to the original NOTIFY requested will be sent. Asterisk will continue to reject the request with 489 "Bad event" for all out of dialog NOTIFY request with event package other than "message-summary. Additionally, it will reject the NOTIFY request with 400 "Bad request" if the message body is not formatted per RFC 3842. On receiving a NOTIFY request for an extension that is not currently registered, Asterisk will respond with 404 "Not found". ****** ADDITIONAL INFORMATION ****** Example: ========================= The following screen capture from the Asterisk console shows the SIP messages exchanged between the third party switch / application, Asterisk and the SIP phone. I: MWI set and clear for a SIP phone that has subscribed for "message-summary" ------------------------------------------------------------------------------ ================================================================================ Subscription for "message-summary" from Polycom Soundpoint IP 320SIP ext: 6199 ================================================================================ SIP phone Asterisk 3rd party application (6199) --------------------------------------------------------------------- 1) SUBSCRIBE --------> 2) <-------- 200 OK 3) <-------- NOTIFY 4) 200 OK --------> 5) <-------- NOTIFY (out of dialog) (MWI:yes) 6) <-------- NOTIFY (subscribe dialog) 7) 200 OK --------> 8) 200 OK --------> 9) <-------- NOTIFY (out of dialog) (MWI:no) 10) <-------- NOTIFY (subscribe dialog) 11) 200 OK --------> 12) 200 OK --------> <--- SIP read from UDP://10.2.3.23:5060 ---> SUBSCRIBE sip:asterisk@172.16.2.11 SIP/2.0 Via: SIP/2.0/UDP 10.2.3.23;branch=z9hG4bK4fdc9fe6937A50E7 From: "6199" <sip:6199@172.16.2.11>;tag=88E88680-B29FD531 To: <sip:6199@172.16.2.11>;tag=as2ae62ea8 CSeq: 196 SUBSCRIBE Call-ID: 4fac063d-8116fc46-3d9a2247@10.2.3.23 Contact: <sip:6199@10.2.3.23> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER Event: message-summary User-Agent: PolycomSoundPointIP-SPIP_320-UA/2.1.1.0037 Accept: application/simple-message-summary Authorization: Digest username="6199", realm="asterisk", nonce="1059fc9e", uri="sip:asterisk@172.16.2.11", response="58cb471aa0d7bd077ac2343c7ae9c4db", algorithm=MD5 Max-Forwards: 70 Expires: 3600 Content-Length: 0 <-------------> --- (15 headers 0 lines) --- Found peer '6199' for '6199' from 10.2.3.23:5060 Looking for 6199 in internal (domain 172.16.2.11) Scheduling destruction of SIP dialog '4fac063d-8116fc46-3d9a2247@10.2.3.23' in 3610000 ms (Method: SUBSCRIBE) <--- Transmitting (no NAT) to 10.2.3.23:5060 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 10.2.3.23;branch=z9hG4bK4fdc9fe6937A50E7;received=10.2.3.23 From: "6199" <sip:6199@172.16.2.11>;tag=88E88680-B29FD531 To: <sip:6199@172.16.2.11>;tag=as2ae62ea8 Call-ID: 4fac063d-8116fc46-3d9a2247@10.2.3.23 CSeq: 196 SUBSCRIBE User-Agent: Asterisk PBX 1.6.0-beta8 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces, timer Expires: 3600 Contact: <sip:asterisk@172.16.2.11>;expires=3600 Content-Length: 0 <------------> Reliably Transmitting (no NAT) to 10.2.3.23:5060: NOTIFY sip:6199@10.2.3.23 SIP/2.0 Via: SIP/2.0/UDP 172.16.2.11:5060;branch=z9hG4bK118840b4;rport Max-Forwards: 70 From: "asterisk" <sip:asterisk@172.16.2.11>;tag=as2ae62ea8 To: <sip:sip:6199@10.2.3.23>;tag=88E88680-B29FD531 Contact: <sip:asterisk@172.16.2.11> Call-ID: 4fac063d-8116fc46-3d9a2247@10.2.3.23 CSeq: 296 NOTIFY User-Agent: Asterisk PBX 1.6.0-beta8 Event: message-summary Content-Type: application/simple-message-summary Subscription-State: active Content-Length: 91 Messages-Waiting: no Message-Account: sip:asterisk@172.16.2.11 Voice-Message: 0/0 (0/0) --- <--- SIP read from UDP://10.2.3.23:5060 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 172.16.2.11:5060;branch=z9hG4bK118840b4;rport From: "asterisk" <sip:asterisk@172.16.2.11>;tag=as2ae62ea8 To: <sip:sip:6199@10.2.3.23>;tag=88E88680-B29FD531 CSeq: 296 NOTIFY Call-ID: 4fac063d-8116fc46-3d9a2247@10.2.3.23 Contact: <sip:6199@10.2.3.23> Event: message-summary User-Agent: PolycomSoundPointIP-SPIP_320-UA/2.1.1.0037 Content-Length: 0 ================================================================================ Out-of-dialog NOTIFY request from a third party switch / application requesting MWI lamp to be set on extension 6199. ================================================================================ <--- SIP read from UDP://172.16.1.71:5060 ---> NOTIFY sip:6199@172.16.2.11;transport=UDP SIP/2.0 From: <sip:3622@172.16.2.11>;tag=2d302f0-470110ac-13c4-45014-593a6-73c568f6-593a6 To: <sip:6199@172.16.2.11> Call-ID: 2d302f0-470110ac-13c4-45014-593a6-5ef7f9b4-593a6@172.16.2.11 CSeq: 1 NOTIFY Via: SIP/2.0/UDP 172.16.1.71:5060;branch=z9hG4bK-593a6-15c8c399-57130b47 Subscription-State: active Contact: <sip:3622@172.16.1.71:5060;transport=UDP> Event: message-summary Max-Forwards: 70 Supported: replaces,timer Content-Type: application/simple-message-summary Content-Length: 25 Messages-Waiting: yes ================================================================================ NOTIFY request sent to ext: 6199 based on existing subscription dialog ================================================================================ <-------------> --- (13 headers 2 lines) --- Reliably Transmitting (no NAT) to 10.2.3.23:5060: NOTIFY sip:6199@10.2.3.23 SIP/2.0 Via: SIP/2.0/UDP 172.16.2.11:5060;branch=z9hG4bK118840b4;rport Max-Forwards: 70 From: "asterisk" <sip:asterisk@172.16.2.11>;tag=as2ae62ea8 To: <sip:sip:6199@10.2.3.23>;tag=88E88680-B29FD531 Contact: <sip:asterisk@172.16.2.11> Call-ID: 4fac063d-8116fc46-3d9a2247@10.2.3.23 CSeq: 297 NOTIFY User-Agent: Asterisk PBX 1.6.0-beta8 Event: message-summary Content-Type: application/simple-message-summary Subscription-State: active Content-Length: 92 Messages-Waiting: yes Message-Account: sip:asterisk@172.16.2.11 Voice-Message: 1/0 (0/0) ================================================================================ Responding with a successful response to the original NOTIFY request ================================================================================ --- <--- Transmitting (no NAT) to 172.16.1.71:5060 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 172.16.1.71:5060;branch=z9hG4bK-593a6-15c8c399-57130b47;received=172.16.1.71 From: <sip:3622@172.16.2.11>;tag=2d302f0-470110ac-13c4-45014-593a6-73c568f6-593a6 To: <sip:6199@172.16.2.11>;tag=as36094053 Call-ID: 2d302f0-470110ac-13c4-45014-593a6-5ef7f9b4-593a6@172.16.2.11 CSeq: 1 NOTIFY User-Agent: Asterisk PBX 1.6.0-beta8 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces, timer Content-Length: 0 <------------> Scheduling destruction of SIP dialog '2d302f0-470110ac-13c4-45014-593a6-5ef7f9b4-593a6@172.16.2.11' in 32000 ms (Method: NOTIFY) <--- SIP read from UDP://10.2.3.23:5060 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 172.16.2.11:5060;branch=z9hG4bK118840b4;rport From: "asterisk" <sip:asterisk@172.16.2.11>;tag=as2ae62ea8 To: <sip:sip:6199@10.2.3.23>;tag=88E88680-B29FD531 CSeq: 297 NOTIFY Call-ID: 4fac063d-8116fc46-3d9a2247@10.2.3.23 Contact: <sip:6199@10.2.3.23> Event: message-summary User-Agent: PolycomSoundPointIP-SPIP_320-UA/2.1.1.0037 Content-Length: 0 ================================================================================ Out-of-dialog NOTIFY request from a third party switch / application requesting MWI lamp to be cleared on extension 6199. ================================================================================ <-------------> --- (0 headers 1 lines) --- <--- SIP read from UDP://172.16.1.71:5060 ---> NOTIFY sip:6199@172.16.2.11;transport=UDP SIP/2.0 From: <sip:3622@172.16.2.11>;tag=2d30478-470110ac-13c4-45014-593b1-5c029783-593b1 To: <sip:6199@172.16.2.11> Call-ID: 2d30478-470110ac-13c4-45014-593b1-62bbc655-593b1@172.16.2.11 CSeq: 2 NOTIFY Via: SIP/2.0/UDP 172.16.1.71:5060;branch=z9hG4bK-593b1-15c8ec7b-2b5cd350 Subscription-State: active Contact: <sip:3622@172.16.1.71:5060;transport=UDP> Event: message-summary Max-Forwards: 70 Supported: replaces,timer Content-Type: application/simple-message-summary Content-Length: 24 Messages-Waiting: no <-------------> --- (13 headers 2 lines) --- Reliably Transmitting (no NAT) to 10.2.3.23:5060: NOTIFY sip:6199@10.2.3.23 SIP/2.0 Via: SIP/2.0/UDP 172.16.2.11:5060;branch=z9hG4bK118840b4;rport Max-Forwards: 70 From: "asterisk" <sip:asterisk@172.16.2.11>;tag=as2ae62ea8 To: <sip:sip:6199@10.2.3.23>;tag=88E88680-B29FD531 Contact: <sip:asterisk@172.16.2.11> Call-ID: 4fac063d-8116fc46-3d9a2247@10.2.3.23 CSeq: 298 NOTIFY User-Agent: Asterisk PBX 1.6.0-beta8 Event: message-summary Content-Type: application/simple-message-summary Subscription-State: active Content-Length: 91 Messages-Waiting: no Message-Account: sip:asterisk@172.16.2.11 Voice-Message: 0/0 (0/0) --- <--- Transmitting (no NAT) to 172.16.1.71:5060 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 172.16.1.71:5060;branch=z9hG4bK-593b1-15c8ec7b-2b5cd350;received=172.16.1.71 From: <sip:3622@172.16.2.11>;tag=2d30478-470110ac-13c4-45014-593b1-5c029783-593b1 To: <sip:6199@172.16.2.11>;tag=as6569ad3c Call-ID: 2d30478-470110ac-13c4-45014-593b1-62bbc655-593b1@172.16.2.11 CSeq: 2 NOTIFY User-Agent: Asterisk PBX 1.6.0-beta8 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces, timer Content-Length: 0 <------------> Scheduling destruction of SIP dialog '2d30478-470110ac-13c4-45014-593b1-62bbc655-593b1@172.16.2.11' in 32000 ms (Method: NOTIFY) <--- SIP read from UDP://10.2.3.23:5060 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 172.16.2.11:5060;branch=z9hG4bK118840b4;rport From: "asterisk" <sip:asterisk@172.16.2.11>;tag=as2ae62ea8 To: <sip:sip:6199@10.2.3.23>;tag=88E88680-B29FD531 CSeq: 298 NOTIFY Call-ID: 4fac063d-8116fc46-3d9a2247@10.2.3.23 Contact: <sip:6199@10.2.3.23> Event: message-summary User-Agent: PolycomSoundPointIP-SPIP_320-UA/2.1.1.0037 Content-Length: 0 <-------------> --- (10 headers 0 lines) --- Really destroying SIP dialog '286e608-470110ac-13c4-45014-5939f-4caf0feb-5939f' Method: REGISTER Really destroying SIP dialog '2d302f0-470110ac-13c4-45014-593a6-5ef7f9b4-593a6@172.16.2.11' Method: NOTIFY II: MWI set and clear for a SIP phone that has not subscribed for "message-summary" ----------------------------------------------------------------------------------- SIP phone Asterisk 3rd party application (3622) --------------------------------------------------------------------- (3622 is registered with Asterisk but does not maintain a subscription for "message-summary") 1) <-------- NOTIFY (out of dialog) (MWI:yes) 2) <-------- NOTIFY (out of dialog) (MWI:yes) 3) 200 OK --------> 4) 200 OK --------> 5) <-------- NOTIFY (out of dialog) (MWI:no) 6) <-------- (out of dialog) (MWI:yes) 7) 200 OK --------> 8) 200 OK --------> <--- SIP read from UDP://172.16.1.71:5060 ---> NOTIFY sip:5622@172.16.2.11;transport=UDP SIP/2.0 From: <sip:3622@172.16.2.11>;tag=2d30600-470110ac-13c4-45014-59410-4282c9a8-59410 To: <sip:5622@172.16.2.11> Call-ID: 2d30600-470110ac-13c4-45014-59410-241485ee-59410@172.16.2.11 CSeq: 3 NOTIFY Via: SIP/2.0/UDP 172.16.1.71:5060;branch=z9hG4bK-59410-15ca614b-cd77311 Subscription-State: active Contact: <sip:3622@172.16.1.71:5060;transport=UDP> Event: message-summary Max-Forwards: 70 Supported: replaces,timer Content-Type: application/simple-message-summary Content-Length: 25 Messages-Waiting: yes ================================================================================ NOTIFY request sent to ext: 3622 as an unsolicited NOTIFY request as the extension has not subscribed for MWI ================================================================================ <-------------> --- (13 headers 2 lines) --- Scheduling destruction of SIP dialog '55b08b687145fa1362af9e2e7cdd5da5@172.16.2.11' in 32000 ms (Method: NOTIFY) Reliably Transmitting (no NAT) to 10.2.3.38:13190: NOTIFY sip:5622@10.2.3.38:13190;rinstance=4e2e3ab595823de2 SIP/2.0 Via: SIP/2.0/UDP 172.16.2.11:5060;branch=z9hG4bK7643c93e;rport Max-Forwards: 70 From: "asterisk" <sip:asterisk@172.16.2.11>;tag=as1457bf06 To: <sip:5622@10.2.3.38:13190;rinstance=4e2e3ab595823de2> Contact: <sip:asterisk@172.16.2.11> Call-ID: 55b08b687145fa1362af9e2e7cdd5da5@172.16.2.11 CSeq: 102 NOTIFY User-Agent: Asterisk PBX 1.6.0-beta8 Event: message-summary Content-Type: application/simple-message-summary Content-Length: 92 Messages-Waiting: yes Message-Account: sip:asterisk@172.16.2.11 Voice-Message: 1/0 (0/0) ================================================================================ Responding with a successful response to the original NOTIFY request ================================================================================ --- <--- Transmitting (no NAT) to 172.16.1.71:5060 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 172.16.1.71:5060;branch=z9hG4bK-59410-15ca614b-cd77311;received=172.16.1.71 From: <sip:3622@172.16.2.11>;tag=2d30600-470110ac-13c4-45014-59410-4282c9a8-59410 To: <sip:5622@172.16.2.11>;tag=as2b6c2880 Call-ID: 2d30600-470110ac-13c4-45014-59410-241485ee-59410@172.16.2.11 CSeq: 3 NOTIFY User-Agent: Asterisk PBX 1.6.0-beta8 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces, timer Content-Length: 0 <------------> Scheduling destruction of SIP dialog '2d30600-470110ac-13c4-45014-59410-241485ee-59410@172.16.2.11' in 32000 ms (Method: NOTIFY) <--- SIP read from UDP://10.2.3.38:13190 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 172.16.2.11:5060;branch=z9hG4bK7643c93e;rport=5060 Contact: <sip:10.2.3.38:13190> To: <sip:5622@10.2.3.38:13190;rinstance=4e2e3ab595823de2>;tag=6c5b7741 From: "asterisk"<sip:asterisk@172.16.2.11>;tag=as1457bf06 Call-ID: 55b08b687145fa1362af9e2e7cdd5da5@172.16.2.11 CSeq: 102 NOTIFY User-Agent: eyeBeam release 1003l stamp 30937 Content-Length: 0 ================================================================================ Out-of-dialog NOTIFY request from a third party switch / application requesting MWI lamp to be cleared on extension 3622. ================================================================================ <-------------> --- (9 headers 0 lines) --- Really destroying SIP dialog '55b08b687145fa1362af9e2e7cdd5da5@172.16.2.11' Method: NOTIFY <--- SIP read from UDP://172.16.1.71:5060 ---> NOTIFY sip:5622@172.16.2.11;transport=UDP SIP/2.0 From: <sip:3622@172.16.2.11>;tag=2d30788-470110ac-13c4-45014-5941b-1d0a22a5-5941b To: <sip:5622@172.16.2.11> Call-ID: 2d30788-470110ac-13c4-45014-5941b-1effe0bf-5941b@172.16.2.11 CSeq: 4 NOTIFY Via: SIP/2.0/UDP 172.16.1.71:5060;branch=z9hG4bK-5941b-15ca8cee-66436cca Subscription-State: active Contact: <sip:3622@172.16.1.71:5060;transport=UDP> Event: message-summary Max-Forwards: 70 Supported: replaces,timer Content-Type: application/simple-message-summary Content-Length: 24 Messages-Waiting: no <-------------> --- (13 headers 2 lines) --- Scheduling destruction of SIP dialog '1c401ebf45ab23b727ac911309a75fbd@172.16.2.11' in 32000 ms (Method: NOTIFY) Reliably Transmitting (no NAT) to 10.2.3.38:13190: NOTIFY sip:5622@10.2.3.38:13190;rinstance=4e2e3ab595823de2 SIP/2.0 Via: SIP/2.0/UDP 172.16.2.11:5060;branch=z9hG4bK3eee2cfb;rport Max-Forwards: 70 From: "asterisk" <sip:asterisk@172.16.2.11>;tag=as2c0a84ec To: <sip:5622@10.2.3.38:13190;rinstance=4e2e3ab595823de2> Contact: <sip:asterisk@172.16.2.11> Call-ID: 1c401ebf45ab23b727ac911309a75fbd@172.16.2.11 CSeq: 102 NOTIFY User-Agent: Asterisk PBX 1.6.0-beta8 Event: message-summary Content-Type: application/simple-message-summary Content-Length: 91 Messages-Waiting: no Message-Account: sip:asterisk@172.16.2.11 Voice-Message: 0/0 (0/0) --- <--- Transmitting (no NAT) to 172.16.1.71:5060 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 172.16.1.71:5060;branch=z9hG4bK-5941b-15ca8cee-66436cca;received=172.16.1.71 From: <sip:3622@172.16.2.11>;tag=2d30788-470110ac-13c4-45014-5941b-1d0a22a5-5941b To: <sip:5622@172.16.2.11>;tag=as603f9f8a Call-ID: 2d30788-470110ac-13c4-45014-5941b-1effe0bf-5941b@172.16.2.11 CSeq: 4 NOTIFY User-Agent: Asterisk PBX 1.6.0-beta8 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces, timer Content-Length: 0 <------------> Scheduling destruction of SIP dialog '2d30788-470110ac-13c4-45014-5941b-1effe0bf-5941b@172.16.2.11' in 32000 ms (Method: NOTIFY) <--- SIP read from UDP://10.2.3.38:13190 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 172.16.2.11:5060;branch=z9hG4bK3eee2cfb;rport=5060 Contact: <sip:10.2.3.38:13190> To: <sip:5622@10.2.3.38:13190;rinstance=4e2e3ab595823de2>;tag=8425de45 From: "asterisk"<sip:asterisk@172.16.2.11>;tag=as2c0a84ec Call-ID: 1c401ebf45ab23b727ac911309a75fbd@172.16.2.11 CSeq: 102 NOTIFY User-Agent: eyeBeam release 1003l stamp 30937 Content-Length: 0 <-------------> --- (9 headers 0 lines) --- Really destroying SIP dialog '1c401ebf45ab23b727ac911309a75fbd@172.16.2.11' Method: NOTIFY <-------------> --- (0 headers 1 lines) --- Really destroying SIP dialog '2d30600-470110ac-13c4-45014-59410-241485ee-59410@172.16.2.11' Method: NOTIFY Really destroying SIP dialog '2d30788-470110ac-13c4-45014-5941b-1effe0bf-5941b@172.16.2.11' Method: NOTIFY Testing: ========================= This feature has been tested with CounterPath eveBeam soft phone (version: 1.5.6.1 build 30937) and Polycom SoundPoint IP320 SIP. Note that this feature handles MWI notifications with or without an active subscription for "message-summary" event package from SIP phones. | ||
Comments: | By: Ashutosh Apte (asteriskrocks) 2008-07-08 15:39:56 Example: ========================= The attached screen capture from the Asterisk console shows the following SIP messages exchanged between the third party switch / application, Asterisk and the SIP phone. I: MWI set and clear for a SIP phone that has subscribed for "message-summary" ------------------------------------------------------------------------------ ================================================================================ Subscription for "message-summary" from Polycom Soundpoint IP 320SIP ext: 6199 ================================================================================ SIP phone Asterisk 3rd party application (6199) --------------------------------------------------------------------- 1) SUBSCRIBE --------> 2) <-------- 200 OK 3) <-------- NOTIFY 4) 200 OK --------> 5) <-------- NOTIFY (out of dialog) (MWI:yes) 6) <-------- NOTIFY (subscribe dialog) 7) 200 OK --------> 8) 200 OK --------> 9) <-------- NOTIFY (out of dialog) (MWI:no) 10) <-------- NOTIFY (subscribe dialog) 11) 200 OK --------> 12) 200 OK --------> II: MWI set and clear for a SIP phone that has not subscribed for "message-summary" -------------------------------------------------------------------------------- SIP phone Asterisk 3rd party application (3622) --------------------------------------------------------------------- (3622 is registered with Asterisk but does not maintain a subscription for "message-summary") 1) <-------- NOTIFY (out of dialog) (MWI:yes) 2) <-------- NOTIFY (out of dialog) (MWI:yes) 3) 200 OK --------> 4) 200 OK --------> 5) <-------- NOTIFY (out of dialog) (MWI:no) 6) <-------- (out of dialog) (MWI:yes) 7) 200 OK --------> 8) 200 OK --------> By: Leif Madsen (lmadsen) 2008-12-05 08:38:09.000-0600 Confirming this patch since it looks like a neat feature, and seems like a bunch of work was done here. Assigning to otherwiseguy for now to see if he can either test this, or move this forward somehow. Please feel free to reassign if this is not the case. Thanks! By: Ashutosh Apte (asteriskrocks) 2008-12-05 11:48:41.000-0600 Thank you blitzrage! Let me know if I can be of any help to get this rolling. By: Terry Wilson (twilson) 2008-12-05 12:05:06.000-0600 AsteriskRocks: First thing that needs to be done is to post the patch in unified format with diff -u :-) By: Terry Wilson (twilson) 2008-12-08 12:53:01.000-0600 AsteriskRocks: any updates? By: Ashutosh Apte (asteriskrocks) 2008-12-09 12:15:16.000-0600 otherwiseguy: That's how I had created the attached patch file. I must have missed something. I downloaded the source for 1.6.0-beta9, compiled it, made changes to the chan_sip.c and produced the patch by running the "diff -u" against the original. Should I follow a different procedure? Thanks for your help. By: Terry Wilson (twilson) 2008-12-09 15:39:25.000-0600 What you should actually do is use subversion to check out asterisk trunk from the repository (svn co http://svn.digium.com/svn/asterisk/trunk asterisk-trunk), change to the asterisk-trunk directory make the changes, and then do an 'svn diff > filename.diff' as any new features need to be made against asterisk trunk. The procedure you followed should have made a unified diff file, but it looks like the '-u' didn't get added. You won't see lines beginning with '>' and '<' throughout a unified diff. By: snuffy (snuffy) 2008-12-09 15:43:45.000-0600 I would just make 1 small comment.. You should use the /* */ style comments as per coding guidelines By: Terry Wilson (twilson) 2008-12-10 11:19:58.000-0600 oej: does this sound too much like trying to make asterisk behave like a SIP proxy to you? By: Olle Johansson (oej) 2008-12-10 11:28:46.000-0600 No, I think this is inline with what we want to do in regards to clustering and scaling. I haven't reviewed the code, so I can't make any comment in regards to the actual implementation. By: Terry Wilson (twilson) 2008-12-10 11:34:14.000-0600 oej: ok, just thought I'd check before continuing. Thanks. :-) By: Ashutosh Apte (asteriskrocks) 2008-12-10 20:05:46.000-0600 otherwiseguy: I've uploaded a patch that I created using diff -u (the < and > went away). I've also changed the comment style as suggested by snuffy. Please note that this patch is also built with 1.6.0-beta9 source (as was the original one) and I've not used svn to get the latest source code. By: Terry Wilson (twilson) 2008-12-16 13:33:34.000-0600 AsteriskRocks: we still need the patch against trunk to be able to test it out, sorry. All new development is against trunk. There are significant changes that have happened since 1.6.0. I went ahead and tried to apply the patch to trunk, but it doesn't apply. If you get a chance to update the patch for trunk (and produce the diff as I outlined above), then we can see about getting this in. One thing that the patch would need changed is the indentation is kind of mixed between spaces and tabs. All indentation should be done with actual tab characters instead. You can use spaces to align some statements that span multiple lines, but the beginning of a statement should always be indented with tabs. (and you still have a couple of // style comments that need to be changed to /* */). Checkout doc/CODING-GUIDELINES from an asterisk checkout for more info on the various guidelines for code submissions. Thanks for taking the time to work on all of this! By: Terry Wilson (twilson) 2009-01-05 12:42:35.000-0600 Just pinging AsteriskRocks for updated patch against trunk if possible By: Ashutosh Apte (asteriskrocks) 2009-01-06 11:04:25.000-0600 otherwiseguy: I'm working on creating an updated patch against the trunk. Sorry its taking so long. I found out that the NOTIFY processing for endpoints / mailboxes with active subscriptions are handled now. I'm adding processing for unsolicited NOTIFY requests only. By: Ashutosh Apte (asteriskrocks) 2009-01-15 00:36:41.000-0600 otherwiseguy: I've attached a patch created against the trunk using "svn diff". There were considerable changes between the two versions (beta9 and the latest trunk). It seems that some work was done to handle MWI for cases when there is an active subscription exists. This patch adds support to handle unsolicited NOTIFY requests for which no subscription exists (but the intended endpoint is currently registered). This patch is tested against the X-Lite (eyeBeam) soft phone. By: Terry Wilson (twilson) 2009-01-30 11:24:49.000-0600 oej, I'm swamped right now working on builtin features stuff. Is this something you are interested in taking a look at? By: Olle Johansson (oej) 2009-01-30 11:30:37.000-0600 Let's see who catches it first. I have a list of bugs that gets priority... :-) By: Leif Madsen (lmadsen) 2009-02-27 16:34:56.000-0600 Setting status of this issue to Confirmed because there are patches here which could be tested. By: cmaj (cmaj) 2009-07-07 19:30:08 Latest patch is rebirth of the earlier attempts and compiles cleanly against trunk. I ripped out some of the urgent message stuff to speed submission and prettied up a few other areas. Unfortunately, the phone keeps replying with NOTIFY messages. By: cmaj (cmaj) 2009-07-12 22:37:49 Patch bug_13028_chan_sip_external_mwi_20090707.patch against trunk works with Cisco 7940 models, but it does keep up some lingering DIALOGS revealed by "sip show channels". By: Digium Subversion (svnbot) 2009-10-27 08:35:18 Repository: asterisk Revision: 226060 U trunk/CHANGES U trunk/channels/chan_sip.c U trunk/configs/sip.conf.sample ------------------------------------------------------------------------ r226060 | file | 2009-10-27 08:35:17 -0500 (Tue, 27 Oct 2009) | 11 lines Add support for receiving unsolicited MWI NOTIFY messages. This change adds a configuration option to SIP peers, unsolicited_mailbox, which configures a virtual mailbox to use for received new/old MWI information. This virtual mailbox can then be used by any device supporting MWI. (closes issue ASTERISK-12343) Reported by: AsteriskRocks Patches: bug_13028_chan_sip_external_mwi_20090707.patch uploaded by cmaj (license 830) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=226060 By: Digium Subversion (svnbot) 2009-10-27 08:35:45 Repository: asterisk Revision: 226061 _U branches/1.6.2/ ------------------------------------------------------------------------ r226061 | file | 2009-10-27 08:35:45 -0500 (Tue, 27 Oct 2009) | 17 lines Blocked revisions 226060 via svnmerge ........ r226060 | file | 2009-10-27 10:30:27 -0300 (Tue, 27 Oct 2009) | 11 lines Add support for receiving unsolicited MWI NOTIFY messages. This change adds a configuration option to SIP peers, unsolicited_mailbox, which configures a virtual mailbox to use for received new/old MWI information. This virtual mailbox can then be used by any device supporting MWI. (closes issue ASTERISK-12343) Reported by: AsteriskRocks Patches: bug_13028_chan_sip_external_mwi_20090707.patch uploaded by cmaj (license 830) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=226061 |