Experience Portal supports sending and receiving events from the CCXML application synchronously or asynchronously within a voice application as specified in the VXML 3.0 specification. When an external message arrives, it reflects in the application.
VoiceXML 3.0 interpreters receive events from external sources. In particular, VoiceXML 3.0 receives the life cycle events specified as part of the Multimodal Architecture and Interfaces (MMI) specification . These life cycle events allow the flow component of the Data Flow Presentation architecture to control the presentation layer by starting and stopping the processing of markup. By handling these events, the VoiceXML interpreter acts as a modality component in the multimodal architecture, while the flow component acts as an Interaction manager. As a result, you can extend VoiceXML 3.0 into multimodal applications.
External messages are reflected in the application in the application.lastmessage$ variable.
Note:
Experience Portal cannot send or receive any other source, except the CCXML application, for processing the external event in the VXML browser.
The variable is an ECMAScript object with the following properties:
application.lastmessage$ properties |
contenttype |
The media type of the external message. Vb currently support “string” only. |
event |
The event name, if any, or ECMAScript undefined if no event name was included in the external message. |
content |
The content of the message, if any, or ECMAScript undefined. The interpreter throws "error.badfetch" in one of the following scenarios:
An interpreter receives an external message with a payload in a data format that it does not understand. * The payload is not well formed as defined by the specification of that format.
The payload is not well formed as defined by the specification of that format.
|
If no external messages are received, application.lastmessage$ is ECMAScript undefined. Only the last received message is available.
Since external messages can arrive at any time, they can be disruptive to a voice application. A voice application developer decides whether these messages are delivered to the application synchronously or asynchronously using the externalevents.enable property.
You can set the property to one of the following values:
externalevents.enable values |
true |
External messages are delivered asynchronously as VoiceXML events. |
false |
External messages are delivered synchronously. This is the default. |