Hi, I'm trying my SIP parser against SIP test messages in RFC 4475. There is
one not working, but I really think that my parser behaviour is correct:
3.1.2.11. Escaped Headers in SIP Request-URI
This INVITE is malformed, as the SIP Request-URI contains escaped
headers.
INVITE sip:[email protected]?route=%3csip:example.com%3E SIP/2.0
To: sip:[email protected]
From: sip:[email protected];tag=341518
Max-Forwards: 7
Contact: <sip:[email protected]>
Call-ID: escruri.23940-asdfhj-aje3br-234q098w-fawerh2q-h4n5
CSeq: 149209342 INVITE
Via: SIP/2.0/UDP host-of-the-hour.example.com;branch=z9hG4bKkdjuw
Content-Type: application/sdp
Content-Length: 150
It says that the request URI has invalid header parameters:
Route=%3Csip:example.com%3E
but my parser (which aims to be 100% strict) accepts it. The fact is that I've
designed two different SIP parsers and both accept that RURI.
I don't understand what it means with "escaped headers". Hexadecimal codes %3C
and %3E becomes "<" and ">" in ASCII.
Also, the SIP BNF defines URI header parameters as:
-------------------
header = hname "=" hvalue
hname = 1*( hnv-unreserved / unreserved / escaped )
hvalue = *( hnv-unreserved / unreserved / escaped )
hnv-unreserved = "[" / "]" / "/" / "?" / ":" / "+" / "$"
unreserved = alphanum / mark
escaped = "%" HEXDIG HEXDIG
-------------------
So I'm 100% sure that "Route=%3Csip:example.com%3E" is a *valid* URI header
parameter. Perhaps I miss something? Thanks a lot.
--
Iñaki Baz Castillo
_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors