SUBSCRIBE messages receive 489 and 406

Hi,

I have installed Asterisk 11 recently and am able to REGISTER my SIP client (MTA).

The SIP client tries to SUBSCRIBE for event =reg which receives 489 Bad event from the Asterisk

and it also sends SUBSCRIBE for event = message-summary which receives 406 Not Acceptable.

sip and extension conf files attached. I have already tried allowsubscribe and hint but nothing works (might have not done it right)

Please let me know how to get the SUBSCRIBES working.

SUBSCRIBE (event=reg) is to NOTIFY the device about registration states
SUBSCRIBE (event = message-summary) is to subscribe for VM service.

SIP Traces attached.


vim sip.conf
[general]
callcounter=yes
context=unauthenticated ; default context for incoming calls
allowguest=no ; disable unauthenticated calls
; in which case yes)
udpbindaddr=:: ; listen for UDP requests on all interfaces
directmedia=yes
directrtpsetup=yes

office-phone ; create a template for our devices
; IP second
; the dialplan
subscribecontext=default
;subscribemwi=yes
allowsubscribe=yes
host=dynamic ; the device will register with asterisk
; external IP address.
; automatically
disallow=all ; reset which voice codecs this device will accept or offer
allow=g722 ; audio codecs to accept from, and request to, the device
allow=ulaw ; in the order we prefer
allow=alaw

[VoiceGW] ;For 911 calls to Voice GW
type = peer
host = 6.4.0.106

; define a device name and use the office-phone template
7705551001
description = 2085L1
subscribecontext=default
;subscribemwi=yes
allowsubscribe=yes
secret= ; a unique password for this device –

7705551002
description = 2085L2
subscribecontext=default
;subscribemwi=yes
allowsubscribe=yes
secret= ; a unique password for this device –

7705551003
description = 1EFDL1
subscribecontext=default
;subscribemwi=yes
allowsubscribe=yes
secret= ; a unique password for this device –

7705551004
description = 1EFDL2
subscribecontext=default
;subscribemwi=yes
allowsubscribe=yes
secret= ; a unique password for this device –
asteriskpbx@asterisk1:/etc/asterisk$
asteriskpbx@asterisk1:/etc/asterisk$
asteriskpbx@asterisk1:/etc/asterisk$
asteriskpbx@asterisk1:/etc/asterisk$ vim extensions.conf
[LocalSets]

exten => 911,1,Dial(SIP/${EXTEN}@VoiceGW)
exten => 7705551001,1,Dial(SIP/7705551001)
exten => 7705551002,1,Dial(SIP/7705551002)
exten => 7705551003,1,Dial(SIP/7705551003)
exten => 7705551004,1,Dial(SIP/7705551004)

[default]
exten => 7705551001,hint,SIP/7705551001
exten => 7705551002,hint,SIP/7705551002
exten => 7705551003,hint,SIP/7705551003
exten => 7705551004,hint,SIP/7705551004
~
~

No. Time Source Destination Protocol Length Info
5 11:27:42.087832000 6.4.20.182 10.90.190.105 SIP 992 Request: SUBSCRIBE sip:7705551003@asterisk1.chs.cisco.com |

