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

error.grammar.option - how come?

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
bgallowayCCS
Posts: 1
Joined: Wed Jun 16, 2010 12:45 pm

error.grammar.option - how come?

Post by bgallowayCCS »

I have a simple form with one field:

Code: Select all

    <field name="membershipIdField">
        <prompt><audio src="/voiceaudio/chooseaccount.wav">
        	Which account would you like to use? 
        	</audio>
        	<enumerate/></prompt>
       	<option accept="approximate" value="912323"> Fleet CCS Internal </option>
       	<option accept="approximate" value="1123456"> Staff Discount Plan </option>
        <filled>
            <assign name="membershipId" expr="parseInt(membershipIdField)"/>
        </filled>
    </field>
It's generating this error:

Code: Select all

GrammarManager::CreateGrammarFromString(application/x-jsgf):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-US" mode="voice">
(Fleet|CCS|Internal)+ {912323} | (Staff|Discount|Plan)+ {1123456}
</grammar>
---------
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>
      A serious error of type </speak>
---------
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>error.grammar.option</speak>
---------
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak> has occurred.  Exiting. </speak>
---------
VXI::exit_element()
So what's wrong with those option tags? The page validates correctly, and it works when run at BeVocal. Is there some difference in platforms here that I'm missing?

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

Re: error.grammar.option - how come?

Post by support »

Hi,

This is currently a known issue with the "approximate" attribute for the <option> tag that is being evaluated for the next release of our platform.

However, as a workaround for your issue, you could use the following IVR code:

membership.php

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>

<vxml version="2.0">
<form>
  <field name="membershipIdField">
    <grammar type="application/srgs+xml" root="ROOT" mode="voice">
      <rule id="ROOT">
        <one-of>
          <item>Fleet CCS Internal <tag>membershipIdField="912323"</tag></item>
          <item>Fleet <tag>membershipIdField="912323"</tag></item>
          <item>CCS <tag>membershipIdField="912323"</tag></item>
          <item>Internal <tag>membershipIdField="912323"</tag></item>
          <item>Fleet CCS <tag>membershipIdField="912323"</tag></item>
          <item>Fleet Internal <tag>membershipIdField="912323"</tag></item>
          <item>CCS Internal <tag>membershipIdField="912323"</tag></item>

          <item>Staff Discount Plan <tag>membershipIdField="1123456"</tag></item>
          <item>Staff <tag>membershipIdField="1123456"</tag></item>
          <item>Discount <tag>membershipIdField="1123456"</tag></item>
          <item>Plan <tag>membershipIdField="1123456"</tag></item>
          <item>Staff Discount <tag>membershipIdField="1123456"</tag></item>
          <item>Staff Plan <tag>membershipIdField="1123456"</tag></item>
          <item>Discount Plan <tag>membershipIdField="1123456"</tag></item>
        </one-of>
      </rule>
    </grammar>

    <prompt>
      Which account would you like to use?
    </prompt>
    <filled>
      You chose <value expr="membershipIdField"/>.
    </filled>
  </field>
</form>
</vxml>
Hope this helps.

Regards,
Plum Support

Post Reply