[asterisk-bugs] [JIRA] (ASTERISK-20562) Contact information appears to be mis-parsed and registered incorrectly

Michael L. Young (JIRA) noreply at issues.asterisk.org
Thu Nov 8 23:17:21 CST 2012


    [ https://issues.asterisk.org/jira/browse/ASTERISK-20562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=199476#comment-199476 ] 

Michael L. Young commented on ASTERISK-20562:
---------------------------------------------

I just played around with adding the "ob" parameter to the contact header field in the code right before Asterisk parses it and everything seemed to be parsed properly.

It looks like this can be closed for now.  If you come across this problem again, let us know and we can take a look at it with fresh debug information.
                
> Contact information appears to be mis-parsed and registered incorrectly 
> ------------------------------------------------------------------------
>
>                 Key: ASTERISK-20562
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20562
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/General
>    Affects Versions: 10.9.0
>         Environment: Amazon EC2, 4ECU, 7.5GB RAM, CentOS 5.8 64bit, sip friends are configured via MySQL Realtime
>            Reporter: Nir Simionovich (GreenfieldTech - Israel)
>            Assignee: Nir Simionovich (GreenfieldTech - Israel)
>
> When utilizing mobile phones, using csipsimple (Android + PJSIP) or iPhone (idoubs), for some odd reason contact information appears to contain information that isn't supposed to be there. 
> Issue manifests when elevating logger, the following appears:
> {noformat}
> [Oct 15 05:20:08] ERROR[1721]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("46.19.81.28", "45183^CSipSimple_GT-I9100T", ...): Servname not supported for ai_socktype
> [Oct 15 05:20:08] WARNING[1721]: chan_sip.c:14460 __set_address_from_contact: Invalid host name in Contact: (can't resolve in DNS) : '46.19.81.28:45183^CSipSimple_GT-I9100T'
> {noformat}
> it is true that my return port is 45183, however, why is the Agent version appearing in there? In the SIP trace, the information appears to be clean, at least from what I can tell. 
> Following below is a SIP trace:
> {noformat}
> <--- SIP read from UDP:46.19.81.28:61832 --->
> REGISTER sip:107.21.118.127 SIP/2.0
> Via: SIP/2.0/UDP 46.19.81.28:37784;branch=z9hG4bKPjXF5Fl8qPZaVEEuV9I6.Z.2LP8mPoj-6s
> Route: <sip:107.21.118.127;transport=udp;lr>
> Max-Forwards: 70
> From: <sip:972546982826 at 107.21.118.127>;tag=U.Mb.Mzii-pItvZ4ptMc3jsvxFSRn5JB
> To: <sip:972546982826 at 107.21.118.127>
> Call-ID: xaZ7Ogr6KCYuTwyBZO4SS61cBsqK4rZB
> CSeq: 50867 REGISTER
> User-Agent: CSipSimple_GT-I9100T-15/r1916
> Contact: <sip:972546982826 at 46.19.81.28:37784;ob>
> Expires: 900
> Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
> Content-Length: 0
> <------------->
> --- (13 headers 0 lines) ---
> Sending to 46.19.81.28:61832 (NAT)
> [Oct 15 05:20:08] ERROR[1721]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("46.19.81.28", "45183^CSipSimple_GT-I9100T", ...): Servname not supported for ai_socktype
> [Oct 15 05:20:08] WARNING[1721]: chan_sip.c:14460 __set_address_from_contact: Invalid host name in Contact: (can't resolve in DNS) : '46.19.81.28:45183^CSipSimple_GT-I9100T'
> <--- Transmitting (NAT) to 46.19.81.28:61832 --->
> SIP/2.0 401 Unauthorized
> ia: SIP/2.0/UDP 46.19.81.28:37784;branch=z9hG4bKPjXF5Fl8qPZaVEEuV9I6.Z.2LP8mPoj-6s;received=46.19.81.28;rport=61832
> From: <sip:972546982826 at 107.21.118.127>;tag=U.Mb.Mzii-pItvZ4ptMc3jsvxFSRn5JB
> To: <sip:972546982826 at 107.21.118.127>;tag=as328366cb
> Call-ID: xaZ7Ogr6KCYuTwyBZO4SS61cBsqK4rZB
> CSeq: 50867 REGISTER
> Server: Asterisk PBX 10.9.0
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
> Supported: replaces, timer
> WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="06b15c02"
> Content-Length: 0
> <------------>
> Scheduling destruction of SIP dialog 'xaZ7Ogr6KCYuTwyBZO4SS61cBsqK4rZB' in 32000 ms (Method: REGISTER)
> [Oct 15 05:20:08] ERROR[1721]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("46.19.81.28", "45183^CSipSimple_GT-I9100T", ...): Servname not supported for ai_socktype
> [Oct 15 05:20:08] WARNING[1721]: chan_sip.c:14460 __set_address_from_contact: Invalid host name in Contact: (can't resolve in DNS) : '46.19.81.28:45183^CSipSimple_GT-I9100T'
> <--- SIP read from UDP:46.19.81.28:61832 --->
> REGISTER sip:107.21.118.127 SIP/2.0
> Via: SIP/2.0/UDP 46.19.81.28:37784;branch=z9hG4bKPjXF5Fl8qPZaVEEuV9I6.Z.2LP8mPoj-6s
> Route: <sip:107.21.118.127;transport=udp;lr>
> Max-Forwards: 70
> From: <sip:972546982826 at 107.21.118.127>;tag=U.Mb.Mzii-pItvZ4ptMc3jsvxFSRn5JB
> To: <sip:972546982826 at 107.21.118.127>
> Call-ID: xaZ7Ogr6KCYuTwyBZO4SS61cBsqK4rZB
> CSeq: 50867 REGISTER
> User-Agent: CSipSimple_GT-I9100T-15/r1916
> Contact: <sip:972546982826 at 46.19.81.28:37784;ob>
> Expires: 900
> Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
> Content-Length: 0
> <------------->
> --- (13 headers 0 lines) ---
> Sending to 46.19.81.28:61832 (NAT)
> [Oct 15 05:20:08] ERROR[1721]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("46.19.81.28", "45183^CSipSimple_GT-I9100T", ...): Servname not supported for ai_socktype
> [Oct 15 05:20:08] WARNING[1721]: chan_sip.c:14460 __set_address_from_contact: Invalid host name in Contact: (can't resolve in DNS) : '46.19.81.28:45183^CSipSimple_GT-I9100T'
> <--- Transmitting (NAT) to 46.19.81.28:61832 --->
> SIP/2.0 401 Unauthorized
> ia: SIP/2.0/UDP 46.19.81.28:37784;branch=z9hG4bKPjXF5Fl8qPZaVEEuV9I6.Z.2LP8mPoj-6s;received=46.19.81.28;rport=61832
> From: <sip:972546982826 at 107.21.118.127>;tag=U.Mb.Mzii-pItvZ4ptMc3jsvxFSRn5JB
> To: <sip:972546982826 at 107.21.118.127>;tag=as328366cb
> Call-ID: xaZ7Ogr6KCYuTwyBZO4SS61cBsqK4rZB
> CSeq: 50867 REGISTER
> Server: Asterisk PBX 10.9.0
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
> Supported: replaces, timer
> WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="06b15c02"
> Content-Length: 0
> <------------>
> Scheduling destruction of SIP dialog 'xaZ7Ogr6KCYuTwyBZO4SS61cBsqK4rZB' in 32000 ms (Method: REGISTER)
> [Oct 15 05:20:08] ERROR[1721]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("46.19.81.28", "45183^CSipSimple_GT-I9100T", ...): Servname not supported for ai_socktype
> [Oct 15 05:20:08] WARNING[1721]: chan_sip.c:14460 __set_address_from_contact: Invalid host name in Contact: (can't resolve in DNS) : '46.19.81.28:45183^CSipSimple_GT-I9100T'
> <--- SIP read from UDP:46.19.81.28:61832 --->
> REGISTER sip:107.21.118.127 SIP/2.0
> Via: SIP/2.0/UDP 46.19.81.28:37784;branch=z9hG4bKPjXF5Fl8qPZaVEEuV9I6.Z.2LP8mPoj-6s
> Route: <sip:107.21.118.127;transport=udp;lr>
> Max-Forwards: 70
> From: <sip:972546982826 at 107.21.118.127>;tag=U.Mb.Mzii-pItvZ4ptMc3jsvxFSRn5JB
> To: <sip:972546982826 at 107.21.118.127>
> Call-ID: xaZ7Ogr6KCYuTwyBZO4SS61cBsqK4rZB
> CSeq: 50867 REGISTER
> User-Agent: CSipSimple_GT-I9100T-15/r1916
> Contact: <sip:972546982826 at 46.19.81.28:37784;ob>
> Expires: 900
> Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
> Content-Length: 0
> <------------->
> --- (13 headers 0 lines) ---
> Sending to 46.19.81.28:61832 (NAT)
> [Oct 15 05:20:08] ERROR[1721]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("46.19.81.28", "45183^CSipSimple_GT-I9100T", ...): Servname not supported for ai_socktype
> [Oct 15 05:20:08] WARNING[1721]: chan_sip.c:14460 __set_address_from_contact: Invalid host name in Contact: (can't resolve in DNS) : '46.19.81.28:45183^CSipSimple_GT-I9100T'
> <--- Transmitting (NAT) to 46.19.81.28:61832 --->
> SIP/2.0 401 Unauthorized
> Via: SIP/2.0/UDP 46.19.81.28:37784;branch=z9hG4bKPjXF5Fl8qPZaVEEuV9I6.Z.2LP8mPoj-6s;received=46.19.81.28;rport=61832
> From: <sip:972546982826 at 107.21.118.127>;tag=U.Mb.Mzii-pItvZ4ptMc3jsvxFSRn5JB
> To: <sip:972546982826 at 107.21.118.127>;tag=as328366cb
> Call-ID: xaZ7Ogr6KCYuTwyBZO4SS61cBsqK4rZB
> CSeq: 50867 REGISTER
> Server: Asterisk PBX 10.9.0
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
> Supported: replaces, timer
> WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="06b15c02"
> Content-Length: 0
> <------------>
> Scheduling destruction of SIP dialog 'xaZ7Ogr6KCYuTwyBZO4SS61cBsqK4rZB' in 32000 ms (Method: REGISTER)
> [Oct 15 05:20:08] ERROR[1721]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("46.19.81.28", "45183^CSipSimple_GT-I9100T", ...): Servname not supported for ai_socktype
> [Oct 15 05:20:08] WARNING[1721]: chan_sip.c:14460 __set_address_from_contact: Invalid host name in Contact: (can't resolve in DNS) : '46.19.81.28:45183^CSipSimple_GT-I9100T'
> <--- SIP read from UDP:46.19.81.28:61832 --->
> REGISTER sip:107.21.118.127 SIP/2.0
> Via: SIP/2.0/UDP 46.19.81.28:37784;branch=z9hG4bKPjPxbivdyWIZU6yQkWnVGqL3A7WuHRLRJs
> Route: <sip:107.21.118.127;transport=udp;lr>
> Max-Forwards: 70
> From: <sip:972546982826 at 107.21.118.127>;tag=U.Mb.Mzii-pItvZ4ptMc3jsvxFSRn5JB
> To: <sip:972546982826 at 107.21.118.127>
> Call-ID: xaZ7Ogr6KCYuTwyBZO4SS61cBsqK4rZB
> CSeq: 50868 REGISTER
> User-Agent: CSipSimple_GT-I9100T-15/r1916
> Contact: <sip:972546982826 at 46.19.81.28:37784;ob>
> Expires: 900
> Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
> Authorization: Digest username="972546982826", realm="asterisk", nonce="06b15c02", uri="sip:107.21.118.127", response="4473e2fb85a4f63853e23ebcf6c56989", algorithm=MD5
> Content-Length: 0
> <------------->
> --- (14 headers 0 lines) ---
> Sending to 46.19.81.28:61832 (NAT)
> [Oct 15 05:20:08] ERROR[1721]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("46.19.81.28", "45183^CSipSimple_GT-I9100T", ...): Servname not supported for ai_socktype
> [Oct 15 05:20:08] WARNING[1721]: chan_sip.c:14460 __set_address_from_contact: Invalid host name in Contact: (can't resolve in DNS) : '46.19.81.28:45183^CSipSimple_GT-I9100T'
>     -- Registered SIP '972546982826' at 46.19.81.28:61832
>        > Saved useragent "CSipSimple_GT-I9100T-15/r1916" for peer 972546982826
> <--- Transmitting (NAT) to 46.19.81.28:61832 --->
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP 46.19.81.28:37784;branch=z9hG4bKPjPxbivdyWIZU6yQkWnVGqL3A7WuHRLRJs;received=46.19.81.28;rport=61832
> From: <sip:972546982826 at 107.21.118.127>;tag=U.Mb.Mzii-pItvZ4ptMc3jsvxFSRn5JB
> To: <sip:972546982826 at 107.21.118.127>;tag=as328366cb
> Call-ID: xaZ7Ogr6KCYuTwyBZO4SS61cBsqK4rZB
> CSeq: 50868 REGISTER
> Server: Asterisk PBX 10.9.0
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
> Supported: replaces, timer
> Expires: 900
> Contact: <sip:972546982826 at 46.19.81.28:37784;ob>;expires=900
> Date: Mon, 15 Oct 2012 09:20:08 GMT
> Content-Length: 0
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list