[asterisk-bugs] [Asterisk 0017790]: Missing semicolon in SIP-Notify

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Aug 25 11:42:00 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17790 
====================================================================== 
Reported By:                denzs
Assigned To:                qwell
====================================================================== 
Project:                    Asterisk
Issue ID:                   17790
Category:                   Channels/chan_sip/Subscriptions
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     feedback
Target Version:             1.8.0
Asterisk Version:           SVN 
JIRA:                       SWP-2005 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): 1.8 
SVN Revision (number only!): 280878 
Request Review:              
====================================================================== 
Date Submitted:             2010-08-04 04:01 CDT
Last Modified:              2010-08-25 11:42 CDT
====================================================================== 
Summary:                    Missing semicolon in SIP-Notify
Description: 
I see a lots of messages like this in the CLI...

It seems like there is a semicolon missing?

NOTIFY sip:1686 at 192.168.51.201:5060user=phone
shouldn it be
NOTIFY sip:1686 at 192.168.51.201:5060;user=phone


Sending to 192.168.51.201:5060 (no NAT)
[Aug  4 11:29:07] ERROR[486]: netsock2.c:245 ast_sockaddr_resolve:
getaddrinfo("192.168.51.201", "5060user=phone", ...): Servname not
supported for ai_socktype
[Aug  4 11:29:07] WARNING[486]: chan_sip.c:12820
__set_address_from_contact: Invalid host name in Contact: (can't resolve in
DNS) : '192.168.51.201:5060user=phone'
Scheduling destruction of SIP dialog
'66e9b8d9258832ce00d06b607e0243e3 at 192.168.51.123:5060' in 32000 ms (Method:
NOTIFY)
Reliably Transmitting (no NAT) to 192.168.51.201:5060:
NOTIFY sip:1686 at 192.168.51.201:5060user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.51.123:5060;branch=z9hG4bK08321305
Max-Forwards: 70
From: "asterisk" <sip:asterisk at 192.168.51.123>;tag=as59f03aba
To: <sip:1686 at 192.168.51.201:5060user=phone>
Contact: <sip:asterisk at 192.168.51.123:5060>
Call-ID: 66e9b8d9258832ce00d06b607e0243e3 at 192.168.51.123:5060
CSeq: 102 NOTIFY
User-Agent: Asterisk PBX SVN-trunk-r280810
Event: message-summary
Content-Type: application/simple-message-summary
Content-Length: 99

Messages-Waiting: no
Message-Account: sip:asterisk at 192.168.51.123:5060
Voice-Message: 0/0 (0/0)

---

<--- Transmitting (no NAT) to 192.168.51.201:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP
192.168.51.201:5060;branch=z9hG4bK1523223228;received=192.168.51.201;rport=5060
From:
<sip:1686 at poc.lvmtest.ar.intranet.gonicus.de;user=phone>;tag=766983564
To:
<sip:1686 at poc.lvmtest.ar.intranet.gonicus.de;user=phone>;tag=as5a5cd7fd
Call-ID: 117896864-5060-1 at 192.168.51.201
CSeq: 4420 REGISTER
Server: Asterisk PBX SVN-trunk-r280810
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH
Supported: replaces, timer
Expires: 300
Contact: <sip:1686 at 192.168.51.201:5060;user=phone>;expires=300
Date: Wed, 04 Aug 2010 09:29:07 GMT
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '117896864-5060-1 at 192.168.51.201' in
32000 ms (Method: REGISTER)
[Aug  4 11:29:07] ERROR[459]: netsock2.c:245 ast_sockaddr_resolve:
getaddrinfo("192.168.51.201", "5060user=phone", ...): Servname not
supported for ai_socktype
[Aug  4 11:29:07] WARNING[459]: chan_sip.c:12820
__set_address_from_contact: Invalid host name in Contact: (can't resolve in
DNS) : '192.168.51.201:5060user=phone'
Retransmitting https://issues.asterisk.org/view.php?id=1 (no NAT) to
192.168.51.201:5060:
NOTIFY sip:1686 at 192.168.51.201:5060user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.51.123:5060;branch=z9hG4bK074f9545
Max-Forwards: 70
From: "asterisk" <sip:asterisk at 192.168.51.123>;tag=as626d156f
To: <sip:1686 at 192.168.51.201:5060user=phone>
Contact: <sip:asterisk at 192.168.51.123:5060>
Call-ID: 5c08a9c229b34d5a23e3183c58953d48 at 192.168.51.123:5060
CSeq: 102 NOTIFY
User-Agent: Asterisk PBX SVN-trunk-r280810
Event: message-summary
Content-Type: application/simple-message-summary
Content-Length: 99

Messages-Waiting: no
Message-Account: sip:asterisk at 192.168.51.123:5060
Voice-Message: 0/0 (0/0)

---
Retransmitting https://issues.asterisk.org/view.php?id=1 (no NAT) to
192.168.51.201:5060:
NOTIFY sip:1686 at 192.168.51.201:5060user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.51.123:5060;branch=z9hG4bK08321305
Max-Forwards: 70
From: "asterisk" <sip:asterisk at 192.168.51.123>;tag=as59f03aba
To: <sip:1686 at 192.168.51.201:5060user=phone>
Contact: <sip:asterisk at 192.168.51.123:5060>
Call-ID: 66e9b8d9258832ce00d06b607e0243e3 at 192.168.51.123:5060
CSeq: 102 NOTIFY
User-Agent: Asterisk PBX SVN-trunk-r280810
Event: message-summary
Content-Type: application/simple-message-summary
Content-Length: 99

Messages-Waiting: no
Message-Account: sip:asterisk at 192.168.51.123:5060
Voice-Message: 0/0 (0/0)


