Subject: RE: [IPTEL] not present/otherwise nodes

From: Jonathan Rosenberg <[email-masked]>
Date: Mon, 9 Apr 2001 18:41:54 -0400

> -----Original Message-----
> From: James Undery [mailto:[email-masked]]
> Sent: Monday, April 09, 2001 9:29 AM
> To: David Bertrand
> Cc: [email-masked]'
> Subject: Re: [IPTEL] not present/otherwise nodes
> 
> 
> 
> 
> David Bertrand wrote:
> 
> > Hi all,
> >
> > Let's suppose a CPL script contains a switch (for example based on
> > subject) without the output <not-present> but with the output
> > <otherwise>. If the variable the switch is to match (in this case,
> > subject of call) is not present in the call setup request, 
> should the
> > script execute the otherwise node or the default behaviour ?
> 
> It should execute the otherwise node, the default behaviour 
> is only used
> when there is no match  to an output node and no otherwise 
> node exists.

Hmm. Thats not what we did - we perform the default action. Its not clear
from the spec which one is correct. It probably doesn't matter much so long
as we pick something. 

Jonathan L. - any comments?

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

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

---

From: Jonathan Lennox <[email-masked]>
Date: Mon, 9 Apr 2001 21:07:31 -0400 (EDT)

> Jonathan L. - any comments?

I wanted <otherwise> to have the same semantics as the C/Java default: tag
in a switch statement, so yes, it should cover the <not-present>  case if
you haven't got a <not-present> output.

This makes using <otherwise> to do negated conditions a lot easier, too --
e.g.

<string-switch field="subject>
  <string contains="I really mean it"> [do something to reach me] </string>
  <otherwise> [do something to reach my voicemail] </otherwise>
</string-switch>

-- 
Jonathan Lennox
[email-masked]

---

From: James Undery <[email-masked]>
Date: Tue, 10 Apr 2001 08:36:35 +0100

>   <otherwise> [do something to reach my voicemail] </otherwise>

I think you did specify this in the 3rd and 4th paragraphs of section 5.

James Undery