Subject: Re: [Sip] A SIP grammar question.

From: Rohan Mahy <[email-masked]>
Date: Thu, 9 Oct 2003 12:17:59 -0700

On Monday, September 29, 2003, at 11:01 AM, Idnani Ajaykumar-AIDNANI1 
wrote:

> 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? 

yes, the grammar is completely fine.  For example, these are all 
perfectly OK From header fields:

From: <sip:anonymous.invalid>
From: <sip:flight-status.united.com>
From: <sip:elvis.org>

thanks,
-rohan

> 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
>

_______________________________________________
Sip mailing list  https://www1.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use [email-masked] for questions on current sip
Use [email-masked] for new developments on the application of sip

---

From: Paul Kyzivat <[email-masked]>
Date: Fri, 10 Oct 2003 16:39:28 -0400

>> <sip:anonymous.invalid>', when the identity of the caller is to be 

The userinfo portion is used to distinguish between different logical 
destinations that share the same address and port. If there is only one 
destination then there is no need for a userpart.

	Paul