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

VXML voice mode regarding

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
Suganthi
Posts: 8
Joined: Wed Jul 16, 2008 10:14 am

VXML voice mode regarding

Post by Suganthi »

Please review the following VXML. Please note that as per the VXML, when there is no input from the user (DTMF), the control switches to “RepeatOffer” segment which is set to be in “voice” mode. On testing the VXML, the voice mode does not seem to recognize voice. I receive the call fine and the control seems to switch fine to “RepeatOffer” segment when I do not respond by DTMF, but when I say one when in voice mode, it does not seem to recognize it. Can you advise on the correctness of the attached VXML please?

<?xml version="1.0"?>
<vxml version="2.0">
<property name="inputmodes" value="dtmf"/>
<property name="termtimeout" value="8s"/>
<property name="sensitivity" value="0.7"/>
<property name="interdigittimeout" value="30ms"/>
<property name="fetchtimeout" value="40s"/>
<form id="assign">
<field name="accept" type="boolean">
<prompt>
Hello. You are offered a web lead, press 1 to accept, or 2 to decline.
</prompt>
<filled>
<if cond="accept==false">
<submit next="' + config.get('PlumVoice_StartURL') + '?mode=decline" method="post" namelist="message_reference" fetchtimeout="40s"/>
<else/>
<prompt>
You have pressed 1 to accept the lead. Please wait while we retrieve the details on the lead.
</prompt>
<submit next="' + config.get('PlumVoice_StartURL') + '?mode=accept" method="post" namelist="message_reference" fetchtimeout="40s"/>
</if>
</filled>
<nomatch>
Did not understand response.
<reprompt/>
</nomatch>
<noinput>
<goto next="#RepeatOffer"/>
</noinput>
</field>
</form>

<form id="RepeatOffer">
<field name="Repeat">
<grammar type="application/x-jsgf" mode="voice">( one | two )</grammar>
<prompt>No response. Switching to voice mode. You may now say one to accept or two to decline</prompt>
<filled>You entered <value expr="Repeat"/>
</filled>
<nomatch>Did not understand response<reprompt/>
</nomatch>
<noinput>No response.<reprompt/>
</noinput>
</field>
</form>
</vxml>

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

IVR code for inputmodes properties to work correctly

Post by support »

Hi Suganthi,

Looking through your IVR code, we noticed this line at the vxml level scope:

Code: Select all

<property name="inputmodes" value="dtmf"/> 
By doing this, your second <form> will also only take DTMF input, instead of voice input, which is what you want.

You should modify your IVR code to look more like this:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
<property name="termtimeout" value="8s"/>
<property name="sensitivity" value="0.7"/>
<property name="interdigittimeout" value="30ms"/>
<property name="fetchtimeout" value="40s"/>
<form id="assign">
<property name="inputmodes" value="dtmf"/>
<field name="accept" type="boolean">
<prompt>
Hello. You are offered a web lead, press 1 to accept, or 2 to decline.
</prompt>
<filled>
<if cond="accept==false">
<submit next="' + config.get('PlumVoice_StartURL') + '?mode=decline" method="post" namelist="message_reference" fetchtimeout="40s"/>
<else/>
<prompt>
You have pressed 1 to accept the lead. Please wait while we retrieve the details on the lead.
</prompt>
<submit next="' + config.get('PlumVoice_StartURL') + '?mode=accept" method="post" namelist="message_reference" fetchtimeout="40s"/>
</if>
</filled>
<nomatch>
Did not understand response.
<reprompt/>
</nomatch>
<noinput>
<goto next="#RepeatOffer"/>
</noinput>
</field>
</form>

<form id="RepeatOffer">
<property name="inputmodes" value="voice"/>
<field name="Repeat">
<grammar type="application/x-jsgf" mode="voice">( one | two )</grammar>
<prompt>No response. Switching to voice mode. You may now say one to accept or two to decline</prompt>
<filled>You entered <value expr="Repeat"/>
</filled>
<nomatch>Did not understand response<reprompt/>
</nomatch>
<noinput>No response.<reprompt/>
</noinput>
</field>
</form>
</vxml>
In this way, your IVR property, inputmodes will work in the way that you intended them for.

Regards,
Plum Support

Post Reply