Page 1 of 1

why does my <option> tag throw an error.grammar.option

Posted: Fri Jun 04, 2004 1:42 am
by ipath
I have defined the <option> for a field as

Code: Select all

  <option dtmf="1" value="pwsCntRef1074777064629_2">Pick a contact</option> 
  <option dtmf="2" value="pwsCntRef1066377085583_2">Track Messages</option> 
  <option dtmf="3" value="pwsCntRef1067942510592_2">Unread Messages</option> 
  <option dtmf="4" value="pwsCntRef1069752628663_2">Emails</option> 
  <option dtmf="5" value="pwsCntRef1070449195414_2">Urgent</option> 
  <option dtmf="6" value="pwsCntRef1063996707468_2">Contacts</option> 
  <option dtmf="8" value="LeaveMsgForMobile">Leave Message For Mobile</option> 
  <option dtmf="0" value="help">zero</option> 
  <option dtmf="9" value="options">options</option> 
  <option value="help">help</option> 
  <option value="help">o</option> 
  <option value="bye">bye</option> 
  <option value="bye">exit</option> 
  <option value="bye">quit</option> 
  <option value="back">back</option> 
  <option value="home">home</option> 
  <option value="options">options</option> 
  <option value="bye">#</option> 
  
When I executed I got the "A serious error of type ". I have placed the log msg here.
Is the
(options) {options} |
generated twice is creating the problem? I validated the vxml with no errors.

Thanks.

Log:

<?xml version='1.0'?>
<grammar type="application/jsgf" mode="voice">
(Pick a contact) {pwsCntRef1074777064629_2} |
(Track Messages) {pwsCntRef1066377085583_2} |
(Emails in Inbox) {pwsCntRef1067942510592_2} |
(Unread Messages) {pwsCntRef1069752628663_2} |
(Contacts) {pwsCntRef1063996707468_2} |
(Leave Message For Mobile) {LeaveMsgForMobile} |
(zero) {help} |
(options) {options} |
(help) {help} |
(o) {help} |
(bye) {bye} |
(exit) {bye} |
(quit) {bye} |
(back) {back} |
(home) {home} |
(options) {options} |
(#) {bye}
</grammar>

---------

Wed 02 Jun 2004 09:07:34 PM EDT (000000;000;1086224771) [prompt] EVENT: bargein set to true
Wed 02 Jun 2004 09:07:34 PM EDT (000000;000;1086224771) [prompt] EVENT: INPUTMODES set to "DTMF VOICE"
Wed 02 Jun 2004 09:07:34 PM EDT (000000;000;1086224771) [prompt] EVENT: Audio segment added to prompt queue from TTS text/plain;charset=wchar_t for:
---------

A serious error of type
---------
Wed 02 Jun 2004 09:07:34 PM EDT (000000;000;1086224771) [prompt] EVENT: bargein set to true
Wed 02 Jun 2004 09:07:34 PM EDT (000000;000;1086224771) [prompt] EVENT: INPUTMODES set to "DTMF VOICE"
Wed 02 Jun 2004 09:07:34 PM EDT (000000;000;1086224771) [prompt] EVENT: Audio segment added to prompt queue from TTS text/plain;charset=wchar_t for:
---------
error.grammar.option
---------

IVR example for Option Tag Usage

Posted: Mon Jun 14, 2004 11:37 am
by support
This IVR error is being caused by your use of # as a dtmf option. When # (or *) are used in an <option> or a <choice> tag they must be escaped with quotes. Below is a simple IVR example of how to properly use a # in an option:

Code: Select all

<? xml version="1.0"?>
<vxml version="2.0">
  <form>
    <field name="field1">
      <option dtmf="1" value="pwsCntRef1074777064629_2">Pick a contact</option>
      <option dtmf="2" value="pwsCntRef1066377085583_2">Track Messages</option>
      <option dtmf="3" value="pwsCntRef1067942510592_2">Unread Messages</option>
      <option value="bye">"#"</option>
    </field>
  </form>
</vxml>
Hope this helps! :)

Plum Support

Posted: Tue Jun 15, 2004 12:33 am
by ipath
Thanks for the reply.

Also,

Code: Select all

<option value="help">o</option> 
This above statement is also creating problem. I removed this statement from the application to make it work.

typo in IVR code

Posted: Thu Jun 17, 2004 12:35 pm
by support
I think you have a typo in your IVR code...

it should be the number '0', not the letter 'o'

as such:

Code: Select all

<option value="help">0</option>

Posted: Thu Jun 17, 2004 11:29 pm
by ipath
No, it is "o" only. Some people say "0" for zero. So, I included that option.

Thanks.

Posted: Thu Jun 17, 2004 11:30 pm
by ipath
Sorry, some people say "oh" for zero.

use of <option> tag in IVR code

Posted: Mon Jun 21, 2004 12:21 pm
by support
I cant replicate the IVR error you are encountering. Try looking at the IVR example for <option> tag found in the vxml reference manual. I was able to modify it to support the functionality you described:

http://www.plumvoice.com/docs/dev/voicexml:tags:option

Hope this IVR source helps!

Plum Support

modification of IVR example

Posted: Thu Jun 24, 2004 11:16 am
by support
Hello iPath:

I have taken the liberty of modifying the IVR example in the url from the previous post. I think this does what you are talking about:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
  <form>
    <field name="maincourse">
    <prompt>
      Please select an entree. Today, we're featuring:
      <enumerate/>
    </prompt>
    <option dtmf="1" value="fish"> swordfish </option>
    <option dtmf="2" value="beef"> roast beef </option>
    <option value="help"> o </option>
    <filled>
        You chose <value expr="maincourse"/>.
    </filled>
   </field>
</form>
</vxml>
in the above IVR example, saying "oh" will result in field being set to "help". I tested this on our IVR hosting environment and it seems to work fine.

Hope this helps!! :)

Sincerely,

Plum Support