Subject: [Sip] Inconsistency/ambiguity in Contact header syntax

From: Paul Kyzivat <[email-masked]>
Date: Tue, 23 Oct 2001 18:13:35 -0400

Section 10.14 of draft-ietf-sip-rfc2543bis-04.txt says:

   Contact           = ( "Contact" | "m" ) ":" 
                       ("*" | (1# (( name-addr | addr-spec )
                       *( ";" contact-params ))))
   contact-params    = "q"       "=" qvalue
                     | "action"  "=" "proxy" | "redirect"
                     | "expires" "=" delta-seconds | <"> SIP-date <">
                     | contact-extension
 
       expires: The "expires" parameter indicates how long the URI is
             valid. The parameter is either a number indicating seconds
             or a quoted string containing a SIP-date. If this parameter
             is not provided, the value of the Expires header field
             determines how long the URI is valid. Implementations MAY
             treat values larger than 2**32-1 (4294967295 seconds or 136
             years) as equivalent to 2**32-1.

while section 7.6 says:

   Registrations expire as described above or may be removed explicitly
   by setting the expires parameter for an existing registration to zero
   or including an Expires: 0 header field. Registrations are matched
   based on the user, host, port and maddr parameters. A client can
   remove all registrations by including a single Contact header field
   with the wildcard address "*". This usage is only allowed in REGISTER
   requests when a Expires header with value of zero is present.

Accordingly, the following seems to be correct:

   REGISTER ...
   Expires: 5
   Contact: sip:[email-masked];expires=0
   Contact: sip:[email-masked]
   Contact: sip:[email-masked]

while the following is apparently incorrect:

   REGISTER ...
   Expires: 5
   Contact: *;expires=0
   Contact: sip:[email-masked]
   Contact: sip:[email-masked]

Also, while the text in 7.6 says the "Contact: *" usage is only allowed
when an "Expires: 0" header is present, it doesn't forbid the use of
parameters with this header. 
So the following seems to be legal:

   REGISTER ...
   Expires: 0
   Contact: *;expires=0;q=0.5

And the following seems to be syntactically ok but semantically
questionable:

   REGISTER ...
   Expires: 0
   Contact: *;expires=5

This seems to have been made obscure by virtue of too much special
casing. I would think the following revised wording for 7.6 would make a
lot more sense:

   Registrations expire as described above or may be removed explicitly
   by setting the expires parameter for an existing registration to zero
   or including an Expires: 0 header field. Registrations are matched
   based on the user, host, port and maddr parameters. A client can
   remove all prior registrations by including a Contact header field
   with the wildcard address "*". A wildcard address of "*" may only
used
   in a Contact header in a REGISTER request, and only with an
expiration
   time (explicit or implicit) of zero.

	Paul Kyzivat
	Cisco Systems

_______________________________________________
Sip mailing list  http://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