From: Veda R <[EMAIL PROTECTED]>
I am implementing a SIP Parser . The parser is being developed based on
RFC 3261.
I need a help on the following issue.
How will the parser be able to distinguish whether the uri is having
opaque part or is it consisting of username hostname etc for headers like
Contact To ,From wherein both absolute URI and the normal type of URI are
allowed
eg: To:"Disp"<http:[EMAIL PROTECTED]>
In case of headers that have only absoluteURI like Alert-Info ,Call-Info
,it easy to get opaque part. What do we do in case of headers like To, From etc
RFC 3261 ABNF
absoluteURI := abs-scheme ":" ( hier-part / opaque-part )
abs-scheme := scheme
hier-part := ( net-path / abs-path ) [ "?" query ]
net-path := "//" authority [ abs-path ]
abs-path := "/" path-segments
opaque-part := uric-no-slash *uric
uric := reserved / unreserved / escaped
uric-no-slash := unreserved / escaped / ";" / "?" / ":" / "@"
/ "&" / "=" / "+" / "$" / ","
As you can see from the grammar, an absoluteURI that has a hier-part
is distinguished by a "/" immediately after the first ":", whereas one
having an opaque-part does not have a "/" immediately after the first
":".
Many headers, especially To, From, Contact, have a value which is not
necessarily a URI. See the productions for Contact, To, From,
name-addr, and addr-spec.
Dale
_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors