See 20.10 in RFC3261;
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
"<".

   These rules for parsing a display name, URI and URI parameters, and
   header parameters also apply for the header fields To and From.

> From: Paul Kyzivat [mailto:[EMAIL PROTECTED]
>
> When there is ambiguity about whether a parameter is a uri parameter
or
> a header parameter, then it is a header paramter. So in:
> 
>       To: sip:[EMAIL PROTECTED];xxx=1
>       From: <sip:[EMAIL PROTECTED];yyy=2>;zzz=3
> 
> xxx and zzz are header parameters while yyy is a header parameter.

I guess what you meant to say was that yyy is a URI parameter :)

> 
>       Paul
> 
> Nils Ohlmeier wrote:
> > Hello,
> >
> > I have a small problem while writing a SIP parser: how can I
distinguish
> > between URI and Contact (and To/From) parameters when the URI is
only an
> > addr-spec but a name-adr (which means no displayname and no brackets
> around
> > the URI)?
> >
> > According to the BNF in RFC 3261 the following Contact should be
valid:
> >
> >  m: sip:abc:[EMAIL PROTECTED]:1234;foo=1;bar=2
> >
> > But foo=1 is an URI parameter and bar=2 is a Contact parameter. From
my
> point
> > of view their is no way for a parser to distinguish between them.
Either
> both
> > parameters will be treated as URI parameters or as Contact
parameters.
> >
> > Their is no problem when I write it like this:
> >
> >  m: <sip:abc:[EMAIL PROTECTED]:1234;foo=1>;bar=2
> >
> > or
> >
> >  m: sip:abc:[EMAIL PROTECTED]:1234;foo=1?test&header;bar=2
> >
> > According to the BNF the first alternative should be possible too,
but I
> doubt
> > that it can be interpreted correct by any parser.
> >
> > Did I oversaw something? Any ideas, comments are welcome.
> >
> > Greetings
> >   Nils Ohlmeier
> > _______________________________________________
> > 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


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

Reply via email to