Subject: [IPTEL] Negation in CPL

From: Daniel Amyot <[email-masked]>
Date: Wed, 05 Dec 2001 17:18:16 -0500

Hello,

I have been taking a closer look at CPL recently and concluded that it would
be difficult to create and maintain a single CPL script for a complex set of
rules/policies. Now, if I go with multiple scripts (one per user policy) and
assume that they are ordered according to their priority (total ordering), I
find myself facing a few other problems.

For instance, imagine a rule like: Forward any call to Radiology except if the
call is from Jacques. Then, two scripts are created:

(priority 1: default action, i.e. lets calls from Jacques go through)
<cpl> 
  <incoming> 
    <address-switch> 
      <address contains="Jacques"> 
      </address> 
    </address-switch> 
  </incoming> 
</cpl>

(priority 2: redirect all calls to Radiology)
<cpl> 
  <incoming> 
    <location url="sip:[email-masked]"> 
      <redirect /> 
    </location> 
  </incoming> 
</cpl>

The first rule will cause conflicts with any other rules focusing on Jacques
(e.g. forward calls from Jacques to my cell phone), whereas the second will
cause many more problems in general. 

What would be useful to me here is the negation of "contains", something like:

<cpl> 
  <incoming> 
    <address-switch> 
      <address does-not-contain="Jacques"> 
        <location url="sip:[email-masked]"> 
          <redirect />
        </location> 
      </address> 
    </address-switch> 
  </incoming> 
</cpl>

Right now, CPL supports OTHERWISE, but this still creates problems with other
rules based on Jacques that have a lower priority (the latter won't get fired,
although they should according to the user's expectations):

<cpl> 
  <incoming> 
    <address-switch> 
      <address contains="Jacques"> 
      </address> 
      <otherwise>
        <location url="sip:[email-masked]"> 
          <redirect />
        </location> 
      </otherwise>
    </address-switch> 
  </incoming> 
</cpl>

Is there any good way of representing exceptions in this context? Can we do so
without support for negative matching of some witches (does-not-contains,
is-not, ...)? Was this discussed in the past?

Thank you,

Daniel Amyot
Mitel Networks

_______________________________________________
IPTEL mailing list
[email-masked]
http://lists.bell-labs.com/mailman/listinfo/iptel