| CallXML 3.0 Development Guide | Home | Frameset Home |
| cleardigits | Data Type: (true|false) | Default: none - attribute is optional |
| 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. | ||
| 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. | ||
| includetermdigit | Data Type: (true|false) | Default: none - attribute is optional |
| This attribute defines whether the terminating digit should be included with the collected digit string. A value of 'true' indicates that the terminating digit will be appended to the string, and 'false' will ensure that the terminating digit pressed by the caller will not be included in the string. | ||
| maxdigits | Data Type: (numeric value) | Default: none - attribute is optional |
| This attribute denoted the maximum number of digits to collect from the caller. When the maximum amount of digits has been reached, application execution will resume from within the <onmaxdigits> handler, if present. | ||
| maxsilence | Data Type: (m|s|ms) | Default: 5s |
| This attribute specifies the maximum time to wait between keypresses before a executing any repeat actions, if specified. The time string format is: <numeric value>[<optional qualifier>] | nolimit The string begins with a required numeric value. The valid qualifiers are:
Example: "45m 33s 117ms" Note that if no qualifier is specified, an "s" qualifier is assumed. No combinations of qualifiers are allowed. If there is a need to specify an unlimited amount of time, simply use the key word "nolimit". | ||
| maxtime | Data Type: (m|s|ms) | Default: 30s |
| The maxtime attribute indicates the maximum time that the CallXML browser should wait for digits before executing any repeat instances, if present. | ||
| 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-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. | ||
| var | Data Type: (variable name) | Default: none - attribute is required |
| This defines the variable name in which to store the digits collected. Not specifying a value for this attribute will cause a fatal application error. | ||
| <?xml version="1.0" encoding="UTF-8"?> <callxml version="3.0"> <do label="B1"> <prompt> Press any number, followed by the pound key. </prompt> <getdigits var="Var_1" termdigits="#" includetermdigit="true"/> <on event="termdigit:#"> <say> You must have pressed $Var_1; </say> </on> </do> </callxml> |
| <?xml version="1.0" encoding="UTF-8"?> <callxml version="3.0"> <do label="B1"> <prompt> Start pressing digits until max time is reached </prompt> <getdigits var="Var_1" maxtime="3s"/> <on event="maxtime"> <say> You managed to press $Var_1; in the 3 seconds we allowed you to input keypresses. </say> </on> </do> </callxml> |
| <?xml version="1.0" encoding="UTF-8"?> <callxml version="3.0"> <do label="B1"> <prompt> Start pressing digits until we hit max digits. Or, dont press any digits, and we will hit a max silence event. </prompt> <getdigits var="Var_1" maxsilence="2s" maxdigits="5"/> <on event="maxdigits"> <say> You must have pressed a total of five digits, which were $Var_1; </say> </on> <on event="maxsilence"> <prompt> You must have stopped pressing keys for at least two seconds. </prompt> </on> </do> </callxml> |
| <?xml version="1.0" encoding="UTF-8"?> <callxml version="3.0"> <do label="B1" value="chocolate"> <prompt> give me a string of 5 digits please. </prompt> <!-- neither of these will execute --> <getdigits var="Var_1" maxdigits="5" value-is="vanilla"/> <getdigits var="Var_2" maxdigits="1" value-is-not="chocolate"/> <!-- this however, will execute --> <getdigits var="Var_3" maxdigits="1" value-is="chocolate"/> <!-- as would this, if we were to uncomment it --> <!-- <getdigits var="Var_4" maxdigits="1" value-is-not="strawberry"/> --> <on event="maxdigits"> <say> You must have pressed a total of five digits, which were $Var_3; </say> </on> <do> </callxml> |
| <?xml version="1.0" encoding="UTF-8"?> <callxml version="3.0"> <do label="B1"> <prompt> give me a string of 5 digits please. </prompt> <!-- neither of these will execute --> <getdigits var="Var_1" maxdigits="5" test="1 = 2"/> <getdigits var="Var_2" maxdigits="1" test="'foo' != 'foo'"/> <!-- this however, will execute --> <getdigits var="Var_3" maxdigits="1" test="'money' != 'charm'"/> <!-- as would this, if we were to uncomment it --> <!-- <getdigits var="Var_4" maxdigits="1" test="'echo' = 'echo'"/> --> <on event="maxdigits"> <say> You must have pressed a total of five digits, which were $Var_3; </say> </on> <do> </callxml> |
| <?xml version="1.0" encoding="UTF-8" ?> <callxml version="3.0"> <do label="D1"> <prompt value="enter three digits here for fun and profit"/> <getdigits var="V1" termdigits="#" maxdigits="3" id="GD1"/> <on event="maxdigits" target="GD652"> <log>*** maxdigits detected in GD652***</log> <say> this is never, ever going to occur. </say> </on> <on event="maxdigits" target="GD1"> <log>*** maxdigits detected in GD1***</log> <say> you pressed $V1; </say> </on> </do> </callxml> |
| ANNOTATIONS: EXISTING POSTS |
F9calltrack
|
|
| Seems
<prompt> Press any number, followed by the pound key. </prompt> Should be <prompt> <say>Press any number, followed by the pound key.</say> </prompt> OR <prompt value="Press any number, followed by the pound key."> </prompt> |
|
voxeojeff
|
|
| Hello,
You are correct. This is something that we will need to edit in our documentation. I have already alerted our documentation gurus to this fact, and it will be changed during the next documetation update. :-) Regards, Jeff Menkel Voxeo Corporation |
| login |