| CallXML 3.0 Development Guide | Home | Frameset Home |
| cache | Data Type: (yes|no) | Default: none - attribute is optional |
| Allows manual override over the caching mechanism. If this attribute is empty the default system caching is used. "yes" should force the system to use the cache all the time, "no" means that no cache should be used at all. | ||
| cleardigits | Data Type: (true|false) | Default: false |
| This attribute's value is a Boolean, indicating whether the queued digits buffer should be cleared when this action starts. "true" clears the digits buffer; "false" leaves the contents of the digit buffer alone. | ||
| format | Data Type: ddmmyyyyhhnn | Default: Optional (ddmmyyyyhhnn) |
| The 'format' attribute defines the string formatting to use for the <play> element. Note that only the following format values are allowed: | ||
| id | Data Type: (element id) | Default: none - attribute is optional |
The new 'id' attribute in CallXML3.0 is applicable to all container and action elements. Specifying this attribute allows yet another level of control and event handling when events occur and are caught by the <on> element. When an event occurs, the handler will first check the event, and then verify that the handler has a handler specific to the 'id' attribute to execute. This allows the developer to plan a specific course of action for events based on where in the application that they occur. | ||
| termdigits | Data Type: (123456789*#|ABCD) | Default: none - attribute is optional |
| This attribute holds the list of touch-tone digits which can terminate the current caller action. Note that for each termdigit specified, there should be an <ontermdigit> handler in the code to catch the event. Allowable values are any one of "012356789*#", the ordinary DTMF (Touch-Tone) keypad possibilities, plus the special keypad tones found on some telephones "ABCD". | ||
| 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: string - URI | Default: none - attribute is required |
| The 'value' attribute defines the audio file to play to the caller when the parent element is first entered. | ||
| 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> <prompt value="The dates are"/> <!-- day month year hour minutes --> <playdate format="ddmmyyyyhhnn" value="180519700612" choices="#"/> <!-- day month --> <playdate format="ddmm" value="1805" choices="#"/> <!-- hour minutes --> <playdate format="hhnn" value="0732" choices="#"/> <!-- month day year --> <playdate format="ddmmyyyy" value="18051970" choices="#"/> <!-- month day --> <playdate format="ddmm" value="1805" choices="#"/> <on event="choice:#"> <prompt value="You must have pressed the pound key"/> </on> </do> </callxml> |
| <?xml version="1.0" encoding="UTF-8"?>
<callxml version="3.0"> <do> <prompt value="The dates are"/> <!-- this will play --> <playdate format="ddmmyyyyhhnn" value="180519700612" choices="#" id="PD1" test="1=1"/> <!-- this will NOT play --> <playdate format="ddmmyyyyhhnn" value="190519700612" choices="#" id="PD2" test="1=2"/> <!-- this will play --> <playdate format="ddmmyyyyhhnn" value="200519700612" choices="#" id="PD3" test="'foo' = 'foo'"/> <!-- this will NOT play --> <playdate format="ddmmyyyyhhnn" value="210519700612" choices="#" id="PD4" test="'foo' = 'bar'"/> <!-- this will play --> <playdate format="ddmmyyyyhhnn" value="220519700612" choices="#" id="PD5" test="1!=2"/> <!-- this will play --> <playdate format="ddmmyyyyhhnn" value="240519700612" choices="#" id="PD6" test="'vanilla'!='chocolate'"/> <on event="choice:#" target="PD1"> <prompt value="You must have pressed the pound key when the playdate ID PD 1 was executing"/> </on> <on event="choice:#" target="PD3"> <prompt value="You must have pressed the pound key when the playdate ID PD3 was executing"/> </on> <on event="choice:#" target="PD5"> <prompt value="You must have pressed the pound key when the playdate ID PD 5 was executing"/> </on> <on event="choice:#" target="PD6"> <prompt value="You must have pressed the pound key when the playdate ID PD 6 was executing"/> </on> </do> </callxml> |
| <?xml version="1.0" encoding="UTF-8"?>
<callxml version="3.0"> <do value="2000"> <prompt value="The dates are"/> <!-- this will play --> <playdate format="ddmmyyyyhhnn" value="010120001200" termdigits="#" value-is="2000"/> <!-- this will NOT play --> <playdate format="ddmmyyyyhhnn" value="010120000100" termdigits="#" value-is="2001"/> <!-- this will play --> <playdate format="ddmmyyyyhhnn" value="010120000200" termdigits="#" value-is-not="2010"/> <!-- this will NOT play --> <playdate format="ddmmyyyyhhnn" value="010120000300" termdigits="#" value-is-not="2000"/> </do> </callxml> |
| ANNOTATIONS: EXISTING POSTS |
jpw
|
|
| can you add to the last example an example of an <on> the handler for termdigits? can't seem to find one on any of the elements where termdigits is permitted, but I know I saw an example of handling it somewhere (maybe the forums)... | |
VoxeoDustin
|
|
| The first example incorrectly uses the 'choices' attribute instead of 'termdigit'
Below is a corrected sample that utilizes termdigit: <?xml version="1.0" encoding="UTF-8"?> <callxml version="3.0"> <do> <prompt value="The dates are"/> <!-- day month year hour minutes --> <playdate format="ddmmyyyyhhnn" value="180519700612" termdigit="#"/> <!-- day month --> <playdate format="ddmm" value="1805" termdigit="#"/> <!-- hour minutes --> <playdate format="hhnn" value="0732" termdigit="#"/> <!-- month day year --> <playdate format="ddmmyyyy" value="18051970" termdigit="#"/> <!-- month day --> <playdate format="ddmm" value="1805" termdigit="#"/> <on event="termdigit:#"> <prompt value="You must have pressed the pound key"/> </on> </do> </callxml> |
| login |