CCXML 1.0-W3C Development GuideHome  |  Frameset Home


<cancel>  element

The <cancel> element provides a quite useful method of stopping a CCXML event timer, (such as an event that is in a pending state from a <send> directive that has a delay specified. When executed, this element will remove any pending event from the event queue of the invoking CCXML session in question. Note that if a delay timer has already expired when this element is fired off, an error.notallowed will be thrown to the event queue instead. Also be aware that this 'cancel' event can be sent to a local, or even a remote CCXML session.


usage
<cancel sendid="(none)">


attributes
sendidData Type: (none)Default: Required
The sendid attribute denotes an ECMAScript expression evaluating to the event identifier of the <send> command that is to be cancelled.




parents
none


children
none


code samples
<:1.0 cancel<
<?xml version="1.0" encoding="UTF-8"?>
<ccxml version="1.0" xmlns="http://www.w3.org/2002/09/ccxml">

  <var name="eventid"/>
 
  <eventprocessor>

    <transition event="connection.alerting">
    <accept/>
    </transition>

    <transition event="connection.connected">
      <log expr="'***** CALL WAS ANSWERED *****'"/>
      <dialogstart src="'someDialog.vxml'" type="'application/voicexml+xml'" dialogid="myDialogID"/>
      <send data="'timeout'" target="myDialogID" delay="'10s'" targettype="'dialog'" sendid="eventid"/>
      <cancel sendid="eventid"/>
    </transition>

    <transition event="send.successful">
    <dialogterminate dialogid="myDialogID"/>
    </transition>
     
    <transition event="cancel.successful">
      <log expr="'Cancel was successful.  Here, have a cookie on me.'"/>
      <exit/> 
    </transition> 
     
    <transition event="error.dialog.notstarted'">
        <log expr="'****** ERROR.DIALOGNOTSTARTED.NAME = ' + event$.name"/>
    </transition>

    <transition event="dialog.exit">
      <log expr="'***** CALL EXITING *****'"/>
      <exit/>
    </transition>

  </eventprocessor>
</ccxml>



additional links
none


  ANNOTATIONS: EXISTING POSTS
0 posts - click the button below to add a note to this page

login



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