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

srgs xml

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
oberwetter
Posts: 8
Joined: Fri May 12, 2006 8:01 am

srgs xml

Post by oberwetter »

I am trying to convert some voice xml which I developed on another platform to run on Plum. This requires me to convert my gsl grammars to srgs. I have the following srgs xml grammar file which works on plum inline but I can't get it to work as an external file. Please show me what the external grxml file should look like, and how to reference that from my voice xml program. The external grxml file will have multiple grammars from the voicexml program.

Thanks,

Robert

<grammar mode="voice" xml:lang="en-US" version="1.0" type="application/srgs+xml" root="getstartedgrammar">
<rule id="getstartedgrammar">
<one-of>
<item>
<one-of>
<item>pin</item>
<item>dtmf-1</item>
</one-of>
<tag>promptforgetstarted="enterpin"</tag>
</item>
<item>
<one-of>
<item>purchase</item>
<item>dtmf-2</item>
</one-of>
<tag>promptforgetstarted="purchase"</tag>
</item>
</one-of>
</rule>
</grammar>

oberwetter
Posts: 8
Joined: Fri May 12, 2006 8:01 am

dtmf srgs

Post by oberwetter »

I forgot to include the second part of the grammar which handles the dtmf entry. Robert

<grammar version="1.0" root="getstartedgrammardtmf" type="application/srgs+xml" xml:lang="en" mode="dtmf">
<rule id="getstartedgrammardtmf">
<one-of>
<item>1<tag>promptforgetstarted="enterpin"</tag></item>
<item>2<tag>promptforgetstarted="purchase"</tag></item>
</one-of>
</rule>
</grammar>

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

IVR code loads each of rules as active grammar for the field

Post by support »

Hello,

Currently the Plum IVR system does not correctly support the standard for remote IVR grammars. Normally you would include the <grammar> tag around the external IVR grammar, instead you should not provide a grammar tag in the external grammar:

Remote Grammar

Code: Select all

 <rule id="getstartedgrammar">
	<one-of>
		<item>
			<one-of>
				<item>pin</item>
				<item>dtmf-1</item>
			</one-of>
			<tag>promptforgetstarted="enterpin"</tag>
		</item>
		<item>
			<one-of>
				<item>purchase</item>
				<item>dtmf-2</item>
			</one-of>
			<tag>promptforgetstarted="purchase"</tag>
		</item>
	</one-of>
</rule>
<rule id="getstartedgrammardtmf">
	<one-of>
		<item>1<tag>promptforgetstarted="enterpin"</tag></item>
		<item>2<tag>promptforgetstarted="purchase"</tag></item>
	</one-of>
</rule>
VoiceXML Script

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">

<form>
	<field name="promptforgetstarted">
		<grammar version="1.0" src="remote_grammar.grxml" root="getstartedgrammar" type="application/srgs+xml" mode="voice">
		<grammar version="1.0" src="remote_grammar.grxml" root="getstartedgrammardtmf" type="application/srgs+xml" mode="dtmf">
		<prompt>
			To enter your PIN say pin or press 1.
			To make a purchase say purchase or press 2.
		</prompt>
		<filled>
			<!-- ...deal with result -->
		</filled>
	</field>
</form>

</vxml>
The above IVR code loads each of the rules as an active IVR grammar for the field. Hope that helps!

Regards,
Plum Support

Post Reply