| 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="2012 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 xml:lang="en-us" root="TOPLEVEL"> <rule id="TOPLEVEL"> <item>ladskfjhbalskjd </item> </rule> </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" 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"> <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 xml:lang="en-us" root="TOPLEVEL"> <rule id="TOPLEVEL"> <item>ladskfjhbalskjd </item> </rule> </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 |
|
chakri.950
|
|
| <form id="Welcome">
<field name="languageSel" type="digits"> <prompt> Enter your option. </prompt> <filled mode="any" namelist="languageSel"> <value expr="languageSel"/> <if cond="languageSel == 1"> <prompt> You Entered value is two. </prompt> <else/> Invalid entry entry </if> <clear namelist="languageSel"/> </filled> <noinput> <prompt> This field is required. </prompt> <clear namelist="languageSel"/> </noinput> <nomatch> <prompt> Invalid Response. </prompt> <clear namelist="languageSel"/> </nomatch> </field> </form> Explanation: 1. As a first input(invalid) I am entering 78*8 It is giving Invalid response 2. As a second input(valid) I am pressing 1 it is saying "Invalid entry entry" and the value it is taking as "78"(which is previously pressed). Issue is that even after clearing the field value we are having the previous entered value in case "number followed by star". |
|
MattHenry
|
|
|
Chakri, Allow me to address each question/comment sequentially: * 1. As a first input(invalid) I am entering 78*8 It is giving Invalid response Matt: Note that per the spec, the builtin field type for "digits" doesn't accept the "*" character: http://www.w3.org/TR/voicexml20/#dmlABuiltins "Valid spoken or DTMF inputs include one or more digits, 0 through 9. The result is a string of digits." Should you wish to capture the start character, you nhave one of two options: a) Use the built-in grammar type for "number" instead b) Construct your own customized grammar for accepting digit input with "*" specified as a valid entry: you can leverage the downloadable grammar in our library as a starting point: http://docs.voxeo.com/opensource/numbers2sixteen.grammar * 2. As a second input(valid) I am pressing 1 it is saying "Invalid entry entry" and the value it is taking as "78"(which is previously pressed). Matt: I am unable to reproduce this in any capacity. In my own testing, pressing "1" when prompted executes this section of your code: <if cond="languageSel == 1"> <prompt> You Entered value is two. </prompt> * Issue is that even after clearing the field value we are having the previous entered value in case "number followed by star". Matt: I am unable to reproduce this in any capacity as well. If I dial the application, press "3", then let it clear the field variable, the value is not retained in any capacity: You may wish to check the cache headers for your document to be sure that we are fetching non-cached content as opposed to an older version of the code. ~Matt |
|
chakri.950
|
|
|
Thank you mat for your suggestions. Actually we are not required to capture the star value. Only issue we are facing is that 1. 67*8 it is giving invalid response as EXPECTED. 2. 1# is Entered then it is saying that you entered 67. 3. If again 1# is pressed then it is considering as valid input. If we are giving 3# value it is executing sucessfully and even if *76 is also pressed it is sucessfully executing. We excuted the code what i have posted in VOXEO; but i am getting the error what is stated above. Could you please execute the code as it is and could you please advice us. |
|
voxeo_chris
|
|
| Hello again,
I have taken the code in question and executed it on our side and I am unfortunately unable to recreate this error. Just to be extremely clear, I called into the application, entered the value 67*8 and received the following error: [code] Invalid entry entryEnter your option. [/code] I then entered 1# and received the prompt "You Entered value is two". Entering 1# again received the same result. What I would invite you to do is to recreate this error with the debugger running, copy the logs into a .log folder, then open a new private support ticket (to avoid others from seeing the logs) and attach the logs for our review. This will allow us to see the error being recreated on your side and help us advise you on what you will need to fix this error. Also, when you open the new ticket, please reference this ticket so we can make sure that all our information is accurate. If you have any other questions, please feel free to ask and we would be happy to assist you. Regards, Chris Bruckart Customer Engineer Voxeo Support |
|
sdandey
|
|
| Hi,
is there a way that I can handle nomatch and noinput exceptions at global level. Say for an e.g. instead of handling it at field level can I declare those in AppRoot.vxml (application level) and let the nocatch noinput handle it global?... please reply me... thanks |
|
voxeo_chris
|
|
| Hello,
This is indeed possible, you simply need to setup the nomatch and noinput handlers in the root document and as long as your specifying the root in the leaf documents according to do the [url=http://www.vxml.org/varscoping.htm?search=variable+scoping#anchor]Variable Scoping[/url] tutorial, it should work without any problems. Please note that if you specify nomatch or noinput handlers at lower levels, those will be hit before the application scoped event handlers. Let me know if this makes sense and if you have any other questions as we would be happy to help. Regards, Chris Bruckart Voxeo Support |
|
bobpandey
|
|
| Hi,
I have a audio that says "Restaurant". I need to have a grammar that should return a text "restaurant" if recognised. In case it is not recognised, the grammar should return "my scrap result". I tried the following but it is returning "my scrap result" with a very high confidance of 99. I'm not sure if I have used the NoMatch tag properly. <?xml version="1.0" encoding="ISO-8859-1"?> <grammar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="en-us" tag-format="swi-semantics/1.0" version="1.0" root="restaurants" mode="voice" xmlns="http://www.w3.org/2001/06/grammar" xsi:schemaLocation="http://www.w3.org/2001/06/grammar http://www.w3.org/TR/speech-grammar/grammar.xsd" xmlns:sapi="http://schemas.microsoft.com/Speech/2002/06/SRGSExtensions"> <meta name="swirec_compile_parser" content="1"/> <rule id="restaurants" scope="public"> <field> <item weight="1.0"> <item>restaurants</item> <tag>value="NAME=restaurants"</tag> </item> <nomatch> <throw event="wastage"/> </nomatch> <catch event="wastage"> <tag>value="NAME=my scrap result"</tag> </catch> </field> </rule> </grammar> How should I tailor this grammar so that it does exactly what I want? Thanks for the help. Bob |
|
voxeoJeffK
|
|
| Hello,
The nomatch tag is a VoiceXML element, and is not to be included within the grammar itself. As an example, below is a small VoiceXML script. The grammar will match "restaurants". Any other utterance will cause a nomatch, and the result is set to "my scrap result". <?xml version="1.0" encoding="UTF-8"?> <vxml version="2.1"> <form id="main"> <field name="myField"> <grammar type="application/grammar-xml"> <rule id="restaurants" scope="public"> <item weight="1.0">restaurants</item> </rule> </grammar> <nomatch> <assign name="myField" expr="'my scrap result'"/> </nomatch> </field> <block> <prompt> The result is <value expr="myField"/>.</prompt> </block> </form> </vxml> Regards, Jeff Kustermann Voxeo Support |
|
riteshsc
|
|
| I have to access shadow variable termchar in the nomatch element & my nomatch is in the field element.
Is there any way to access it in nomatch? Thanks, Ritesh |
|
voxeoJeffK
|
|
| Hello,
Can we have some clarification on your goal? Is it you need to discover what the termchar is set to, or you need to allow the '#" as a valid entry in a grammar? As a shadow variable the termchar is available in a <record> as recordname$.termchar, so that doesn't apply to <field>. Regards, Jeff Kustermann Voxeo Support |
|
riteshsc
|
|
| Yes, I need to discover(in <nomatch>) what the termchar (e.g:- #) is set for the <field> | |
VoxeoDante
|
|
| Hello,
I apologize, but there is no way to tell what the term char is set to at the application level. If you can give us a better overall idea of what you are trying to accomplish maybe we can help you find another way to get the same result. Can you give us an overview of what you are looking to do here? With that we may be able to provide some additional guidance. Regards, Dante Vitulano Customer Support Engineer II Voxeo Corporation |
|
SamiPriya
|
|
| Hi,
I have creating one simple application of voxeo paltform. I have use nomatch tag. i have check the <form id="getId"> <var name="audioSource"/> <field name="speaker_id" type="digits?length=4"> <prompt> <audio expr="audioSource + 'EnterID.wav'"> please enter speaker i d followed by the pound key </audio> </prompt> <filled> <log>Inside getId, before return...</log> <return namelist ="speaker_id"/> </filled> <nomatch count ="3"> <var name ="resultState" expr ="'Error'"/> <var name="message" expr="'No input error - 3rd time'"/> <return namelist="resultState message"/> </nomatch> <nomatch> <audio expr="audioSource + 'priya.wav'"> Please enter Valid speaker i d. </audio> <!--<reprompt/>--> </nomatch> If it speaker id is greater than or less than 4 digits it will go to nomatch right. In the nomatch tag we call one subdialog name ie is <!-- Calling enroll (with 3 utterances) for the specific speaker--> <subdialog name="enroll" cond ="trained=='false'" srcexpr="AppURL + 'Enroll.vxml#enroll'"> <param name="URL" expr="VPHost"/> <param name="hostName" expr="APIWrapper"/> <param name="audioSource" expr="audioHost" /> <param name="speakerId" expr="globalSpeaker"/> <param name="speakerSubId" expr="DefaultSubId"/> <param name="sessionId" expr="my_session"/> <param name="configSetName" expr="defaultConfig"/> <param name="backgroundModel" expr="'Default'"/> <param name="promptAudio" expr="audioHost + 'SayYourPwd.wav'"/> <param name="promptPhrase" expr="'Please say your Vocal PassPhrase after the tone followed by the pound key.'"/> <param name="text" expr="''"/> <param name="APPURL" expr="AppURL"/> <filled> <if cond="enroll.resultState=='Error'"> <throw event="error.result" messageexpr="'The Enroll returned with error : ' + enroll.message"/> </if> <if cond="enroll.result=='Trained'"> <assign name="result" expr="'Enrollment'"/> <else/> <prompt> <audio expr="audioHost + 'EnrollFail.wav'"> Enrollment has failed. Please contact your administrator for further details. </audio> </prompt> </if> <log> After enroll <value expr="enroll.resultState"/> ,<value expr="enroll.result"/> </log> </filled> </subdialog> how it call?or using goto next tag. can you pls give brief idea. urgent please thanks and Regards, Priya.N |
|
jdyer
|
|
| Hello Priya,
It may help if we were to get a little more context into this issue, perhaps you can open a ticket with additional logging, and complete application code, for our review? This may additional material will help us understand the issue you are having and allow us to offer our suggestions on how to address it. We will be standing by for your update at this time. Regards, John Dyer Customer Engineer Voxeo Support |
|
personetics
|
|
| Hi
I am trying to prompt the user input incase there is a nomatch but it keep saying "Undefined" in instead of the user input. <form id="test1"> <field name="confirm" slot="confirm"> <grammar type="text/gsl"> <![CDATA[[ [(one two three four) (dtmf-1 dtmf-2 dtmf-3 dtmf-4)] { <confirm "1234"> } ]]]> </grammar> <prompt bargein="false"> Thank you for calling. Please enter your 16 digit account number now </prompt> <noinput> <prompt> I did not hear you. Please try again. </prompt> <reprompt/> </noinput> <nomatch cond="true" count="1"> <prompt> The number <value expr="confirm" />. is not a valid account number. </prompt> <reprompt/> </nomatch> . . . . How can I get it him to say the user input inside the nomatch : <prompt> The number <value expr="confirm" />. is not a valid account number. </prompt> Thanks Itay |
|
voxeotimlindsey
|
|
| Hey Itay,
The field must be filled in order to establish the value of that variable, and if a nomatch occurs in the grammar, it will block the fill. Your best bet is to code your own little bit of error handling for that part along the lines of... <if cond="confirm=='validnumber'"> <goto nextitem="testPassed"/> <else/> <prompt> Sorry, <value expr="confirm"/> is not valid, please try again.</prompt> <goto nextitem="retry"/> </if> |
| login |