| 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. | ||
| 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 builtin 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]"> | ||
| 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. | ||
| format | Data Type: URI | Default: none - attribute is optional |
| The 'format' attribute defines the string formatting to use for the element. If the value is undefined, the audio file format should be determined from the file name extension, if possible, and, if necessary, override the default format. | ||
| 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. | ||
| label | Data Type: (navigation identifier) | Default: none - attribute is optional |
| This attribute designates the unique inter-document identifier of the parent element in question, and allows an easy way to navigate through applications as a destination 'anchor', as used in goto references | ||
| 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. | ||
| next | Data Type: (navigation identifier) | Default: none - attribute is optional |
| The 'next' attribute sets the URL the CallXML platform will go to when the container ends. | ||
| repeat | Data Type: (numeric value) | Default: 1 |
| The value for the repeat attribute indicates the number of times to execute the content contained by the parent element. If this attribute is explicitly specified, this must be a valid number, or an error will result. Also note that if the value is zero the content will be skipped. | ||
| say | Data Type: STRING | Default: none - attribute is optional |
| The 'say' attribute allows the developer to specify backup TTS to be output in the event that the .wav file cannot be found. | ||
| 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: 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 label="B1"> <prompt> Lets navigate to a menu, shall we? </prompt> <goto value="#M_1"/> </do> <menu label="M_1" value="EnterSomething.wav" choices="1"> <on event="choice:1"> <say> You must have pressed DTMF 1 to get here. </say> </on> </menu> </callxml> |
| <?xml version="1.0" encoding="UTF-8"?> <callxml version="3.0"> <do label="D1"> <prompt> Lets navigate to a menu, shall we? Note that if we dont enter any digits, then the wav file will repeat 3 times. </prompt> <goto value="#M_1"/> </do> <menu label="M_1" value="EnterSomething.wav" choices="1" repeat="3" cache="yes"/> <on event="choice:1"> <say> You must have pressed DTMF 1 to get here. </say> </on> </callxml> |
| <?xml version="1.0" encoding="UTF-8"?> <callxml version="3.0"> <menu label="menu" value="entersomething.wav" termdigits="123"> <on event="choice:1" next="#key1"/> <on event="choice:2" next="#key2"/> <on event="choice:3" next="#key3"/> </menu> <do label="key1"> <prompt> you pressed 1 </prompt> <exit/> </do> <do label="key2"> <prompt> you pressed 2 </prompt> <exit/> </do> <do label="key2"> <prompt> you pressed 3 </prompt> <exit/> </do> </callxml> |
| <?xml version="1.0" encoding="UTF-8"?> <callxml version="3.0"> <do> <menu label="menu" value="enter.wav" choices="1,2" id="menu_A" maxtime="5s" text="press one here. or dont."/> <menu label="menu" value="enter.wav" choices="1,2" id="menu_B" maxtime="5s" text="press two here"/> <on event="choice:1" target="menu_A"> <log>*** TARGETED 1 ***</log> <prompt> you pressed one, in menu A. </prompt> </on> <on event="choice:1"> <log>*** NON-TARGETED 1 ***</log> <prompt> you pressed one in a non specific menu. </prompt> </on> <on event="choice:2" target="menu_B"> <log>*** TARGETED 2 ***</log> <prompt> you pressed two, in menu B. </prompt> </on> <on event="choice:2"> <log>*** NON-TARGETED 2 ***</log> <prompt> you pressed two in a non specific menu. </prompt> </on> </do> </callxml> |
| <?xml version="1.0" encoding="UTF-8"?> <callxml version="3.0"> <do label="main" value="slappy"> <!-- this will not be executed, as 'slappy' is NOT equal to 'pappy' --> <menu label="menu" value="enter.wav" choices="#" maxtime="5s" value-is="pappy"/> <!-- this will not be executed, as 'slappy' IS equal to 'slappy' --> <menu label="menu" value="enter.wav" choices="#" maxtime="5s" value-is-not="slappy"/> <!-- this will be executed, as 'sappy' is NOT equal to 'slappy' --> <menu label="menu" value="entersomething.wav" choices="123" maxtime="5s" value-is-not="sappy"> <on event="choice:1" next="#key1"/> <on event="choice:2" next="#key2"/> <on event="choice:3" next="#key3"/> </menu> </do> <block label="key1"> <prompt> you pressed 1 </prompt> <exit/> </block> <block label="key2"> <prompt> you pressed 2 </prompt> <exit/> </block> <block label="key3"> <prompt> you pressed 3 </prompt> <exit/> </block> </callxml> |
| <?xml version="1.0" encoding="UTF-8"?> <callxml version="3.0"> <do label="main" value="slappy"> <!-- this will not be executed, as 'slappy' is NOT equal to 'pappy' --> <menu label="menu" value="enter.wav" choices="#" maxtime="5s" test="'slappy' = 'pappy'"/> <!-- this will not be executed, as 'slappy' IS equal to 'slappy' --> <menu label="menu" value="enter.wav" choices="#" maxtime="5s" test="'slappy' = 'slappy'"/> <!-- this will be executed, as 'sappy' is NOT equal to 'slappy' --> <menu label="menu" value="entersomething.wav" choices="123" maxtime="5s" test="'sappy' != 'slappy'"> <on event="choice:1" next="#key1"/> <on event="choice:2" next="#key2"/> <on event="choice:3" next="#key3"/> </menu> </do> <block label="key1"> <prompt> you pressed 1 </prompt> <exit/> </block> <block label="key2"> <prompt> you pressed 2 </prompt> <exit/> </block> <block label="key3"> <prompt> you pressed 3 </prompt> <exit/> </block> </callxml> |
| ANNOTATIONS: EXISTING POSTS |
| login |