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

From: Jonathan Rosenberg <[email-masked]>
Date: Wed, 11 Apr 2001 00:00:55 -0400

> -----Original Message-----
> From: James Undery [mailto:[email-masked]]
> Sent: Tuesday, April 10, 2001 3:37 AM
> To: Jonathan Lennox
> Cc: Jonathan Rosenberg; David Bertrand; [email-masked]'
> Subject: Re: [IPTEL] not present/otherwise nodes
> 
> 
> 
> 
> Jonathan Lennox wrote:
> 
> > On Monday, April 9 2001, "Jonathan Rosenberg" wrote to 
> "'James Undery', David Bertrand, [email-masked]'" saying:
> >
> > > > -----Original Message-----
> > > > From: James Undery [mailto:[email-masked]]
> > > >
> > > > David Bertrand wrote:
> > > > >
> > > > > 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?
> >
> > 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>
> 
> I think you did specify this in the 3rd and 4th paragraphs of 
> section 5.

I don't think its really that clear. How about:

The output otherwise, which MUST be the last output specified if it
   is present, matches if no other condition matched. This includes the
   case where the field is not present in the request, and a not-present
output
   was not specified.

-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: David Bertrand <[email-masked]>
Date: Wed, 11 Apr 2001 10:20:50 +0200

Sounds good to me.

--
David Bertrand
Software Engineer
Indigo Software
50 Rue Wiertz
Brussels, 1050 - Belgium
Phone : +32 2 235 09 44
Fax: +32 2 280 26 76
[email-masked]
http://www.indigosw.com