Subject: [Sip] A SIP grammar question.

From: Idnani Ajaykumar-AIDNANI1 <[email-masked]>
Date: Mon, 29 Sep 2003 13:01:32 -0500

Hi All,
 
I had a question about the 'From' and 'To' addresses in SIP, and while I was going through the grammar, I noticed that the grammar allows for a 'From' and 'To' address to NOT have any 'userinfo' in the name-addr spec. Is this really desired? Or was this done so as to accommodate the Request-URI in the same grammar rules? If this was desired, under what circumstances one would have a 'From' or 'To' address with no 'userinfo'. Could you have a 'From' address of 'From: Anonymous <sip:anonymous.invalid>', when the identity of the caller is to be hidden?
 
For your convenience I am including the relevant grammar lines from the RFC below.
 
FROM ADDRESS
============
 
From = ( "From" / "f" ) HCOLON from-spec
from-spec = ( name-addr / addr-spec )
*( SEMI from-param )
from-param = tag-param / generic-param
tag-param = "tag" EQUAL token
 
TO ADDRESS
==========
 
To = ( "To" / "t" ) HCOLON ( name-addr
/ addr-spec ) *( SEMI to-param )
to-param = tag-param / generic-param
 
REQUEST-URI
===========
 
Request-URI = SIP-URI / SIPS-URI / absoluteURI
absoluteURI = scheme ":" ( hier-part / opaque-part )
 
NAME-ADDR
=========
 
name-addr = [ display-name ] LAQUOT addr-spec RAQUOT
addr-spec = SIP-URI / SIPS-URI / absoluteURI
display-name = *(token LWS)/ quoted-string
 
SIP-URI = "sip:" [ userinfo ] hostport
uri-parameters [ headers ]
SIPS-URI = "sips:" [ userinfo ] hostport
uri-parameters [ headers ]
userinfo = ( user / telephone-subscriber ) [ ":" password ] "@"
user = 1*( unreserved / escaped / user-unreserved )
user-unreserved = "&" / "=" / "+" / "$" / "," / ";" / "?" / "/"
password = *( unreserved / escaped /
"&" / "=" / "+" / "$" / "," )
hostport = host [ ":" port ]

Appreciate your help
 
Thanks and Regards
- Ajay