Frame 5: 992 bytes on wire (7936 bits), 992 bytes captured (7936 bits) on interface 0
Ethernet II, Src: c8:4c:75:77:af:24 (c8:4c:75:77:af:24), Dst: d0:d0:fd:2a:79:00 (d0:d0:fd:2a:79:00)
Internet Protocol Version 4, Src: 6.4.20.182 (6.4.20.182), Dst: 10.90.190.105 (10.90.190.105)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5060 (5060)
Session Initiation Protocol (SUBSCRIBE)
Request-Line: SUBSCRIBE sip:7705551003@asterisk1.chs.cisco.com SIP/2.0
Method: SUBSCRIBE
Request-URI: sip:7705551003@asterisk1.chs.cisco.com
Request-URI User Part: 7705551003
Request-URI Host Part: asterisk1.chs.cisco.com
[Resent Packet: False]
Message Header
Accept: application/reginfo+xml, application/rlmi+xml, application/sdp, application/simple-message-summary, application/watcherinfo+xml, application/xml, message/sipfrag, multipart/mixed
Via: SIP/2.0/UDP 6.4.20.182:5060;branch=z9hG4bKccbad36681cbb41ea;rport
Route: sip:asterisk1.chs.cisco.com;lr
Max-Forwards: 70
From: sip:7705551003@asterisk1.chs.cisco.com;tag=bde993aa01
To: sip:7705551003@asterisk1.chs.cisco.com
Call-ID: efc6eb2394b5777a
CSeq: 282681240 SUBSCRIBE
Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, OPTIONS, PRACK, REFER, SUBSCRIBE, UPDATE
Allow-Events: refer, vq-rtcpxr
Contact: sip:7705551003@6.4.20.182:5060;transport=udp
Event: reg
Expires: 600000
P-Preferred-Identity: sip:7705551003@asterisk1.chs.cisco.com
Supported: 100rel, answermode, eventlist, gruu, histinfo, path, replaces, tdialog, timer
User-Agent: dpc3939-1622-141112a
Content-Length: 0

No. Time Source Destination Protocol Length Info
6 11:27:42.088831000 10.90.190.105 6.4.20.182 SIP 525 Status: 489 Bad Event |

Frame 6: 525 bytes on wire (4200 bits), 525 bytes captured (4200 bits) on interface 0
Ethernet II, Src: d0:d0:fd:2a:79:00 (d0:d0:fd:2a:79:00), Dst: c8:4c:75:77:af:24 (c8:4c:75:77:af:24)
Internet Protocol Version 4, Src: 10.90.190.105 (10.90.190.105), Dst: 6.4.20.182 (6.4.20.182)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5060 (5060)
Session Initiation Protocol (489)
Status-Line: SIP/2.0 489 Bad Event
Status-Code: 489
[Resent Packet: False]
[Request Frame: 5]
[Response Time (ms): 0]
Message Header
Via: SIP/2.0/UDP 6.4.20.182:5060;branch=z9hG4bKccbad36681cbb41ea;received=6.4.20.182;rport=5060
From: sip:7705551003@asterisk1.chs.cisco.com;tag=bde993aa01
To: sip:7705551003@asterisk1.chs.cisco.com;tag=as119032a5
Call-ID: efc6eb2394b5777a
CSeq: 282681240 SUBSCRIBE
Server: Asterisk PBX SVN-branch-11-r428117
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

No. Time Source Destination Protocol Length Info
7 11:27:42.101827000 6.4.20.182 10.90.190.105 SIP 1004 Request: SUBSCRIBE sip:7705551003@asterisk1.chs.cisco.com |

Frame 7: 1004 bytes on wire (8032 bits), 1004 bytes captured (8032 bits) on interface 0
Ethernet II, Src: c8:4c:75:77:af:24 (c8:4c:75:77:af:24), Dst: d0:d0:fd:2a:79:00 (d0:d0:fd:2a:79:00)
Internet Protocol Version 4, Src: 6.4.20.182 (6.4.20.182), Dst: 10.90.190.105 (10.90.190.105)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5060 (5060)
Session Initiation Protocol (SUBSCRIBE)
Request-Line: SUBSCRIBE sip:7705551003@asterisk1.chs.cisco.com SIP/2.0
Method: SUBSCRIBE
Request-URI: sip:7705551003@asterisk1.chs.cisco.com
Request-URI User Part: 7705551003
Request-URI Host Part: asterisk1.chs.cisco.com
[Resent Packet: False]
Message Header
Accept: application/reginfo+xml, application/rlmi+xml, application/sdp, application/simple-message-summary, application/watcherinfo+xml, application/xml, message/sipfrag, multipart/mixed
Via: SIP/2.0/UDP 6.4.20.182:5060;branch=z9hG4bKbe26c1f418abd0145;rport
Route: sip:asterisk1.chs.cisco.com;lr
Max-Forwards: 70
From: sip:7705551003@asterisk1.chs.cisco.com;tag=9ecd61a80b
To: sip:7705551003@asterisk1.chs.cisco.com
Call-ID: 90b079f68f2db0cc
CSeq: 1095007897 SUBSCRIBE
Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, OPTIONS, PRACK, REFER, SUBSCRIBE, UPDATE
Allow-Events: refer, vq-rtcpxr
Contact: sip:7705551003@6.4.20.182:5060;transport=udp
Event: message-summary
Expires: 43200
P-Preferred-Identity: sip:7705551003@asterisk1.chs.cisco.com
Supported: 100rel, answermode, eventlist, gruu, histinfo, path, replaces, tdialog, timer
User-Agent: dpc3939-1622-141112a
Content-Length: 0

