| CallXML 3.0 Development Guide | Home | Frameset Home |
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.| 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: (123456789*#) | 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. | ||
| <?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> |
| <?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="'victory'='peace'"/> <wait value="2s"/> <!-- this will execute. see also: Winston Smith --> <playdtmf value="55555" test="'ignorance'!='strength'"/> </if> </callxml> |
| <?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> |
| ANNOTATIONS: EXISTING POSTS |
| login |