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

Reply via email to