Open VXI Library Reference

VoiceXML Coverage and Specification Interpretation.

It is the goal of the Open VXI toolkit to be fully compliant with the VoiceXML standard as it evolves in the W3C consortium. This version of the VoiceXML interpreter is based on the VoiceXML 1.0 specification (Mar. 7 2000).

The current release has several minor difference from the specification, which come from two sources. The first is known bugs and unimplemented semantics. The second is that the VoiceXML 1.0 specification is unclear or ambiguous in many cases. The significant differences and interpretations are listed below. Refer to the Release Notes for more detail on bugs and limitations of the current release.

Portal Support and Extensions

The Open VXI VoiceXML interpreter incorporates a number of features to support browser administration and support Voice Portals. In addition, we support a small number of sttribute extensions which seem useful to developers.

Programming Reference

Alll interfaces where generated using doc++. This is available for download from source forge

VXI API

The VXI programming interface consists of four calls.

VXIresult VXIapiCreate(void* platform, void* os, VXIint32 line, void* logger, JSIHandle runtime, void** vxip);

The VXIapiCreate creates and initializes a new VXI and associated data structures. The VXI is a light-weight structure and VXIapiCreate and VXIapiDestroy are typically called once for each new call.

The channel argument contains handles on any channel specific resources, for example, resources requied by the rec, prompts or tel interfaces. These resources must be created and initialized by the program using the VXI library (referred to henceforth as the 'framework'). This is typically done by calling the CreateResource>/code> functions of the various platform API's.

The channel argment also contains values to be used to initialize the session.telephony variables in VoiceXML. These values should be put in the following VXIObject properties of channel (refer to the VoiceXML 1.0 specification for the semantics of these values).

The default document can be passed in at this point as a URI under the property The os, logger, and line argments have been deprecated and this information should be be transmitted via the channel.

The runtime, argument is a handle on the global JavaScript runtime as returned by VXIjsiInit().

If a new VXI has been succesfully created VXIapiCreate returns VXIresultSUCCESS and stores a handle through the vxip argument. This handle should be passed into subsequent VXIapi calls.

VXIresult VXIapiDestroy(void* vxi);

This call is the reciprocal of VXIapiCreate and should be called when a given VXI object is no longer needed. Typically this called at the end of each call.

VXIresult VXIapiRun(void* vxi, VXIchar* url);

This is the main call to invoke the VoiceXML interpreter. The framework is responsable for taking a call, creating and initializing a new VXI, and determining the URL to be invoked. The url argument points to the initial page to be interpreted by the VXI. The VXIapiRun function returns when VoiceXML processing is complete. That is, either an <exit> element is encountered, there is no active dialog to process, or an unhandled error has occurred. In the former two cases, VXIresultSUCCESS is returned, in the latter, an error code.

VXIresult VXIapiGetResult(void* vxi, VXIValue* vp);

This call returns any return value specified by the last <exit> element as a VXIValue. The functions relating to VXIValue can be usedto query the type of this value and convert back to basic C/C++ data types.

Platform API Calls

This section under development. See also Integration.html.

Reference Client Usage

There are two reference clients included in this release. A console-based client testVXI and a Win32 GUI client nt_client. At the moment these are mainly useful for testing pieces of interpreter functionality. The command line arguments for both are the same (indeed they share all code except UI):
testVXI url [options]
Where url
  • -maxCalls n

  • Where n is a positive integer. The default is infinite.
  • -numChannel n

  • Where n is a positive integer. The default is 1.
  • -defaultDoc url Where url refers to a document containing default catch handlers.



  • This document refers to files in the Open VXI release. This is available at http://www.speech.cs.cmu.edu/openvxi .


    VoiceXML is a Trademark of the VoiceXML forum.
    Copyright 2000, 2001. SpeechWorks International, Inc. All rights reserved. Distributed under SpeechWorks Open Document License, v1.0