[1]W3C
[1] http://www.w3.org/
Voice Browser Call Control: CCXML Version 1.0
W3C Recommendation 05 July 2011
This version:
[2]http://www.w3.org/TR/2011/REC-ccxml-20110705/
[2] http://www.w3.org/TR/2011/REC-ccxml-20110705/
Latest version:
[3]http://www.w3.org/TR/ccxml/
[3] http://www.w3.org/TR/ccxml/
Previous version:
[4]http://www.w3.org/TR/2011/PR-ccxml-20110510/
[4] http://www.w3.org/TR/2011/PR-ccxml-20110510/
Editor in Chief:
RJ Auburn, Voxeo Corporation
Editors:
Paolo Baggia, Loquendo
Mark Scott, Genesys
Contributors:
There are many valuable people who have helped create CCXML.
Please see the complete list in the [5]Acknowledgments
section at the rear of the specification.
Please refer to the [6]errata for this document, which may include
some normative corrections.
[6] http://www.w3.org/2011/07/ccxml-errata
See also [7]translations.
[7] http://www.w3.org/2003/03/Translations/byTechnology?technology=ccxml
[8]Copyright ©2011 [9]W3C^® ([10]MIT, [11]ERCIM, [12]Keio), All
Rights Reserved. W3C [13]liability, [14]trademark and [15]document
use rules apply.
_________________________________________________________
[8] http://www.w3.org/Consortium/Legal/ipr-notice#Copyright
[9] http://www.w3.org/
[10] http://www.csail.mit.edu/
[11] http://www.ercim.eu/
[12] http://www.keio.ac.jp/
[13] http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer
[14] http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks
[15] http://www.w3.org/Consortium/Legal/copyright-documents
Abstract
This document describes CCXML, or the Call Control eXtensible Markup
Language. CCXML is designed to provide telephony call control
support for dialog systems, such as VoiceXML [16]VOICEXML]. While
CCXML can be used with any dialog systems capable of handling media,
CCXML has been designed to complement and integrate with a VoiceXML
interpreter. Because of this there are many references to VoiceXML's
capabilities and limitations. There are also details on how VoiceXML
and CCXML can be integrated. However, it should be noted that the
two languages are separate and are not required in an implementation
of either language. For example, CCXML could be integrated with a
more traditional Interactive Voice Response (IVR) system or a 3GPP
Media Resource Function (MRF), and VoiceXML or other dialog systems
could be integrated with other call control systems.
Status of this Document
This section describes the status of this document at the time of
its publication. Other documents may supersede this document. A list
of current W3C publications and the latest revision of this
technical report can be found in the [17]W3C technical reports index
at http://www.w3.org/TR/.
[17] http://www.w3.org/TR/
This is the 05 July 2011 Recommendation of "Call Control eXtensible
Markup Language (CCXML) Version 1.0". There were no changes since
the Proposed Recommendation document.
The W3C Membership and other interested parties are invited to
review the document and send comments to the Working Group's public
mailing list [18]www-voice@w3.org ([19]archive). See [20]W3C mailing
list and archive usage guidelines.
[18] mailto:www-voice@w3.org
[19] http://lists.w3.org/Archives/Public/www-voice/
[20] http://www.w3.org/Mail/
This specification describes the Call Control XML (CCXML) markup
language that is designed to provide telephony call control support
for VoiceXML or other dialog systems.
This document has been produced as part of the [21]Voice Browser
Activity. The authors of this document are participants in the
[22]Voice Browser Working Group. For more information see the
[23]Voice Browser FAQ.
[21] http://www.w3.org/Voice/Activity.html
[22] http://www.w3.org/Voice/
[23] http://www.w3.org/Voice/#faq
During the Candidate Recommendation phase, four independently
developed implementations were evaluated. The entrance criteria for
the Proposed Recommendation phase requires a minimum of two
independently developed interoperable implementations for each
required feature, two or more implementations of optional features
that would impact interoperability, and a minimum of one
implementation for each optional feature that has no impact on
interoperability. These requirements were met. For further details
and complete results please see section 7 of the [24]CCXML
Implementation Report. Comments received during the Candidate
Recommendation period can be found in the [25]Disposition of
Comments.
[24] http://www.w3.org/TR/ccxml/ccxml-ir/#results
[25] http://www.w3.org/TR/2011/PR-ccxml-20110510/CCXML_DoC-2011-03-31.html
This document has been reviewed by W3C Members, by software
developers, and by other W3C groups and interested parties, and is
endorsed by the Director as a W3C Recommendation. It is a stable
document and may be used as reference material or cited from another
document. W3C's role in making the Recommendation is to draw
attention to the specification and to promote its widespread
deployment. This enhances the functionality and interoperability of
the Web.
This document was produced by a group operating under the [26]5
February 2004 W3C Patent Policy. W3C maintains a [27]public list of
any patent disclosures made in connection with the deliverables of
the group; that page also includes instructions for disclosing a
patent. An individual who has actual knowledge of a patent which the
individual believes contains [28]Essential Claim(s) must disclose
the information in accordance with [29]section 6 of the W3C Patent
Policy.
[26] http://www.w3.org/Consortium/Patent-Policy-20040205/
[27] http://www.w3.org/2004/01/pp-impl/34665/status
[28] http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential
[29] http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure
Conventions of this Document
In this document, the key words "must", "must not", "required",
"shall", "shall not", "should", "should not", "recommended", "may",
and "optional" are to be interpreted as described in [30][RFC2119]
and indicate requirement levels for compliant CCXML implementations.
Table of Contents
* 1: [31]Introduction
* 2: [32]Motivation (Informative)
* 3: [33]Concepts and Architecture
*
+ 3.1: [34]Event Processing
+ 3.2: [35]Conferencing
+ 3.3: [36]Scripting
+ 3.4: [37]Definitions
+ 3.5: [38]Session Life-Cycle
+
o 3.5.1: [39]Startup
o 3.5.2: [40]Shutdown
o 3.5.3: [41]Session Life-Cycle Diagrams
* 4: [42]Simple Examples
+ 4.1: [43]Hello World
+ 4.2: [44]Accept or Reject a Call
+ 4.3: [45]Simple Dialog
* 5: [46]CCXML Elements Listing
* 6: [47]Document Control Flow and Execution
*
+ 6.1: [48]Overview
+ 6.2: [49]Elements
+
o 6.2.1: [50]
o 6.2.2: [51]
o 6.2.3: [52]
o 6.2.4: [53]
o 6.2.5: [54]
o 6.2.6: [55]
o 6.2.7: [56]
o 6.2.8: [57]
o 6.2.9: [58]
o 6.2.10: [59]
o 6.2.11: [60]
+ 6.3: [61]Events
+
o 6.3.1: [62]Overview
o 6.3.2: [63]fetch.done
o 6.3.3: [64]error.fetch
o 6.3.4: [65]ccxml.exit
o 6.3.5: [66]ccxml.loaded
o 6.3.6: [67]ccxml.kill
o 6.3.7: [68]ccxml.created
o 6.3.8: [69]error.createccxml
o 6.3.9: [70]error.unsupported
* 7: [71]Dialogs
*
+ 7.1: [72]Overview
+ 7.2: [73]Elements
+
o 7.2.1: [74]
o 7.2.2: [75]
o 7.2.3: [76]
+ 7.3: [77]Events
+
o 7.3.1: [78]Overview
o 7.3.2: [79]dialog.started
o 7.3.3: [80]dialog.exit
o 7.3.4: [81]dialog.disconnect
o 7.3.5: [82]dialog.transfer
o 7.3.6: [83]dialog.terminatetransfer
o 7.3.7: [84]error.dialog
o 7.3.8: [85]error.dialog.notstarted
o 7.3.9: [86]blank
o 7.3.10: [87]dialog.user.*
o 7.3.11: [88]dialog.prepared
o 7.3.12: [89]error.dialog.notprepared
+ 7.4: [90]Dialog Object Properties
+ 7.5: [91]Dialog Class
* 8: [92]Variables and Expressions
*
+ 8.1: [93]Overview
+ 8.2: [94]Elements
+
o 8.2.1: [95] and
o 8.2.2: [96]
* ECMAScript expression - defined in ECMA-262 [230]ECMASCRIPT]
11.1; this is an expression which produces a value; an
expression which is valid on the right hand side of an
assignment operator;
Several examples of ECMAScript expressions are as follows
(ECMAScript expression in red):
* ECMAScript variable name - defined in ECMA-262 [231]ECMASCRIPT]
7.6; this is any valid sequence of characters, known as an
identifier, which can be used as a variable name, a property
name, or a function name; this does not include any qualifiers,
such as array or property accessors;
Several examples of ECMAScript variable names are as follows
(ECMAScript variable name in red):
* Empty ECMAScript object - an object returned by the new Object()
ECMAScript expression; an object with no properties.
* CCXML variable name - a variable name, with optional dot
separated qualification, declared in a CCXML element or
defined within ECMAScript code using the var keyword.
* Scope element - a CCXML element which defines a variable scope;
and are CCXML scope elements. Variables
which are defined within a scope element are not visible to
variables defined in other scope elements.
* Time interval - CCXML uses the Cascading Style Sheets, Level 2 [
[232]CSS2 ] time format. Time designations consist of a
non-negative real number followed by a time unit identifier. The
time unit identifiers are:
+ ms : milliseconds
+ s : seconds
Examples include: "3s", "850ms", "0.7s", ".5s" and "+1.5s".
* CCXML Application/Program - A collection of CCXML documents that
together create a complete application/program.
* CCXML Interpreter - The software that processes CCXML documents,
executes commands and dispatches events. Also referred to as the
"CCXML Platform".
* CCXML Platform - An implementation of CCXML for a specific
network and environment, generally including a CCXML Interpreter
as a component.
* CCXML Session - A single instance of a CCXML application. It can
span multiple documents and phone calls. See [233]Section 3.5
Session Life-Cycle for details.
* CCXML Parent Session - The CCXML session that created the
currently running session using the element.
* Event - An action or occurrence to which an application can
respond. Examples of events are incoming phone calls, dialog
actions or user defined events. Events in CCXML are modeled as
ECMAScript objects and can contain complex values. All events in
CCXML have a standard set of properties as defined in section
[234]9.4.2: Standard Event Attributes.
* Associative array - An associative array (also known as a map,
lookup table, or dictionary) is an abstract data type composed
of a collection of keys and a collection of values, where each
key is associated with one value. Associative arrays in
ECMAScript are implemented using an Object with sub properties.
* Class - CCXML Classes are ECMAScript Constructor objects (see
section 4.2.1 of the ECMAScript specification for more
information) to help in creating the appropriate type of object
instances (such as connection, conference and dialog). The
Constructor object may contain properties that are not inherited
by children objects (such as Connection.states). The constructor
object MAY also contain a Prototype property to allow properties
that are inherited. Platforms MAY choose to add properties to
classes. By convention, the properties MUST begin with an
underscore, "_", to identify them as platform-dependent. All
defined objects in this specification must be initiated via one
of these classes. An example would be 'MyConnection = new
Connection()'. The Connection class MUST initiate connection
objects, the Dialog class MUST initiate dialog objects and the
Conference class MUST initiate conference objects.
3.5: Session Life-Cycle
3.5.1: Startup
A CCXML session can be started for the following reasons:
* A new incoming phone call coming into the platform.
* A CCXML application executing a .
* An external session launch request coming into the platform.
To create a CCXML session, the URI for the initial CCXML document
must be known, along with any fetching parameters affecting how that
CCXML document is retrieved. For incoming calls, the selection of
the initial URI and fetching parameters is platform-dependent, and
MAY be based on information from the incoming call. Sessions created
via and the session creation event I/O processor
determine the initial URI and fetching parameters as stated in this
specification.
When a session is started due to an incoming call it has ownership
of the new Connection that caused it to be created. The new CCXML
session will be responsible for processing the Connection state
events and performing the Connection actions. If the session was
started because of a , it will start without ownership
of any event endpoints. In the case of an external session launch
the session will not own any event endpoints.
A CCXML application can determine the reason its session was started
by evaluating the contents of the session.startupmode session
variable that is defined in the [235]Session Variables section.
3.5.2: Shutdown
A CCXML session can end in one of the following ways:
* The CCXML application executes an .
* An unhandled "error.*" event.
* An unhandled "ccxml.kill" event.
* A "ccxml.kill.unconditional" event.
When a CCXML session ends, all active connections, conferences and
dialogs that are owned by that session are automatically terminated
by the platform.
3.5.3: Session Life-Cycle Diagrams
The following diagrams illustrate the session life-cycle of several
different scenarios. These diagrams do not show all possible
scenarios but rather show some of the most common ones that CCXML
applications may encounter.
3.5.3.1: session can live before and after active connections (or
no connections at all)
A CCXML session does not necessarily need to have any connections
associated with it. After starting, a session may acquire
connections as a result of or requests.
Session lifecycle diagram
3.5.3.2: connection life shorter than session
In this example, the session is started due to an incoming call. A
connection is typically shorter than a session. A session does not
end when a connection terminates.
Session lifecycle diagram
3.5.3.3: session ends, kills all active connections
When a session ends, any resources, including connections owned by
that session are terminated.
Session lifecycle diagram
3.5.3.4: session can have multiple sequential connections
A session can have multiple sequential connections
Session lifecycle diagram
3.5.3.5: session can have multiple sequential connections and
multiple concurrent connections
In addition to having multiple sequential connections, a session can
have multiple concurrent connections.
Session lifecycle diagram
3.5.3.5: move a connection to a newly created session
A connection can be moved from one CCXML session to another session.
In the figure below, CCXML session (1) creates a new CCXML session
(2) via . Then, the connection is moved from the
original CCXML session to the new session.
Session lifecycle diagram
3.5.3.7: move a connection to a "master" session
A connection can be moved from one CCXML session to another session,
such as a "master" session.
Session lifecycle diagram
3.5.3.8: optional "master" session for inbound call handling
Implementations MAY, as a platform-specific optimization, choose to
deliver more than one inbound call to a single "master" session.
This can be viewed as equivalent to sessions handling incoming calls
performing a , as described in 3.5.3.7, of the new Connection
(including the connection.alerting event) to the single "master"
CCXML session.
The default inbound call handling behavior for CCXML implementations
is to create a new CCXML session and deliver the connection.alerting
event to it. If a platform supports delivery of multiple inbound
calls to a single session, the way this is configured is
implementation specific.
Session lifecycle diagram
3.5.3.9: ccxml.kill.unconditional event raised
If at anytime a ccxml.kill.unconditional event is raised by the
underlying implementation, the CCXML session is immediately
terminated and all active connections, conferences and dialogs that
are owned by that session are automatically terminated by the
platform.
Session lifecycle diagram
3.5.3.10: Normal session shutdown requested by the platform
If at anytime the platform wishes to terminate a CCXML session it
MUST raise a ccxml.kill event to inform the CCXML application. The
normal response to this event is for the CCXML application to
perform any clean up and termination of current active connections,
conferences or dialogs and then execute an element.
If the CCXML application does not respond to the ccml.kill event in
a timely manner the platform MAY then raise a
ccxml.kill.unconditional event to immediately terminate the CCXML
session and all active connections, conferences, and dialogs that
are owned by the session.
Session lifecycle diagram
4: Simple Examples
4.1: Hello World
This simple CCXML document shows an example of a "hello world"
application that is started due to an incoming call where the
application simply assigns a value to a variable, prints a message
to the platform log and exits:
4.2: Accept or Reject a Call
This CCXML document shows an example of how to process a incoming
call event and answer or reject the call based on the phone number
of the calling party:
4.3: Simple Dialog
This is an example of running a simple VoiceXML dialog from CCXML.
The application answers an incoming phone call and then connects it
to a VoiceXML dialog that returns a value that is then logged to the
platform:
dialog.ccxml:
dialog.vxml:
5: CCXML Elements Listing
[236] Accept an incoming phone call
[237] Assign a variable a value
[238] Cancel a CCXML event timer
[239] CCXML container element
[240] Make an outbound call
[241] Create a new CCXML session
[242] Create a multi-party audio conference
[243] Destroy a multi-party audio conference
[244] Prepare a dialog for execution
[245] Start a dialog session's execution
[246] Stop a dialog session's execution
[247] Terminate a phone connection
[248] Used in statements
[249] Used in statements
[250] Block of event-processing statements
[251] Ends execution of the CCXML session
[252] Preload a CCXML file
[253] Move execution to a new location
[254] Conditional logic
[255] Connect two audio sources
[256] Log to the platform debug log
[257] Merge two connections at the network level
[258] Override HTTP headers and provide document metadata
[259] Provide document metadata
[260] Move an event source to another ccxml session
[261] Redirect an incoming call to a new endpoint
[262] Reject an incoming phone call
[263]
An implementation MUST support