CallXML 3.0 Development GuideHome  |  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="(123456789*#)" value-is="STRING" value-is-not="STRING">


attributes
durationData 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.
pauseData 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.
testData Type: CDATADefault: 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.
valueData Type: (123456789*#)Default: Required
The 'value' attribute defines the dtmf string to play to the caller when the element is executed.
value-isData Type: STRINGDefault: 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-notData Type: STRINGDefault: 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
0 posts - click the button below to add a note to this page

login



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