CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: [vxml]Field Type Question

  1. #1
    Join Date
    Aug 2009

    Question [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=*">

  2. #2
    Join Date
    Jan 2010

    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


    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>

    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:


    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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)