Page 1 of 1

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

Posted: Sun Jun 29, 2003 11:51 am
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: