| VoiceXML 2.1 Development Guide | Home | Frameset Home |
| cond | Data Type: CDATA | Default: Optional (true) |
| The cond attribute specifies a Boolean expression, which must equate to ‘true’ in order for the content to be visited and executed. Any standard ECMAScript Boolean value is valid for this attribute. | ||
| count | Data Type: CDATA | Default: Optional |
| The count attribute allows the developer fine grained control over event handling upon multiple event occurrences. When an event is thrown for the first time, the catch element with a count of 1 will be executed. Upon the second instance of the same event, the FIA will look for a catch handler with a count value of 2, if one exists, otherwise, it will simply execute the catch handler with the count of 1 again. | ||
| _event | The _event shadow variable equates to a string specifying the event name that caused the exception, thereby making it available for the developer to log or submit the resultant exception/error to a database, or to save it to another local variable to get an application ‘error report’. |
| _message | The _message shadow variable will equate to the value of any user-defined message that is explicitly thrown. Currently, Voxeo has no platform-defined messages for any standard events, such as error.badfetch or error.semantic, so any caught messages must be user-defined. |
| <?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" xmlns="http://www.w3.org/2001/06/vxml"> <meta name="copyright" content="2005 voxeo corporation"/> <meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/> <form id="F1"> <field name="F_1"> <noinput cond="false" count="1"> <prompt> this handler will never get executed, because the condition is set to false. </prompt> </noinput> <noinput cond="true" count="1"> <prompt> no input count one is successful. </prompt> </noinput> <noinput cond="true" count="2"> <prompt> no input count two is successful. </prompt> </noinput> <grammar xml:lang="en-us" root="TOPLEVEL"> <rule id="TOPLEVEL"> <item> another dummy grammar </item> </rule> </grammar> <prompt> Don't say anything. </prompt> <filled> <prompt> sheesh, cant you keep quiet? </prompt> </filled> </field> </form> </vxml> |
| <?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" xmlns="http://www.w3.org/2001/06/vxml"> <meta name="copyright" content="2012 Voxeo Corporation"/> <meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/> <form id="F1"> <field name="F_1"> <noinput> <prompt> <!-- These will be undefined, as no value is inherently applied --> The message is <value expr="_message"/>. <!-- ********************************************************** --> The event is <value expr="_event"/>. </prompt> </noinput> <grammar xml:lang="en-us" root="TOPLEVEL"> <rule id="TOPLEVEL"> <item> another dummy grammar </item> </rule> </grammar> <prompt> Don't say anything. </prompt> <filled> <prompt> Sheesh, cant you keep quiet? </prompt> </filled> </field> </form> </vxml> |
| ANNOTATIONS: EXISTING POSTS |
manunya
|
|
| I use <goto> in <noinput> element so it can go to the other field if it doesn't receive any input. But it seems like it doesn't recognize it at all. When it receives no input, it keeps repeating the question in <prompt> until it receive an input. What should I do with it? | |
manunya
|
|
| Here is the code
.... <field name="check_country" slot="check_country"> <grammar type="text/gsl" src="main.grammar#NO" /> <prompt bargein="true"> <break strength="small"/>Please say no if this is incorrect. </prompt> <noinput timeout="4s"><goto nextitem="age" /></noinput> <filled mode="any"> <goto nextitem="country" /> </filled> </field> <field name="age" slot="age" type="digits?minlength=1;maxlength=2"> ..... |
|
MattHenry
|
|
| Hello Manunya,
I think that such application-specific questions are better suited for the support forums in the future, as this does not seem to be a documentation related issue. However, I suspect that your problem is occurring as the 'check_country' field is still flagged as executable by the FIA, and as such, we need to flag it so that it cannot be visited upon a noinput event: <noinput timeout="4s"> <assign name="check_country" expr="'noinput_filled'"/> <goto nextitem="age" /> </noinput> Also note, that 'timeout' is not a valid attribute of the <noinput. element. ~Matt |
|
Marquet
|
|
| Hi MattHenry,
i have some doubts about the <noinput> and <goto> tags. First of all, what do I have to do if I want the noinput to wait 10 seconds. I mean, I want the <noinput> to be executed after 10 seconds of "no input". Is it possible that you cannot put a <goto> tag in a <field>?Look at this code: <field name="NoRespuesta"> <script> <![CDATA[ contador++; tipoerror==0; ]]> </script> <prompt bargein= "false">Lo siento, no te he oído.</prompt> <if cond="contador == 2 || contador == 4 || contador == 6"> <goto next="#Repeticion"/> <elseif cond="contador == 3 || contador == 5"/> <goto next="#MenuPrincipal"/> <elseif cond="contador == 7"/> <goto next="#Despedida1"/> </if> </field> This code doesn't work, and when I look at the "trace file" there is an error like this:Element "field" does not allow "goto". Is there any tag with the same function? Thank you, Marc |
|
MattHenry
|
|
|
Hello Marc, Let me help clear your doubts below: "First of all, what do I have to do if I want the noinput to wait 10 seconds. I mean, I want the <noinput> to be executed after 10 seconds of 'no input'. " ** I think you would want to specify a "timeout" property, either at the field, form, or applicaion scope, depending on where you want this setting to apply: <property name="timeout" value="10s"/> ------------------------------------------------------------------------------------- "Is it possible that you cannot put a <goto> tag in a <field>?" **The VXML documentation shows the alloowable parent-child relationships for any given element: http://docs.voxeo.com/voicexml/2.0/goto.htm This being said, I don't see any <goto> elements in your code that are at the field scope at all. I [b]do[/b] see that you have conditional statements, (if/elseif) at the field scope, and these really should be nested within a <filled> element, such as below: <field name="NoRespuesta"> <script> <![CDATA[ contador++; tipoerror==0; ]]> </script> <prompt bargein= "false">Lo siento, no te he oído.</prompt> <filled> <if cond="contador == 2 || contador == 4 || contador == 6"> <goto next="#Repeticion"/> <elseif cond="contador == 3 || contador == 5"/> <goto next="#MenuPrincipal"/> <elseif cond="contador == 7"/> <goto next="#Despedida1"/> </if> </filled> </field> Let me know if this doesnt fix your problems. http://docs.voxeo.com/voicexml/2.0/gettingsupport.htm ~Matthew Henry |
|
lovely
|
|
| Hi,
I want to allow only speech input in my application. I have tried using follwing vxml property. <propery name="inputmodes" value="voice"/> My problem is: ------------- unfortunately if i will give DTMF input during playing prompt,it works fine.suppose if i give DTMF input after playing the prompt call becomes silent. Can anyone please give me the solution for this problem.I need solution as soon as possible. Thanks in advance. |
|
voxeojeff
|
|
| Hi there,
Turning off barge-in should solve the issue for you. This will allow the prompt to complete, uninterrupted by any type of input. <propery name="inputmodes" value="voice"/> <prompt bargein="false"> Say some digits </prompt> Hope this helps, Jeff |
|
lovely
|
|
| Hi Jeff,
Thanks for your response. But my requirement is ,bargein value will be true.Because while playing the prompt itself user can give (say) his input.(only speech not DTMF). <prompt bargein="true"> please give me your customer reference mumber </prompt> the problem here is after playing this prompt unfortunately if i will give input through keypad call becomes silent. I don't know what is the reason..and also i am getting some parameters value like KillPlaybackOnDTMF ="FALSE" like that. So,kindly give me the solution for this problem. Thanks. |
|
mikethompson
|
|
| Hello Lovely,
We cannot proceed much further with this issue unless we see some application debugger logs. Setting inputmodes to voice should completely kill the ability to use DTMF input anywhere in its scope. With the above being said, would you be so kind as to call your application with the application debugger open, then submit the output to us via the "support" tab at the top of the debugger page? We will be happy to take a look at the logs for you and help you resolve the issue. Best, Mike Thompson Voxeo Corporation |
|
mdclements
|
|
| Hi there,
it possible to do somthing like this: ... <var name="repeatCnt" expr="2"/> ... <field ...> ... <noinput count="repeatCnt"> --- assign var in count ?? (causing parse error) .. </noinput> </field> |
|
voxeoshanesmith
|
|
| Hi,
If you are looking to conditionally catch an event handler, you can do so using the catch element. http://www.vxml.org/catch.htm [code]<catch cond="repeatCnt=='2'" event="noinput">[/code] This even will fire only when repeatCnt is 2. I hope this helps. Please let me know if I can be of any further assistance. Regards, Shane Smith Voxeo Corporation Status of Voxeo's Hosted Services: [link=http://status.voxeo.com/]status.voxeo.com/[/link] Prophecy 11 Now Available: [link=http://docs.voxeo.com/prophecy/11.0/home.htm]docs[/link] | [link=http://www.voxeo.com/prophecy/]download[/link] |
|
mdclements
|
|
| hi,
can you tell how i can catch 'filled' event under field. Because when i try no event like filled don't throw. Than i try <throw tag but there i have another problem with <catch cond="something..." ... then <throw> tag cause error thanks |
|
steve.sax
|
|
|
Hi there, Without seeing your code, or your logs its hard to say for sure why you are having difficulties. I'd suggest submitting the required information via an account ticket so that we can provide some help on this for you. https://evolution.voxeo.com/wiki/docs:CollectingInformation Steve Sax |
| login |