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

How do I use the star or pound key in <grammar> tags?

Answers to common Plum DEV questions

Moderators: admin, support

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

using the asterisk (star key) or pound keys in grammar tags

Post by support »

Often times, the function keys (* and #) are used to provide additional functionality in voice vxml applications.
Here's a simple grammar tag example that specifies the star key, using jsgf (the default grammar type):
<grammar>"*"</grammar>

Here is the same grammar tag, specified with regexp instead of jsgf:
<grammar type="application/x-jsgf">^"*"$</grammar>



It is also possible to define a more complex grammar consisting of a function key and another key.
For example, if you want * 4 to be a grammar, it can be defined as follows:
<grammar>"*"4</grammar>

Again, same grammar tag, specified with regexp instead of jsgf:
<grammar type="application/x-jsgf">^"*"4$</grammar>


Hope this helps...
:shock:

Locked