Subject: [Sip] How to distinguish parameters in To header

From: <[email-masked]>
Date: Thu, 20 Jul 2006 12:35:52 +0200

Hi,

there is some weird thing aroud To header (analogously all headers of
the similar form). Consider now To header. Its grammar is the following:

To = ( "To" / "t" ) HCOLON ( name-addr / addr-spec ) *( SEMI to-param )

where
to-param  = tag-param / generic-param
tag-param = "tag" EQUAL token
name-addr = [ display-name ] LAQUOT addr-spec RAQUOT
addr-spec = SIP-URI / SIPS-URI / absoluteURI

SIP-URI = "sip:" [ userinfo ] hostport uri-parameters [ headers ]
uri-parameters = *( ";" uri-parameter)

The problem lies in the fact that both To header and SIP-URI may have
own parameters. Using above mentioned grammar there is possibility to
construct To header where there is no chance to distinguish between
SIP-URI parameters and To header parameters. Se example bellow:

SIP-URI = sip:[email-masked];uriparam=value
Additional To header param = tparam=value

and the complete and valid header is
To: sip:[email-masked];uriparam=value;tparam=value

and again, there is now no chance to distinguish whether
- all parameters are SIP-URI specific
- one parameter is SIP-URI specific and one To header specific
- all parameters are To header specific

br, Martin

+-------------------------------------+
  Martin Hynar
  Software Specialist

  TietoEnator
  Czech Software Center
  Phone: +420 599 096 022
  Mobile: +420 724 035 397
  E-mail: [email-masked]

  Vystavni 292/13
  CZ-709 16 Ostrava

  www.tietoenator.com

_______________________________________________
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: Marco Ambu <[email-masked]>
Date: Thu, 20 Jul 2006 14:27:44 +0200

> - all parameters are To header specific
Fortunately the way to distinguish URI parameters from header parameters 
exists!
This thread has been already discussed in sip-implementors mailing list, 
so you can check the mailing list archives.

RFC 3261 - 20.10
"When the header field value contains a display name, the URI
including all URI parameters is enclosed in "<" and ">". If no "<"
and ">" are present, all parameters after the URI are header
parameters, not URI parameters."
[cut]
"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."
[cut]
"These rules for parsing a display name, URI and URI parameters, and
header parameters also apply for the header fields To and From."

So if URI is in the addr-spec form (is not encolsed in "<" and ">") all 
the parameters are header parameters.

To: sip:[email-masked];uriparam=value -> "uriparam" is a header parameter
To: <sip:[email-masked];uriparam=value>;headerparam=value2 -> 
"uriparam" is an URI parameter and "headerparam" is a header parameter.

-- 
Marco Ambu
Abbeynet S.p.a. <http://www.abbeynet.it>
E-mail: [email-masked]
VoIP address: <sip:[email-masked]>