Page 1 of 1

Problem with VXML

Posted: Tue Jun 09, 2009 3:58 pm
by tprintyw2gi
Hello,

This VXML is supposedly valid however the test barfs.... Any idea as to why?

1 <?xml version="1.0"?>
2 <!DOCTYPE vxml PUBLIC "-//The Plum Group//DTD VOICEXML 2.1//EN" "/usr/local/plumvp/vxml.dtd">
3 <vxml version="2.0">
4 <menu id="locations">
5 <prompt>
6 Your Nearest Locations are:
7 <enumerate/>
8 </prompt>
9 <choice dtmf="1" next="#location1">
10 Press 1 to be transfered to One State Farm Plaza Bloomington, IL, (309) 763-2398
11 </choice>
12 <choice dtmf="2" next="#location2">
13 Press 2 to be transfered to One State Farm Plaza Bloomington, IL, (309) 766-3909
14 </choice>
15 <choice dtmf="3" next="#sa">Press 3 to try your search again.</choice>
16 </menu>
17 <form id="location1">
18 <block>
19 Please hold while we transfer you.
20 </block>
21 <transfer dest="(309) 763-2398" connecttimeout="20s" bridge="true"/>
22 </form>
23 <form id="location2">
24 <block>
25 Please hold while we transfer you.
26 </block>
27 <transfer dest="(309) 766-3909" connecttimeout="20s" bridge="true"/>
28 </form>
29 <form id="sa">
30 <field name="address" type="digits">
31 <prompt>
32 Please enter or say you zip code to find the nearest location.
33 </prompt>
34 </field>
35 <block>
36 <prompt>Please wait while we search for a location.</prompt>
37 <submit namelist="address" next="http://ivr.where2getit.com/lite?action= ... vider=plum"/>
38 </block>
39 </form>
40 </vxml>

IVR grammar

Posted: Wed Jun 10, 2009 9:59 am
by support
Hi,

The VoiceXML itself is valid as far as XML validation goes, however the contents of your IVR tag, <choice>, are not valid input for the IVR grammar engine. Contents of a <choice> tag are interpreted as a speech grammar fragment for speech recognition, in our case JSGF grammar fragment, so you should not use special characters such as parentheses because generally ASR engines do not recognize punctuation. The parentheses are preventing the ASR engine from forming a valid IVR grammar.

From your IVR code sample, it appears that you intended the menu to only respond to DTMF input. In this case you can put all of the text into the <prompt> and leave the <choice> elements empty. We would recommend the follow replacement for <menu id="locations"/> if you are not using speech recognition:

Code: Select all

<menu id="locations"> 
<prompt> 
Your Nearest Locations are: 
Press 1 to be transfered to One State Farm Plaza Bloomington, IL, (309) 763-2398. 
Press 2 to be transfered to One State Farm Plaza Bloomington, IL, (309) 766-3909. 
Press 3 to try your search again.
</prompt> 
<choice dtmf="1" next="#location1"/> 
<choice dtmf="2" next="#location2"/> 
<choice dtmf="3" next="#sa"/> 
</menu> 

Posted: Wed Jun 10, 2009 1:44 pm
by tprintyw2gi
Thanks for the update.


If I wanted to allow for voice input as well what should I change?

Thanks
-Tom

Clarification to IVR grammar

Posted: Thu Jun 11, 2009 9:51 am
by support
You would want to provide an IVR grammar fragment within each IVR tag, <choice>, basically a key phrase the ASR engine will listen for (without punctuation).

Code: Select all

<choice dtmf="1" next="#location1">One</choice> 
<choice dtmf="2" next="#location2">Two</choice> 
<choice dtmf="3" accept="approximate" next="#sa">Search Again</choice>
For the last choice here, the accept="approximate" means that any part of the phrase "Search Again" will trigger the choice as opposed to the entire phrase, so either "Search", "Again", or "Search Again" would be accepted.

For more information on the IVR tag, choice, see
http://www.plumvoice.com/docs/dev/voicexml:tags:choice