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>
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
-
- Posts: 8
- Joined: Fri May 12, 2006 8:01 am
dtmf srgs
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>
<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>
IVR code loads each of rules as active grammar for the field
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
VoiceXML Script
The above IVR code loads each of the rules as an active IVR grammar for the field. Hope that helps!
Regards,
Plum Support
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>
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>
Regards,
Plum Support