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

Answers to common Plum DEV questions

Moderators: admin, support

  • Author
  • Message
Offline

support

  • Posts: 3628
  • Joined: Mon Jun 02, 2003 3:47 pm
  • Location: Boston, MA

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

PostSun Jun 29, 2003 11:51 am

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:

Return to Plum DEV FAQs

Who is online

Users browsing this forum: No registered users and 1 guest

cron