CCXML Voxeo 1.0 Development GuideHome  |  Frameset Home

This documentation is for CCXML 1.0-Voxeo, which has been superceded by CCXML 1.0-W3C. The CCXML-Voxeo platform is not being updated any longer. The CCXML 1.0-W3C version, however, has many new features and is actively being enhanced. If you're writing a new CCXML application, you should use CCXML 1.0-W3C. Click here for the CCXML 1.0-W3C documentation.
<eventhandler>  element

The <eventhandler> element is the main parent element for the <transition> tag. Both of these in conjunction serve as the main event handling elements, (or state machine) of a CCXML document. Events received can be in response to a previous programmatic CCXML action, or they may be generated by an external source, (such as when an incoming call is received and needs to be answered). Additionally, user-defined events can be thrown via the <send> element.

The CCXML interpreter has an event queue, into which it places all incoming events, which are then sorted by arrival time. A CCXML document may only gain access to these queued events by using an eventhandler.



usage
<eventhandler id="STRING" statevariable="(variable name)">


attributes
idData Type: STRINGDefault: none - attribute is required
This attribute simply indicates the name of the eventhandler in question.
statevariableData Type: (variable name)Default: none - attribute is optional
This attribute denotes the variable name which is the <eventhandler> state variable.



parents
<ccxml>


children
<transition>


code samples
<Eventhandler id-statevariable> sample
<?xml version="1.0" encoding="UTF-8" ?>
<!-- *************** DECLARE CCXML DOCUMENT TYPE *************** -->
<ccxml version="1.0">

<var name="state0" expr="'init'"/>

  <eventhandler id="'myHandler'" statevariable="state0">

    <transition state="'init'" event="ccxml.loaded" name="evt">
      <exit/>
    </transition>

<!-- ******************* GENERAL EXCEPTIONS ******************** -->
    <transition event="error.*" name="evt">
      <log expr="'*** ERROR HAS OCCURED [' + evt.error + '] ***'"/>
      <exit/>
    </transition>

  </eventhandler>   
</ccxml>



additional links
W3C Specification


  ANNOTATIONS: EXISTING POSTS
moshe
5/25/2004 11:04 AM (EDT)
There /must/ be only one eventhandler per CCXML document according to the last W3C specification.

login



© 2008 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site