Subject: [Sip] RE: [Sip-implementors] Need clarification on callerprefs

From: Jonathan Rosenberg <[email-masked]>
Date: Wed, 21 Nov 2001 03:26:41 -0500

> -----Original Message-----
> From: Paul Kyzivat [mailto:[email-masked]]
> Sent: Thursday, September 27, 2001 10:27 AM
> To: [email-masked]
> Subject: [Sip-implementors] Need clarification on callerprefs
> 
> 
> 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. 

This is an excellent question.

According to the code, this will indeed work. The BNF also allows it. 

However, the general (although not well stated) understanding was that
multiple parameters of the same name is not allowed. The reason is that it
fouls up nearly all parsers that store parameters in hash tables, which is a
common thing. I believe this is true for SIP in general. However, I welcome
further comment on that (and thus have cc'd the sip list).

So, I would argue that it is not allowed, and that text should be added to
callerprefs which says this. This does mean that this kind of AND operation
you are looking for is not really feasible with caller preferences. Caller
prefs is not a cure-all and is quite restricted in functionality.

-Jonathan R.

---
Jonathan D. Rosenberg, Ph.D.                72 Eagle Rock Ave.
Chief Scientist                             First Floor
dynamicsoft                                 East Hanover, NJ 07936
[email-masked]                     FAX:   (973) 952-5050
http://www.jdrosen.net                      PHONE: (973) 952-5000
http://www.dynamicsoft.com

_______________________________________________
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