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

Problem with External Grammar File

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
sureshkuyilath
Posts: 9
Joined: Tue Nov 04, 2003 6:35 pm

Problem with External Grammar File

Post by sureshkuyilath »

I have been experimenting with different grammar formats. We have the platform version 2.5.0.12, with the Sphinx ASR. I could not get this external grammar file working. The platform reports grammar error.

Code: Select all

<?xml version="1.0" encoding="iso-8859-1"?>

<grammar mode="dtmf" type="application/srgs+xml" root="nbr" xml:lang="en-US" version="1.0" >
	<rule id="nbr" scope="public">
		<one-of>
			<item>1</item>
			<item>2</item>
			<item>3</item>
			<item>4</item>
			<item>"*"</item>
			<item>"#"</item>
		</one-of>
	</rule>
</grammar>
The same grammar segment works perfectly if I declare inline. Please advice what I am doing wrong?

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

provide IVR grammar in local reference

Post by support »

Hello,

You should be providing the IVR tag, <grammar>, (and it's data) in the local reference rather than in the remote IVR grammar. An example VXML file would look like:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
<form>
  <field name="field1">
    <prompt>Please press a digit</prompt>
    <grammar src="remotegrammar.grxml" mode="dtmf" type="application/srgs+xml" root="nbr" xml:lang="en-US" version="1.0"/>
  </field>
</form>
</vxml>
And your remote IVR grammar would look like:

Code: Select all

<rule id="nbr" scope="public">
  <one-of>
    <item>1</item>
    <item>2</item>
    <item>3</item>
    <item>4</item>
    <item>"*"</item>
    <item>"#"</item>
  </one-of>
</rule>
Hope this helps.

Regards,
Plum Support
Last edited by support on Thu Feb 25, 2010 2:53 pm, edited 3 times in total.

sureshkuyilath
Posts: 9
Joined: Tue Nov 04, 2003 6:35 pm

Post by sureshkuyilath »

Thanks. That worked. But, I am still confused.
Is that true according to the SRGS spec? The way I understood, the external grammar file must be a well formed XML document with elements from the namespace "http://www.w3.org/2001/06/grammar" version="1.0".
The spec also gives examples such grammars. Why is this different here? Is this an implementation limitation ?

Thanks,
Suresh

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

grammar limitation of current IVR platform

Post by support »

Hello,

Yes, this is currently a limitation of the Plum IVR Platform. We require that the local grammar reference contain the information about the IVR grammar load and that the external IVR grammar provide the data within that <grammar> tag. We are working towards complete standardization and do plan to support the standard format as well for external IVR grammars in the future.

Regards,
Plum Support
Last edited by support on Thu Feb 25, 2010 2:54 pm, edited 2 times in total.

sureshkuyilath
Posts: 9
Joined: Tue Nov 04, 2003 6:35 pm

Post by sureshkuyilath »

Thanks and glad to know that this will be available in the future. Lack of this will restrict portability, and also prevent the usage of third party grammars.
Regards,
Suresh

Post Reply