Hi All,
Iam developing a parser for SIP. i am using the ABNF for developing the
parser.
I have certain doubts regarding the ABNF.
Given below are list of things i require your guidance and help .
1.For Contact-Header :
ABNF :
Contact = ("Contact" / "m" ) HCOLON
( STAR / (contact-param *(COMMA contact-param)))
contact-param = (name-addr / addr-spec) *(SEMI contact-params)
name-addr = [ display-name ] LAQUOT addr-spec RAQUOT
addr-spec = SIP-URI / SIPS-URI / absoluteURI
it says contact-param can be addr-spec,
following the ABNF then
we would have
1.1 a conflict between the URI-parameters and the Header-parameters.
1.2. If the Contact URI has a Query
e.g. Contact: sip://[EMAIL PROTECTED]@zzz.com%3E;expires=3600
In this case since uric character set has ';' it will not be able to
distinguish between the beginning of parameter and end of uri part.
1.3 if contact header has a list
e.g : Contact: sip://[EMAIL PROTECTED]@zzz.com%3E,sip:qqqww:5060
here since COMMA is there in the character set of uric (Query), though COMMA
is used to seperate the List items , would be consumed in Uric part of the
first URI.
But the RFC 3261 says in section 20.10 says :
When the header field value contains a display name, the URI
including all URI parameters is enclosed in "<" and ">". If no "<"
and ">" are present, all parameters after the URI are header
parameters, not URI parameters. The display name can be tokens, or a
quoted string, if a larger character set is desired.
Even if the "display-name" is empty, the "name-addr" form MUST be
used if the "addr-spec" contains a comma, semicolon, or question
mark. There may or may not be LWS between the display-name and the
"<".
So my problem is when i develop a parser should i assume what the RFC says and
develop the parser to support only what RFC permits or should i stick to the
ABNF.
2. In absoluteURI definition
ABNF :
authority:srvr/reg-name
2.1How do i distinguish whether what follows "//" is srvr or reg- name.
2.2Which should be given priority?
2.3If i choose to implement only srvr , what are the drawbacks. In
other-words how important is reg-name.
Thanks in advance
veda
---------------------------------
Stay in the know. Pulse on the new Yahoo.com. Check it out.
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
countries) for 2ยข/min or less.
_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors