> -----Original Message-----
> From: Paul Kyzivat [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 27, 2001 10:27 AM
> To: [EMAIL PROTECTED]
> 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 PROTECTED];language="en"
>    Contact: sip:[EMAIL PROTECTED];language="de,en"
>    Contact: sip:[EMAIL PROTECTED];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 PROTECTED]                     FAX:   (973) 952-5050
http://www.jdrosen.net                      PHONE: (973) 952-5000
http://www.dynamicsoft.com
_______________________________________________
Sip-implementors mailing list
[EMAIL PROTECTED]
http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors

Reply via email to