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

XML grammar and DTMF

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
sniemetz
Posts: 12
Joined: Thu Sep 02, 2010 2:18 am

XML grammar and DTMF

Post by sniemetz »

Hello,

I am trying to run this grammar but get an "error.grammar.inlined" error;

what I am trying to do is this:

I have a word-based grammar and want to add a digit-based grammar.

I want to be able to get a match using either a word, or a series of digits. I then need to extract the semantic result for further processing.

Works fine with word based. DTMF is failing:

<grammar type="application/srgs+xml" maxage="300" mode="dtmf">
<rule id="ROOT2">
<one-of>
<item>11<tag>foo="bar";</tag>
</item>
</rule>
</grammar>

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

Re: XML grammar and DTMF

Post by support »

Hi,

From taking a look at your code, we've noticed a couple things with your grammar. First, you are missing a closing </one-of> tag, also, keep in mind that when using SRGS+XML grammars, you must include a root attribute. The modified code would look like this:

Code: Select all

<grammar type="application/srgs+xml" maxage="300" root="ROOT2" mode="dtmf"> 
<rule id="ROOT2"> 
<one-of> 
<item>11<tag>foo="bar";</tag> 
</item> 
</one-of>
</rule> 
</grammar>
For more information on grammars, you can also check out our help docs.

Hope this helps.

Regards,
Plum Support

sniemetz
Posts: 12
Joined: Thu Sep 02, 2010 2:18 am

Re: XML grammar and DTMF

Post by sniemetz »

weird.

thought I'd set the root attribute/nodes -- must have had a typo b/c when I retested - all worked great. thanks!

Post Reply