No. Time Source Destination Protocol Length Info
8 11:27:42.102550000 10.90.190.105 6.4.20.182 SIP 531 Status: 406 Not Acceptable |

Frame 8: 531 bytes on wire (4248 bits), 531 bytes captured (4248 bits) on interface 0
Ethernet II, Src: d0:d0:fd:2a:79:00 (d0:d0:fd:2a:79:00), Dst: c8:4c:75:77:af:24 (c8:4c:75:77:af:24)
Internet Protocol Version 4, Src: 10.90.190.105 (10.90.190.105), Dst: 6.4.20.182 (6.4.20.182)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5060 (5060)
Session Initiation Protocol (406)
Status-Line: SIP/2.0 406 Not Acceptable
Status-Code: 406
[Resent Packet: False]
[Request Frame: 7]
[Response Time (ms): 0]
Message Header
Via: SIP/2.0/UDP 6.4.20.182:5060;branch=z9hG4bKbe26c1f418abd0145;received=6.4.20.182;rport=5060
From: sip:7705551003@asterisk1.chs.cisco.com;tag=9ecd61a80b
To: sip:7705551003@asterisk1.chs.cisco.com;tag=as6444592b
Call-ID: 90b079f68f2db0cc
CSeq: 1095007897 SUBSCRIBE
Server: Asterisk PBX SVN-branch-11-r428117
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

“reg” is not a supported event type.

Asterisk requires application/simple-message-summary to be the only acceptable format for message summary events, at least in the version I checked. That’s probably a misfeature, but I believe the client is also in error by specifying formats that it would not be able to handle for message summaries. Actually, it will handle other formats, but only if they are on separate lines.

The accepted events appear to be:

presence
dialog
message-summary
call-completion

Thanks for the response David, now I know why the event: reg are being rejected.

But what i don’t understand is, the client sends a SUBSCRIBE with Event: message-summary and receives a 406. Please could you help me with this. Is Event: message-summary supported in Asterisk 11? Or do I need to upgrade\update to other versions.

Thanks

Asterisk is objecting to the Accept line, not the Event. If Accept is present, there must be a line consisting only of:

Accept: application/simple-message-summary

and the peer should only be listing formats that it can accept and process as results of SUBSCRIBE.

So, If the client sends the SIP request as below, with Accept header only with application/simple-message-summary, this should work?

Message Header
Accept: application/simple-message-summary
Via: SIP/2.0/UDP 6.4.20.182:5060;branch=z9hG4bKbe26c1f418abd0145;rport
Route: sip:asterisk1.chs.cisco.com;lr
Max-Forwards: 70
From: sip:7705551003@asterisk1.chs.cisco.com;tag=9ecd61a80b
To: sip:7705551003@asterisk1.chs.cisco.com
Call-ID: 90b079f68f2db0cc
CSeq: 1095007897 SUBSCRIBE
Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, OPTIONS, PRACK, REFER, SUBSCRIBE, UPDATE
Allow-Events: refer, vq-rtcpxr
Contact: sip:7705551003@6.4.20.182:5060;transport=udp
Event: message-summary
Expires: 43200
P-Preferred-Identity: sip:7705551003@asterisk1.chs.cisco.com
Supported: 100rel, answermode, eventlist, gruu, histinfo, path, replaces, tdialog, timer
User-Agent: dpc3939-1622-141112a
Content-Length: 0

That’s what my reading of the code says.