| VoiceXML 2.1 Development Guide | Home | Frameset Home |
| accept | Data Type: (approximate|exact) | Default: Optional |
| accept is a w3c compliant attribute that allows the developer to specify whether an exact or an approximate utterance will be considered a valid grammar match for the phrase contianed within the choice element. If set to 'approximate' then the caller is allowed quite a bit of leeway in regards to how exact the utterance must be, while a setting of 'exact' designates more stringent control of what is considered valid. For example, if the grammar value is the string 'david hasselhoffs self integrity', then an utterance of 'hasselhoff' will be considred a valid match if the accept setting is 'approximate', but not if set to 'exact'. | ||
| dtmf | Data Type: CDATA | Default: Optional |
| The value of the dtmf attribute specifies a DTMF key press, or a sequence of key presses, a caller may input to choose the listed option. Using this attribute allows the developer to permit both DTMF and voice as valid input for a particular field option. Please note that when listing a sequence of key presses, whitespace is optional (i.e. dtmf="123" is equivalent to dtmf="1 2 3"). Also, be aware that if you would like to use the '#' key, you must first change the 'termchar' property, as '#' is the default terminating character. | ||
| value | Data Type: CDATA | Default: Optional |
| The value attribute specifies the string to use for the field item return when a user selects a particular option. If not specified, then the dtmf value is returned. | ||
| <?xml version="1.0" encoding="UTF-8"?> <vxml version = "2.1"> <meta name="author" content="Matthew Henry"/> <meta name="copyright" content="2005 voxeo corporation"/> <meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/> <form id="F1"> <field name="F_1"> <prompt> your choices are <break strength="medium"/> press one or say shatner, press two or say nimoy, press three or say terminal geek. </prompt> <option value="william shatner" dtmf="1"> shatner </option> <option value="leonard nimoy" dtmf="2"> nimoy </option> <option value="I still live in my moms basement" dtmf="3"> terminal geek </option> <filled> <prompt> you said <value expr="F_1"/> </prompt> </filled> </field> </form> </vxml> |
| <?xml version="1.0" encoding="UTF-8"?> <vxml version = "2.1"> <meta name="author" content="Matthew Henry"/> <meta name="copyright" content="2005 voxeo corporation"/> <meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/> <form id="F1"> <field name="F_1"> <prompt> your choices are <break strength="medium"/> shatner, nimoy, or terminal geek. </prompt> <option value="william shatner" accept="approximate"> bill shatner or captian kirk </option> <option value="leonard nimoy" accept="approximate"> lennie nimoy or spock </option> <option value="living in my moms basement" accept="exact"> terminal geek </option> <filled> <prompt> you said <value expr="F_1"/> </prompt> </filled> </field> </form> </vxml> |
| ANNOTATIONS: EXISTING POSTS |
safarishane
|
|
| In your description of the dtmf attribute, you specify...
Note that the available values for this attribute are '1-9' for VXML 1.0, with support for the '*' key character in VXML 2.0 But, according to the vxml2.0 spec, you should be able to actually list a sequence for picking the option, not just a single character. Do dtmf sequences work on this platform? |
|
Michael.Book
|
|
| Howdy "eloy_shane,"
You can indeed specify a sequence, like so: ___________________ <option value="william shatner" dtmf="1 2 3"> shatner </option> ___________________ I will let our documentation admin know the error of his ways. Thank you for your valuable feed-back! Have Fun, ~ Michael |
|
safarishane
|
|
| Does it matter if it's space separated between the digits?
|
|
Michael.Book
|
|
| As per the W3C spec, you can do it either way:
<option value="william shatner" dtmf="1 2 3"> ... or <option value="william shatner" dtmf="123"> Best, ~ Michael |
|
safarishane
|
|
| Excellent, thanks... surly this will make a good addition to the docs. | |
yashar
|
|
| hi,
Actually I have a problem with <option>, I'm using <option> to submit some values from my vxml to the php page using : <submit next="myquery.php" method="get" namelist="f2 d1"/> thats fine... I want to add a choice such as <option> EXIT </option> that when user says that it goes to the form1. <option> Good </option> <option> Bad </option> <option> EXIT </option> so i want to submit good or bad if is uttered but i want to move to form1 if "exit" is uttered. I know I can do it with <menu> and <choice> but I dont know how to submit my values if I use <choice> while easily i could use <option> to submit my values to php page. anybody could show me a way that I can use any of <choice> or <option> to perform both that i require? Thank you very much |
|
yashar
|
|
| hi,
Actually I have a problem with <option>, I'm using <option> to submit some values from my vxml to the php page using : <submit next="myquery.php" method="get" namelist="f2 d1"/> thats fine... I want to add a choice such as <option> EXIT </option> that when user says that it goes to the form1. <option> Good </option> <option> Bad </option> <option> EXIT </option> so i want to submit good or bad if is uttered but i want to move to form1 if "exit" is uttered. I know I can do it with <menu> and <choice> but I dont know how to submit my values if I use <choice> while easily i could use <option> to submit my values to php page. anybody could show me a way that I can use any of <choice> or <option> to perform both that i require? Thank you very much |
|
VoxeoDustin
|
|
| Hey Yashar,
You may want to do something like this: <?xml version="1.0" encoding="UTF-8"?> <vxml version = "2.1"> <form id="F1"> <field name="F_1"> <prompt> Say good, bad, or exit. </prompt> <option value="good" dtmf="1"> good </option> <option value="bad" dtmf="2"> bad </option> <option value="exit" dtmf="3"> exit </option> <filled> <if cond="F_1 == 'good'"> <submit next="good.php"/> <elseif cond="F_1 == 'bad'"/> <submit next="bad.php"/> <else/> <goto nextitem="#exit"/> </if> </filled> </field> <block name="exit"> <prompt> O K. Goodbye </prompt> <exit/> </block> </form> </vxml> Cheers, Dustin |
| login |