Per RFC-3261 section 20.10 "Contact"
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.
So to save on confusion, your example must use the form:
To: <sip:[EMAIL PROTECTED]:5060;user=ip>;tag=treee
- rob
-----Original Message-----
From: Janarthanan, Bhagatram [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 5:52 PM
To: '[EMAIL PROTECTED]'
Cc: Dong, Hwan
Subject: [Sip-implementors] how to recognize parameters in "To" header?
Hi ,
I am confused as to how the following header has to be decoded in
consideration with the ABNF in rfc-3261. The grammar seems to suggest two
possibilites. Can you please help?
To:sip:[EMAIL PROTECTED]:5060;user=ip;tag=treee;
To = ( "To" / "t" ) HCOLON ( name-addr
/ addr-spec ) *( SEMI to-param )
addr-spec = SIP-URI / SIPS-URI / absoluteURI
SIP-URI = "sip:" [ userinfo ] hostport
uri-parameters [ headers ]
uri-parameters = *( ";" uri-parameter)
uri-parameter = transport-param / user-param / method-param
/ ttl-param / maddr-param / lr-param / other-param
user-param = "user=" ( "phone" / "ip" / other-user)
other-param = pname [ "=" pvalue ]
pname = 1*paramchar
pvalue = 1*paramchar
paramchar = param-unreserved / unreserved / escaped
unreserved = alphanum / mark
param-unreserved = "[" / "]" / "/" / ":" / "&" / "+" / "$"
According to the above, it seems that we can recognize the "user=ip" and
"tag=treee" parts of the header as two URI parameters. However the grammar
also mentions that
to-param = tag-param / generic-param
tag-param = "tag" EQUAL token
generic-param = token [ EQUAL gen-value ]
Thus the "user=ip" and "tag=treee" parts of the header can also be
recognized as generic-param and tag-param of the header.
Can you please let me know which is the preffered way of decoding in such
cases...
Thanks
Bhagat
_______________________________________________
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