|
Author
|
Topic: how to control the number of DTMF entry
|
dragondad
Junior Member
Member # 3257
Rate Member
|
posted July 28, 2006 11:43 AM
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:
|
posted July 28, 2006 12:31 PM
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
|
|
|