Hi,
I want to be able to include dynamic grammas from my own rest api of a list of names to match, etc.
How do I integrate the grammars into the Fuse+ modules?
THanks!
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
Dynamic grammars
Re: Dynamic grammars
You should use the subdialog module. Your subdialog would look something like this:
And your app should look like this: https://drive.google.com/file/d/0B2RqW1 ... sp=sharing
You would reference the user's inputted name with the subdialog module name, and returned namelist. In this instance, it would be dynamic_name_grammar.providername.
Please let us know if you have questions.
Code: Select all
<?php
// Call your REST API to get a list of names to match here
echo '<?xml version="1.0"?>';
?>
<vxml version="2.0">
<form>
<field name="providername">
<grammar type="application/srgs+xml" root="ROOT" mode="voice">
<rule id="ROOT">
<one-of>
<item>Mister Ahmed<tag>providername="Fawad Ahmed"</tag></item>
<item>Doctor Ahmed<tag>providername="Fawad Ahmed"</tag></item>
<!-- Format the list of names from your REST API to match VXML grammar here -->
</one-of>
</rule>
</grammar>
<prompt> Please say your provider's name. </prompt>
<filled>
<return namelist="providername"/>
</filled>
</field>
</form>
</vxml>
You would reference the user's inputted name with the subdialog module name, and returned namelist. In this instance, it would be dynamic_name_grammar.providername.
Please let us know if you have questions.
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com