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

Valid Grammar, but Fails Inline

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
moshe
Posts: 66
Joined: Wed Aug 15, 2007 5:36 pm
Location: Chicago
Contact:

Valid Grammar, but Fails Inline

Post by moshe »

I've got a simple valid inline grammar in my voicexml script:

<grammar mode="voice">
<rule id="ready">ready</rule>
</grammar>

The page with this grammar passes validation with your VoiceXML validator; it passes your grammar validation tool; and works as expecte with your grammar teser. It also works correctly in another company's hosted service.

However, each time I try this grammar, I get an error.grammar.inlined.

The Last Call Log shows

<?xml version='1.0'?>
<grammar xml:lang="en-US" mode="voice">
<rule id="ready" scope="private">ready</rule>
</grammar>

and the pre-pended <?xml?> statement isn't loved by your grammar validator, which make me wonder what's going on.

moshe
Posts: 66
Joined: Wed Aug 15, 2007 5:36 pm
Location: Chicago
Contact:

Post by moshe »

And the answer is: you require explicit use of the "type" attribute on inline grammars; if I'm reading the VoiceXML spec 3.1.1.4 correctly, type is optional, but then again no type would make you have to guess at it.

The VoiceXML page validator doesn't pick this up.

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

Link for IVR grammars

Post by support »

Hi,

When you don't specify the type, it defaults to "application/x-jsgf". This explains why it didn't work for you when you tried:

Code: Select all

<grammar mode="voice">
<rule id="ready">ready</rule>
</grammar> 
For more information on our IVR grammars, you can go to this link:
http://www.plumvoice.com/docs/dev/devel ... ce:grammar

Also, the VoiceXML validator detects syntax errors, not IVR grammar errors. This is why the VoiceXML page validator didn't pick this up.

Regards,
Plum Support
Last edited by support on Fri Feb 19, 2010 5:00 pm, edited 3 times in total.

moshe
Posts: 66
Joined: Wed Aug 15, 2007 5:36 pm
Location: Chicago
Contact:

Post by moshe »

Thanks. I now see the "default" notation inside the JGSF section; I guess I managed to forget to keyword-search the documentation page.

Post Reply