Subject: [Sip] Proposed change to callerprefs

From: Paul Kyzivat <[email-masked]>
Date: Fri, 05 Oct 2001 10:48:03 -0400

I posted the question attached to the end of this to sip-implementors a
week or so age.
Since then I have considered the question further and have come to the
conclusion that while the interpretation I reached was probably valid
and functional, it is a confusing interpretation. I now believe it would
be better to revise the callerprefs proposal so that the issues may be
handled in a more consistent, less confusing way. 

In my earlier posting, I posed the problem of specifying a preference
for a contact supporting both english and spanish language. According to
draft-ietf-sip-callerprefs-04 language="en,es" means english OR spanish,
while language="en",language="es" means english AND spanish.

The trouble with this is it violates the principle of least
astonishment. I believe most people will expect language="en,es" and
language="en",language="es" to mean the same thing. For precedent we
need look no further than the normal header processing logic in sip,
which says that:

   Accept-Contact:*;language="en", *;language="es"

is equivalent to:

   Accept-Contact:*;language="en"
   Accept-Contact:*;language="es"

So, I propose that: 

  language="en,es"

should be equivalent to:

  language="en",language="es"

and that this should require a match on both english AND spanish.
The reason this means AND rather than OR is consistency with the
combination of cp-params of different types:

  language="en",media="audio"     means english AND audio, so
  language="en",language="es"     should mean english AND spanish

Unfortunately this interpretation is a change from the current draft. 

In addition to the consistency argument, practicality also supports this
change. For one thing, there is more need to express an AND condition
than an OR condition, and so it ought to be more concise. Also, there is
already another way to express the OR condition. If I want english or
spanish, I can write:

   Accept-Contact:*;language="en", *;language="es"

There is one more issue to deal with if this change is to be made.
Consider

   Accept-Contact:*;media="voice";media="video";q=1.0,
                  *;media="voice";media="!video";q=.5

This ought to be equivalent to

   Accept-Contact:*;media="voice,video";q=1.0,
                  *;media="voice,!video";q=.5

but this would be wrong because "!" is only valid at the beginning of
the parameter value, and applies the value as a whole rather than to a
particular item in the comma separated list of items in the value.

For consistency, I propose that this also be changed. Negation through
use of "!" should apply to an individual element in a comma separated
list of values.

For example (yes, I know this is nonsense), suppose I want to accept
contacts supporting english but neither spanish nor french. (english AND
NOT(spanish OR french)) 
This can be written:

   Accept-Contact:*;language="en,!es,!fr"

If instead I wanted to accept (english AND ((NOT spanish) OR (NOT
french))
I would write: 

   Accept-Contact:*;language="en,!es",
                  *;language="en,!fr"

If there is agreement on this proposal then I am willing to draft a
revision to draft-ietf-sip-callerprefs-04 that reflects it. But I don't
want to go th the trouble unless there is agreement that this is a good
thing.

If there isn't agreement with this proposal, then I at least hope to get
agreement that the interpretation I posed in the message below is
correct. It is essential that there be some way to express the AND
condition for two values of the same cp-param type.

	Paul Kyzivat
	Cisco Systems

-------- Original Message --------
Subject: [Sip-implementors] Need clarification on callerprefs
Date: Thu, 27 Sep 2001 10:26:57 -0400
From: Paul Kyzivat <[email-masked]>
To: [email-masked]
References: <[email-masked]>

I have a question on the matching algorithm in callerprefs.

Suppose I need a rule that requires multiple distinct values for the
same kind of param - for instance I need a contact that supports both
English and Spanish.

If I match:

   Accept-Contact *;language="en,es"

against:

   Contact: sip:[email-masked];language="en"
   Contact: sip:[email-masked];language="de,en"
   Contact: sip:[email-masked];language="en,es,fi"

it will match both joe and alice, which is not what I want.

I believe that the following should do the right thing:

   Accept-Contact *;language="en";language="es"

I find nothing in the draft that forbids this, but neither do I find
anything that convinces me that this is intended behavior either. 

Can someone confirm that this is valid usage, and that a server which
failed to support it would be non-conforming?

	Paul Kyzivat
_______________________________________________
Sip-implementors mailing list
[email-masked]
http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors

_______________________________________________
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