CCXML 1.0-W3C Development GuideHome  |  Frameset Home

  Dialog Extension: x-fetchdigits  |  TOC  |  Dialog Extension: x-recordaudio  

Dialog extension: "x-senddtmf"

This dialog type simply plays DTMF tones to the caller.  Like the other dialog extensions, the pertinent information is passed in through the src attribute of the <dialogstart> element. There are also two additional parameters that we may use with this extension:


A fully realized test case that illustrates this in action is listed below for reference:


<?xml version="1.0" encoding="UTF-8"?>
<ccxml version="1.0" xmlns:voxeo="http://community.voxeo.com/xmlns/ccxml">

  <meta name="author" content="Jeff Menkel"/>
  <meta name="copyright" content="2007 Voxeo Corporation"/>
  <meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/>

  <var name="initState" expr="'state_1'"/>
  <var name="MyCallID"/>

  <eventprocessor statevariable="initState">

    <transition event="connection.alerting" state="state_1">
      <assign name="MyCallID" expr="event$.connectionid"/>
      <send data="'MyEvent'" target="session.id"/>
    </transition>

    <transition event="MyEvent">
        <accept connectionid="MyCallID"/>   
    </transition>

    <transition event="connection.connected" state="state_1">
      <log expr="'***** CALL WAS ANSWERED *****'"/>
      <dialogstart src="'dtmf://12345?pause=200&amp;duration=100'" type="'application/x-senddtmf'"/>
    </transition>

    <transition event="error.dialog.notstarted'" state="state_1">
        <log expr="'****** ERROR.DIALOGNOTSTARTED.NAME = ' + event$.name"/>
    </transition>

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

  </eventprocessor>
</ccxml>


Be aware that the DTMF formatting scheme is absolutely mandatory. The actual digits to output will be played in the order indicated in the URL path, (the above example would play out as 'dtmf-1, dtmf-2, dtmf-3, dtmf-4, dtmf-5' to the caller). DTMF playback will only introduce problems if the URL is improperly formatted.


Note that you may also download the complete code for testing by clicking here. Copy and paste is SO last-century....




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

login
  Dialog Extension: x-fetchdigits  |  TOC  |  Dialog Extension: x-recordaudio  

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