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.
<dialogterminate>  element

When any VXML dialog has completed, best practices dictate that it should be 'torn down', (or, more properly, 'destroyed'). This is accomplished by using the <dialogterminate> element. When this tag is encountered and executed, a 'dialog.exit' event is returned to the CCXML layer of the application.

Note that if a dialogterminate request cannot be executed if the launched dialog is not yet in a ready state to receive it and act upon it. If this happens, a 'error.dialog.wrongstate' event will be thrown.

Also be aware that when the CCXML application does a <dialogterminate>, the VXML dialog can return data to the CCXML application using the VoiceXML <exit namelist> element, (inherantly throwing a 'dialog.exit event').



usage
<dialogterminate dialogid="(ECMAScript Expression)" immediate="(true|false)">


attributes
dialogidData Type: (ECMAScript Expression)Default: none - attribute is required
The dialogid attribute specifies a character string identifying the dialog. This dialogid will have been generated by <dialogstart> and stored in the ECMAScript variable identified by the "dialogid" attribute.
immediateData Type: (true|false)Default: False
Set to "true" or "false" to specify if the dialog is immediately terminated.



parents
none


children
none


code samples
<Dialogterminate dialogid> sample
<?xml version="1.0" encoding="UTF-8" ?>
<ccxml version="1.0">

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

  <eventhandler statevariable="state0">
    <transition state="'init'" event="connection.CONNECTION_ALERTING" name="evt">
      <var name="callid_IN" expr="evt.callid"/>
      <accept/>
    </transition>

    <transition state="'init'" event="connection.CONNECTION_CONNECTED" name="evt">
      <dialogstart type="'application/xml+vxml'"
                  src="'HoldMusic.vxml'"
                  dialogid="holdMusicDlg"
                  callid="callid_IN"/>
      <send event="'stopHoldMusic'" target="session.id" delay="'10000'"/>
    </transition>   
   
    <transition state="'init'" event="user.stopHoldMusic" name="evt">
<!-- ************** TERMINATE HOLD MUSIC DIALOG *************** -->
      <dialogterminate dialogid="holdMusicDlg"/>
    </transition>

    <transition event="dialog.exit" name="evt">
      <log expr="'DIALOG EXIT REACHED'"/>
      <exit/>
    </transition>
   
<!-- ****************** GENERAL EXCEPTIONS ******************** -->
    <transition event="call.CALL_INVALID">
      <exit/>
    </transition>

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

</ccxml>

<HoldMusic.vxml>
<?xml version="1.0" encoding="UTF-8" ?>
<vxml version="2.0">

<form id="form1">
  <block>
    <prompt bargein="false">
      I dont want to work. 
      I just want to bang on the ukelele daily.
      I dont want to play.
      I just want to bang on the ukelele daily.
    </prompt>
    <goto next="#form1"/>
  </block>
</form>

</vxml>




additional links
W3C Specification


  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