Summary:ASTERISK-01855: MWI-cann't receive correct format notify sip message
Reporter:khung (khung)Labels:
Date Opened:2004-06-21 00:54:41Date Closed:2011-06-07 14:04:53
Versions:Frequency of
Description:Open astrisk voicemail function. Let Sip 1 leave a voice message to Sip 2. When Sip 2 send a SUBSCRIBE SIP message to asterisk to know it's information about voicemail.
The NOTIFY SIP message format which send from asterisk is not correct. The Content-Type should be application/simple-message-summary, not application/xpidf+xml.


Asterisk :
   IP =  
   Port = 5070
SIP 2:
   phone number = 52765
   IP =
   Port = 5060

the SUBSCRIBE SIP message which send from SIP 2:
Request-Line: SUBSCRIBE sip:52765@ SIP/2.0
Via: SIP/2.0/UDP;branch=z9hG4bKcc3e4b520648c90d
To: <sip:52765@>
From: <sip:52765@>;tag=XIDO5gDMXID
Call-ID: 1202BD2712121212@
Contact: <sip:52765@>
Content-Length: 0
Expires: 86400
Accept: application/simple-message-summary
Event: message-summary

And SIP 2 will get NOTIFY SIP message which send from asterisk
Request-Line: NOTIFY sip:52765@ SIP/2.0
Via: SIP/2.0/UDP;branch=z9hG4bK3c0a7f38
From: <sip:52765@>;tag=as611129bd
To: <sip:52765@>;tag=XIDO5gDMXID
Contact: <sip:52765@>
Call-ID: 1202BD2712121212@
CSeq: 102 NOTIFY
User-Agent: Asterisk PBX
Content-Type: application/xpidf+xml
Content-Length: 345
Message body:
<?xml version="1.0"?>\n
<!DOCTYPE presence PUBLIC "-//IETF//DTD RFCxxxx XPIDF 1.0//EN" "xpidf.dtd">\n
<presentity uri="sip:52765@;method=SUBSCRIBE" />\n
<atom id="52765">\n
<address uri="sip:52765@;user=ip" priority="0,800000">\n
<status status="open" />\n
<msnsubstatus substatus="online" />\n

Comments:By: Mark Spencer (markster) 2004-06-21 10:36:02

Please use the "mailbox=foo" syntax in the peer declaration.  That will send you the right notify.

By: Mark Spencer (markster) 2004-06-21 11:05:42

It's not a bug that we're sending the wrong message, but I did modify Asterisk to at least detect that you're requesting the message waiting and to return 200 OK or 403 Forbidden depending on hte peers MWI setting.

By: khung (khung) 2004-06-22 22:00:47

I try it, but it still can't work correctly.
Below is my setting.
sip 1: 52766
sip 2: 52765




exten => 52765,1,Dial(SIP/52765,30)
exten => 52765,2,Voicemail(u52765)
exten => 52765,3,Hangup

exten => 52766,1,Dial(SIP/52766,30)
exten => 52766,2,Voicemail(52766)
exten => 52766,3,Hangup


52765 => 52765,zyxel user,khung@zyxel.com.tw
52766 => 52766,zyxel user,khung@zyxel.com.tw

About your suggestion,
"Please use the "mailbox=foo" syntax in the peer declaration",
it mean that I need to modify "mailbox=52765" to "mailbox=foo" in sip.conf, does it?
If the answer is yes, I had try it, but it still can't work correctly (the Content-Type is still application/xpidf+xml).

By: Mark Spencer (markster) 2004-06-22 22:17:18

Asterisk will send the NOTIFY for the mailbox separately.  It will *not* send it when you do SUBSCRIBE.  Asterisk does not NEED or WANT the subscribe.  If you update to latest CVS it SHOULD send you 200 OK or 403 Forbidden when it receives your SUBSCRIBE request but since I have no phone that does this I have nothing to test against.

If you want to send me one of your phones I can take a look at it.

By: Mark Spencer (markster) 2004-06-26 14:05:23

User seems to have dropped interest.