Section 20 of RFC 3261 answers you questions:

  "The Contact, From, and To header fields contain a URI.  If the URI
   contains a comma, question mark or semicolon, the URI MUST be
   enclosed in angle brackets (< and >).  Any URI parameters are
   contained within these brackets.  If the URI is not enclosed in angle
   brackets, any semicolon-delimited parameters are header-parameters,
   not URI parameters."

BTW, A To-header does not have comma-separated SIP URIs.

/Hisham

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of 
> ext Roman
> Shpount
> Sent: 24.February.2004 04:46
> To: [EMAIL PROTECTED]
> Subject: [Sip-implementors] Ambiguous definition of comma 
> separated SIP
> URL lists in RFC 3261
> 
> 
> 
> In RFC 3261 comma-separated lists of SIP URLs are used in 
> several places, such as Contact or To headers. At the same 
> time SIP URI is defined as:
> 
> SIP-URI          =  "sip:" [ userinfo ] hostport
>                     uri-parameters [ headers ] 
> userinfo         =  ( user / telephone-subscriber ) [ ":" 
> password ] "@"
> user             =  1*( unreserved / escaped / user-unreserved )
> user-unreserved  =  "&" / "=" / "+" / "$" / "," / ";" / "?" / "/"
> password         =  *( unreserved / escaped /
>                     "&" / "=" / "+" / "$" / "," ) 
> 
> Since "," can be a part of userinfo, there are two ways to 
> parse the following contact header: 
> "Contact: 
> sip:10.7.7.161:8060;expires=0,sip:[EMAIL PROTECTED];expires=1200"
> 
> First option, which is legal, but clearly wrong is:
> user = "10.7.7.161:8060;expires=0,sip"
> password = "105"
> hostport = "10.7.7.152" 
> uri-parameters = "expires=1200" 
> 
> Second option is to actually parse this list into two URLs.
> 
> Is there any real need to allow comma as a part of user, or 
> all of the other user-unreserved characters? If any of those 
> characters need to be present in the user part, they can be 
> escaped. Furthermore, the presence of additional unreserved 
> characters complicates the parser, since in order to parse a 
> URI, it needs to be scanned for presence of the user part.  
> 
> ___________________________________
> Roman Shpount, VP of Technology
> aTelo, Inc. -- www.atelo.com
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Sip-implementors mailing list
> [EMAIL PROTECTED]
> http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors
> 

_______________________________________________
Sip-implementors mailing list
[EMAIL PROTECTED]
http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors

Reply via email to