On Thu, 2006-01-05 at 11:14 +0530, Praveen wrote:
>             As per Sec 25.1 of RFC 3261 a userinfo part of SIP URI can
> contain *","* as acceptable character. But the SIP URI's can appear in
> multiples separated by COMMA in headers like Record-Route/ Route/
> Contact etc.,.  contradicting the said rule. How we distinguish whether
> it is a user part or another followed URI, since COMMA is only separator
> 
> for the list.
> 
> Excerpts of the rule from RFC is as below
> 
> userinfo = ( user / telephone-subscriber ) [ ":" password ] "@"
> 
> user = 1*( unreserved / escaped / user-unreserved )
> 
> user-unreserved = "&" / "=" / "+" / "$" / *","* / ";" / "?" / "/"
> 
> Record-Route = "Record-Route" HCOLON rec-route *(*COMMA* rec-route)

The way you distinguish is that the context forces one interpretation of
the comma or another.  An example is:

Record-Route: <sip:aaa,[EMAIL PROTECTED]>, <sip:[EMAIL PROTECTED]>

(The <...> are necessary because rec-route expands to name-addr.)

According to the grammar, this header is not ambiguous; there is no way
to produce it where the first comma is generated by the Record-Route
production.

The "problem" is that you cannot parse Record-Route by first splitting
the value at the commas and then parsing each part as a name-addr, you
need to parse each name-addr in order and then find and consume the
comma that would follow it.

Dale


_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors

Reply via email to