Page 1 of 1

about taking dtmf input

Posted: Tue May 02, 2006 12:53 pm
by yunyun
Hi,

I want to get two kinds of input from users. If users enter a 7-digit number with a ending pound key, then they will be redirected to a.vxml. If they enter just a star key, they will be redirected to b.vxml. And I want to give users enough time to enter the 7-digit number so I set the "interdigittimeout" as 10 seconds while the default is 1 second. My question is that how I can stop the input immediately right after users enter a star key. Currently it still waits for 10 seconds to close the input after getting a star key.

Code: Select all

<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<link next="b.vxml">
<grammar>"*"</grammar>
</link>

<property name="interdigittimeout" value="10s"/>

<form>
<field name="number" type="digits">
<prompt>Please enter your account number.</prompt>
<filled>
<submit next="a.vxml" method="get" namelist="number"/>
</filled>
</field>
</form>

</vxml>
Thanks,

interdigittimeout change needed in IVR script

Posted: Tue May 02, 2006 3:52 pm
by support
Hi,

The simple asnwer is that there is really no way to do this. The simplest improvement to your IVR script would be to change the interdigittimeout from 10s to maybe 4 or 5; this will reduce the wait for callers who press the star key.


Regards,

Plum Support

Posted: Tue May 02, 2006 4:07 pm
by yunyun
I saw a property "termmaxdigits" from the programmer's reference manual. Will it help to set this property? Thanks,

purpose of termmaxdigits for IVR platform

Posted: Tue May 02, 2006 4:51 pm
by support
Hi,

No, the IVR property, termmaxdigits, tells the IVR platform to stop collecting input when the caller's entry matches a specified max length for the given field. In this case, you want like to stop collecting input if the first character of the input is "*".

There is another method you could try, though it is a bit of a hack. Basically, you will have a field with a very short interdigittimeout (e.g. 100ms) that collects the first character/digit of input. If that character is "*", you will go to b.vxml (or perhaps the link in your example IVR code will be invoked, not sure). If that first character is anything else, you will store it in a variable/buffer and jump to another form that collects the rest of the caller input (using the appropriate timeouts). This transition from the first form to the second should not be apparent to the caller.

E.g. (note, this is a draft and has not been debugged at all. Caveat emptor...):

<var name="input_buffer" expr="''" />
<form id="getFirst">
<property name="interdigittimeout" value="100ms" />
<field name="first">
<grammar mode="dtmf">1|2|3|4|5|6|7|8|9|0|"*"</grammar>
<filled>
<if cond="first == '*'">
<goto next="b.vxml" />
<else />
<assign name="input_buffer" expr="first" />
<goto next="#getRest" />
</if>
</filled>
</field>
</form>

<form id="getRest">
<property name="interdigittimeout" value="10s" />
<field name="rest" type="digits?maxlength=6">
<filled>
<assign name="input_buffer" expr="input_buffer+rest" />
<submit next="a.vxml" method="get" namelist="input_buffer"/>
</filled>
</field>
</form>


All that said, it is probably simpler to just reduce the interdigittimeout in your first snippet of IVR code.


Regards,

Plum Support

Posted: Tue May 02, 2006 5:04 pm
by yunyun
Thank you very much for the really long reply.

I'm wondering if another workaround will help. Is it possible that I specify "*" as a grammar with a single character. Then the first "*" will stop the input without a termchar "#".

This is from the VXML 2.0 document.

termchar Non-Empty and termtimeout When Grammar Must Terminate

In the example below, the entry of the last DTMF has brought the grammar to a termination point at which no additional DTMF is allowed by the grammar. If the termchar is non-empty, then the user can enter an optional termchar DTMF. If the user fails to enter this optional DTMF within termtimeout, the recognition ends and the recognized value is returned. If the termtimeout is 0s (the default), then the recognized value is returned immediately after the last DTMF allowed by the grammar, without waiting for the optional termchar. Note: the termtimeout applies only when no additional input is allowed by the grammar; otherwise, the interdigittimeout applies.

Does Plum support "termtimeout" property? And how can I specify "*" is the only character for the grammar?

Thanks,

IVR platform does not support termtimeout property

Posted: Mon May 08, 2006 10:36 am
by support
Hi,

While we don't specifically support the "termtimeout" IVR property, I think you are misreading the VoiceXML spec in any case.

"Termtimeout" only applies when "the grammar must terminate", but this is not the case with your IVR grammar because it is possible for the caller to enter more input.

You should either prompt callers to press *#, or simply lower your interdigittimeout to something like 4s.


Regards,

Plum Support