We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

about taking dtmf input

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
yunyun
Posts: 21
Joined: Mon Jan 23, 2006 8:31 pm

about taking dtmf input

Post 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,

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

interdigittimeout change needed in IVR script

Post 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
Last edited by support on Thu Jan 14, 2010 3:43 pm, edited 3 times in total.

yunyun
Posts: 21
Joined: Mon Jan 23, 2006 8:31 pm

Post by yunyun »

I saw a property "termmaxdigits" from the programmer's reference manual. Will it help to set this property? Thanks,

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

purpose of termmaxdigits for IVR platform

Post 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
Last edited by support on Thu Feb 25, 2010 1:52 pm, edited 2 times in total.

yunyun
Posts: 21
Joined: Mon Jan 23, 2006 8:31 pm

Post 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,

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR platform does not support termtimeout property

Post 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

Post Reply