[Asterisk-Dev] userinfo part missing in contact header

Ivo Brett ivo at o2.ie
Sat Feb 21 03:20:05 MST 2004


Hello,

I have noticed a parsing error with libosip-0.9.7 and Asterisk CVS-12/21/03-23:12:52.

libosip sends Options request:
==============================
OPTIONS sip:127.0.0.1:5061 SIP/2.0
Via: SIP/2.0/UDP
127.0.0.1:5060;branch=z9hG4bK998826981;rport
From: <sip:jack at 127.0.0.1>;tag=21754835
To: <sip:127.0.0.1:5061>
Call-ID: 3592017974 at 127.0.0.1
CSeq: 20 OPTIONS
max-forwards: 50
user-agent: oSIP-ua/0.8.1
Content-Type: application/sdp
Content-Length:   210

v=0
o=- 1890408335 1890408335 IN IP4 192.168.1.114
s=session
c=IN IP4 192.168.1.114
t=3185086562 0
m=audio 10060 RTP/AVP 0
a=rtpmap:0 PCMU/8000
m=application 10050 UDP wb
a=orient:portrait
a=recvonly

Asterisk returns Options response:
==============================
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP
127.0.0.1:5060;branch=z9hG4bK998826981;rport
From: <sip:jack at 127.0.0.1>;tag=21754835
To: <sip:127.0.0.1:5061>;tag=as06a5ee64
Call-ID: 3592017974 at 127.0.0.1
CSeq: 20 OPTIONS
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:@127.0.0.1:5061>
Accept: application/sdp
Content-Length: 0

Notice that the Contact header in the Asterisk reply is Contact: <sip:@127.0.0.1:5061>. I.E. It doesnt have a userinfo prior to the "@". libosip doesnt like this and it fails in parsing.

Not sure if this is an error with Asterisk or libosip. The libosip development team think that this is an Asterisk error. Their response below.

Any views on whether this is an Asterisk bug, if it has been fixed and if not how can I seek to resolve it?

Rgds,
Ivo

>>>From libosip developer>>>>
According to RFC 3261, if the '@' sign is present, the userinfo part of 
the URI must not be empty.   Therefore it is an Asterisk bug.





More information about the asterisk-dev mailing list