VoiceXML
Introduction to CCXML
Introduction to CCXML
Sep. 27, 2002 12:00 AM
When building interactive voice recognition applications, we are inevitably faced with the challenge of providing advanced telephony call-control capabilities. In some scenarios we'd like to bridge two calls for a conferencing application, in others we'd like to provide basic call routing so the caller can be connected to an appropriate customer service agent, make outbound calls, and the like. VoiceXML doesn't really provide these advanced call-control and telephony features.
What's available in VoiceXML is a simple "transfer" element that can be used to connect a VoiceXML application with another phone number/voice application. However, by definition it wasn't meant to provide the sophisticated call-control capabilities.
Introducing CCXML
Call Control eXtensible Markup Language (CCXML), as the name suggests, is an XML-based markup language that provides rich telephony call-control capabilities to an interactive speech application. Whereas the VoiceXML standard is focused primarily on providing semantics for representing conversational dialogs, CCXML provides the much-needed, sophisticated, event-based asynchronous call-control mechanism and tighter integration with the telephony platform.
CCXML and VoiceXML are totally complementary standards. Also, they aren't dependent on each other. For instance, CCXML isn't restricted to VoiceXML; it could be used in the context of other dialog languages (or even without one if the application requires only call routing capabilities). Similarly, VoiceXML could utilize other call-control semantics. The whole idea is to develop CCXML as a complementary standard so it can be leveraged in uniform fashion with dialog markup languages such as VoiceXML.
CCXML Application Model
The CCXML application model is based on an asynchronous event management system. Represented by the root XML node , much of the functionality provided by a CCXML application is around processing asynchronous telephony events. The bulk of CCXML application processing happens within event handlers (represented by the element) that process incoming events through a series of event-processing triggers (represented by the element). Transition elements can then invoke a set of corresponding actions, including:
Accept/reject calls (/ elements).
Initiate/terminate a dialog interpreter instance (, ).
Invoke processing logic (, , , , , ).
Transfer executions to different CCXML documents (, , ).
Create/destroy conferences and connect/disconnect phone connections (also known as call-legs)(, , , ).
Make an outbound call ().
Generate events ().
Terminate a call ().
In a nutshell, developing a CCXML application is really writing the handlers, which are executed when certain events arrive. Using the mechanism provided, information is passed back and forth between VoiceXML and CCXML documents. Similar to VoiceXML, a CCXML application can comprise more than one document.
CCXML Events
As is probably clear, asynchronous event handling is a key highlight of CCXML. It's also important to understand that CCXML event handling is quite different from VoiceXML's basic nomatch/filled synchronous style events. Technically speaking, each running CCXML interpreter has a queue, into which it places incoming events and sorts them by arrival time. Events are then available to a CCXML program using an eventhandler.
It's possible for a CCXML application to generate and process any arbitrarily named events. However, most of the CCXML application development is focused around a set of standardized events. Following is a list of commonly used events (the CCXML specification provides an exhaustive list of predefined events):
Call related
-call.CALL_INVALID (final state for all calls)
Connection related
-connection.CONNECTION_ALERTING (represents an incoming call notification)
-connection.CONNECTION_CONNECTED (represents a call that's been connected)
-connection.CONNECTION_FAILED (connection to the other end of call has failed)
Dialog related
-dialog.exit (a VoiceXML Interpreter has ended execution)
-dialog.disconnect (a VoiceXML Interpreter encountered a disconnect tag)
-dialog.transfer (a VoiceXML Interpreter encountered a transfer tag)
Hello CCXML
Enough talk. Let's get our hands dirty and actually take a look at a CCXML-based application. The code in Listing 1 shows a basic CCXML application that provides the capability to screen calls from selected phone numbers.
What our simple "Hello World" style CCXML application does is provide a basic event handler for the event "CONNECTION_ALERTING", which notifies the application of an incoming call. Once the event is received, we process the caller ID of the user and, based on that, make a decision to accept/reject the call.
Combining VoiceXML, CCXML
A personal secretary
Let's say you've developed an address book application (similar to the one we developed in a previous article [XML-J, Vol. 2, issue 2]) that stores your frequent contact information. A VoiceXML dialog recognizes a person in your address book (by name, company, and/or nickname) and returns the phone number of the person (see Listing 2).
It's then possible, using CCXML, to create outbound calls (see Listing 3).
The basic CCXML script in Listing 3 can be modified to handle error-handling scenarios and timeouts, provide call-bridging capabilities, and so on.
Application Scenarios
CCXML is easy enough to develop simple applications like call screening and personal dialer, yet complex enough to develop a multiparty conferencing application. Application scenarios that can use the capabilities provided by CCXML include call screening (filter calls to an application), find-me/follow-me applications, personalized call centers, intelligent routing, call-hold, supervised transfer, multiparty conferencing, calling card applications, and the like.
Let's take an automated self-service interactive voice-based application, for example. Typically, it's desirable to provide the user an easy mechanism to exit out of the recognition mode and be transferred to a human customer service agent. However, we'd also like to inform the customer service agent about any interactions that have already occurred in an automated fashion (for instance, a user's basic profile - telephone number, maybe a credit card number or an account number). Even though it's quite possible to achieve the basic "transfer" functionality using the element in VoiceXML, CCXML provides the needed sophistication to achieve an automated "whisper-enabled transfer," in which a CCXML application can actually pass on any information about the caller to the agent before bridging the call.
Implementations
Voxeo Community, a hosted VoiceXML platform, is one of the first implementations of CCXML that I've come across. A number of other vendors have announced support for the upcoming standard as well. Included in the Community application is Voxeo Application Insight, a tool that provides management/analysis/debugging of remote CCXML applications.
Conclusion
CCXML is in its early stages. As a first working draft in the W3C standardization process, it's been pointed out that CCXML may change significantly before it reaches the official "W3C Recommendation" status. So as developers of interactive telephony applications, we need to be aware of that. Actually, a number of vendors today provide implementations to certain features highlighted in CCXML through specific vendor extensions. Apart from standardization, another key development required in the adoption process of CCXML would be for vendors to provide a set of tools that support visual CCXML design, development, and testing. The whole notion of a state machine-based CCXML event model lends itself easily to be generated through a visual call-control application tool.
References
CCXML version 1.0 (W3C Working Draft):
www.w3.org/TR/ccxml/
Voxeo Community site:
http://community.voxeo.com
Voxeo Application Insight:
http://techpreview.voxeo.com/insight/index.html
JTAPI:
http://java.sun.com/products/jtapi/
About Hitesh SethHitesh Seth is chief technology officer of ikigo, Inc., a provider of XML-based web-services monitoring and management software. A freelance writer and well-known speaker, he regularly writes for technology publications on VoiceXML, Web Services, J2EE and Microsoft .NET, Wireless Computing & Enterprise/B2B Integration. He is the conference chair for VoiceXML Planet Conference & Expo.