| CallXML 3.0 Development Guide | Home | Frameset Home |
| choices | Data Type: (grammar value) | Default: Optional |
The 'choices' attribute defines a list of comma delimited voice recognition utterances that will be active for the container element. Alternatively, the attribute can contain a choice followed parantheses containing different words which equate to that choice. Note that both dtmf grammars, and spoken word grammar utterances can be defined; digit values always indicate dtmf input, whereas spelled 'literals' for numbers imply that the grammar must be spoken:One can also define multiple matches to return the same value to the application by specifying the values in the following format: ContainerElementName choices="ReturnValue (subchoice1, subchoice2)">As such, either of the 'subchoice' utterances will be interpreted as 'ReturnValue'. To illustrate in greater detail: <say choices="Beatles (john, paul, ringo, george),Lastly, developers can also make use of a built in number grammar for capturing a string of digit values by specifying [x DIGITS], where 'x' is the length of the string that you wish to collect: <block choices="[5 DIGITS]"> This can also be modified to accept input of varying lengths by specifying [x-y DIGITS], where 'x' and 'y' are the minimum and maximum values for the length of the string being collected: <block choices="[5-8 DIGITS]"> Note: You must add <assign var="settings.choices.completetimeout" value="10000ms"/> to set the wait time for variable digits. 10000ms=10s wait | ||
| 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: (m|s|ms) | Default: none - attribute is required |
| 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". | ||
| 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="Preparing to demonstrate the wait element. You will be able to press the star key at any time to stop waiting."/> <wait value="nolimit" choices="*"/> <on event="choice:*"> <prompt value="The wait is now over, my little love bucket. You are free to go about your bidness"/> </on> </do> </callxml> |
| <?xml version="1.0" encoding="UTF-8"?>
<callxml version="3.0"> <do> <prompt value="Preparing to"/> <!-- this will NOT execute, as 1 is not equal to 2 --> <wait value="60s" test="1 = 2"/> <prompt value="demonstrate"/> <!-- this will NOT execute, as foo is equal to foo --> <wait value="90s" test="'foo' != 'foo'"/> <prompt value="the wait"/> <!-- this will execute, as zappa is equal to zappa --> <wait value="5s" test="'zappa' = 'zappa'"/> <prompt value="element"/> </do> </callxml> |
| ANNOTATIONS: EXISTING POSTS |
SethStern
|
|
| Can a <wait> be interrupted by an (external) event? For example:
<do label="DoNothing"> <!-- Wait for an external event to end this session. --> <wait value="29s"/> </do> <on event="externalevent:done"> <!-- The callback completed. Log the status and exit. --> <assign var="FinalStatus" value="..."/> <goto cache="no" method="post" value="someurl"/> </on> Seth |
|
voxeoadam
|
|
| Hello,
The beauty of external events is that they are asynchronous, meaning they will interrupt whatever is currently being executed in the application. Simply create an external event in the current session called whatever you want. Something like, "gameover" would suffice. Whenever you want to interrupt the <wait>, simply do a send event with the value of "gameover". The current session will immediately pickup this event and do whatever you have specified in that event handler. In the meantime, if there is any other questions that we can further help just feel free to let us know. Regards Adam Kong Voxeo Support [url=http://www.voxeo.com/summit2011/] [img=http://evolution.voxeo.com/images/summit2011footer.jpg/] [/url] [b][color=blue]Join us October 10-12 in Orlando for Customer Summit 2011[/color][/b] [b][url=http://www.voxeo.com/summit2011/]REGISTER NOW![/url][/b] |
| login |