[Sip-implementors] SIP ABNF: Doubt about params in name_addr/addr_spec

Valentin Nechayev netch at portaone.com
Thu Apr 17 04:28:59 EDT 2008


>>>>> I??aki Baz Castillo <ibc at aliax.net> wrote:

> a)
> 	From: sip:user at domain;custom_tag=X;tag=xxxxx

> b)
> 	From: NAME <sip:user at domain;custom_tag=X>;tag=xxxxx

> In a) "custom_tag" and "tag" are URI params,
> while in b) "custom_tag" is an URI param and "tag" is a "from-param".

Yes.

> I know that both are equivalent since some SIP implementation use a) and 
> others b), but it seems a bit ambiguous, don't you think so?

See paragraph 20:

===
   The Contact, From, and To header fields contain a URI.  If the URI
   contains a comma, question mark or semicolon, the URI MUST be
   enclosed in angle brackets (< and >).  Any URI parameters are
   contained within these brackets.  If the URI is not enclosed in angle
   brackets, any semicolon-delimited parameters are header-parameters,
   not URI parameters.
===

Here, grammar is incomplete. Complete grammar should look like
following:

 From        =  ( "From" / "f" ) HCOLON from-spec
from-spec   =  ( name-addr / addr-spec-short )
               *( SEMI from-param )
name-addr      =  [ display-name ] LAQUOT addr-spec RAQUOT
addr-spec      =  SIP-URI / SIPS-URI / absoluteURI
addr-spec-short      =  SIP-URI-short / SIPS-URI-short / absoluteURI-short
SIP-URI          =  "sip:" [ userinfo ] hostport
                    uri-parameters [ headers ]
SIP-URI-short          =  "sip:" [ userinfo ] hostport
// SIP-URI-short shall NOT contain uri-parameters and/or headers

Note the formal definition of SIP-URI-short. I didn't try to fix
all issues in this definition, so use it only as common plot.

P.S. I'm very glad to see how you dig all these perularities -
maybe your implementation will be _the first_ which really
conforms all existing specifications without explicit bugs.:))

-- 
Valentin Nechayev
PortaOne Inc., Software Engineer
mailto:netch at portaone.com




More information about the Sip-implementors mailing list