draft-ietf-iptel-cpl-03.txt   draft-ietf-iptel-cpl-04.txt 
Internet Engineering Task Force IPTEL WG Internet Engineering Task Force IPTEL WG
Internet Draft Lennox/Schulzrinne Internet Draft Lennox/Schulzrinne
draft-ietf-iptel-cpl-03.txt Columbia University draft-ietf-iptel-cpl-04.txt Columbia University
October 25, 2000 November 14, 2000
Expires: April, 2001 Expires: May, 2001
CPL: A Language for User Control of Internet Telephony Services CPL: A Language for User Control of Internet Telephony Services
STATUS OF THIS MEMO STATUS OF THIS MEMO
This document is an Internet-Draft and is in full conformance with This document is an Internet-Draft and is in full conformance with
all provisions of Section 10 of RFC2026. all provisions of Section 10 of RFC2026.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
skipping to change at page 2, line 39 skipping to change at page 2, line 39
Internet telephony servers and in advanced clients; both can usefully Internet telephony servers and in advanced clients; both can usefully
process and direct users' calls. This document primarily addresses process and direct users' calls. This document primarily addresses
the usage in servers. A mechanism will be needed to transport scripts the usage in servers. A mechanism will be needed to transport scripts
between clients and servers; this document does not describe such a between clients and servers; this document does not describe such a
mechanism, but related documents will. mechanism, but related documents will.
The framework and requirements for the CPL architecture are described The framework and requirements for the CPL architecture are described
in RFC 2824, "Call Processing Language Framework and Requirements" in RFC 2824, "Call Processing Language Framework and Requirements"
[4]. [4].
1.1 Conventions of this document 1.1 Conventions of This Document
In this document, the key words "MUST", "MUST NOT", "REQUIRED", In this document, the key words "MUST", "MUST NOT", "REQUIRED",
"SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
and "OPTIONAL" are to be interpreted as described in RFC 2119 [5] and and "OPTIONAL" are to be interpreted as described in RFC 2119 [5] and
indicate requirement levels for compliant CPL implementations. indicate requirement levels for compliant CPL implementations.
In examples, non-XML strings such as -action1, -action2, and so
forth, are sometimes used. These represent further parts of the
script which are not relevant to the example in question.
Some paragraphs are indented, like this; they give Some paragraphs are indented, like this; they give
motivations of design choices, or questions for future motivations of design choices, or questions for future
discussion in the development of the CPL, and are not discussion in the development of the CPL, and are not
essential to the specification of the language. essential to the specification of the language.
2 Structure of CPL scripts 2 Structure of CPL Scripts
2.1 High-level structure 2.1 High-level Structure
A CPL script consists of two types of information: ancillary A CPL script consists of two types of information: ancillary
information about the script, and call processing actions. information about the script, and call processing actions.
A call processing action is a structured tree that describes the A call processing action is a structured tree that describes the
decisions and actions a telephony signalling server performs on a operations and decisions a telephony signalling server performs on a
call set-up event. There are two types of call processing actions: call set-up event. There are two types of call processing actions:
top-level actions are actions that are triggered by signalling events top-level actions and subactions. Top-level actions are actions that
that arrive at the server. Two top-level action names are defined: are triggered by signalling events that arrive at the server. Two
incoming, the action performed when a call arrives whose destination top-level action names are defined: incoming, the action performed
is the owner of the script; and outgoing, the action performed when a when a call arrives whose destination is the owner of the script; and
call arrives whose originator is the owner of the script. Sub-actions outgoing, the action performed when a call arrives whose originator
are actions which can be called from other actions. The CPL forbids is the owner of the script. Subactions are actions which can be
sub-actions from being called recursively: see section 9. called from other actions. The CPL forbids subactions from being
called recursively: see Section 9.
Ancillary information is information which is necessary for a server Ancillary information is information which is necessary for a server
to correctly process a script, but which does not directly describe to correctly process a script, but which does not directly describe
any actions. Currently, no ancillary information is defined, but the any operations or decisions. Currently, no ancillary information is
section is reserved for use by extensions. defined, but the section is reserved for use by extensions.
2.2 Abstract structure of a call processing action 2.2 Abstract Structure of a Call Processing Action
Abstractly, a call processing action is described by a collection of Abstractly, a call processing action is described by a collection of
nodes, which describe actions that can be performed or choices which nodes, which describe operations that can be performed or decisions
can be made. A node may have several parameters, which specify the which can be made. A node may have several parameters, which specify
precise behavior of the node; they usually also have outputs, which the precise behavior of the node; they usually also have outputs,
depend on the result of the condition or action. which depend on the result of the decision or action.
For a graphical representation of a CPL action, see Figure 1. Nodes For a graphical representation of a CPL action, see Figure 1. Nodes
and outputs can be thought of informally as boxes and arrows; the CPL and outputs can be thought of informally as boxes and arrows; the CPL
is designed so that actions can be conveniently edited graphically is designed so that actions can be conveniently edited graphically
using this representation. Nodes are arranged in a tree, starting at using this representation. Nodes are arranged in a tree, starting at
a single root node; outputs of nodes are connected to additional a single root node; outputs of nodes are connected to additional
nodes. When an action is run, the action or condition described by nodes. When an action is run, the action or decision described by the
the top-level node is performed; based on the result of that node, action's top-level node is performed; based on the result of that
the server follows one of the node's outputs, and that action or node, the server follows one of the node's outputs, and the
condition is performed; this process continues until a node with no subsequent node it points to is performed; this process continues
specified outputs is reached. Because the graph is acyclic, this will until a node with no specified outputs is reached. Because the graph
occur after a bounded and predictable number of nodes are visited. is acyclic, this will occur after a bounded and predictable number of
nodes are visited.
If an output to a node is not specified, it indicates that the CPL If an output to a node does not point to another node, it indicates
server should perform a node- or protocol-specific action. Some nodes that the CPL server should perform a node- or protocol-specific
have specific default actions associated with them; for others, the action. Some nodes have specific default behavior associated with
default action is implicit in the underlying signalling protocol, or them; for others, the default behavior is implicit in the underlying
can be configured by the administrator of the server. For further signalling protocol, or can be configured by the administrator of the
details on this, see section 11. server. For further details on this, see Section 11.
_________________ ___________________ ________ busy _________________ ___________________ ________ busy
| Address-switch | | location | | proxy |--------\ | Address-switch | | location | | proxy |--------\
Call --->| field: origin | ->| url: sip:jones@ |--->|timeout:| timeout| Call --->| field: origin | ->| url: sip:jones@ |--->|timeout:| timeout|
| subfield: host | / | example.com | | 10s |--------| | subfield: host | / | example.com | | 10s |--------|
|-----------------|/ |___________________| | | failure| |-----------------|/ |___________________| | | failure|
| subdomain-of: | |________|--------| | subdomain-of: | |________|--------|
| example.com | | | example.com | |
|-----------------| _____________________________________________/ |-----------------| _____________________________________________/
| otherwise | /.......................................... | otherwise | /..........................................
skipping to change at page 4, line 29 skipping to change at page 4, line 26
|_________________| \. ____________________ . |_________________| \. ____________________ .
->| location | __________ . ->| location | __________ .
. | url: sip:jones@ | | redirect | . . | url: sip:jones@ | | redirect | .
. | voicemail. |--->| | . . | voicemail. |--->| | .
. | example.com | |__________| . . | example.com | |__________| .
. |____________________| . . |____________________| .
.......................................... ..........................................
Figure 1: Sample CPL Action: Graphical Version Figure 1: Sample CPL Action: Graphical Version
2.3 Location model 2.3 Location Model
For flexibility, one piece of information necessary for the function For flexibility, one piece of information necessary for the function
of a CPL is not given as node parameters: the set of locations to of a CPL is not given as node parameters: the set of locations to
which a call is to be directed. Instead, this set of locations is which a call is to be directed. Instead, this set of locations is
stored as an implicit global variable throughout the execution of a stored as an implicit global variable throughout the execution of a
processing action (and its sub-actions). This allows locations to be processing action (and its subactions). This allows locations to be
retrieved from external sources, filtered, and so forth, without retrieved from external sources, filtered, and so forth, without
requiring general language support for such actions (which could harm requiring general language support for such operations (which could
the simplicity and tractability of understanding the language). The harm the simplicity and tractability of understanding the language).
specific actions which add, retrieve, or filter location sets are The specific operations which add, retrieve, or filter location sets
given in section 6. are given in Section 6.
For the incoming top-level processing action, the location set is For the incoming top-level call processing action, the location set
initialized to the empty set. For the outgoing action, it is is initialized to the empty set. For the outgoing action, it is
initialized to the destination address of the call. initialized to the destination address of the call.
2.4 XML structure 2.4 XML Structure
Syntactically, CPL scripts are represented by XML documents. XML is Syntactically, CPL scripts are represented by XML documents. XML is
thoroughly specified by [3], and implementors of this specification thoroughly specified by [3], and implementors of this specification
should be familiar with that document, but as a brief overview, XML should be familiar with that document, but as a brief overview, XML
consists of a hierarchical structure of tags; each tag can have a consists of a hierarchical structure of tags; each tag can have a
number of attributes. It is visually and structurally very similar to number of attributes. It is visually and structurally very similar to
HTML [6], as both languages are simplifications of the earlier and HTML [6], as both languages are simplifications of the earlier and
larger standard SGML [7]. larger standard SGML [7].
See Figure 2 for the XML document corresponding to the graphical See Figure 2 for the XML document corresponding to the graphical
representation of the CPL script in Figure 1. Both nodes and outputs representation of the CPL script in Figure 1. Both nodes and outputs
in the CPL are represented by XML tags; parameters are represented by in the CPL are represented by XML tags; parameters are represented by
XML tag attributes. Typically, node tags contain output tags, and XML tag attributes. Typically, node tags contain output tags, and
vice-versa (with one exception; see section 6.1). vice-versa (with a few exceptions: see Sections 6.1, 6.3, 8.1, and
8.2).
The connection between the output of a node and another node is The connection between the output of a node and another node is
represented by enclosing the tag representing the pointed-to node represented by enclosing the tag representing the pointed-to node
inside the tag for the outer node's output. Convergence (several inside the tag for the outer node's output. Convergence (several
outputs pointing to a single node) is represented by sub-actions, outputs pointing to a single node) is represented by subactions,
discussed further in section 9. discussed further in Section 9.
The higher-level structure of a CPL script is represented by tags The higher-level structure of a CPL script is represented by tags
corresponding to each piece of meta-information, sub-actions, and corresponding to each piece of ancillary information, subactions, and
top-level actions, in order. This higher-level information is all top-level actions, in order. This higher-level information is all
enclosed in a special tag cpl, the outermost tag of the XML document. enclosed in a special tag cpl, the outermost tag of the XML document.
A complete Document Type Declaration for the CPL is provided in A complete Document Type Declaration for the CPL is provided in
Appendix C. The remainder of the main sections of this document Appendix C. The remainder of the main sections of this document
describe the semantics of the CPL, while giving its syntax describe the semantics of the CPL, while giving its syntax
informally. For the formal syntax, please see the appendix. informally. For the formal syntax, please see the appendix.
3 Document information 3 Document Information
This section gives meta-information about CPL scripts. This section gives information describing how CPL scripts are
identified.
3.1 CPL Document Identifiers for XML 3.1 CPL Document Identifiers for XML
A CPL script list which appears as a top-level XML document is A CPL script list which appears as a top-level XML document is
identified with the formal public identifier "-//IETF//DTD RFCxxxx identified with the formal public identifier "-//IETF//DTD RFCxxxx
CPL 1.0//EN". If this document is published as an RFC, "xxxx" will be CPL 1.0//EN".
replaced by the RFC number.
A CPL embedded as a fragment within another XML document is A CPL embedded as a fragment within another XML document is
identified with the XML namespace identifier identified with the XML namespace identifier "http://www.rfc-
editor.org/rfc/rfcxxxx.txt".
<?xml version="1.0" ?> <?xml version="1.0" ?>
<!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd"> <!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd">
<cpl> <cpl>
<subaction id="voicemail"> <subaction id="voicemail">
<location url="sip:jones@voicemail.example.com"> <location url="sip:jones@voicemail.example.com">
<redirect /> <redirect />
</location> </location>
</subaction> </subaction>
skipping to change at page 6, line 34 skipping to change at page 6, line 35
</address> </address>
<otherwise> <otherwise>
<sub ref="voicemail" /> <sub ref="voicemail" />
</otherwise> </otherwise>
</address-switch> </address-switch>
</incoming> </incoming>
</cpl> </cpl>
Figure 2: Sample CPL Script: XML Version Figure 2: Sample CPL Script: XML Version
"http://www.ietf.org/internet-drafts/draft-ietf-iptel-cpl-03.txt". [Note to RFC editor: please replace "xxxx" above with the
If this document is published as an RFC, the namespace identifier number of this RFC.]
will be "http://www.rfc-editor.org/rfc/rfcxxxx.txt", where xxxx is
the RFC number.
Note that the URIs specifying XML namespaces are only Note that the URIs specifying XML namespaces are only
globally unique names; they do not have to reference any globally unique names; they do not have to reference any
particular actual object. The URI of a canonical source of particular actual object. The URI of a canonical source of
this specification meets the requirement of being globally this specification meets the requirement of being globally
unique, and is also useful to document the format. unique, and is also useful to document the format.
3.2 MIME Registration 3.2 MIME Registration
As an XML type, CPL's MIME registration conforms with "XML Media As an XML type, CPL's MIME registration conforms with "XML Media
Types" [8] as well as RFC 2048 [9]. Types," RFC YYYY [8].
[Note to RFC Editor: please replace "YYYY" in this section,
and in bibliography entry [8], with the RFC number assigned
to the Internet-Draft draft-murata-xml-09.txt, approved for
Proposed Standard.]
MIME media type name: application MIME media type name: application
MIME subtype name: cpl+xml MIME subtype name: cpl+xml
Mandatory parameters: none Mandatory parameters: none
Optional parameters: charset Optional parameters: charset
As for application/xml in "XML Media Types." As for application/xml in RFC YYYY.
Encoding considerations: As for application/xml in "XML Media Encoding considerations: As for application/xml in RFC YYYY.
Types."
Security considerations: See section 14, and section 10 of "XML Security considerations: See Section 14, and Section 10 of RFC
Media Types." YYYY.
Interoperability considerations: Different CPL servers may use Interoperability considerations: Different CPL servers may use
incompatible address types. However, all potential incompatible address types. However, all potential
interoperability issues should be resolvable at the time a interoperability issues should be resolvable at the time a
script is uploaded; there should be no interoperability script is uploaded; there should be no interoperability
issues which cannot be detected until runtime. issues which cannot be detected until runtime.
Published specification: This document. Published specification: This document.
Applications which use this media type: None publicly released Applications which use this media type: None publicly released
skipping to change at page 7, line 48 skipping to change at page 7, line 51
Macintosh file type code: "TEXT" Macintosh file type code: "TEXT"
Person and e-mail address for further information: Person and e-mail address for further information:
Jonathan Lennox <lennox@cs.columbia.edu> Jonathan Lennox <lennox@cs.columbia.edu>
Henning Schulzrinne <hgs@cs.columbia.edu> Henning Schulzrinne <hgs@cs.columbia.edu>
Intended usage: COMMON Intended usage: COMMON
Author/Change Controller: The IETF. Author/Change Controller: The IETF.
4 Script structure: overview 4 Script Structure: Overview
As mentioned, a CPL script consists of ancillary information, As mentioned, a CPL script consists of ancillary information,
subactions, and top-level actions. The full syntax of the cpl node is subactions, and top-level actions. The full syntax of the cpl node is
given in Figure 3. given in Figure 3.
Tag: cpl Tag: cpl
Parameters: none Parameters: None
Sub-tags: ancillary See section 10 Sub-tags: ancillary See Section 10
subaction See section 9 subaction See Section 9
outgoing Top-level actions to take on this user's outgoing Top-level actions to take on this user's
outgoing calls outgoing calls
incoming Top-level actions to take on this user's incoming Top-level actions to take on this user's
incoming calls incoming calls
Figure 3: Syntax of the top-level cpl tag Figure 3: Syntax of the top-level cpl tag
Call processing actions, both top-level actions and sub-actions, Call processing actions, both top-level actions and sub-actions,
consist of nodes and outputs. Nodes and outputs are both described by consist of a tree of nodes and outputs. Nodes and outputs are both
XML tags. There are four categories of CPL nodes: switches , which described by XML tags. There are four categories of CPL nodes:
represent choices a CPL script can make; location modifiers , which switches , which represent choices a CPL script can make; location
add or remove locations from the location set; signalling actions , modifiers , which add or remove locations from the location set;
which cause signalling events in the underlying protocol; and non- signalling operations , which cause signalling events in the
signalling actions, which take an action but do not effect the underlying protocol; and non-signalling operations , which trigger
underlying protocol. behavior which does not effect the underlying protocol.
5 Switches 5 Switches
Switches represent choices a CPL script can make, based on either Switches represent choices a CPL script can make, based on either
attributes of the original call request or items independent of the attributes of the original call request or items independent of the
call. call.
All switches are arranged as a list of conditions that can match a All switches are arranged as a list of conditions that can match a
variable. Each condition corresponds to a node output; the output variable. Each condition corresponds to a node output; the output
points to the next node to execute if the condition was true. The points to the next node to execute if the condition was true. The
skipping to change at page 8, line 47 skipping to change at page 9, line 6
There are two special switch outputs that apply to every switch type. There are two special switch outputs that apply to every switch type.
The output not-present, which MAY occur anywhere in the list of The output not-present, which MAY occur anywhere in the list of
outputs, is true if the variable the switch was to match was not outputs, is true if the variable the switch was to match was not
present in the original call setup request. (In this document, this present in the original call setup request. (In this document, this
is sometimes described by saying that the information is "absent".) is sometimes described by saying that the information is "absent".)
The output otherwise, which MUST be the last output specified if it The output otherwise, which MUST be the last output specified if it
is present, matches if no other condition matched. is present, matches if no other condition matched.
If no condition matches and no otherwise output was present in the If no condition matches and no otherwise output was present in the
script, the default script action is taken. See section 11 for more script, the default script behavior is taken. See Section 11 for more
information on this. information on this.
5.1 Address switches 5.1 Address Switches
Address switches allow a CPL script to make decisions based on one of Address switches allow a CPL script to make decisions based on one of
the addresses present in the original call request. They are the addresses present in the original call request. They are
summarized in Figure 4. summarized in Figure 4.
Node: address-switch Node: address-switch
Outputs: address Specific addresses to match Outputs: address Specific addresses to match
Parameters: field origin, destination, or original-destination Parameters: field origin, destination, or original-destination
subfield address-type, user, host, port, tel, or display, subfield address-type, user, host, port, tel, or display
( (also: password and alias-type)
also: password and alias-type)
Output: address Output: address
Parameters: is exact match Parameters: is exact match
contains substring match (for display only) contains substring match (for display only)
subdomain-of sub-domain match (for host, tel only) subdomain-of sub-domain match (for host, tel only)
Figure 4: Syntax of the address-switch node Figure 4: Syntax of the address-switch node
Address switches have two node parameters: field, and subfield. The Address switches have two node parameters: field, and subfield. The
mandatory field parameter allows the script to specify which address mandatory field parameter allows the script to specify which address
skipping to change at page 10, line 35 skipping to change at page 10, line 36
tel This subfield indicates a telephone subscriber number, if tel This subfield indicates a telephone subscriber number, if
the address contains such a number. It is not case the address contains such a number. It is not case
sensitive (the telephone numbers may contain the symbols sensitive (the telephone numbers may contain the symbols
`A' `B' `C' and `D'), and may be absent. It may be matched `A' `B' `C' and `D'), and may be absent. It may be matched
using the subdomain-of match operator. Punctuation and using the subdomain-of match operator. Punctuation and
separator characters in telephone numbers are discarded. separator characters in telephone numbers are discarded.
display This subfield indicates a "display name" or user-visible display This subfield indicates a "display name" or user-visible
name corresponding to an address. It is a Unicode string, name corresponding to an address. It is a Unicode string,
and is matched using the case-insensitive algorithm and is matched using the case-insensitive algorithm
described in section 5.2. The contains operator may be described in Section 5.2. The contains operator may be
applied to it. It may be absent. applied to it. It may be absent.
For any completely unknown subfield, the server MAY reject the script For any completely unknown subfield, the server MAY reject the script
at the time it is submitted with an indication of the problem; if a at the time it is submitted with an indication of the problem; if a
script with an unknown subfield is executed, the server MUST consider script with an unknown subfield is executed, the server MUST consider
the not-present output to be the valid one. the not-present output to be the valid one.
The address output tag may take exactly one of three possible The address output tag may take exactly one of three possible
parameters, indicating the kind of matching allowed. parameters, indicating the kind of matching allowed.
skipping to change at page 11, line 38 skipping to change at page 11, line 38
The display subfield of an address is the display-name part of the The display subfield of an address is the display-name part of the
address, if it is present. Because of SIP's syntax, the destination address, if it is present. Because of SIP's syntax, the destination
address field will never have a display subfield. address field will never have a display subfield.
The address-type subfield of an address is the URI scheme of that The address-type subfield of an address is the URI scheme of that
address. Other address fields depend on that address-type. address. Other address fields depend on that address-type.
For sip URLs, the user, host, and port subfields correspond to the For sip URLs, the user, host, and port subfields correspond to the
"user," "host," and "port" elements of the URI syntax. The tel "user," "host," and "port" elements of the URI syntax. The tel
subfield is defined to be the "user" part of the URI if and only if subfield is defined to be the "user" part of the URI, with visual
the "user=phone" parameter is given to the URI. An additional separators stripped,
subfield, password is defined to correspond to the "password" element
of the SIP URI, and is case-sensitive. However, use of this field is if and only if the "user=phone" parameter is given to the URI. An
NOT RECOMMENDED for general security reasons. additional subfield, password is defined to correspond to the
"password" element of the SIP URI, and is case-sensitive. However,
use of this field is NOT RECOMMENDED for general security reasons.
For tel URLs, the tel and user subfields are the subscriber name; in For tel URLs, the tel and user subfields are the subscriber name; in
the former case, visual separators are stripped. The host and port the former case, visual separators are stripped. The host and port
subfields are both not present. subfields are both not present.
For h323 URLs, subfields MAY be set according to the scheme described For h323 URLs, subfields MAY be set according to the scheme described
in Appendix B. in Appendix B.
For other URI schemes, only the address-type subfield is defined by For other URI schemes, only the address-type subfield is defined by
this specification; servers MAY set other pre-defined subfields, or this specification; servers MAY set other pre-defined subfields, or
MAY support additional subfields. MAY support additional subfields.
If no subfield is specified for addresses in SIP messages, the string If no subfield is specified for addresses in SIP messages, the string
matched is the URI part of the address. For "sip" URLs, all matched is the URI part of the address. For "sip" URLs, all
parameters are stripped; for other URLs, the URL is used verbatim. parameters are stripped; for other URLs, the URL is used verbatim.
5.2 String switches 5.2 String Switches
String switches allow a CPL script to make decisions based on free- String switches allow a CPL script to make decisions based on free-
form strings present in a call request. They are summarized in Figure form strings present in a call request. They are summarized in Figure
5. 5.
Node: string-switch Node: string-switch
Outputs: string Specific string to match Outputs: string Specific string to match
Parameters: field subject, organization, user-agent, Parameters: field subject, organization, user-agent,
language, or display language, or display
skipping to change at page 12, line 46 skipping to change at page 13, line 4
subject The subject of the call. subject The subject of the call.
organization The organization of the originator of the call. organization The organization of the originator of the call.
user-agent The name of the program or device with which the call user-agent The name of the program or device with which the call
request was made. request was made.
language The languages in which the originator of the call language The languages in which the originator of the call
wishes to receive responses. This contains a list of RFC wishes to receive responses. This contains a list of RFC
1766 [10] language tags, separated by commas. 1766 [9] language tags, separated by commas.
Note that matching based on contains is likely to be Note that matching based on contains is likely to be
much more useful than matching based on is, for this much more useful than matching based on is, for this
field. field.
display Free-form text associated with the call, intended to be display Free-form text associated with the call, intended to be
displayed to the recipient, with no other semantics defined displayed to the recipient, with no other semantics defined
by the signalling protocol. by the signalling protocol.
Strings are matched as case-insensitive Unicode strings, in the Strings are matched as case-insensitive Unicode strings, in the
following manner. First, strings are canonicalized to the following manner. First, strings are canonicalized to the
"Compatibility Composition" (KC) form, as specified in Unicode "Compatibility Composition" (KC) form, as specified in Unicode
Technical Report 15 [11]. Then, strings are compared using locale- Technical Report 15 [10]. Then, strings are compared using locale-
insensitive caseless mapping, as specified in Unicode Technical insensitive caseless mapping, as specified in Unicode Technical
Report 21 [12]. Report 21 [11].
Code to perform the first step, in Java and Perl, is Code to perform the first step, in Java and Perl, is
available; see the links from Annex E of UTR 15 [11]. The available; see the links from Annex E of UTR 15 [10]. The
case-insensitive string comparison in the Java standard case-insensitive string comparison in the Java standard
class libraries already performs the second step; other class libraries already performs the second step; other
Unicode-aware libraries should be similar. Unicode-aware libraries should be similar.
The output tags of string matching are named string, and have a The output tags of string matching are named string, and have a
mandatory argument, one of is or contains, indicating whole-string mandatory argument, one of is or contains, indicating whole-string
match or substring match, respectively. match or substring match, respectively.
5.2.1 Usage of string-switch with SIP 5.2.1 Usage of string-switch with SIP
For SIP, the fields subject, organization, and user-agent correspond For SIP, the fields subject, organization, and user-agent correspond
to the SIP header fields with the same name. These are used verbatim to the SIP header fields with the same name. These are used verbatim
as they appear in the message. as they appear in the message.
The field language corresponds to the SIP Accept-Language header. It The field language corresponds to the SIP Accept-Language header. It
is converted to a list of comma-separated languages as described is converted to a list of comma-separated languages as described
above. above.
The field display is not used, and is never present. The field display is not used, and is never present.
5.3 Time switches 5.3 Time Switches
Time switches allow a CPL script to make decisions based the time Time switches allow a CPL script to make decisions based on the time
and/or date the script is being executed. They are summarized in and/or date the script is being executed. They are summarized in
Figure 6. Figure 6.
Time switches are independent of the underlying signalling protocol. Time switches are independent of the underlying signalling protocol.
Time switches are based on a large subset of how recurring intervals
Node: time-switch Node: time-switch
Outputs: time Specific time to match Outputs: time Specific time to match
Parameters: tzid RFC 2445 Time Zone Identifier Parameters: tzid RFC 2445 Time Zone Identifier
tzurl RFC 2445 Time Zone URL tzurl RFC 2445 Time Zone URL
Output: time Output: time
Parameters: dtstart Start of interval (RFC 2445 DATE-TIME) Parameters: dtstart Start of interval (RFC 2445 DATE-TIME)
dtend End of interval (RFC 2445 DATE-TIME) dtend End of interval (RFC 2445 DATE-TIME)
duration Length of interval (RFC 2445 DURATION) duration Length of interval (RFC 2445 DURATION)
freq Frequency of recurrence (one of "daily", freq Frequency of recurrence (one of "daily",
skipping to change at page 14, line 26 skipping to change at page 14, line 27
until Bound of recurrence (RFC 2445 DATE-TIME) until Bound of recurrence (RFC 2445 DATE-TIME)
byday List of days of the week byday List of days of the week
bymonthday List of days of the month bymonthday List of days of the month
byyearday List of days of the year byyearday List of days of the year
byweekno List of weeks of the year byweekno List of weeks of the year
bymonth List of months of the year bymonth List of months of the year
wkst First day of workweek wkst First day of workweek
Figure 6: Syntax of the time-switch node Figure 6: Syntax of the time-switch node
Time switches are based on a large subset of how recurring intervals
of time are specified in the Internet Calendaring and Scheduling Core of time are specified in the Internet Calendaring and Scheduling Core
Object Specification (iCal COS), RFC 2445 [13]. Object Specification (iCal COS), RFC 2445 [12].
This allows CPLs to be generated automatically from This allows CPLs to be generated automatically from
calendar books. It also allows us to re-use the extensive calendar books. It also allows us to re-use the extensive
existing work specifying time intervals. existing work specifying time intervals.
The subset was designed with the goal that a time-switch The subset was designed with the goal that a time-switch
can be evaluated -- an instant can be determined to fall can be evaluated -- an instant can be determined to fall
within an interval, or not -- in constant (O(1)) time. within an interval, or not -- in constant (O(1)) time.
An algorithm to whether an instant falls within a given recurrence is An algorithm to whether an instant falls within a given recurrence is
given in Appendix A. given in Appendix A.
The time-switch tag takes two optional parameters, tzid and tzurl, The time-switch tag takes two optional parameters, tzid and tzurl,
both of which are defined in RFC 2445 (sections 4.8.3.1 and 4.8.3.5 both of which are defined in RFC 2445 (Sections 4.8.3.1 and 4.8.3.5
respectively). The TZID is the identifying label by which a time zone respectively). The TZID is the identifying label by which a time zone
definition is referenced. If it begins with a forward slash definition is referenced. If it begins with a forward slash
(solidus), it references a to-be-defined global time zone registry; (solidus), it references a to-be-defined global time zone registry;
otherwise it is locally-defined at the server. The TZURL gives a otherwise it is locally-defined at the server. The TZURL gives a
network location from which an up-to-date VTIMEZONE definition for network location from which an up-to-date VTIMEZONE definition for
the timezone can be retrieved. the timezone can be retrieved.
While TZID labels that do not begin with a forward slash are locally While TZID labels that do not begin with a forward slash are locally
defined, it is RECOMMENDED that servers support at least the naming defined, it is RECOMMENDED that servers support at least the naming
scheme used by Olson Time Zone database [14]. Examples of timezone scheme used by Olson Time Zone database [13]. Examples of timezone
databases that use the Olson scheme are the zoneinfo files on most databases that use the Olson scheme are the zoneinfo files on most
Unix-like systems, and the standard Java TimeZone class. Unix-like systems, and the standard Java TimeZone class.
If a script is uploaded with a tzid and tzurl which the CPL server If a script is uploaded with a tzid and tzurl which the CPL server
does not recognize or cannot resolve, it SHOULD diagnose and reject does not recognize or cannot resolve, it SHOULD diagnose and reject
this at script upload time. If neither tzid nor tzurl are present, this at script upload time. If neither tzid nor tzurl are present,
all non-UTC times within this time switch should be interpreted as all non-UTC times within this time switch should be interpreted as
being "floating" times, i.e. that they are specified in the local being "floating" times, i.e. that they are specified in the local
timezone of the CPL server. timezone of the CPL server.
skipping to change at page 15, line 37 skipping to change at page 15, line 39
intervals when local time is discontinuous, at the beginning or end intervals when local time is discontinuous, at the beginning or end
of daylight-savings time. Note especially that some times may occur of daylight-savings time. Note especially that some times may occur
more than once when clocks are set back. The algorithm in Appendix A more than once when clocks are set back. The algorithm in Appendix A
is believed to handle this correctly. is believed to handle this correctly.
Time nodes specify a list of periods during which their output should Time nodes specify a list of periods during which their output should
be taken. They have two required parameters: dtstart, which specifies be taken. They have two required parameters: dtstart, which specifies
the beginning of the first period of the list, and exactly one of the beginning of the first period of the list, and exactly one of
dtend or duration, which specify the ending time or the duration of dtend or duration, which specify the ending time or the duration of
the period, respectively. The dtstart and dtend parameters are the period, respectively. The dtstart and dtend parameters are
formatted as iCal COS DATE-TIME values, as specified in section 4.3.5 formatted as iCal COS DATE-TIME values, as specified in Section 4.3.5
of RFC 2445 [13]. Because time zones are specified in the top-level of RFC 2445 [12]. Because time zones are specified in the top-level
time-switch tag, only forms 1 or 2 (floating or UTC times) can be time-switch tag, only forms 1 or 2 (floating or UTC times) can be
used. The duration parameter is given as an iCal COS DURATION used. The duration parameter is given as an iCal COS DURATION
parameter, as specified in section 4.3.6 of RFC 2445. Both the parameter, as specified in section 4.3.6 of RFC 2445. Both the DATE-
DATE-TIME and the DURATION syntaxes are subsets of the corresponding TIME and the DURATION syntaxes are subsets of the corresponding
syntaxes from ISO 8601 [15]. syntaxes from ISO 8601 [14].
For a recurring interval, the duration parameter MUST be less than For a recurring interval, the duration parameter MUST be less than
twenty-four hours. For non-recurring intervals, durations of any twenty-four hours. For non-recurring intervals, durations of any
length are permitted. length are permitted.
If no other parameters are specified, a time node indicates only a If no other parameters are specified, a time node indicates only a
single period of time. More complicated sets periods intervals are single period of time. More complicated sets periods intervals are
constructed as recurrences. A recurrence is specified by including constructed as recurrences. A recurrence is specified by including
the freq parameter, which indicates the type of recurrence rule. No the freq parameter, which indicates the type of recurrence rule. No
parameters other than dtstart, dtend, and duration SHOULD be parameters other than dtstart, dtend, and duration SHOULD be
skipping to change at page 16, line 21 skipping to change at page 16, line 24
weekly, to specify repeating periods based on an interval of a week weekly, to specify repeating periods based on an interval of a week
or more; monthly, to specify repeating periods based on an interval or more; monthly, to specify repeating periods based on an interval
of a month or more; and yearly, to specify repeating periods based on of a month or more; and yearly, to specify repeating periods based on
an interval of a year or more. These values are not case-sensitive. an interval of a year or more. These values are not case-sensitive.
The values secondly, minutely, and hourly are present in The values secondly, minutely, and hourly are present in
iCal, but were removed from CPL. iCal, but were removed from CPL.
The interval parameter contains a positive integer representing how The interval parameter contains a positive integer representing how
often the recurrence rule repeats. The default value is "1", meaning often the recurrence rule repeats. The default value is "1", meaning
every second for a secondly rule, or every minute for a minutely every day for a daily rule, every week for a weekly rule, every month
rule, every hour for an hourly rule, every day for a daily rule, for a monthly rule and every year for a yearly rule.
every week for a weekly rule, every month for a monthly rule and
every year for a yearly rule.
The until parameter defines an iCal COS DATE or DATE-TIME value which The until parameter defines an iCal COS DATE or DATE-TIME value which
bounds the recurrence rule in an inclusive manner. If the value bounds the recurrence rule in an inclusive manner. If the value
specified by until is synchronized with the specified recurrence, specified by until is synchronized with the specified recurrence,
this date or date-time becomes the last instance of the recurrence. this date or date-time becomes the last instance of the recurrence.
If specified as a date-time value, then it MUST be specified in an If specified as a date-time value, then it MUST be specified in an
UTC time format. If not present, the recurrence is considered to UTC time format. If not present, the recurrence is considered to
repeat forever. repeat forever.
iCal also defines a count parameter, which allows an iCal also defines a count parameter, which allows an
skipping to change at page 17, line 22 skipping to change at page 17, line 22
represents the tenth to the last day of the month. represents the tenth to the last day of the month.
The byyearday parameter specifies a comma-separated list of days of The byyearday parameter specifies a comma-separated list of days of
the year. Valid values are 1 to 366 or -366 to -1. For example, -1 the year. Valid values are 1 to 366 or -366 to -1. For example, -1
represents the last day of the year (December 31st) and -306 represents the last day of the year (December 31st) and -306
represents the 306th to the last day of the year (March 1st). represents the 306th to the last day of the year (March 1st).
The byweekno parameter specifies a comma-separated list of ordinals The byweekno parameter specifies a comma-separated list of ordinals
specifying weeks of the year. Valid values are 1 to 53 or -53 to -1. specifying weeks of the year. Valid values are 1 to 53 or -53 to -1.
This corresponds to weeks according to week numbering as defined in This corresponds to weeks according to week numbering as defined in
ISO 8601 [15]. A week is defined as a seven day period, starting on ISO 8601 [14]. A week is defined as a seven day period, starting on
the day of the week defined to be the week start (see wkst). Week the day of the week defined to be the week start (see wkst). Week
number one of the calendar year is the first week which contains at number one of the calendar year is the first week which contains at
least four (4) days in that calendar year. This parameter is only least four (4) days in that calendar year. This parameter is only
valid for yearly rules. For example, 3 represents the third week of valid for yearly rules. For example, 3 represents the third week of
the year. the year.
Note: Assuming a Monday week start, week 53 can only occur Note: Assuming a Monday week start, week 53 can only occur
when Thursday is January 1 or if it is a leap year and when Thursday is January 1 or if it is a leap year and
Wednesday is January 1. Wednesday is January 1.
The bymonth parameter specifies a comma-separated list of months of The bymonth parameter specifies a comma-separated list of months of
the year. Valid values are 1 to 12. the year. Valid values are 1 to 12.
The wkst parameter specifies the day on which the workweek starts. The wkst parameter specifies the day on which the workweek starts.
Valid values are MO, TU, WE, TH, FR, SA and SU. This is significant Valid values are MO, TU, WE, TH, FR, SA and SU. This is significant
when a weekly recurrence has an interval greater than 1, and a byday when a weekly recurrence has an interval greater than 1, and a byday
parameter is specified. This is also significant in a yearly parameter is specified. This is also significant in a yearly
recurrence when a byweekno parameter is specified. The default value recurrence when a byweekno parameter is specified. The default value
is MO, following ISO 8601 [15]. is MO, following ISO 8601 [14].
iCal also includes the Byxxx parameters bysecond, byminute, iCal also includes the Byxxx parameters bysecond, byminute,
byhour, and bysetpos, which have been removed from CPL. byhour, and bysetpos, which have been removed from CPL.
If byxxx parameter values are found which are beyond the available If byxxx parameter values are found which are beyond the available
scope (ie, bymonthday="30" in February), they are simply ignored. scope (ie, bymonthday="30" in February), they are simply ignored.
Byxxx parameters modify the recurrence in some manner. Byxxx rule Byxxx parameters modify the recurrence in some manner. Byxxx rule
parts for a period of time which is the same or greater than the parts for a period of time which is the same or greater than the
frequency generally reduce or limit the number of occurrences of the frequency generally reduce or limit the number of occurrences of the
skipping to change at page 18, line 23 skipping to change at page 18, line 23
2. 2.
If multiple Byxxx parameters are specified, then after evaluating the If multiple Byxxx parameters are specified, then after evaluating the
specified freq and interval parameters, the Byxxx parameters are specified freq and interval parameters, the Byxxx parameters are
applied to the current set of evaluated occurrences in the following applied to the current set of evaluated occurrences in the following
order: bymonth, byweekno, byyearday, bymonthday, and byday; then order: bymonth, byweekno, byyearday, bymonthday, and byday; then
until is evaluated. until is evaluated.
Here is an example of evaluating multiple Byxxx parameters. Here is an example of evaluating multiple Byxxx parameters.
<time dtstart="19970105T083000" duration="P10M" <time dtstart="19970105T083000" duration="PT10M"
freq="yearly" interval="2" bymonth="1" byday="SU"> freq="yearly" interval="2" bymonth="1" byday="SU">
First, the interval="2" would be applied to freq="YEARLY" to arrive First, the interval="2" would be applied to freq="YEARLY" to arrive
at "every other year." Then, bymonth="1" would be applied to arrive at "every other year." Then, bymonth="1" would be applied to arrive
at "every January, every other year." Then, byday="SU" would be at "every January, every other year." Then, byday="SU" would be
applied to arrive at "every Sunday in January, every other year." applied to arrive at "every Sunday in January, every other year."
Then the time of day is derived from dtstart to end up in "every Then the time of day is derived from dtstart to end up in "every
Sunday in January from 8:30:00 AM to 8:40:00 AM, every other year." Sunday in January from 8:30:00 AM to 8:40:00 AM, every other year."
Similarly, if the byday, bymonthday or bymonth parameter were Similarly, if the byday, bymonthday or bymonth parameter were
missing, the appropriate day or month would have been retrieved from missing, the appropriate day or month would have been retrieved from
the dtstart parameter. the dtstart parameter.
The iCal COS RDATE, EXRULE and EXDATE recurrence rules are not The iCal COS RDATE, EXRULE and EXDATE recurrence rules are not
specifically mapped to components of the time-switch node. Equivalent specifically mapped to components of the time-switch node. Equivalent
functionality to the exception rules can be attained by using the functionality to the exception rules can be attained by using the
ordering of switch rules to exclude times using earlier rules; ordering of switch rules to exclude times using earlier rules;
equivalent functionality to the additional-date RDATE rules can be equivalent functionality to the additional-date RDATE rules can be
attained by using sub nodes (see section 9) to link multiple outputs attained by using sub nodes (see Section 9) to link multiple outputs
to the same subsequent node. to the same subsequent node.
The not-present output is never true for a time switch. However, it The not-present output is never true for a time switch. However, it
MAY be included, to allow switch processing to be more regular. MAY be included, to allow switch processing to be more regular.
5.3.1 Motivations for the iCal subset 5.3.1 Motivations for the iCal Subset
(This sub-sub-section is non-normative.) (This sub-sub-section is non-normative.)
The syntax of the CPL time-switch was based on that of the iCal COS The syntax of the CPL time-switch was based on that of the iCal COS
RRULE, but as mentioned above, certain features were omitted and RRULE, but as mentioned above, certain features were omitted and
restrictions were added. Specifically: restrictions were added. Specifically:
1. All recurrence intervals and rules describing periods less 1. All recurrence intervals and rules describing periods less
than a day were removed. These were the frequencies than a day were removed. These were the frequencies
secondly, minutely, and hourly, and the Byxxx rules secondly, minutely, and hourly, and the Byxxx rules
bysecond, byminute, and byhour. bysecond, byminute, and byhour.
skipping to change at page 19, line 45 skipping to change at page 19, line 45
shorter than that period. The one-day point seemed to be the most shorter than that period. The one-day point seemed to be the most
generally useful place to place this division, as some investigation generally useful place to place this division, as some investigation
showed that many common calendaring applications do not support showed that many common calendaring applications do not support
durations longer than a day, none that we found supported repetitions durations longer than a day, none that we found supported repetitions
shorter than a day. Eliminating sub-day repetitions also greatly shorter than a day. Eliminating sub-day repetitions also greatly
simplifies the handling of daylight-savings transitions. simplifies the handling of daylight-savings transitions.
The algorithm given in Appendix A runs in constant time, and The algorithm given in Appendix A runs in constant time, and
motivated the development of this iCal subset. motivated the development of this iCal subset.
5.4 Priority switches 5.4 Priority Switches
Priority switches allow a CPL script to make decisions based on the Priority switches allow a CPL script to make decisions based on the
priority specified for the original call. They are summarized in priority specified for the original call. They are summarized in
Figure 7. They are dependent on the underlying signalling protocol. Figure 7. They are dependent on the underlying signalling protocol.
Node: priority-switch Node: priority-switch
Outputs: priority Specific priority to match Outputs: priority Specific priority to match
Parameters: none Parameters: None
Output: priority Output: priority
Parameters: less Match if priority is less than specified Parameters: less Match if priority is less than specified
greater Match if priority is greater than specified greater Match if priority is greater than specified
equal Match if priority is equal to specified equal Match if priority is equal to specified
Figure 7: Syntax of the priority-switch node Figure 7: Syntax of the priority-switch node
Priority switches take no parameters. Priority switches take no parameters.
The priority tags take one of the three parameters greater, less, and The priority tags take one of the three parameters greater, less, and
equal. The values of these tags are one of the following priorities: equal. The values of these tags are one of the following priorities:
in decreasing order, emergency, urgent, normal, and non-urgent. These in decreasing order, emergency, urgent, normal, and non-urgent. These
values are matched in a case-insensitive manner. Outputs with the values are matched in a case-insensitive manner. Outputs with the
less parameter are taken if the priority of the message is less than less parameter are taken if the priority of the call is less than the
the priority given in the argument; and so forth. priority given in the argument; and so forth.
If no priority header is specified in a message, the priority is If no priority header is specified in a message, the priority is
considered to be normal. If an unknown priority is given, the considered to be normal. If an unknown priority is specified in the
priority is considered to be equivalent to normal for the purposes of call, it is considered to be equivalent to normal for the purposes of
greater and less comparisons, but it is compared literally for equal greater and less comparisons, but it is compared literally for equal
comparisons. comparisons.
Since every message has a priority, the not-present output is never Since every message has a priority, the not-present output is never
true for a priority switch. However, it MAY be included, to allow true for a priority switch. However, it MAY be included, to allow
switch processing to be more regular. switch processing to be more regular.
5.4.1 Usage of priority-switch with SIP 5.4.1 Usage of priority-switch with SIP
The priority of a SIP message corresponds to the Priority header in The priority of a SIP message corresponds to the Priority header in
the message. the initial INVITE message.
6 Location modifiers 6 Location Modifiers
The abstract location model of the CPL is described in section 2.3. The abstract location model of the CPL is described in Section 2.3.
The behavior of several of the signalling actions (defined in section The behavior of several of the signalling operations (defined in
7) is dependent on the current location set specified. Location nodes Section 7) is dependent on the current location set specified.
add or remove locations from the location set. Location nodes add or remove locations from the location set.
There are three types of location nodes defined. Explicit locations There are three types of location nodes defined. Explicit locations
add literally-specified locations to the current location set; add literally-specified locations to the current location set;
location lookups obtain locations from some outside source; and location lookups obtain locations from some outside source; and
location filters remove locations from the set, based on some location filters remove locations from the set, based on some
specified criteria. specified criteria.
6.1 Explicit location 6.1 Explicit Location
Explicit location nodes specify a location literally. Their syntax is Explicit location nodes specify a location literally. Their syntax is
described in Figure 8. described in Figure 8.
Explicit location nodes are dependent on the underlying signalling Explicit location nodes are dependent on the underlying signalling
protocol. protocol.
Node: location Node: location
Outputs: any node Outputs: None (next node follows directly)
Next node: Any node
Parameters: url URL of address to add to location set Parameters: url URL of address to add to location set
priority Priority of this location (0.0-1.0) priority Priority of this location (0.0-1.0)
clear Whether to clear the location set before adding clear Whether to clear the location set before adding
the new value the new value
Figure 8: Syntax of the location node Figure 8: Syntax of the location node
Explicit location nodes have three node parameters. The mandatory url Explicit location nodes have three node parameters. The mandatory url
parameter's value is the URL of the address to add to the location parameter's value is the URL of the address to add to the location
set. Only one address may be specified per location node; multiple set. Only one address may be specified per location node; multiple
locations may be specified by cascading these nodes. locations may be specified by cascading these nodes.
The optional priority parameter specifies a priority for the The optional priority parameter specifies a priority for the
location. Its value is a floating-point number between 0.0 and 1.0. location. Its value is a floating-point number between 0.0 and 1.0.
The optional clear parameter specifies whether the location set If it is not specified, the server SHOULD assume a default priority
should be cleared before adding the new location to it. Its value can of 1.0. The optional clear parameter specifies whether the location
be "yes" or "no", with "no" as the default. set should be cleared before adding the new location to it. Its value
can be "yes" or "no", with "no" as the default.
Basic location nodes have only one possible output, since there is no Basic location nodes have only one possible result, since there is no
way that they can fail. (If a basic location node specifies a way that they can fail. (If a basic location node specifies a
location which isn't supported by the underlying signalling protocol, location which isn't supported by the underlying signalling protocol,
the script server SHOULD detect this and report it to the user at the the script server SHOULD detect this and report it to the user at the
time the script is submitted.) Therefore, its XML representation does time the script is submitted.) Therefore, their XML representations
not have explicit output nodes; the <location> tag directly contains do not have explicit output tags; the <location> tag directly
another node tag. contains another node.
6.1.1 Usage of location with SIP 6.1.1 Usage of location with SIP
All SIP locations are represented as URLs, so the locations specified All SIP locations are represented as URLs, so the locations specified
in location tags are interpreted directly. in location tags are interpreted directly.
6.2 Location lookup 6.2 Location Lookup
Locations can also be specified up through external means, through Locations can also be specified up through external means, through
the use of location lookups. The syntax of these tags is given in the use of location lookups. The syntax of these tags is given in
Figure 9. Figure 9.
Location lookup is dependent on the underlying signalling protocol. Location lookup is dependent on the underlying signalling protocol.
Node: lookup Node: lookup
Outputs: success Action if lookup was successful Outputs: success Next node if lookup was successful
notfound Action if lookup found no addresses notfound Next node if lookup found no addresses
failure Action if lookup failed failure Next node if lookup failed
Parameters: source Source of the lookup Parameters: source Source of the lookup
timeout Time to try before giving up on the lookup timeout Time to try before giving up on the lookup
use Caller preferences fields to use use Caller preferences fields to use
ignore Caller preferences fields to ignore ignore Caller preferences fields to ignore
clear Whether to clear the location set before adding clear Whether to clear the location set before adding
the new values the new values
Output: success Output: success
Parameters: none Parameters: none
Output: notfound Output: notfound
Parameters: none Parameters: none
Output: failure Output: failure
Parameters: none Parameters: none
Figure 9: Syntax of the lookup node Figure 9: Syntax of the lookup node
Location lookup nodes have one mandatory parameter, and four optional Location lookup nodes have one mandatory parameter, and four optional
parameters. The mandatory parameter is source, the source of the parameters. The mandatory parameter is source, the source of the
lookup. This can either be a URL, or a non-URL value. If the value of lookup. This can either be a URI, or a non-URI value. If the value of
source is a URL, it indicates a location which returns the source is a URI, it indicates a location which the CPL server can
application/url media type. The server adds the locations returned by query to obtain an object with the text/uri-list media type (see the
the URL to the location set. IANA registration of this type, which also appears in RFC 2483 [15]).
The query is performed verbatim, with no additional information (such
as URI parameters) added. The server adds the locations contained in
this object to the location set.
CPL servers MAY refuse to allow URI-based sources for location
queries for some or all URI schemes. In this case, they SHOULD reject
the script at script upload time.
There has been discussion of having CPL servers add URI
parameters to the location request, so that (for instance)
CGI scripts could be used to resolve them. However, the
consensus was that this should be a CPL extension, not a
part of the base specification.
Non-URL sources indicate a source not specified by a URL which the Non-URL sources indicate a source not specified by a URL which the
server can query for addresses to add to the location set. The only server can query for addresses to add to the location set. The only
non-URL source currently defined is registration, which specifies all non-URL source currently defined is registration, which specifies all
the locations currently registered with the server. the locations currently registered with the server.
The lookup node also has four optional parameters. The timeout The lookup node also has four optional parameters. The timeout
parameter which specifies the time, in seconds, the script is willing parameter specifies the time, in seconds, the script is willing to
to wait for the lookup to be performed. If this is not specified, its wait for the lookup to be performed. If this is not specified, its
default value is 30. The clear parameter specifies whether the default value is 30. The clear parameter specifies whether the
location set should be cleared before the new locations are added. location set should be cleared before the new locations are added.
The other two optional parameters affect the interworking of the CPL The other two optional parameters affect the interworking of the CPL
script with caller preferences and caller capabilities. By default, script with caller preferences and caller capabilities. By default,
a CPL server SHOULD invoke the appropriate caller preferences a CPL server SHOULD invoke the appropriate caller preferences
filtering of the underlying signalling protocol, if the corresponding filtering of the underlying signalling protocol, if the corresponding
information is available. The two parameters use and ignore allow the information is available. The two parameters use and ignore allow the
script to modify how the script applies caller preferences filtering. script to modify how the script applies caller preferences filtering.
The specific meaning of the values of these parameters is The specific meaning of the values of these parameters is
signalling-protocol dependent; see Section 6.2.1 for SIP and Appendix signalling-protocol dependent; see Section 6.2.1 for SIP and Appendix
B.5 for H.323. B.5 for H.323.
Lookup has three outputs: success, notfound, and failure. Notfound is Lookup has three outputs: success, notfound, and failure. Notfound is
taken if the lookup process succeeded but did not find any locations; taken if the lookup process succeeded but did not find any locations;
failure is taken if the lookup failed for some reason, including that failure is taken if the lookup failed for some reason, including that
specified timeout was exceeded. If a given output is not present, specified timeout was exceeded. If a given output is not present,
script execution terminates and the default action is taken. script execution terminates and the default behavior is performed.
Clients SHOULD specify the three outputs success, notfound, and Clients SHOULD specify the three outputs success, notfound, and
failure in that order, so their script complies with the DTD given in failure in that order, so their script complies with the DTD given in
Appendix C, but servers MAY accept them in any order. Appendix C, but servers MAY accept them in any order.
6.2.1 Usage of lookup with SIP 6.2.1 Usage of lookup with SIP
Caller preferences for SIP are defined in "SIP Caller Preferences and Caller preferences for SIP are defined in "SIP Caller Preferences and
Callee Capabilities" [16]. By default, a CPL server SHOULD honor any Callee Capabilities" [16]. By default, a CPL server SHOULD honor any
Accept-Contact and Reject-Contact headers of the original call Accept-Contact and Reject-Contact headers of the original call
skipping to change at page 24, line 4 skipping to change at page 24, line 20
The addr-spec part of the caller preferences is always applied, and The addr-spec part of the caller preferences is always applied, and
the script cannot modify it. the script cannot modify it.
If a SIP server does not support caller preferences and callee If a SIP server does not support caller preferences and callee
capabilities, if the call request does not contain any preferences, capabilities, if the call request does not contain any preferences,
or if the callee's registrations do not contain any capabilities, the or if the callee's registrations do not contain any capabilities, the
use and ignore parameters are ignored. use and ignore parameters are ignored.
6.3 Location Removal 6.3 Location Removal
A CPL script can also remove locations from the location set, through A CPL script can also remove locations from the location set, through
the use of the remove-location node. The syntax of this node is the use of the remove-location node. The syntax of this node is
defined in Figure 10. defined in Figure 10.
The meaning of this node is dependent on the underlying signalling The meaning of this node is dependent on the underlying signalling
protocol. protocol.
Node: remove-location Node: remove-location
Outputs: any node Outputs: None (next node follows directly)
Next node: Any node
Parameters: location Location to remove Parameters: location Location to remove
param Caller preference parameters to apply param Caller preference parameters to apply
value Value of caller preference parameters value Value of caller preference parameters
Figure 10: Syntax of the remove-location node Figure 10: Syntax of the remove-location node
A remove-location node removes locations from the location set. It is A remove-location node removes locations from the location set. It is
primarily useful following a lookup node. primarily useful following a lookup node. An example of this is
given in Section 13.8.
The remove-location node has three optional parameters. The parameter The remove-location node has three optional parameters. The parameter
location gives the URL (or a signalling-protocol-dependent URL location gives the URL (or a signalling-protocol-dependent URL
pattern) of location or locations to be removed from the set. If this pattern) of location or locations to be removed from the set. If this
parameter is not given, all locations, subject to the constraints of parameter is not given, all locations, subject to the constraints of
the other parameters, are removed from the set. the other parameters, are removed from the set.
If param and value are present, their values are comma-separated If param and value are present, their values are comma-separated
lists of caller preferences parameters and corresponding values, lists of caller preferences parameters and corresponding values,
respectively. The where the nth entry in the param list matches the respectively. The nth entry in the param list matches the nth entry
nth entry in the value list. There MUST be the same number of in the value list. There MUST be the same number of parameters as
parameters as values specified. The meaning of these parameters is values specified. The meaning of these parameters is signalling-
signalling-protocol dependent. protocol dependent.
The remove-location node has no explicit output tags. In the XML
syntax, the XML remove-location tag directly encloses the next node's
tag.
6.3.1 Usage of remove-location with SIP 6.3.1 Usage of remove-location with SIP
For SIP-based CPL servers, the remove-location node has the same For SIP-based CPL servers, the remove-location node has the same
effect on the location set as a Reject-Contact header in caller effect on the location set as a Reject-Contact header in caller
preferences [16]. The value of the location parameter is treated as preferences [16]. The value of the location parameter is treated as
though it were the addr-spec field of a Reject-Contact header; thus, though it were the addr-spec field of a Reject-Contact header; thus,
an absent header is equivalent to an addr-spec of "*" in that an absent header is equivalent to an addr-spec of "*" in that
specification. The param and value parameters are treated as though specification. The param and value parameters are treated as though
they appeared in the params field of a Reject-Location header, as "; they appeared in the params field of a Reject-Location header, as ";
param=value" for each one. param=value" for each one.
If the CPL server does not support caller preferences and callee If the CPL server does not support caller preferences and callee
capabilities, or if the callee did not supply any preferences, the capabilities, or if the callee did not supply any preferences, the
param and value parameters are ignored. param and value parameters are ignored.
7 Signalling actions 7 Signalling Operations
Signalling action nodes cause signalling events in the underlying Signalling operation nodes cause signalling events in the underlying
signalling protocol. Three signalling actions are defined: "proxy," signalling protocol. Three signalling operations are defined:
"redirect," and "reject." "proxy," "redirect," and "reject."
7.1 Proxy 7.1 Proxy
Proxy causes the triggering call to be forwarded on to the currently Proxy causes the triggering call to be forwarded on to the currently
specified set of locations. The syntax of the proxy node is given in specified set of locations. The syntax of the proxy node is given in
Figure 11. Figure 11.
The specific actions invoked by the proxy node are signalling- The specific signalling events invoked by the proxy node are
protocol-dependent, though the general concept should apply to any signalling-protocol-dependent, though the general concept should
signalling protocol. apply to any signalling protocol.
After a proxy operation has completed, the CPL server chooses the
"best" response to the call attempt, as defined by the signalling
protocol or the server's administrative configuration rules.
If the call attempt was successful, CPL execution terminates and the
server proceeds to its default behavior (normally, to allow the call
Node: proxy Node: proxy
Outputs: busy Action if call attempt returned "busy" Outputs: busy Next node if call attempt returned "busy"
noanswer Action if call attempt was not answered before timeout noanswer Next node if call attempt was not answered before timeout
redirection Action if call attempt was redirected redirection Next node if call attempt was redirected
failure Action if call attempt failed failure Next node if call attempt failed
default Default action for unspecified outputs default Default next node for unspecified outputs
Parameters: timeout Time to try before giving up on the call attempt Parameters: timeout Time to try before giving up on the call attempt
recurse Whether to recursively look up redirections recurse Whether to recursively look up redirections
ordering What order to try the location set in. ordering What order to try the location set in.
Output: busy Output: busy
Parameters: none Parameters: none
Output: noanswer Output: noanswer
Parameters: none Parameters: none
Output: redirection Output: redirection
Parameters: none Parameters: none
Output: failure Output: failure
Parameters: none Parameters: none
Output: default Output: default
Parameters: none Parameters: none
Figure 11: Syntax of the proxy node Figure 11: Syntax of the proxy node
After a proxy action has completed, the CPL server chooses the "best"
response to the call attempt, as defined by the signalling protocol
or the server's administrative configuration rules.
If the call attempt was successful, CPL execution terminates and the to be set up). Otherwise, the next node corresponding to one of the
server proceeds to its default behavior (normally, to allow the call
to be set up). Otherwise, the action corresponding to one of the
proxy node's outputs is taken. The busy output is followed if the proxy node's outputs is taken. The busy output is followed if the
call was busy; noanswer is followed if the call was not answered call was busy; noanswer is followed if the call was not answered
before the timeout parameter expired; redirection is followed if the before the timeout parameter expired; redirection is followed if the
call was redirected; and failure is followed if the call setup failed call was redirected; and failure is followed if the call setup failed
for any other reason. for any other reason.
If one of the conditions above is true, but the corresponding output If one of the conditions above is true, but the corresponding output
was not specified, the default output of the proxy node is followed was not specified, the default output of the proxy node is followed
instead. If there is also no default node specified, CPL execution instead. If there is also no default node specified, CPL execution
terminates and the server returns to its default behavior (normally, terminates and the server returns to its default behavior (normally,
to forward the best response upstream to the originator). to forward the best response upstream to the originator).
Note: CPL extensions to allow in-call or end-of-call Note: CPL extensions to allow in-call or end-of-call
actions will require an additional output, such as success, operations will require an additional output, such as
to be added. success, to be added.
If no locations were present in the set, or if the only locations in If no locations were present in the set, or if the only locations in
the set were locations to which the server cannot proxy a call (for the set were locations to which the server cannot proxy a call (for
example, "http" URLs), the failure output is taken. example, "http" URLs), the failure output is taken.
Proxy has three optional parameters. The timeout parameter specifies Proxy has three optional parameters. The timeout parameter specifies
the time, in seconds, to wait for the call to be completed or the time, in seconds, to wait for the call to be completed or
rejected; after this time has elapsed, the call attempt is terminated rejected; after this time has elapsed, the call attempt is terminated
and the noanswer branch is taken. If this parameter is not specified, and the noanswer branch is taken. If this parameter is not specified,
the default value is 20 seconds if the proxy node has a noanswer or the default value is 20 seconds if the proxy node has a noanswer or
skipping to change at page 27, line 14 skipping to change at page 27, line 39
should be tried. Parallel asks that they all be tried simultaneously; should be tried. Parallel asks that they all be tried simultaneously;
sequential asks that the one with the highest priority be tried sequential asks that the one with the highest priority be tried
first, the one with the next-highest priority second, and so forth, first, the one with the next-highest priority second, and so forth,
until one succeeds or the set is exhausted. First-only instructs the until one succeeds or the set is exhausted. First-only instructs the
server to try only the highest-priority address in the set, and then server to try only the highest-priority address in the set, and then
follow one of the outputs. The priority of locations in a set is follow one of the outputs. The priority of locations in a set is
determined by server policy, though CPL servers SHOULD honor the determined by server policy, though CPL servers SHOULD honor the
priority parameter of the location tag. The default value of this priority parameter of the location tag. The default value of this
parameter is parallel. parameter is parallel.
Once a proxy action completes, if control is passed on to other Once a proxy operation completes, if control is passed on to other
actions, all locations which have been used are cleared from the nodes, all locations which have been used are cleared from the
location set. That is, the location set is emptied of proxyable location set. That is, the location set is emptied of proxyable
locations if the ordering was parallel or sequential; the highest- locations if the ordering was parallel or sequential; the highest-
priority item in the set is removed from the set if ordering was priority item in the set is removed from the set if ordering was
first-only. (In all cases, non-proxyable locations such as "http" first-only. (In all cases, non-proxyable locations such as "http"
URIs remain.) In the case of a redirection output, the new addresses URIs remain.) In the case of a redirection output, the new addresses
to which the call was redirected are then added to the location set. to which the call was redirected are then added to the location set.
7.1.1 Usage of proxy with SIP 7.1.1 Usage of proxy with SIP
For SIP, the best response to a proxy node is determined by the For SIP, the best response to a proxy node is determined by the
skipping to change at page 28, line 8 skipping to change at page 28, line 32
Redirect causes the server to direct the calling party to attempt to Redirect causes the server to direct the calling party to attempt to
place its call to the currently specified set of locations. The place its call to the currently specified set of locations. The
syntax of this node is specified in Figure 12. syntax of this node is specified in Figure 12.
The specific behavior the redirect node invokes is dependent on the The specific behavior the redirect node invokes is dependent on the
underlying signalling protocol involved, though its semantics are underlying signalling protocol involved, though its semantics are
generally applicable. generally applicable.
Node: redirect Node: redirect
Outputs: none Outputs: None (no node may follow)
Next node: None
Parameters: permanent Whether the redirection should be Parameters: permanent Whether the redirection should be
considered permanent considered permanent
Figure 12: Syntax of the redirect node Figure 12: Syntax of the redirect node
Redirect immediately terminates execution of the CPL script, so this Redirect immediately terminates execution of the CPL script, so this
node has no outputs. It has one parameter, permanent, which specifies node has no outputs and no next node. It has one parameter,
whether the result returned should indicate that this is a permanent permanent, which specifies whether the result returned should
redirection. The value of this parameter is either "yes" or "no" and indicate that this is a permanent redirection. The value of this
its default value is "no." parameter is either "yes" or "no" and its default value is "no."
7.2.1 Usage of redirect with SIP 7.2.1 Usage of redirect with SIP
The SIP server SHOULD send a 3xx class response to a call request The SIP server SHOULD send a 3xx class response to a call request
upon executing a redirect tag. If permanent was yes, the server upon executing a redirect tag. If permanent was yes, the server
SHOULD send the response "301 Moved permanently"; otherwise it SHOULD SHOULD send the response "301 Moved permanently"; otherwise it SHOULD
send "302 Moved temporarily". send "302 Moved temporarily".
7.3 Reject 7.3 Reject
Reject nodes cause the server to reject the call attempt. Their Reject nodes cause the server to reject the call attempt. Their
syntax is given in Figure 13. The specific behavior they invoke is syntax is given in Figure 13. The specific behavior they invoke is
dependent on the underlying signalling protocol involved, though dependent on the underlying signalling protocol involved, though
their semantics are generally applicable. their semantics are generally applicable.
Node: reject Node: reject
Outputs: none Outputs: None (no node may follow)
Next node: None
Parameters: status Status code to return Parameters: status Status code to return
reason Reason phrase to return reason Reason phrase to return
Figure 13: Syntax of the reject node Figure 13: Syntax of the reject node
This immediately terminates execution of the CPL script, so this node This immediately terminates execution of the CPL script, so this node
has no outputs. has no outputs and no next node.
This node has two arguments: status and reason. The status argument This node has two arguments: status and reason. The status argument
is required, and can take one of the values busy, notfound, reject, is required, and can take one of the values busy, notfound, reject,
and error, or a signalling-protocol-defined status. and error, or a signalling-protocol-defined status.
The reason argument optionally allows the script to specify a reason The reason argument optionally allows the script to specify a reason
for the rejection. for the rejection.
7.3.1 Usage of redirect with SIP 7.3.1 Usage of reject with SIP
Servers which implement SIP SHOULD also allow the status field to be Servers which implement SIP SHOULD also allow the status field to be
a numeric argument corresponding to a SIP status in the 4xx, 5xx, or a numeric argument corresponding to a SIP status in the 4xx, 5xx, or
6xx range. 6xx range.
They SHOULD send the "reason" parameter in the SIP reason phrase. They SHOULD send the "reason" parameter in the SIP reason phrase.
A suggested mapping of the named statuses is as follows. Servers MAY A suggested mapping of the named statuses is as follows. Servers MAY
use a different mapping, though similar semantics SHOULD be use a different mapping, though similar semantics SHOULD be
preserved. preserved.
skipping to change at page 29, line 27 skipping to change at page 30, line 4
They SHOULD send the "reason" parameter in the SIP reason phrase. They SHOULD send the "reason" parameter in the SIP reason phrase.
A suggested mapping of the named statuses is as follows. Servers MAY A suggested mapping of the named statuses is as follows. Servers MAY
use a different mapping, though similar semantics SHOULD be use a different mapping, though similar semantics SHOULD be
preserved. preserved.
busy: 486 Busy Here busy: 486 Busy Here
notfound: 404 Not Found notfound: 404 Not Found
reject: 603 Decline reject: 603 Decline
error: 500 Internal Server Error error: 500 Internal Server Error
8 Other actions 8 Non-signalling Operations
In addition to the signalling actions, the CPL defines several In addition to the signalling operations , the CPL defines several
actions which do not affect and are not dependent on the telephony operations which do not affect and are not dependent on the telephony
signalling protocol. signalling protocol.
8.1 Mail 8.1 Mail
The mail node causes the server to notify a user of the status of the The mail node causes the server to notify a user of the status of the
CPL script through electronic mail. Its syntax is given in Figure 14. CPL script through electronic mail. Its syntax is given in Figure 14.
Node: mail Node: mail
Outputs: any node Outputs: None (next node follows directly)
Next node: Any node
Parameters: url Mailto url to which the mail should be sent Parameters: url Mailto url to which the mail should be sent
Figure 14: Syntax of the mail node Figure 14: Syntax of the mail node
The mail node takes one argument: a mailto URL giving the address, The mail node takes one argument: a mailto URL giving the address,
and any additional desired parameters, of the mail to be sent. The and any additional desired parameters, of the mail to be sent. The
server sends the message containing the content to the given url; it server sends the message containing the content to the given url; it
SHOULD also include other status information about the original call SHOULD also include other status information about the original call
request and the CPL script at the time of the notification. request and the CPL script at the time of the notification.
Using a full mailto URL rather than just an e-mail address Using a full mailto URL rather than just an e-mail address
allows additional e-mail headers to be specified, such as allows additional e-mail headers to be specified, such as
<mail <mail
url="mailto:jones@example.com?subject=lookup%20failed" />. url="mailto:jones@example.com?subject=lookup%20failed" />.
skipping to change at page 30, line 15 skipping to change at page 30, line 37
and any additional desired parameters, of the mail to be sent. The and any additional desired parameters, of the mail to be sent. The
server sends the message containing the content to the given url; it server sends the message containing the content to the given url; it
SHOULD also include other status information about the original call SHOULD also include other status information about the original call
request and the CPL script at the time of the notification. request and the CPL script at the time of the notification.
Using a full mailto URL rather than just an e-mail address Using a full mailto URL rather than just an e-mail address
allows additional e-mail headers to be specified, such as allows additional e-mail headers to be specified, such as
<mail <mail
url="mailto:jones@example.com?subject=lookup%20failed" />. url="mailto:jones@example.com?subject=lookup%20failed" />.
Mail nodes have only one output, since failure of e-mail delivery Mail nodes have only one possible result, since failure of e-mail
cannot reliably be known in real-time. Therefore, its XML delivery cannot reliably be known in real-time. Therefore, its XML
representation does not have explicit output nodes: the <mail> tag representation does not have output tags: the <mail> tag directly
directly contains another node tag. contains another node tag.
Note that the syntax of XML requires that ampersand characters, "&", Note that the syntax of XML requires that ampersand characters, "&",
which are used as parameter separators in mailto URLs, be quoted as which are used as parameter separators in mailto URLs, be quoted as
"&amp;" inside parameter values (see section C.12 of [3]). "&amp;" inside parameter values (see Section C.12 of [3]).
8.1.1 Suggested Content of Mailed Information 8.1.1 Suggested Content of Mailed Information
This section presents suggested guidelines for the mail sent as a This section presents suggested guidelines for the mail sent as a
result of the mail node, for requests triggered by SIP. The message result of the mail node, for requests triggered by SIP. The message
mailed (triggered by any protocol) SHOULD contain all this mailed (triggered by any protocol) SHOULD contain all this
information, but servers MAY elect to use a different format. information, but servers MAY elect to use a different format.
1. If the mailto URI did not specify a subject header, the 1. If the mailto URI did not specify a subject header, the
subject of the e-mail is "[CPL]" followed by the subject subject of the e-mail is "[CPL]" followed by the subject
header of the SIP request. If the URI specified a subject header of the SIP request. If the URI specified a subject
header, it is used instead. header, it is used instead.
skipping to change at page 31, line 14 skipping to change at page 31, line 39
The server SHOULD honor the user's requested languages, and send the The server SHOULD honor the user's requested languages, and send the
mail notification using an appropriate language and character set. mail notification using an appropriate language and character set.
8.2 Log 8.2 Log
The Log node causes the server to log information about the call to The Log node causes the server to log information about the call to
non-volatile storage. Its syntax is specified in Figure 15. non-volatile storage. Its syntax is specified in Figure 15.
Node: log Node: log
Outputs: any node Outputs: None (next node follows directly)
Next node: Any node
Parameters: name Name of the log file to use Parameters: name Name of the log file to use
comment Comment to be placed in log file comment Comment to be placed in log file
Figure 15: Syntax of the log node Figure 15: Syntax of the log node
Log takes two arguments, both optional: name, which specifies the Log takes two arguments, both optional: name, which specifies the
name of the log, and comment, which gives a comment about the name of the log, and comment, which gives a comment about the
information being logged. Servers SHOULD also include other information being logged. Servers SHOULD also include other
information in the log, such as the time of the logged event, information in the log, such as the time of the logged event,
information that triggered the call to be logged, and so forth. Logs information that triggered the call to be logged, and so forth. Logs
skipping to change at page 31, line 38 skipping to change at page 32, line 20
not define how users may retrieve their logs from the server. not define how users may retrieve their logs from the server.
The name of a log is a logical name only, and does not necessarily The name of a log is a logical name only, and does not necessarily
correspond to any physical file on the server. The interpretation of correspond to any physical file on the server. The interpretation of
the log file name is server defined, as is a mechanism to access the log file name is server defined, as is a mechanism to access
these logs. The CPL server SHOULD NOT directly map log names these logs. The CPL server SHOULD NOT directly map log names
uninterpreted onto local file names, for security reasons, lest a uninterpreted onto local file names, for security reasons, lest a
security-critical file be overwritten. security-critical file be overwritten.
A correctly operating CPL server SHOULD NOT ever allow the log event A correctly operating CPL server SHOULD NOT ever allow the log event
to fail. As such, log nodes have only one output, and their XML to fail. As such, log nodes can have only one possible result, and
representation does not have explicit output nodes. A CPL <log> tag their XML representation does not have explicit output tags. A CPL
directly contains another node tag. <log> tag directly contains another node tag.
9 Subactions 9 Subactions
XML syntax defines a tree. To allow more general call flow diagrams, XML syntax defines a tree. To allow more general call flow diagrams,
and to allow script re-use and modularity, we define subactions. and to allow script re-use and modularity, we define subactions.
Two tags are defined for subactions: subaction definitions and Two tags are defined for subactions: subaction definitions and
subaction references. Their syntax is given in Figure 16. subaction references. Their syntax is given in Figure 16.
Tag: subaction Tag: subaction
Subtags: any node Subtags: Any node
Parameters: id Name of this subaction Parameters: id Name of this subaction
Pseudo-node: sub Pseudo-node: sub
Outputs: none in XML tree Outputs: None in XML tree
Parameters: ref Name of subaction to execute Parameters: ref Name of subaction to execute
Figure 16: Syntax of subactions and sub pseudo-nodes Figure 16: Syntax of subactions and sub pseudo-nodes
Subactions are defined through subaction tags. These tags are placed Subactions are defined through subaction tags. These tags are placed
in the CPL after any ancillary information (see section 10) but in the CPL after any ancillary information (see Section 10) but
before any top-level tags. They take one argument: id, a token before any top-level tags. They take one argument: id, a token
indicating a script-chosen name for the subaction. indicating a script-chosen name for the subaction.
Subactions are called from sub tags. The sub tag is a "pseudo-node": Subactions are called from sub tags. The sub tag is a "pseudo-node":
it can be used anyplace in a CPL action that a true node could be it can be used anyplace in a CPL action that a true node could be
used. It takes one parameter, ref, the name of the subaction to be used. It takes one parameter, ref, the name of the subaction to be
called. The sub tag contains no outputs of its own; control instead called. The sub tag contains no outputs of its own; control instead
passes to the subaction. passes to the subaction.
References to subactions MUST refer to subactions defined before the References to subactions MUST refer to subactions defined before the
current action. A sub tag MUST NOT refer to the action which it current action. A sub tag MUST NOT refer to the action which it
appears in, or to any action defined later in the CPL script. Top- appears in, or to any action defined later in the CPL script. Top-
level actions cannot be called from sub tags, or through any other level actions cannot be called from sub tags, or through any other
means. Script servers MUST verify at the time the script is submitted means. Script servers MUST verify at the time the script is submitted
skipping to change at page 32, line 31 skipping to change at page 33, line 15
it can be used anyplace in a CPL action that a true node could be it can be used anyplace in a CPL action that a true node could be
used. It takes one parameter, ref, the name of the subaction to be used. It takes one parameter, ref, the name of the subaction to be
called. The sub tag contains no outputs of its own; control instead called. The sub tag contains no outputs of its own; control instead
passes to the subaction. passes to the subaction.
References to subactions MUST refer to subactions defined before the References to subactions MUST refer to subactions defined before the
current action. A sub tag MUST NOT refer to the action which it current action. A sub tag MUST NOT refer to the action which it
appears in, or to any action defined later in the CPL script. Top- appears in, or to any action defined later in the CPL script. Top-
level actions cannot be called from sub tags, or through any other level actions cannot be called from sub tags, or through any other
means. Script servers MUST verify at the time the script is submitted means. Script servers MUST verify at the time the script is submitted
that no sub node refers to any sub-action which is not its proper that no sub node refers to any subaction which is not its proper
predecessor. predecessor.
Allowing only back-references of subs forbids any sort of Allowing only back-references of subs forbids any sort of
recursion. Recursion would introduce the possibility of recursion. Recursion would introduce the possibility of
non-terminating or non-decidable CPL scripts, a possibility non-terminating or non-decidable CPL scripts, a possibility
our requirements specifically excluded. our requirements specifically excluded.
Every sub MUST refer to a subaction ID defined within the same CPL Every sub MUST refer to a subaction ID defined within the same CPL
script. No external links are permitted. script. No external links are permitted.
Subaction IDs are case sensitive.
If any subsequent version or extension defines external If any subsequent version or extension defines external
linkages, it should probably use a different tag, perhaps linkages, it should probably use a different tag, perhaps
XLink [17]. Ensuring termination in the presence of XLink [17]. Ensuring termination in the presence of
external links is a difficult problem. external links is a difficult problem.
10 Ancillary information 10 Ancillary Information
No ancillary information is currently defined for CPL scripts. If No ancillary information is defined in the base CPL specification. If
ancillary information, not part of any action, is found to be ancillary information, not part of any operation, is found to be
necessary for scripts in the future, it will be added to this necessary for a CPL extension, it SHOULD be placed within this tag.
section.
The (trivial) definition of the ancillary information section is The (trivial) definition of the ancillary information tag is given in
given in Figure 17. Figure 17.
It may be useful to include timezone definitions inside CPL It may be useful to include timezone definitions inside CPL
scripts directly, rather than referencing them externally scripts directly, rather than referencing them externally
with tzid and tzurl parameters. If it is, they will be with tzid and tzurl parameters. If it is, an extension
included here. could be defined to include them here.
11 Default Behavior
Tag: ancillary Tag: ancillary
Parameters: none Parameters: None
Subtags: none Subtags: None
Figure 17: Syntax of the ancillary tag Figure 17: Syntax of the ancillary tag
11 Default actions When a CPL node reaches an unspecified output, either because the
output tag is not present, or because the tag is present but does not
When a CPL action reaches an unspecified output, the action it takes contain a node, the CPL server's behavior is dependent on the current
is dependent on the current state of script execution. This section state of script execution. This section gives the operations that
gives the actions that should be taken in each case. should be taken in each case.
no location or signalling actions performed, location set empty: no location modifications or signalling operations performed,
Look up the user's location through whatever mechanism the location set empty: Look up the user's location through
server would use if no CPL script were in effect. Proxy, whatever mechanism the server would use if no CPL script
redirect, or send a rejection message, using whatever were in effect. Proxy, redirect, or send a rejection
policy the server would use in the absence of a CPL script. message, using whatever policy the server would use in the
absence of a CPL script.
no location or signalling actions performed, location set non- no location modifications or signalling operations performed,
empty: (This can only happen for outgoing calls.) Proxy location set non-empty: (This can only happen for outgoing
the call to the addresses in the location set. calls.) Proxy the call to the addresses in the location
set.
location actions performed, no signalling actions: Proxy or location modifications performed, no signalling operations:
redirect the call, whichever is the server's standard Proxy or redirect the call, whichever is the server's
policy, to the addresses in the current location set. If standard policy, to the addresses in the current location
the location set is empty, return notfound rejection. set. If the location set is empty, return notfound
rejection.
noanswer output of proxy, no timeout given: (This is a special noanswer output of proxy, no timeout given: (This is a special
case.) If the noanswer output of a proxy node is case.) If the noanswer output of a proxy node is
unspecified, and no timeout parameter was given to the unspecified, and no timeout parameter was given to the
proxy node, the call should be allowed to ring for the proxy node, the call should be allowed to ring for the
maximum length of time allowed by the server (or the maximum length of time allowed by the server (or the
request, if the request specified a timeout). request, if the request specified a timeout).
proxy action previously taken: Return whatever the "best" proxy operation previously taken: Return whatever the "best"
response is of all accumulated responses to the call to response is of all accumulated responses to the call to
this point, according to the rules of the underlying this point, according to the rules of the underlying
signalling protocol. signalling protocol.
12 CPL Extensions 12 CPL Extensions
Servers MAY support additional CPL features beyond those listed in Servers MAY support additional CPL features beyond those listed in
this document. Some of the extensions which have been suggested are a this document. Some of the extensions which have been suggested are a
means of querying how a call has been authenticated; richer control means of querying how a call has been authenticated; richer control
over H.323 addressing; end-system or administrator-specific features; over H.323 addressing; end-system or administrator-specific features;
regular-expression matching for strings and addresses; mid-call or regular-expression matching for strings and addresses; mid-call or
end-of-call controls; and the parts of iCal COS recurrence rules end-of-call controls; and the parts of iCal COS recurrence rules
omitted from time switches. omitted from time switches.
CPL extensions are indicated by XML namespaces [18]. Every extension CPL extensions are indicated by XML namespaces [18]. Every extension
MUST have an appropriate XML namespace assigned to it. All XML tags MUST have an appropriate XML namespace assigned to it. All XML tags
skipping to change at page 34, line 34 skipping to change at page 35, line 19
end-of-call controls; and the parts of iCal COS recurrence rules end-of-call controls; and the parts of iCal COS recurrence rules
omitted from time switches. omitted from time switches.
CPL extensions are indicated by XML namespaces [18]. Every extension CPL extensions are indicated by XML namespaces [18]. Every extension
MUST have an appropriate XML namespace assigned to it. All XML tags MUST have an appropriate XML namespace assigned to it. All XML tags
and attributes that are part of the extension MUST be appropriately and attributes that are part of the extension MUST be appropriately
qualified so as to place them within that namespace. qualified so as to place them within that namespace.
Tags or attributes in a CPL script which are in the global namespace Tags or attributes in a CPL script which are in the global namespace
(i.e., not associated with any namespace) are equivalent to tags and (i.e., not associated with any namespace) are equivalent to tags and
attributes in the CPL namespace "http://www.ietf.org/internet- attributes in the CPL namespace "http://www.rfc-
drafts/draft-ietf-iptel-cpl-03.txt". editor.org/rfc/rfcxxxx.txt".
A CPL server MUST reject any script which contains a reference to a A CPL server MUST reject any script which contains a reference to a
namespace which it does not understand. It MUST reject any script namespace which it does not understand. It MUST reject any script
which contains an extension tag or attribute which is not qualified which contains an extension tag or attribute which is not qualified
to be in an appropriate namespace. to be in an appropriate namespace.
A CPL script SHOULD NOT specify any namespaces it does not use. For A CPL script SHOULD NOT specify any namespaces it does not use. For
compatibility with non-namespace-aware parsers, a CPL script SHOULD compatibility with non-namespace-aware parsers, a CPL script SHOULD
NOT specify the base CPL namespace for a script which does not use NOT specify the base CPL namespace for a script which does not use
any extensions. any extensions.
skipping to change at page 35, line 23 skipping to change at page 36, line 6
was suggested as an alternate way of handling extensions. was suggested as an alternate way of handling extensions.
This would allow scripts to be uploaded to a server without This would allow scripts to be uploaded to a server without
requiring a script author to somehow determine which requiring a script author to somehow determine which
extensions a server supports. However, experience extensions a server supports. However, experience
developing other languages, notably Sieve [19], was that developing other languages, notably Sieve [19], was that
this added excessive complexity to languages. The this added excessive complexity to languages. The
extension-switch tag could, of course, itself be defined in extension-switch tag could, of course, itself be defined in
a CPL extension. a CPL extension.
It is unfortunately true that XML DTDs, such as the CPL DTD It is unfortunately true that XML DTDs, such as the CPL DTD
given in appendix C, are not powerful enough to encompass given in Appendix C, are not powerful enough to encompass
namespaces, since the base XML specification (which defines namespaces, since the base XML specification (which defines
DTDs) predates the XML namespace specification. XML schemas DTDs) predates the XML namespace specification. XML schemas
[20] are a work in progress to define a namespace-aware [20] are a work in progress to define a namespace-aware
method for validating XML documents, as well as improving method for validating XML documents, as well as improving
upon DTDs' expressive power in many other ways. upon DTDs' expressive power in many other ways.
13 Examples 13 Examples
13.1 Example: Call Redirect Unconditional 13.1 Example: Call Redirect Unconditional
The script in Figure 18 is a simple script which redirects all calls The script in Figure 18 is a simple script which redirects all calls
to a single fixed location. to a single fixed location.
13.2 Example: Call Forward Busy/No Answer
The script in Figure 19 illustrates some more complex behavior. We
see an initial proxy attempt to one address, with further actions if
that fails. We also see how several outputs take the same action,
through the use of subactions.
13.3 Example: Call Forward: Redirect and Default
The script in Figure 20 illustrates further proxy behavior. The
server initially tries to proxy to a single address. If this attempt
<?xml version="1.0" ?> <?xml version="1.0" ?>
<!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd"> <!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd">
<cpl> <cpl>
<incoming> <incoming>
<location url="sip:smith@phone.example.com"> <location url="sip:smith@phone.example.com">
<redirect /> <redirect />
</location> </location>
</incoming> </incoming>
</cpl> </cpl>
Figure 18: Example Script: Call Redirect Unconditional Figure 18: Example Script: Call Redirect Unconditional
13.2 Example: Call Forward Busy/No Answer
The script in Figure 19 illustrates some more complex behavior. We
see an initial proxy attempt to one address, with further operations
if that fails. We also see how several outputs take the same action
subtree, through the use of subactions.
13.3 Example: Call Forward: Redirect and Default
The script in Figure 20 illustrates further proxy behavior. The
server initially tries to proxy to a single address. If this attempt
is redirected, a new redirection is generated using the locations
returned. In all other failure cases for the proxy node, a default
operation -- forwarding to voicemail -- is performed.
<?xml version="1.0" ?> <?xml version="1.0" ?>
<!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd"> <!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd">
<cpl> <cpl>
<subaction id="voicemail"> <subaction id="voicemail">
<location url="sip:jones@voicemail.example.com" > <location url="sip:jones@voicemail.example.com" >
<proxy /> <proxy />
</location> </location>
</subaction> </subaction>
skipping to change at page 36, line 43 skipping to change at page 37, line 31
<noanswer> <noanswer>
<sub ref="voicemail" /> <sub ref="voicemail" />
</noanswer> </noanswer>
</proxy> </proxy>
</location> </location>
</incoming> </incoming>
</cpl> </cpl>
Figure 19: Example Script: Call Forward Busy/No Answer Figure 19: Example Script: Call Forward Busy/No Answer
is redirected, a new redirection is generated using the locations 13.4 Example: Call Screening
returned. In all other failure cases for the proxy node, a default
action -- forwarding to voicemail -- is performed. The script in Figure 21 illustrates address switches and call
rejection, in the form of a call screening script. Note also that
because the address-switch lacks an otherwise clause, if the initial
pattern did not match, the script does not define any operations. The
server therefore proceeds with its default behavior, which would
presumably be to contact the user.
13.5 Example: Priority and Language Routing
The script in Figure 22 illustrates service selection based on a
call's priority value and language settings. If the call request had
a priority of "urgent" or higher, the default script behavior is
performed. Otherwise, the language string field is checked for the
string "es" (Spanish). If it is present, the call is proxied to a
Spanish-speaking operator; other calls are proxied to an English-
<?xml version="1.0" ?> <?xml version="1.0" ?>
<!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd"> <!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd">
<cpl> <cpl>
<subaction id="voicemail"> <subaction id="voicemail">
</subaction> </subaction>
<incoming> <incoming>
<location url="sip:jones@jonespc.example.com"> <location url="sip:jones@jonespc.example.com">
<proxy> <proxy>
skipping to change at page 37, line 30 skipping to change at page 38, line 29
<proxy /> <proxy />
</location> </location>
</default> </default>
</proxy> </proxy>
</location> </location>
</incoming> </incoming>
</cpl> </cpl>
Figure 20: Example Script: Call Forward: Redirect and Default Figure 20: Example Script: Call Forward: Redirect and Default
13.4 Example: Call Screening
The script in Figure 21 illustrates address switches and call
rejection, in the form of a call screening script. Note also that
because the address-switch lacks an otherwise clause, if the initial
pattern did not match, the script does not define any action. The
server therefore proceeds with its default action, which would
presumably be to contact the user.
13.5 Example: Priority and Language Routing
The script in Figure 22 illustrates service selection based on a
call's priority value and language settings. If the call request had
a priority of "urgent" or higher, the default script action is taken.
Otherwise, the language string field is checked for the string "es"
(Spanish). If it is present, the call is proxied to a Spanish-
speaking operator; other calls are proxied to an English-speaking
operator.
<?xml version="1.0" ?> <?xml version="1.0" ?>
<!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd"> <!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd">
<cpl> <cpl>
<incoming> <incoming>
<address-switch field="origin" subfield="user"> <address-switch field="origin" subfield="user">
<address is="anonymous"> <address is="anonymous">
<reject status="reject" <reject status="reject"
reason="I don't accept anonymous calls" /> reason="I don't accept anonymous calls" />
</address> </address>
</address-switch> </address-switch>
</incoming> </incoming>
</cpl> </cpl>
Figure 21: Example Script: Call Screening Figure 21: Example Script: Call Screening
speaking operator.
13.6 Example: Outgoing Call Screening
The script in Figure 23 illustrates a script filtering outgoing
calls, in the form of a script which prevent 1-900 (premium) calls
from being placed. This script also illustrates subdomain matching.
13.7 Example: Time-of-day Routing
Figure 24 illustrates time-based conditions and timezones.
13.8 Example: Location Filtering
Figure 24 illustrates filtering actions on the location set. In this
example, we assume that version 0.9beta2 of the "Inadequate Software
SIP User Agent" mis-implements some features, and so we must work
around its problems. We assume, first, that the value of its
"feature" parameter in caller preferences is known to be unreliable,
so we ignore it; we also know that it cannot talk successfully to one
particular mobile device we may have registered, so we remove that
location from the location set. Once these two actions have been
completed, call setup is allowed to proceed normally.
13.9 Example: Non-call Actions
Figure 26 illustrates non-call actions; in particular, alerting a
<?xml version="1.0" ?> <?xml version="1.0" ?>
<!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd"> <!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd">
<cpl> <cpl>
<incoming> <incoming>
<priority-switch> <priority-switch>
<priority greater="urgent" /> <priority greater="urgent" />
<otherwise> <otherwise>
<string-switch field="language"> <string-switch field="language">
<string contains="es"> <string contains="es">
skipping to change at page 39, line 31 skipping to change at page 39, line 33
</location> </location>
</otherwise> </otherwise>
</string-switch> </string-switch>
</otherwise> </otherwise>
</priority-switch> </priority-switch>
</incoming> </incoming>
</cpl> </cpl>
Figure 22: Example Script: Priority and Language Routing Figure 22: Example Script: Priority and Language Routing
user by electronic mail if the lookup server failed. The primary 13.6 Example: Outgoing Call Screening
motivation for having the mail node is to allow this sort of out-of-
band notification of error conditions, as the user might otherwise be
unaware of any problem.
13.10 Example: Hypothetical Extensions The script in Figure 23 illustrates a script filtering outgoing
calls, in the form of a script which prevent 1-900 (premium) calls
from being placed. This script also illustrates subdomain matching.
The example in Figure 27 shows a hypothetical extension which 13.7 Example: Time-of-day Routing
implements distinctive ringing. The XML namespace
"http://www.example.com/distinctive-ring" specifies a new node named
ring.
The example in Figure 28 implements a hypothetical new attribute for Figure 24 illustrates time-based conditions and timezones.
address switches, to allow regular-expression matches. It defines a
new attribute regex for the standard address node. In this example, 13.8 Example: Location Filtering
the global namespace is not specified.
Figure 25 illustrates filtering operations on the location set. In
<?xml version="1.0" ?> <?xml version="1.0" ?>
<!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd"> <!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd">
<cpl> <cpl>
<outgoing> <outgoing>
<address-switch field="original-destination" subfield="tel"> <address-switch field="original-destination" subfield="tel">
<address subdomain-of="1900"> <address subdomain-of="1900">
<reject status="reject" <reject status="reject"
reason="Not allowed to make 1-900 calls." /> reason="Not allowed to make 1-900 calls." />
</address> </address>
skipping to change at page 40, line 28 skipping to change at page 40, line 27
Figure 23: Example Script: Outgoing Call Screening Figure 23: Example Script: Outgoing Call Screening
<?xml version="1.0" ?> <?xml version="1.0" ?>
<!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd"> <!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd">
<cpl> <cpl>
<incoming> <incoming>
<time-switch tzid="America/New_York" <time-switch tzid="America/New_York"
tzurl="http://zones.example.com/tz/America/New_York"> tzurl="http://zones.example.com/tz/America/New_York">
<time dtstart="20000703T090000" duration="P8H" <time dtstart="20000703T090000" duration="PT8H"
freq="weekly" byday="MO,TU,WE,TH,FR"> freq="weekly" byday="MO,TU,WE,TH,FR">
<lookup source="registration"> <lookup source="registration">
<success> <success>
<proxy /> <proxy />
</success> </success>
</lookup> </lookup>
</time> </time>
<otherwise> <otherwise>
<location url="sip:jones@voicemail.example.com"> <location url="sip:jones@voicemail.example.com">
<proxy /> <proxy />
</location> </location>
</otherwise> </otherwise>
</time-switch> </time-switch>
</incoming> </incoming>
</cpl> </cpl>
Figure 24: Example Script: Time-of-day Routing Figure 24: Example Script: Time-of-day Routing
13.11 Example: A Complex Example this example, we assume that version 0.9beta2 of the "Inadequate
Software SIP User Agent" mis-implements some features, and so we must
work around its problems. We assume, first, that the value of its
particular mobile device we may have registered, so we remove that
location from the location set. Once these two operations have been
completed, call setup is allowed to proceed normally.
<?xml version="1.0" ?> <?xml version="1.0" ?>
<!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd"> <!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd">
<cpl> <cpl>
<incoming> <incoming>
<string-switch field="user-agent"> <string-switch field="user-agent">
<string is="Inadequate Software SIP User Agent/0.9beta2"> <string is="Inadequate Software SIP User Agent/0.9beta2">
<lookup source="registration" ignore="feature"> <lookup source="registration" ignore="feature">
<success> <success>
<remove-location location="sip:me@mobile.provider.net"> <remove-location location="sip:me@mobile.provider.net">
skipping to change at page 41, line 25 skipping to change at page 41, line 29
</remove-location> </remove-location>
</success> </success>
</lookup> </lookup>
</string> </string>
</string-switch> </string-switch>
</incoming> </incoming>
</cpl> </cpl>
Figure 25: Example Script: Location Filtering Figure 25: Example Script: Location Filtering
13.9 Example: Non-signalling Operations
Figure 26 illustrates non-signalling operations; in particular,
alerting a user by electronic mail if the lookup server failed. The
primary motivation for having the mail node is to allow this sort of
out-of-band notification of error conditions, as the user might
otherwise be unaware of any problem.
13.10 Example: Hypothetical Extensions
The example in Figure 27 shows a hypothetical extension which
implements distinctive ringing. The XML namespace
"http://www.example.com/distinctive-ring" specifies a new node named
ring.
The example in Figure 28 implements a hypothetical new attribute for
address switches, to allow regular-expression matches. It defines a
<?xml version="1.0" ?> <?xml version="1.0" ?>
<!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd"> <!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd">
<cpl> <cpl>
<incoming> <incoming>
<lookup source="http://www.example.com/cgi-bin/locate.cgi?user=jones" <lookup source="http://www.example.com/cgi-bin/locate.cgi?user=jones"
timeout="8"> timeout="8">
<success> <success>
<proxy /> <proxy />
</success> </success>
<failure> <failure>
<mail url="mailto:jones@example.com?subject=lookup%20failed" /> <mail url="mailto:jones@example.com?subject=lookup%20failed" />
</failure> </failure>
</lookup> </lookup>
</incoming> </incoming>
</cpl> </cpl>
Figure 26: Example Script: Non-call Actions Figure 26: Example Script: Non-signalling Operations
In this case, the user attempts to have his calls reach his desk; if
he does not answer within a small amount of time, calls from his boss
<?xml version="1.0" ?> <?xml version="1.0" ?>
<!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd"> <!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd">
<cpl xmlns="http://www.ietf.org/internet-drafts/draft-ietf-iptel-cpl-03.txt" <cpl xmlns="http://www.ietf.org/internet-drafts/draft-ietf-iptel-cpl-03.txt"
xmlns:dr="http://www.example.com/distinctive-ring"> xmlns:dr="http://www.example.com/distinctive-ring">
<incoming> <incoming>
<address-switch field="origin"> <address-switch field="origin">
<address is="sip:boss@example.com"> <address is="sip:boss@example.com">
<dr:ring ringstyle="warble" /> <dr:ring ringstyle="warble" />
</address> </address>
</address-switch> </address-switch>
</incoming> </incoming>
</cpl> </cpl>
Figure 27: Example Script: Hypothetical Distinctive-Ringing Extension Figure 27: Example Script: Hypothetical Distinctive-Ringing Extension
new attribute regex for the standard address node. In this example,
the global namespace is not specified.
13.11 Example: A Complex Example
Finally, Figure 29 is a complex example which shows the sort of
<?xml version="1.0" ?> <?xml version="1.0" ?>
<!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd"> <!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd">
<cpl> <cpl>
<incoming> <incoming>
<address-switch field="origin" subfield="user" <address-switch field="origin" subfield="user"
xmlns:re="http://www.example.com/regex"> xmlns:re="http://www.example.com/regex">
<address re:regex="(.*.smith|.*.jones)"> <address re:regex="(.*.smith|.*.jones)">
<reject status="reject" <reject status="reject"
reason="I don't want to talk to Smiths or Joneses" /> reason="I don't want to talk to Smiths or Joneses" />
</address> </address>
</address-switch> </address-switch>
</incoming> </incoming>
</cpl> </cpl>
Figure 28: Example Script: Hypothetical Regular-Expression Extension Figure 28: Example Script: Hypothetical Regular-Expression Extension
are forwarded to his celphone, and all other calls are directed to sophisticated behavior which can be achieved by combining CPL nodes.
voicemail. In this case, the user attempts to have his calls reach his desk; if
he does not answer within a small amount of time, calls from his boss
are forwarded to his mobile phone, and all other calls are directed
to voicemail. If the call setup failed, no operation is specified,
so the server's default behavior is performed.
14 Security considerations 14 Security Considerations
The CPL is designed to allow services to be specified in a manner The CPL is designed to allow services to be specified in a manner
which prevents potentially hostile or mis-configured scripts from which prevents potentially hostile or mis-configured scripts from
launching security attacks, including denial-of-service attacks. launching security attacks, including denial-of-service attacks.
Because script runtime is strictly bounded by acyclicity, and because
the number of possible script operations are strictly limited,
scripts should not be able to inflict damage upon a CPL server.
Because scripts can direct users' telephone calls, the method by
which scripts are transmitted from a client to a server MUST be
strongly authenticated. Such a method is not specified in this
document.
Script servers SHOULD allow server administrators to control the
details of what CPL operations are permitted.
15 IANA Considerations
This document registers the MIME type application/cpl+xml. See
<?xml version="1.0" ?> <?xml version="1.0" ?>
<!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd"> <!DOCTYPE cpl PUBLIC "-//IETF//DTD RFCxxxx CPL 1.0//EN" "cpl.dtd">
<cpl> <cpl>
<subaction id="voicemail"> <subaction id="voicemail">
<location url="sip:jones@voicemail.example.com"> <location url="sip:jones@voicemail.example.com">
<redirect /> <redirect />
</location> </location>
</subaction> </subaction>
<incoming> <incoming>
<location url="sip:jones@phone.example.com"> <location url="sip:jones@phone.example.com">
<proxy timeout="8"> <proxy timeout="8">
<busy> <busy>
<sub ref="voicemail" /> <sub ref="voicemail" />
</busy> </busy>
<noanswer> <noanswer>
<address-switch field="origin"> <address-switch field="origin">
<address contains="boss@example.com"> <address is="sip:boss@example.com">
<location url="tel:+19175551212"> <location url="tel:+19175551212">
<proxy /> <proxy />
</location> </location>
</address> </address>
<otherwise> <otherwise>
<sub ref="voicemail" /> <sub ref="voicemail" />
</otherwise> </otherwise>
</address-switch> </address-switch>
</noanswer> </noanswer>
</proxy> </proxy>
</location> </location>
</incoming> </incoming>
</cpl> </cpl>
Figure 29: Example Script: A Complex Example Figure 29: Example Script: A Complex Example
Because script runtime is strictly bounded by acyclicity, and because Section 3.2.
the number of possible script actions are strictly limited, scripts
should not be able to inflict damage upon a CPL server.
Because scripts can direct users' telephone calls, the method by
which scripts are transmitted from a client to a server MUST be
strongly authenticated. Such a method is not specified in this
document.
Script servers SHOULD allow server administrators to control the
details of what CPL actions are permitted.
15 IANA considerations
This document registers the MIME type application/cpl+xml. See
section 3.2.
16 Acknowledgments 16 Acknowledgments
This document was reviewed and commented upon by IETF IP Telephony This document was reviewed and commented upon by IETF IP Telephony
Working Group. We specifically acknowledge the following people for Working Group. We specifically acknowledge the following people for
their help: their help:
The outgoing call screening script was written by Kenny Hom. The outgoing call screening script was written by Kenny Hom.
Paul E. Jones contributed greatly to the mappings of H.323 addresses. Paul E. Jones contributed greatly to the mappings of H.323 addresses.
The text of the time-switch section was taken (lightly modified) from The text of the time-switch section was taken (lightly modified) from
RFC 2445 [13], by Frank Dawson and Derik Stenerson. RFC 2445 [12], by Frank Dawson and Derik Stenerson.
We drew a good deal of inspiration, notably the language's lack of We drew a good deal of inspiration, notably the language's lack of
Turing-completeness and the syntax of string matching, from the Turing-completeness and the syntax of string matching, from the
specification of Sieve [19], a language for user filtering of specification of Sieve [19], a language for user filtering of
electronic mail messages. electronic mail messages.
Thomas F. La Porta and Jonathan Rosenberg had many useful Thomas F. La Porta and Jonathan Rosenberg had many useful
discussions, contributions, and suggestions. discussions, contributions, and suggestions.
A An algorithm for resolving time switches A An Algorithm for Resolving Time Switches
The following algorithm resolves, in constant time, whether a given The following algorithm resolves, in constant time, whether a given
instant falls within a repetition of a time-switch recurrence. Open- instant falls within a repetition of a time-switch recurrence. Open-
source Java code implementing this algorithm is available on the source Java code implementing this algorithm is available on the
world wide web at <http://www.cs.columbia.edu/~lennox/Cal-Code/> world wide web at <http://www.cs.columbia.edu/~lennox/Cal-Code/>
1. Compute the time of the call, in the timezone of the time 1. Compute the time of the call, in the timezone of the time
switch. (No step after this needs to consider time zones switch. (No step after this needs to consider time zones
-- all calculations are done using continuously-running -- all calculations are done using continuously-running
standard Gregorian time.) standard Gregorian time.)
skipping to change at page 45, line 49 skipping to change at page 46, line 34
B Suggested Usage of CPL with H.323 B Suggested Usage of CPL with H.323
This appendix gives a suggested usage of CPL with H.323 [2]. Study This appendix gives a suggested usage of CPL with H.323 [2]. Study
Group 16 of the ITU, which developed H.323, is proposing to work on Group 16 of the ITU, which developed H.323, is proposing to work on
official CPL mappings for that protocol. This section is therefore official CPL mappings for that protocol. This section is therefore
not normative. not normative.
B.1 Usage of address-switch with H.323 B.1 Usage of address-switch with H.323
Address switches are specified in section 5.1. This section specifies Address switches are specified in Section 5.1. This section specifies
the mapping between H.323 messages and the fields and subfields of the mapping between H.323 messages and the fields and subfields of
address-switches address-switches
For H.323, the origin address corresponds to the alias addresses in For H.323, the origin address corresponds to the alias addresses in
the sourceAddress field of the Setup-UUIE user-user information the sourceAddress field of the Setup-UUIE user-user information
element, and to the Q.931 [21] information element "Calling party element, and to the Q.931 [21] information element "Calling party
number." If both fields are present, or if multiple aliases addresses number." If both fields are present, or if multiple aliases addresses
for sourceAddress are present, which one has priority is a matter of for sourceAddress are present, which one has priority is a matter of
local server policy; the server SHOULD use the same resolution as it local server policy; the server SHOULD use the same resolution as it
would use for routing decisions in this case. Similarly, the would use for routing decisions in this case. Similarly, the
destination address corresponds to the alias addresses of the destination address corresponds to the alias addresses of the
destinationAddress field, and to the Q.931 information element destinationAddress field, and to the Q.931 information element
"Called party number." "Called party number."
skipping to change at page 47, line 21 skipping to change at page 48, line 6
standard IPv4 or IPv6 textual representation, and the port standard IPv4 or IPv6 textual representation, and the port
subfield is set to the "port" element of the sequence subfield is set to the "port" element of the sequence
represented in decimal. The tel and user fields are not represented in decimal. The tel and user fields are not
present. The "entire-address" form is not defined. The present. The "entire-address" form is not defined. The
representation and mapping of transport addresses is not representation and mapping of transport addresses is not
defined for non-IP addresses. defined for non-IP addresses.
H.323 version 4 [22] and the Internet-Draft draft-levin-iptel-h323- H.323 version 4 [22] and the Internet-Draft draft-levin-iptel-h323-
url-scheme-00 [23] define a "h323" URI scheme. This appendix defines url-scheme-00 [23] define a "h323" URI scheme. This appendix defines
a mapping for these URIs onto the CPL address-switch subfields, as a mapping for these URIs onto the CPL address-switch subfields, as
given in section 5.1. Neither of these documents has yet been given in Section 5.1. Neither of these documents has yet been
formally published in a final form, so this appendix is non- formally published in a final form, so this appendix is non-
normative. normative.
For h323 URIs, the the user, host, and port subfields are set to the For h323 URIs, the the user, host, and port subfields are set to the
corresponding parts of the H.323 URL. The tel subfield is not corresponding parts of the H.323 URL. The tel subfield is not
present. The "entire-address" form corresponds to the entire URI. present. The "entire-address" form corresponds to the entire URI.
This mapping MAY be used both for h323 URIs in an h323 url-ID address This mapping MAY be used both for h323 URIs in an h323 url-ID address
alias, and for h323 URIs in SIP messages. alias, and for h323 URIs in SIP messages.
skipping to change at page 48, line 43 skipping to change at page 49, line 29
As H.323 currently has no counterpart of SIP caller preferences and As H.323 currently has no counterpart of SIP caller preferences and
callee capabilities, the param and value parameters of the remove- callee capabilities, the param and value parameters of the remove-
location node are ignored. location node are ignored.
C The XML DTD for CPL C The XML DTD for CPL
This section includes a full DTD describing the XML syntax of the This section includes a full DTD describing the XML syntax of the
CPL. Every script submitted to a CPL server SHOULD comply with this CPL. Every script submitted to a CPL server SHOULD comply with this
DTD. However, CPL servers MAY allow minor variations from it, DTD. However, CPL servers MAY allow minor variations from it,
particularly in the ordering of output branches of nodes. Note that particularly in the ordering of the outputs of nodes. Note that
compliance with this DTD is not a sufficient condition for compliance with this DTD is not a sufficient condition for
correctness of a CPL script, as many of the conditions described correctness of a CPL script, as many of the conditions described
above are not expressible in DTD syntax. above are not expressible in DTD syntax.
<?xml version="1.0" encoding="US-ASCII" ?> <?xml version="1.0" encoding="US-ASCII" ?>
<!-- <!--
Draft DTD for CPL, corresponding to Draft DTD for CPL, corresponding to
draft-ietf-iptel-cpl-01. draft-ietf-iptel-cpl-01.
--> -->
skipping to change at page 54, line 5 skipping to change at page 55, line 5
<!ENTITY % TopLevelActions 'outgoing?,incoming?' > <!ENTITY % TopLevelActions 'outgoing?,incoming?' >
<!ELEMENT outgoing ( %Node; )> <!ELEMENT outgoing ( %Node; )>
<!ELEMENT incoming ( %Node; )> <!ELEMENT incoming ( %Node; )>
<!-- The top-level element of the script. --> <!-- The top-level element of the script. -->
<!ELEMENT cpl ( %Ancillary;,%Subactions;,%TopLevelActions; ) > <!ELEMENT cpl ( %Ancillary;,%Subactions;,%TopLevelActions; ) >
D Changes from earlier versions D Changes from Earlier Versions
D.1 Changes from draft -02 [Note to RFC Editor: please remove this appendix before
publication as an RFC.]
D.1 Changes from Draft -03
The changebars in the Postscript and PDF versions of this document The changebars in the Postscript and PDF versions of this document
indicate significant changes from this version. indicate significant changes from this version.
o Removed an obsolete reference to a usage in examples which
wasn't actually used anywhere.
o Added forward references to remove-location, mail and log, as
well as location, in the XML syntax as examples of nodes that
don't have explicit output tags.
o Made the usage of some terminology more consistent: "output"
vs. "next node"; "action" vs. "operation" vs. "behavior";
"sub-actions" and "subactions"; "other operations" and "non-
call operations" and "non-signalling operations"; "meta-
information" and "ancillary information."
o The tel subfield of addresses which come from sip URIs should
have its visual separators stripped.
o The default value of the priority value of the location node
is 1.0.
o Corrected the media type of a set of URIs to text/uri-list,
and added a reference to it.
o Added some wording clarifying how URI-based lookup queries
work.
o Corrected the syntax of duration parameter in the examples.
o Performed some pre-RFC textual cleanups (e.g. removing the
reference to the Internet-Draft URL from the XML namespace
identifier).
o Re-worded text in the description of the Ancillary tag which
implied that information could be placed in that node in the
base CPL specification. Clarified that the tag is for use by
extensions only.
o Expunged some references to sub-daily recurrences which had
accidentally been left in the text.
o Updated bibliography to refer to the latest versions of the
cited documents.
o Fixed a number of typographical errors.
D.2 Changes from Draft -02
o Reduced time-switches from the full iCal recurrence to an iCal o Reduced time-switches from the full iCal recurrence to an iCal
subset. Added an appendix giving an algorithm to resolve subset. Added an appendix giving an algorithm to resolve
time-switches. time-switches.
o Added the extension mechanism. o Added the extension mechanism.
o Made explicit how each node is dependent on protocol handling. o Made explicit how each node is dependent on protocol handling.
Separated out protocol-specific information -- for SIP in Separated out protocol-specific information -- for SIP in
subsections of the main text, for H.323 in a non-normative subsections of the main text, for H.323 in a non-normative
appendix. appendix.
skipping to change at page 55, line 5 skipping to change at page 57, line 7
o Pointed out that log names are logical names, and should not o Pointed out that log names are logical names, and should not
be interpreted as verbatim filenames. be interpreted as verbatim filenames.
o Added some examples. o Added some examples.
o Clarified some wording. o Clarified some wording.
o Fixed some typographical errors. o Fixed some typographical errors.
D.2 Changes from draft -01 D.3 Changes from Draft -01
o Completely re-wrote changes to time switches: they are now o Completely re-wrote changes to time switches: they are now
based on iCal rather than on crontab. based on iCal rather than on crontab.
o Timezone references are now defined within time switches o Timezone references are now defined within time switches
rather than in the ancillary section. The ancillary section is rather than in the ancillary section. The ancillary section is
now empty, but still defined for future use. To facilitate now empty, but still defined for future use. To facilitate
this, an explicit ancillary tag was added. this, an explicit ancillary tag was added.
o Added XML document type identifiers (the public identifier and o Added XML document type identifiers (the public identifier and
skipping to change at page 56, line 13 skipping to change at page 58, line 14
servers. servers.
o Updated reference to RFC 2824 now that it has been published. o Updated reference to RFC 2824 now that it has been published.
o Added explanatory text to the introduction to types of nodes. o Added explanatory text to the introduction to types of nodes.
o Numerous minor clarifications and wording changes. o Numerous minor clarifications and wording changes.
o Fixed copy-and-paste errors, typos. o Fixed copy-and-paste errors, typos.
D.3 Changes from draft -00 D.4 Changes from Draft -00
o Added high-level structure; script doesn't just start at a o Added high-level structure; script doesn't just start at a
first action. first action.
o Added a section giving a high-level explanation of the o Added a section giving a high-level explanation of the
location model. location model.
o Added informal syntax specifications for each tag so people o Added informal syntax specifications for each tag so people
don't have to try to understand a DTD to figure out the don't have to try to understand a DTD to figure out the
syntax. syntax.
skipping to change at page 57, line 47 skipping to change at page 59, line 49
[1] M. Handley, H. Schulzrinne, E. Schooler, and J. Rosenberg, "SIP: [1] M. Handley, H. Schulzrinne, E. Schooler, and J. Rosenberg, "SIP:
session initiation protocol," Request for Comments 2543, Internet session initiation protocol," Request for Comments 2543, Internet
Engineering Task Force, Mar. 1999. Engineering Task Force, Mar. 1999.
[2] International Telecommunication Union, "Packet based multimedia [2] International Telecommunication Union, "Packet based multimedia
communication systems," Recommendation H.323, Telecommunication communication systems," Recommendation H.323, Telecommunication
Standardization Sector of ITU, Geneva, Switzerland, Feb. 1998. Standardization Sector of ITU, Geneva, Switzerland, Feb. 1998.
[3] T. Bray, J. Paoli, and C. M. Sperberg-McQueen, "Extensible markup [3] T. Bray, J. Paoli, and C. M. Sperberg-McQueen, "Extensible markup
language (XML) 1.0," W3C Recommendation REC-xml-19980210, World Wide language (XML) 1.0 (second edition)," W3C Recommendation REC-xml-
Web Consortium (W3C), Feb. 1998. Available at 20001006, World Wide Web Consortium (W3C), Oct. 2000. Available at
http://www.w3.org/TR/REC-xml. http://www.w3.org/XML/.
[4] J. Lennox and H. Schulzrinne, "Call processing language framework [4] J. Lennox and H. Schulzrinne, "Call processing language framework
and requirements," Request for Comments 2824, Internet Engineering and requirements," Request for Comments 2824, Internet Engineering
Task Force, May 2000. Task Force, May 2000.
[5] S. Bradner, "Key words for use in RFCs to indicate requirement [5] S. Bradner, "Key words for use in RFCs to indicate requirement
levels," Request for Comments 2119, Internet Engineering Task Force, levels," Request for Comments 2119, Internet Engineering Task Force,
Mar. 1997. Mar. 1997.
[6] D. Raggett, A. Le Hors, and I. Jacobs, "HTML 4.0 specification," [6] D. Raggett, A. Le Hors, and I. Jacobs, "HTML 4.01 specification,"
W3C Recommendation REC-html40-19980424, World Wide Web Consortium W3C Recommendation REC-html401-19991224, World Wide Web Consortium
(W3C), Apr. 1998. Available at http://www.w3.org/TR/REC-html40/. (W3C), Dec. 1999. Available at http://www.w3.org/TR/html4/.
[7] ISO (International Organization for Standardization), [7] ISO (International Organization for Standardization),
"Information processing -- text and office systems -- standard "Information processing -- text and office systems -- standard
generalized markup language (SGML)," ISO Standard ISO 8879:1986(E), generalized markup language (SGML)," ISO Standard ISO 8879:1986(E),
International Organization for Standardization, Geneva, Switzerland, International Organization for Standardization, Geneva, Switzerland,
Oct. 1986. Oct. 1986.
[8] M. Murata, S. S. Laurent, and D. Kohn, "XML media types," [8] M. Murata, S. S. Laurent, and D. Kohn, "XML media types," Request
Internet Draft, Internet Engineering Task Force, Aug. 2000. Work in for Comments YYYY, Internet Engineering Task Force, Sept. 2000.
progress. [Draft draft-murata-xml-09.txt, approved for Proposed Standard. RFC
Editor: please fill in appropriate bibliographic information.].
[9] N. Freed, J. Klensin, and J. Postel, "Multipurpose internet mail
extensions (MIME) part four: Registration procedures," Request for
Comments 2048, Internet Engineering Task Force, Nov. 1996.
[10] H. Alvestrand, "Tags for the identification of languages," [9] H. Alvestrand, "Tags for the identification of languages,"
Request for Comments 1766, Internet Engineering Task Force, Mar. Request for Comments 1766, Internet Engineering Task Force, Mar.
1995. 1995.
[11] M. Davis and M. Drst, "Unicode normalization forms," Unicode [10] M. Davis and M. Duerst, "Unicode normalization forms," Unicode
Technical Report 15, Unicode Consortium, Nov. 1999. Revision 18.0. Technical Report 15, Unicode Consortium, Aug. 2000. Revision 19;
Available at http://www.unicode.org/unicode/reports/tr15/. part of Unicode 3.0.1. Available at
http://www.unicode.org/unicode/reports/tr15/.
[12] M. Davis, "Case mapping," Unicode Technical Report 21, Unicode [11] M. Davis, "Case mappings," Unicode Technical Report 21, Unicode
Consortium, Nov. 1999. Revision 3.0. Available at Consortium, Oct. 2000. Revision 4.3. Available at
http://www.unicode.org/unicode/reports/tr21/. http://www.unicode.org/unicode/reports/tr21/.
[13] F. Dawson and D. Stenerson, "Internet calendaring and scheduling [12] F. Dawson and D. Stenerson, "Internet calendaring and scheduling
core object specification (icalendar)," Request for Comments 2445, core object specification (icalendar)," Request for Comments 2445,
Internet Engineering Task Force, Nov. 1998. Internet Engineering Task Force, Nov. 1998.
[14] P. Eggert, "Sources for time zone and daylight saving time [13] P. Eggert, "Sources for time zone and daylight saving time
data." Available at http://www.twinsun.com/tz/tz-link.htm. data." Available at http://www.twinsun.com/tz/tz-link.htm.
[15] ISO (International Organization for Standardization), "Data [14] ISO (International Organization for Standardization), "Data
elements and interchange formats -- information interchange -- elements and interchange formats -- information interchange --
representation of dates and times," ISO Standard ISO 8601:1988(E), representation of dates and times," ISO Standard ISO 8601:1988(E),
International Organization for Standardization, Geneva, Switzerland, International Organization for Standardization, Geneva, Switzerland,
June 1986. June 1986.
[15] M. Mealling and R. Daniel, "URI resolution services necessary
for URN resolution," Request for Comments 2483, Internet Engineering
Task Force, Jan. 1999.
[16] H. Schulzrinne and J. Rosenberg, "SIP caller preferences and [16] H. Schulzrinne and J. Rosenberg, "SIP caller preferences and
callee capabilities," Internet Draft, Internet Engineering Task callee capabilities," Internet Draft, Internet Engineering Task
Force, July 2000. Work in progress. Force, July 2000. Work in progress.
[17] S. DeRose, E. Maler, D. Orchard, and B. Trafford, "XML linking [17] S. DeRose, E. Maler, D. Orchard, and B. Trafford, "XML linking
language (XLink)," Working Draft WD-xlink-20000221, World Wide Web language (XLink) version 1.0," W3C Candidate Recommendation CR-
Consortium (W3C), Feb. 2000. Available at xlink-20000703, World Wide Web Consortium (W3C), July 2000.
http://www.w3.org/TR/xlink/. Available at http://www.w3.org/TR/xlink/.
[18] T. Bray, D. Hollander, and A. Layman, "Namespaces in XML," W3C [18] T. Bray, D. Hollander, and A. Layman, "Namespaces in XML," W3C
Recommendation REC-xml-names-19900114, World Wide Web Consortium Recommendation REC-xml-names-19900114, World Wide Web Consortium
(W3C), Jan. 1999. Available at http://www.w3.org/TR/REC-xml-names/. (W3C), Jan. 1999. Available at http://www.w3.org/TR/REC-xml-names/.
[19] T. Showalter, "Sieve: A mail filtering language," Internet [19] T. Showalter, "Sieve: A mail filtering language," Request for
Draft, Internet Engineering Task Force, Aug. 2000. Work in progress. Comments YYYY, Internet Engineering Task Force, Aug. 2000. [Draft
draft-showalter-sieve-12.txt, approved for Proposed Standard. RFC
Editor: please fill in appropriate bibliographic information.].
[20] D. C. Fallside, "XML schema part 0: Primer," Working Draft WD- [20] D. C. Fallside, "XML schema part 0: Primer," W3C Candidate
xmlschema-0-20000225, World Wide Web Consortium (W3C), Feb. 2000. Recommendation CR-xmlschema-0-20001024, World Wide Web Consortium
Available at http://www.w3.org/TR/xmlschema-0/. (W3C), Oct. 2000. Available at http://www.w3.org/TR/xmlschema-0/.
[21] International Telecommunication Union, "Digital subscriber [21] International Telecommunication Union, "Digital subscriber
signalling system no. 1 (dss 1) - isdn user-network interface layer 3 signalling system no. 1 (dss 1) - isdn user-network interface layer 3
specification for basic call control," Recommendation Q.931, specification for basic call control," Recommendation Q.931,
Telecommunication Standardization Sector of ITU, Geneva, Switzerland, Telecommunication Standardization Sector of ITU, Geneva, Switzerland,
Mar. 1993. Mar. 1993.
[22] International Telecommunication Union, "Packet based multimedia [22] International Telecommunication Union, "Packet based multimedia
communication systems," Recommendation H.323 Draft v4, communication systems," Recommendation H.323 Draft v4,
Telecommunication Standardization Sector of ITU, Geneva, Switzerland, Telecommunication Standardization Sector of ITU, Geneva, Switzerland,
skipping to change at page 60, line 22 skipping to change at page 62, line 28
This document and the information contained herein is provided on an This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Table of Contents Table of Contents
1 Introduction ........................................ 2 1 Introduction ........................................ 2
1.1 Conventions of this document ........................ 2 1.1 Conventions of This Document ........................ 2
2 Structure of CPL scripts ............................ 3 2 Structure of CPL Scripts ............................ 2
2.1 High-level structure ................................ 3 2.1 High-level Structure ................................ 3
2.2 Abstract structure of a call processing action ...... 3 2.2 Abstract Structure of a Call Processing Action ...... 3
2.3 Location model ...................................... 4 2.3 Location Model ...................................... 4
2.4 XML structure ....................................... 5 2.4 XML Structure ....................................... 4
3 Document information ................................ 5 3 Document Information ................................ 5
3.1 CPL Document Identifiers for XML .................... 5 3.1 CPL Document Identifiers for XML .................... 5
3.2 MIME Registration ................................... 6 3.2 MIME Registration ................................... 6
4 Script structure: overview .......................... 7 4 Script Structure: Overview .......................... 7
5 Switches ............................................ 8 5 Switches ............................................ 8
5.1 Address switches .................................... 9 5.1 Address Switches .................................... 9
5.1.1 Usage of address-switch with SIP .................... 11 5.1.1 Usage of address-switch with SIP .................... 11
5.2 String switches ..................................... 12 5.2 String Switches ..................................... 12
5.2.1 Usage of string-switch with SIP ..................... 13 5.2.1 Usage of string-switch with SIP ..................... 13
5.3 Time switches ....................................... 13 5.3 Time Switches ....................................... 13
5.3.1 Motivations for the iCal subset ..................... 18 5.3.1 Motivations for the iCal Subset ..................... 18
5.4 Priority switches ................................... 19 5.4 Priority Switches ................................... 19
5.4.1 Usage of priority-switch with SIP ................... 20 5.4.1 Usage of priority-switch with SIP ................... 20
6 Location modifiers .................................. 20 6 Location Modifiers .................................. 20
6.1 Explicit location ................................... 21 6.1 Explicit Location ................................... 21
6.1.1 Usage of location with SIP .......................... 21 6.1.1 Usage of location with SIP .......................... 21
6.2 Location lookup ..................................... 22 6.2 Location Lookup ..................................... 22
6.2.1 Usage of lookup with SIP ............................ 23 6.2.1 Usage of lookup with SIP ............................ 23
6.3 Location Removal .................................... 23 6.3 Location Removal .................................... 24
6.3.1 Usage of remove-location with SIP ................... 24 6.3.1 Usage of remove-location with SIP ................... 25
7 Signalling actions .................................. 25 7 Signalling Operations ............................... 25
7.1 Proxy ............................................... 25 7.1 Proxy ............................................... 25
7.1.1 Usage of proxy with SIP ............................. 27 7.1.1 Usage of proxy with SIP ............................. 27
7.2 Redirect ............................................ 27 7.2 Redirect ............................................ 28
7.2.1 Usage of redirect with SIP .......................... 28 7.2.1 Usage of redirect with SIP .......................... 28
7.3 Reject .............................................. 28 7.3 Reject .............................................. 29
7.3.1 Usage of redirect with SIP .......................... 29 7.3.1 Usage of reject with SIP ............................ 29
8 Other actions ....................................... 29 8 Non-signalling Operations ........................... 30
8.1 Mail ................................................ 29 8.1 Mail ................................................ 30
8.1.1 Suggested Content of Mailed Information ............. 30 8.1.1 Suggested Content of Mailed Information ............. 30
8.2 Log ................................................. 31 8.2 Log ................................................. 31
9 Subactions .......................................... 31 9 Subactions .......................................... 32
10 Ancillary information ............................... 33 10 Ancillary Information ............................... 33
11 Default actions ..................................... 33 11 Default Behavior .................................... 33
12 CPL Extensions ...................................... 34 12 CPL Extensions ...................................... 34
13 Examples ............................................ 35 13 Examples ............................................ 36
13.1 Example: Call Redirect Unconditional ................ 35 13.1 Example: Call Redirect Unconditional ................ 36
13.2 Example: Call Forward Busy/No Answer ................ 35 13.2 Example: Call Forward Busy/No Answer ................ 36
13.3 Example: Call Forward: Redirect and Default ......... 35 13.3 Example: Call Forward: Redirect and Default ......... 36
13.4 Example: Call Screening ............................. 37 13.4 Example: Call Screening ............................. 37
13.5 Example: Priority and Language Routing .............. 37 13.5 Example: Priority and Language Routing .............. 37
13.6 Example: Outgoing Call Screening .................... 38 13.6 Example: Outgoing Call Screening .................... 39
13.7 Example: Time-of-day Routing ........................ 38 13.7 Example: Time-of-day Routing ........................ 39
13.8 Example: Location Filtering ......................... 38 13.8 Example: Location Filtering ......................... 39
13.9 Example: Non-call Actions ........................... 38 13.9 Example: Non-signalling Operations .................. 41
13.10 Example: Hypothetical Extensions .................... 39 13.10 Example: Hypothetical Extensions .................... 41
13.11 Example: A Complex Example .......................... 40 13.11 Example: A Complex Example .......................... 42
14 Security considerations ............................. 42 14 Security Considerations ............................. 43
15 IANA considerations ................................. 44 15 IANA Considerations ................................. 43
16 Acknowledgments ..................................... 44 16 Acknowledgments ..................................... 44
A An algorithm for resolving time switches ............ 44 A An Algorithm for Resolving Time Switches ............ 45
B Suggested Usage of CPL with H.323 ................... 45 B Suggested Usage of CPL with H.323 ................... 46
B.1 Usage of address-switch with H.323 .................. 45 B.1 Usage of address-switch with H.323 .................. 46
B.2 Usage of string-switch with H.323 ................... 47 B.2 Usage of string-switch with H.323 ................... 48
B.3 Usage of priority-switch with H.323 ................. 48 B.3 Usage of priority-switch with H.323 ................. 48
B.4 Usage of location with H.323 ........................ 48 B.4 Usage of location with H.323 ........................ 48
B.5 Usage of lookup with H.323 .......................... 48 B.5 Usage of lookup with H.323 .......................... 49
B.6 Usage of remove-location with H.323 ................. 48 B.6 Usage of remove-location with H.323 ................. 49
C The XML DTD for CPL ................................. 48 C The XML DTD for CPL ................................. 49
D Changes from earlier versions ....................... 54 D Changes from Earlier Versions ....................... 55
D.1 Changes from draft -02 .............................. 54 D.1 Changes from Draft -03 .............................. 55
D.2 Changes from draft -01 .............................. 55 D.2 Changes from Draft -02 .............................. 56
D.3 Changes from draft -00 .............................. 56 D.3 Changes from Draft -01 .............................. 57
E Authors' Addresses .................................. 57 D.4 Changes from Draft -00 .............................. 58
F Bibliography ........................................ 57 E Authors' Addresses .................................. 59
F Bibliography ........................................ 59
 End of changes. 

This html diff was produced by rfcdiff 1.23, available from http://www.levkowetz.com/ietf/tools/rfcdiff/