| 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"> <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"> <nomatch cond="false" count="1"> <prompt> this handler will never get executed because the condition is set to false. </prompt> </nomatch> <nomatch cond="true" count="1"> <prompt> no match count one is successful. </prompt> </nomatch> <nomatch cond="true" count="2"> <prompt> no match count two is successful. </prompt> </nomatch> <grammar type="text/gsl">[(nhdkghynsma)]</grammar> <prompt> say anything here. </prompt> <filled> <prompt>you must be from the planet Neptune to pronounce that.</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"> <nomatch> <prompt> <!-- These will be undefined, as no value is inherently applied --> The message is <value expr="_message"/>. <!-- ********************************************************** --> The event is <value expr="_event"/>. </prompt> </nomatch> <grammar type="text/gsl">[(nhdkghynsma)]</grammar> <prompt> say anything here. </prompt> <filled> <prompt>you must be from the planet Neptune to pronounce that.</prompt> </filled> </field> </form> </vxml> |
| ANNOTATIONS: EXISTING POSTS |
safarishane
|
|
| Short of setting my minimum confidence to 0, and dynamically deciding whether the score is indeed high enough to be considered at match....
Is there any way when the <nomatch> event handler is triggered to tell if the rejected input was voice or dtmf? The lastresult.inputmode shadow variable isn't available until you hit filled. Thanks, Shane |
|
MattHenry
|
|
|
At present, OOGNI events aren't populated with the lastresult array on our platforms, (voice center 5.5, and 6.0). We have had a smattering of requests to enable this feature in the past, but not really enough to warrant the engineering effort required to deploy this as a feature. Of course, if this is mission-critical for any of our production customers, we can always make an exception. =) ~Matthew Henry |
|
ashwani_c
|
|
| Can i have a count greater than 2 in my applications? | |
voxeojeff
|
|
| Hi ashwani,
Yes, you absolutely can have a count greater than 2 in your application. I don't believe that there is a limit for x, here: <nomatch count="x">. Hope this helps, Jeff |
|
chuchoomar
|
|
| the variable _message and the variable _event are a default message?........in fact the question is.... the sistem said automatically an standard message?......so if is true....then can i use oyher language in the message or it is a standar message in english? | |
voxeoblehn
|
|
| Hello,
The shadow variables _event & _message are both user defined and not specified by default. The variable _event would be used if we were looking to log or report out an event which we are looking to catch. Example can be found here: http://docs.voxeo.com/voicexml/2.0/nomatch.htm The variable _message would particularly be used alongside a <throw> event in which we want to include a descriptive message along with the event that is being thrown. Example can be found here: http://docs.voxeo.com/voicexml/2.0/throw.htm As for the question of language, you can specify any language that we support in your nomatch prompt tag. Although, you must be working on a multi-language platform. For example, if our header code looked like the following: <?xml version="1.0" encoding="UTF-8"?> <vxml version="2.0" xml:lang="es-es"> The default nomatch prompt would be read back to us in Spanish. But if we felt like having our nomatch prompts read back to our users in french we would change the lang on the prompt of our nomatch statements, for example: <prompt bargein="false" xml:lang="fr-fr"> Hope this helps! Best Regards, Brian Lehnen Voxeo Support |
|
chuchoomar
|
|
|
hello i can do it? <catch event="nomatch noinput" count="3"> <prompt>Security violation!</prompt> <submit next="http://www.example.com/apprehend_felon.vxml"> namelist="user_id"/> </catch> i need a noimput and a nomatch input that only arrived to 3......in fact that the sistem only support 3 errores and after the hang up the call.......the question is about the count?....is right with that count in 3?....... in oother question i can use the element <nomatch> and not in a catch elemente...for instance: <field name="color"> <prompt>Please say a primary color</prompt> <grammar type="application/srgs">red | yellow | blue</grammar> <nomatch> ASI <throw event="event.foo"/> ASI </nomatch> ASI </field> </form> </vxml> THAT IS RIGHT? if no ..please could you give an example |
|
VoxeoDustin
|
|
| Hey,
If I'm understanding your question correctly, that is correct. With 'count="3"', the nomatch/noinput handler will only be caught after 3 of those events have occurred. Thanks, Dustin |
|
sdarja
|
|
| In my vxml audio file is playing. When # is received during playing, playing is stoped. Problem I can not solve is that any other DTMF key must not stop playing audio file.
Here is my example: <?xml version="1.0" encoding="UTF-8"?> <vxml version="2.0"> <form> <field name="choice"> <property name="timeout" value="1ms"/> <audio src="Audio/music1"/> <property name="char" value=""/> <dtmf> # </dtmf> <nomatch> <exit/> </nomatch> <noinput> <exit/> </noinput> </field> <block> <if cond="choice == '#'"> <exit/> </if> </block> </form> </vxml> Can you help me please? Thanks, Darja |
|
VoxeoDustin
|
|
| Hey Darja,
I noticed a couple issues with your code, particularly that the <dtmf> tag is no longer supported and <property name="char" should actually be <property name="termchar". I have made a few changes to your code below to correct these issues and enable bargein in the manner that you wish, by enabling the hotword bargeintype. I also replaced the final block with a <filled> element inside the field. <?xml version="1.0" encoding="UTF-8"?> <vxml version="2.0"> <property name="termchar" value="abc"/> <form> <field name="choice"> <grammar type="application/grammar+xml" root="MAIN" mode="dtmf"> <rule id="MAIN"> # </rule> </grammar> <prompt bargein="true" bargeintype="hotword"> <audio src="myaudio.wav"/> </prompt> <nomatch> <exit/> </nomatch> <noinput> <exit/> </noinput> <filled> <if cond="choice == '#'"> <exit/> </if> </filled> </field> </form> </vxml> Give this a try and let me know if you have any further questions. Cheers, Dustin |
|
sdarja
|
|
| Hello, thank you for your quick response. It does not work. It repeates .wav file and can not be interupted with any key.
Have you another idea? Thank you for your support, Darja |
|
sdarja
|
|
| I saw, that in my version of vxml does not support grammar type. Probably that is why does not work. I need another way of solution.
Thanks, Darja |
|
voxeoJeffK
|
|
| Hi Darja,
What version of VXML are you using? And Voxeo supports grXML grammars. Are you using a different voice browser? Jeff K. |
|
sdarja
|
|
| It is W3C VoiceXML 2.0, but in limited edition. Unfortunately I can do nothing regarding that. My limitations are media switch and its interpreter. Does not support prompt (bargein, bargeintype, timeout) and grammar (type).
I do not know how to proceed. You do a great job and I learned a lot. Darja |
|
MattHenry
|
|
|
Hello Darja, I am not certain specifically what VXML platform that you are using, and as such, we can only guess as to what is and isn't supported. If your platform does support GSL grammars, then you may use the following as a basis for a grammar that accepts the input that you are looking for: <dtmf>[dtmf-pound]</dtmf> OR: <dtmf>[dtmf-#]</dtmf> OR: <dtmf>[#]</dtmf> Regarding the issue of bargein, I can't really offer too much help, as I don't know what your platform does, and doesn't support. If it helps, I would advise that you check your platform documentation to see if hotwording is supported in any capacity, possibly by way of a <property> setting. Hope this helps, ~Matthew Henry |
| login |