CCXML 1.0-W3C Development Guide Home  |  Frameset Home

  Dialog Extension: x-recordaudio  |  TOC  |  E: Client Side Scripting  

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:

Note: You must escape reserved URI characters used such as the & and # signs.


<?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
ranm
10/30/2010 8:13 AM (EDT)
What would be the right syntax for playing DTMF pound and star with the x-senddtmf extension of the <dialogstart> element (12345p / 12345pound) ?
Is it possible to add longer pauses between digits, like 'p' in the postdial option of vxml transfer?
voxeoJeffK
10/30/2010 8:38 AM (EDT)
Hello,

You should be able to simply use the "*" and "#" characters:

  <dialogstart src="'dtmf://12#345*?pause=500&amp;duration=100'" type="'application/x-senddtmf'"/>

The "pause=500" allows you to specify the delay between each DTMF, and the "duration=100" allows you to set the length of each DTMF signal.

Regards,
Jeff Kustermann
Voxeo Support
SSA_Whispir
12/19/2010 7:50 PM (EST)
Can we add a pause between the DTMFs? like in post-dialing syntax: postd=pp12p3
voxeomlucas
12/20/2010 3:52 AM (EST)
Hi there,

I want to make sure that I am fully understanding what method that you are using for the outbound call so that I can give an accurate response. If you are doing an outbound call and dtmf playback via the VXML transfer element, then you can use the 'p' to indicate a pause while doing postdial dtmf tones:

  <transfer name="MyCall" dest="tel:+12223334444;postd=ppp123"
          bridge="true" connecttimeout="20s" maxtime="60s">

If you are playing back the dtmf tones via a dialogstart using CCXML, then you might wish to review the following snippet from our CCXML docs:


<dialogstart src="'dtmf://'+ pbxExt +'#?pause=200&duration=200'"
                  type="'application/x-senddtmf'"
                  callid="callid_2"
                  name="dialExtDlg_2"/>


I'm hoping that one of these suggestions is close to the mark, but if I am way off course, do clarify the methods that you are using, and I'd be glad to help however I can.

Regards,
Matt Lucas
Voxeo Support

Be sure to check out our latest version of Prophecy.
[url=http://voxeo.com/prophecy]Download Prophecy 10[/url] | [url=http://docs.voxeo.com/prophecy/10.0/home.htm]Prophecy 10 Docs[/url]

login
  Dialog Extension: x-recordaudio  |  TOC  |  E: Client Side Scripting  

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