[Freeswitch-users] How to deal with user pressing extra keys? flush_dtmf? session::flushDigits?

Anthony Minessale anthony.minessale at gmail.com
Sat Jun 25 00:17:14 MSD 2011

session:flushDigits() right before you collect DTMF and you will never
get any old dtmf

On Fri, Jun 24, 2011 at 2:51 PM, Wes <wes-fs at 499x.com> wrote:
> I'm writing an ivr script in lua, and using playAndGetDigits in a couple
> different places.  Both places just take a single digit to continue on.
> If the user presses 2 digits, it seems as if the second digit is being
> queued and it's being processed in the next call to playAndGetDigits.
> Often the extra digit is invalid, so when it tells the user to press a
> certain key, it follows immediately with the message "invalid key", due
> to the extra key being in the "queue"...
> is this anything I can protect against?   I found a flush_dtmf, but it
> is not very documented:
> http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_flush_dtmf
> and I also found this:
> http://wiki.freeswitch.org/wiki/Session_flushDigits
> but calling it before and after playAndGetDigits didn't *seem* to
> help... should it?
> script here:
> http://pastebin.freeswitch.org/16584
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org

More information about the FreeSWITCH-users mailing list