[1]W3C [1] http://www.w3.org/ Voice Browser Call Control: CCXML Version 1.0 W3C Working Draft 19 January 2007 This version: [2]http://www.w3.org/TR/2007/WD-ccxml-20070119/ [2] http://www.w3.org/TR/2007/WD-ccxml-20070119/ Latest version: [3]http://www.w3.org/TR/ccxml/ [3] http://www.w3.org/TR/ccxml/ Previous version: [4]http://www.w3.org/TR/2006/WD-ccxml-20061122/ [4] http://www.w3.org/TR/2006/WD-ccxml-20061122/ Editor: RJ Auburn, Voxeo [5] [5] mailto:rj@voxeo.com [6]Copyright ©2007 [7]W3C^® ([8]MIT, [9]ERCIM, [10]Keio), All Rights Reserved. W3C [11]liability, [12]trademark and [13]document use rules apply. _________________________________________________________ [6] http://www.w3.org/Consortium/Legal/ipr-notice#Copyright [7] http://www.w3.org/ [8] http://www.csail.mit.edu/ [9] http://www.ercim.org/ [10] http://www.keio.ac.jp/ [11] http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer [12] http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks [13] 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 [14]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 [15]W3C technical reports index at http://www.w3.org/TR/. [15] http://www.w3.org/TR/ 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 [16]W3C Voice Browser Activity, following the procedures set out for the [17]W3C Process. The authors of this document are members of the [18]Voice Browser Working Group ([19]W3C Members only). [16] http://www.w3.org/Voice/Activity [17] http://www.w3.org/Consortium/Process/ [18] http://www.w3.org/Voice/Group/ [19] http://cgi.w3.org/MemberAccess/AccessRequest This is the Last Call Working Draft of CCXML 1.0. The Last Call period is set to last 3 weeks. Therefore comments on the documents are welcome until 7 February 2007. There are no changes since the [20]previous Working Draft, except that this is a Last Call WD. [20] http://www.w3.org/TR/2006/WD-ccxml-20061122/ This document is also available as a non-normative [21]HTML page showing the changes since previous revisions. For a detailed list please see [22]Appendix F - Changes. [21] http://www.w3.org/TR/ccxml/ccxml.html An Implementation Report Plan is currently being developed for this specification. The Working Group currently expects to require at least two independently developed interoperable implementations of each required feature, and at least one implementation of each feature, in order to exit the next phase of this document, the Candidate Recommendation phase. To help the Voice Browser Working Group build such a report, reviewers are encouraged to implement this specification and to indicate to W3C which features have been implemented, and any problems that arose. This document is for public review. Comments and discussion are welcomed on the public mailing list < [23]www-voice@w3.org >. To subscribe, send an email to <[24]www-voice-request@w3. org> with the word subscribe in the subject line (include the word unsubscribe if you want to unsubscribe). The [25]archive for the list is accessible on-line. [23] mailto:www-voice@w3.org [24] mailto:www-voice-request@w3.org [25] http://lists.w3.org/Archives/Public/www-voice/ Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress. 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 [223]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 [224]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 [ [225]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. Can span multiple documents and phone calls. See [226]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. * 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()'. Reserved ECMAscript property 'prototype.constructor' MUST reference the class constructor object, so in the example above, 'MyConnection.prototype.constructor == 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 [227]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:
Please say some numbers ...
5: CCXML Elements Listing [228] Accept an incoming phone call [229] Assign a variable a value [230] Cancel a CCXML event timer [231] CCXML container element [232] Make an outbound call [233] Create a new CCXML session [234] Create a multi-party audio conference [235] Destroy a multi-party audio conference [236] Prepare a dialog for execution [237] Start a dialog session's execution [238] Stop a dialog session's execution [239] Terminate a phone connection [240] Used in statements [241] Used in statements [242] Block of event-processing statements [243] Ends execution of the CCXML session [244] Preload a CCXML file [245] Move execution to a new location [246] Conditional logic [247] Connect two audio sources [248] Log to the platform debug log [249] Merge two connections at the network level [250] Override HTTP headers and provide document metadata [251] Provide document metadata [252] Move an event source to another ccxml session [253] Redirect an incoming call to a new endpoint [254] Reject an incoming phone call [255]