-
August 25th, 2009, 10:19 PM
#1
[vxml]Field Type Question
I want to receive only * or # as legal input from user
Can I use field elememt like this (change the termchar)
...
<field name="demo" type="boolean?y=#;n=*">
...
...
</field>
-
January 13th, 2010, 02:07 PM
#2
Re: [vxml]Field Type Question
Hmm. I've never seen the boolean type used that way. There may be an platform-specific extension out there somewhere like that, but all I've ever seen is
type="boolean"
I think what you need is to create your own very simple grammar, like in the following form:
<form id="push_something">
<field name="demo">
<grammar type="application/x-jsgf" mode="dtmf"> "#" | "*" </grammar>
<prompt>Please press the pound or star key.</prompt>
</field>
</form>
</vxml>
Instead of using the built-in boolean grammar, that form specifies a simple grammar that only accepts "#" or "*".
If you want to map "#" to "y" and "*" to "n" in the "demo" var, you could extend that grammar in the following way:
<grammar type="application/x-jsgf" mode="dtmf"> "#" {y} | "*" {n} </grammar>
There are some nice, simple examples of JSGF grammars on the docs for the PlumVoice platform:
http://www.plumvoice.com/docs/hosting/
Another common grammar type used in IVR is SRGS+XML. See same docs.
Good luck!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|