We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

Problem with VXML

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
tprintyw2gi
Posts: 2
Joined: Tue Jun 09, 2009 3:57 pm

Problem with VXML

Post 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>

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR grammar

Post 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> 
Last edited by support on Wed Feb 24, 2010 12:41 pm, edited 7 times in total.

tprintyw2gi
Posts: 2
Joined: Tue Jun 09, 2009 3:57 pm

Post by tprintyw2gi »

Thanks for the update.


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

Thanks
-Tom

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Clarification to IVR grammar

Post 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

Post Reply