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

how do you put a '*' as a valid input for a grammar?

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
always24x7
Posts: 30
Joined: Tue Apr 18, 2006 3:05 pm
Location: Bedford, TX

how do you put a '*' as a valid input for a grammar?

Post by always24x7 »

I have a grammar that I would like to use:

<grammar type="application/x-jsgf">1|2|3|9|*|balance|lost|register|repeat|men
u</grammar>

The vxml interpreter barfs on the '*'.

I have tried *, but it did not work either. Is there a way to represent an '*' that will not cause the interpreter to barf?

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

IVR grammar to fix * error

Post by support »

The * in JSGF means "zero or more of the previous token". Because there's no token preceding the star, the JSGF parser throws an IVR error. To tell the JSGF parser to look for the * character you should put it into double quotes. Thus, your IVR <grammar> will look like this instead:

Code: Select all

<grammar type="application/x-jsgf">1|2|3|9|"*"|balance|lost|register|repeat|menu</grammar> 

Post Reply