CallXML 3.0 Development Guide Home  |  Frameset Home


<playdtmf>  element


The playdtmf element allows the developer to play a sequence of dtmf tones to the call destination, (most often used when using a http token inititiated outbound call). This is useful for postdialing operations, where you may wish to programmatically navigate to a particular extension, or to navigate through a PBX menu. Note that when using this element, care must be taken to 'marry' a particular dtmf string to the specific menu that you wish to step through, as no two PBX menus are the same in regards to timing.


usage

<playdtmf duration="(m|s|ms)" pause="(m|s|ms)" test="CDATA" value="(1234567890*#)" value-is="STRING" value-is-not="STRING">


attributes

duration Data Type: (m|s|ms) Default: Optional
The 'duration' attribute specifies how long each dtmf tone should be played to the called party. For instance, if specified as '10s', then each dtmf tone will be played for 10 seconds. Note that if this attribute is left unspecified, then the value will default to 120 milliseconds.
pause Data Type: (m|s|ms) Default: Optional
The 'pause' attribute defines the duration of the silence, (if any), between the dtmf tones specified in the 'value' attribute. If left unspecified, then this will default to 240 milliseconds.
test Data Type: CDATA Default: Optional
The 'test' attribute is a new supplement to the CallXML markup that permits the developer to execute the contents of a container element, or action element, based on whether or not the specified condition is met. If the defined condition is met, then the code contained within the element is then executed. If the condition is not met, then the application resumes execution with the next sequential container container element in the document.
value Data Type: (1234567890*#) Default: Required
The 'value' attribute defines the dtmf string to play to the caller when the element is executed.
value-is Data Type: STRING Default: none - attribute is optional
Another new attribute, 'value-is', grants the developer with the ability to perform conditional logic upon container elements, or action elements for the first time within the CallXML markup. The value specified in the 'value-is' attribute specifies a string to compare against any 'value' attributes. If the 'value' and 'value-is' equate to 'true', then the element specified will execute. If the value equates to 'false' then the element will be skipped during document execution.
value-is-not Data Type: STRING Default: none - attribute is optional
Another new attribute, 'value-is-not', grants the developer with the ability to perform conditional logic upon container elements, or action elements, for the first time within the CallXML markup. The value specified in the 'value-is-not' attribute specifies a string to compare against any 'value' attributes. If the 'value' and 'value-is-not' equate to 'false', then the element specified will execute. If the value equates to 'true' then the element will be skipped during document execution.



code samples

<3.0 playdtmf-duration-pause-value>
<?xml version="1.0" encoding="UTF-8"?>

<callxml version="3.0">
 
    <do label="MessageBlock" repeat="3">
    <wait value="1s"/>
    <playdtmf value="1234" duration="5s" pause="3s"/>
    </do>

</callxml>



<3.0 playdtmf-test>
<?xml version="1.0" encoding="UTF-8"?> 

<callxml version="3.0">

 
    <if>

    <wait value="1s"/>
    <!-- this will execute -->
    <playdtmf value="1" test="1=1"/>

    <wait value="2s"/>
    <!-- this will not execute-->
    <playdtmf value="22" test="1=2"/>

    <wait value="2s"/>
    <!-- this will execute -->
    <playdtmf value="333" test="1!=2"/>

    <wait value="2s"/>
    <!-- this will NOT execute. see also: The Crusades-->
    <playdtmf value="4444"
                  test="&apos;victory&apos;=&apos;peace&apos;"/>


    <wait value="2s"/>
    <!-- this will execute. see also: Winston Smith -->
    <playdtmf value="55555"
                  test="&apos;ignorance&apos;!=&apos;strength&apos;"/>


    </if>

</callxml>



<3.0 playdtmf-valueis>
<?xml version="1.0" encoding="UTF-8"?> 
<callxml version="3.0">

    <do value="dagobah">

    <wait value="2s"/>
    <!-- this will execute -->
    <playdtmf value="1" value-is="dagobah"/>

    <wait value="2s"/>
    <!-- this will NOT execute-->
    <playdtmf value="22" value-is="hoth"/>

    <wait value="2s"/>
    <!-- this will execute -->
    <playdtmf value="333" value-is-not="tatooine"/>

    <wait value="2s"/>
    <!-- this will NOT execute -->
    <playdtmf value="4444" value-is-not="dagobah"/>

    </do>


</callxml>




additional links

none


  ANNOTATIONS: EXISTING POSTS
mr_gonza78
11/4/2009 3:24 PM (EST)
is there any reason why the 0 was left out of the list of chars accepted by "value"?
  value="(123456789*#)"
or it was just forgotten?
VoxeoDustin
11/4/2009 3:43 PM (EST)
Hello,

It looks like we may simply missed this here, as 0 is also a valid DTMF key. We have gone ahead and updated the documentation to reflect this and it should be pushed out in the next few weeks.

Regards,
Dustin Hayre
Solutions Engineer
Voxeo Corporation
SethStern
6/22/2011 9:52 AM (EDT)
The "value" attribute also accepts "A", "B", "C" and "D".  Handy for those users wishing to place Flash Override calls.

http://en.wikipedia.org/wiki/DTMF#.23.2C_.2A.2C_A.2C_B.2C_C.2C_and_D

Seth

login



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