====================================================================== 

---------------------------------------------------------------------- 
 (0126324) denzs (reporter) - 2010-08-25 11:42
 https://issues.asterisk.org/view.php?id=17790#c126324 
---------------------------------------------------------------------- 
Asterisk sends the wrong formated URI even in SIP-Notify.

See byte 0x115 which is 0x03 instead of 0x3B (;)

wireshark hexdump (Notify from asterisk to phone):

0000   00 1a e8 0c 06 12 00 16 3e 55 b7 b7 08 00 45 00  ........>U....E.
0010   02 84 11 f2 00 00 40 11 7d cb c0 a8 33 7b c0 a8  ...... at .}...3{..
0020   33 e0 13 c4 13 c4 02 70 46 5b 4e 4f 54 49 46 59  3......pF[NOTIFY
0030   20 73 69 70 3a 31 36 38 33 40 31 39 32 2e 31 36   sip:1683 at 192.16
0040   38 2e 35 31 2e 32 32 34 3a 35 30 36 30 03 74 72  8.51.224:5060.tr
0050   61 6e 73 70 6f 72 74 3d 75 64 70 20 53 49 50 2f  ansport=udp SIP/
0060   32 2e 30 0d 0a 56 69 61 3a 20 53 49 50 2f 32 2e  2.0..Via: SIP/2.
0070   30 2f 55 44 50 20 31 39 32 2e 31 36 38 2e 35 31  0/UDP 192.168.51
0080   2e 31 32 33 3a 35 30 36 30 3b 62 72 61 6e 63 68  .123:5060;branch
0090   3d 7a 39 68 47 34 62 4b 35 61 39 35 37 62 39 38  =z9hG4bK5a957b98
00a0   0d 0a 4d 61 78 2d 46 6f 72 77 61 72 64 73 3a 20  ..Max-Forwards: 
00b0   37 30 0d 0a 46 72 6f 6d 3a 20 22 61 73 74 65 72  70..From: "aster
00c0   69 73 6b 22 20 3c 73 69 70 3a 61 73 74 65 72 69  isk" <sip:asteri
00d0   73 6b 40 31 39 32 2e 31 36 38 2e 35 31 2e 31 32  sk at 192.168.51.12
00e0   33 3e 3b 74 61 67 3d 61 73 36 61 33 63 36 61 66  3>;tag=as6a3c6af
00f0   39 0d 0a 54 6f 3a 20 3c 73 69 70 3a 31 36 38 33  9..To: <sip:1683
0100   40 31 39 32 2e 31 36 38 2e 35 31 2e 32 32 34 3a  @192.168.51.224:
0110   35 30 36 30 03 74 72 61 6e 73 70 6f 72 74 3d 75  5060.transport=u
0120   64 70 3e 0d 0a 43 6f 6e 74 61 63 74 3a 20 3c 73  dp>..Contact: <s
0130   69 70 3a 61 73 74 65 72 69 73 6b 40 31 39 32 2e  ip:asterisk at 192.
0140   31 36 38 2e 35 31 2e 31 32 33 3a 35 30 36 30 3e  168.51.123:5060>
0150   0d 0a 43 61 6c 6c 2d 49 44 3a 20 35 38 30 34 65  ..Call-ID: 5804e
0160   61 64 61 30 37 38 63 64 30 34 36 33 37 66 66 36  ada078cd04637ff6
0170   32 36 65 32 35 35 62 39 33 38 32 40 31 39 32 2e  26e255b9382 at 192.
0180   31 36 38 2e 35 31 2e 31 32 33 3a 35 30 36 30 0d  168.51.123:5060.
0190   0a 43 53 65 71 3a 20 31 30 32 20 4e 4f 54 49 46  .CSeq: 102 NOTIF
01a0   59 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 41  Y..User-Agent: A
01b0   73 74 65 72 69 73 6b 20 50 42 58 20 53 56 4e 2d  sterisk PBX SVN-
01c0   74 72 75 6e 6b 2d 72 32 38 33 34 39 35 0d 0a 45  trunk-r283495..E
01d0   76 65 6e 74 3a 20 6d 65 73 73 61 67 65 2d 73 75  vent: message-su
01e0   6d 6d 61 72 79 0d 0a 43 6f 6e 74 65 6e 74 2d 54  mmary..Content-T
01f0   79 70 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e  ype: application
0200   2f 73 69 6d 70 6c 65 2d 6d 65 73 73 61 67 65 2d  /simple-message-
0210   73 75 6d 6d 61 72 79 0d 0a 43 6f 6e 74 65 6e 74  summary..Content
0220   2d 4c 65 6e 67 74 68 3a 20 39 39 0d 0a 0d 0a 4d  -Length: 99....M
0230   65 73 73 61 67 65 73 2d 57 61 69 74 69 6e 67 3a  essages-Waiting:
0240   20 6e 6f 0d 0a 4d 65 73 73 61 67 65 2d 41 63 63   no..Message-Acc
0250   6f 75 6e 74 3a 20 73 69 70 3a 61 73 74 65 72 69  ount: sip:asteri
0260   73 6b 40 31 39 32 2e 31 36 38 2e 35 31 2e 31 32  sk at 192.168.51.12
0270   33 3a 35 30 36 30 0d 0a 56 6f 69 63 65 2d 4d 65  3:5060..Voice-Me
0280   73 73 61 67 65 3a 20 30 2f 30 20 28 30 2f 30 29  ssage: 0/0 (0/0)
0290   0d 0a                                            .. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-08-25 11:42 denzs          Note Added: 0126324                          
======================================================================




More information about the asterisk-bugs mailing list