VoiceXML Forum Community Message Board


Post New Topic  Post A Reply
my profile | register | search | faq | forum home
  next oldest topic   next newest topic
» VoiceXML Forum Community Message Board   » Newbies   » how to control the number of DTMF entry

 - UBBFriend: Email this page to someone!    
Author Topic: how to control the number of DTMF entry
dragondad
Junior Member
Member # 3257

Rate Member
Icon 1 posted July 28, 2006 11:43 AM      Profile for dragondad     Send New Private Message       Edit/Delete Post   Reply With Quote 
I have a question regarding for the DTMF collection (from the <field> tag), is that possible to control how many DTMF will be allowed to enter?
I didn't see attribute from <field> or <property>, the only place I see the similar implementation from the CISCO, it has a property defined as termlength, which can control the number of the DTMFs.
Do you have any suggestions about this?
Thanks.

Posts: 7 | Registered: Sep 2005  |  IP: Logged
mheadd
Member
Member # 3181

Member Rated:
4
Icon 1 posted July 28, 2006 12:31 PM      Profile for mheadd   Author's Homepage   Email mheadd   Send New Private Message       Edit/Delete Post   Reply With Quote 
If you are using a builtin grammar for the field - e.g., setting the type attribute on the <field> element to "digits" - you can parameterize entry as follows:
code:
 
<field name="getInput" type="digits?length=5">
...
</field>

If you want to allow any DTMF key to be pressed - not just numbers - you can write a custom grammar and designate the number of repeats allowed. Here is an example in ABNF format:
code:
   
#ABNF 1.0;
root = $touchtone;
$touchtone = $numbers<1-4> $keys<1>;
$numbers = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0;
$keys = # | *;

If you�re using the XML grammar format, you can use the "repeat" attribute on the <item> element.

Hope this helps.

[ July 28, 2006, 12:32 PM: Message edited by: mheadd ]

--------------------
Mark
VoiceinGov.org
http://www.voiceingov.org

Posts: 55 | Registered: Jun 2005  |  IP: Logged


All times are Eastern  
Post New Topic  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:

Contact Us | VoiceXML Forum



Powered by Infopop Corporation
UBB.classicTM 6.3.1.2