[Home]

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
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
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.

****** ADDITIONAL INFORMATION ******

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

the SUBSCRIBE SIP message which send from SIP 2:
======================================
Request-Line: SUBSCRIBE sip:52765@172.21.3.80:5070 SIP/2.0
Via: SIP/2.0/UDP 172.22.1.1:5060;branch=z9hG4bKcc3e4b520648c90d
To: <sip:52765@172.21.3.80>
From: <sip:52765@172.21.3.80>;tag=XIDO5gDMXID
Call-ID: 1202BD2712121212@172.22.1.1
CSeq: 2 SUBSCRIBE
Contact: <sip:52765@172.22.1.1:5060>
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@172.21.3.80 SIP/2.0
Via: SIP/2.0/UDP 172.21.3.80:5070;branch=z9hG4bK3c0a7f38
From: <sip:52765@172.21.3.80>;tag=as611129bd
To: <sip:52765@172.21.3.80>;tag=XIDO5gDMXID
Contact: <sip:52765@172.21.3.80:5060>
Call-ID: 1202BD2712121212@172.22.1.1
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
<presence>\n
<presentity uri="sip:52765@172.21.3.80;method=SUBSCRIBE" />\n
<atom id="52765">\n
<address uri="sip:52765@172.21.3.80;user=ip" priority="0,800000">\n
<status status="open" />\n
<msnsubstatus substatus="online" />\n
</address>\n
</atom>\n
</presence>\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
=============================
sip.conf

[52765]
type=friend
host=dynamic
mailbox=52765

[52766]
type=friend
host=dynamic
mailbox=52766

==================================
extensions.conf

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

====================================
voicemail.conf

[default]
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.