< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] Embedded headers in a SIP Uri


There's an exception when the INVITE below is parsed (using the latest code).  
It looks like a bug in the parsing of embedded headers in a Uri (shows up when 
the Request-Line is parsed).  My reading of 3261 is that "headers" in the 
following won't ever contain a space (unless it's escaped):

SIP-URI          =  "sip:" [ userinfo ] hostport
                    uri-parameters [ headers ]

So I think Uri.cxx:850 should be changed to the following:

pb.skipToOneOf(ParseBuffer::Whitespace);

I've updated resip/stack/test/testSipMessage.cxx with a test case for this.  
I'll check in my fix to Uri.cxx if someone can confirm that it looks good.

Thanks,
Jeremy


---------------------------------

INVITE sip:7003@xxxxxxxxxxxxx:20060?REQUIRE=replaces SIP/2.0
Via: SIP/2.0/UDP 192.122.24.109;branch=z9hG4bKfc4a20db5EC58FB8
From: "7006 601" <sip:7006@xxxxxxxxxxxxxxxxxxxxxxx>;tag=29C49D21-D9FDBDBC
To: <sip:7003@xxxxxxxxxxxxx:20060?REQUIRE=replaces>
CSeq: 1 INVITE
Call-ID: a9ad18fd-5fd391bf-309febea@xxxxxxxxxxxxxx
Contact: <sip:7006@xxxxxxxxxxxxxx>
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, 
PRACK, UPDATE, REFER
User-Agent: PolycomSoundPointIP-SPIP_601-UA/2.1.1.0052
Supported: 100rel,replaces
Allow-Events: talk,hold,conference
Replaces: 
MDQ5MDJmZGEyYTkyNTBhZjBhNDg0NjUyMzE1MTc2Mjk.;to-tag=cf71d002;from-tag=1394930945
Referred-By: <sip:7776@xxxxxxxxxxxxxxxxxxxxxxx>
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: 253

v=0
o=- 1210601497 1210601497 IN IP4 192.122.24.109
s=Polycom IP Phone
c=IN IP4 192.122.24.109
t=0 0
m=audio 2224 RTP/AVP 0 8 18 101
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000



Jeremy Geras
Software Developer
CounterPath Corporation

T  604.320.3344 x1373
F  250.380.0404


This email may be privileged and/or confidential, and the sender does not waive 
any related rights and obligations. Any distribution, use or copying of this 
email or the information it contains by other than an intended recipient is 
unauthorized. If you receive this email in error, please notify me immediately 
and delete the contents and any attachments.