But but but the wiki says! The wiki just CAN'T be wrong! ;) Actually, according to switch_ivr_play_say.c it looks like you can have a min_digits of "0". Still, I'd make the min digits "1" unless there's a compelling reason to want zero digits. -MC On Mon, Jun 18, 2012 at 8:00 AM, Avi Marcus <avi@avimarcus.net> wrote:
Uhm I thought I just wrote code that did that last week in lua. Seemed to work GREAT.
if(phone_required==true) then ... else phone_min=0 --no minimum on the match length end phone=session:playAndGetDigits(phone_min, phone_max, 3, 20000, "#", "phrase:cc_phone_prompt:"..phone_skip, "phrase:cc_invalid_entry","\\d{"..phone_min..","..phone_max.."}");
-Avi
On Mon, Jun 18, 2012 at 5:55 PM, Michael Collins <msc@freeswitch.org>wrote:
The problem is with confirmkey = session:playAndGetDigits(0, 1, 1, 1000, "#", confPrompt, "", "\\d|\\*")
It complains of "Invalid Args" (and doesn't say anything). All it has to
do is read out the number that it's intending to call, allowing the user to change their mind by hitting *.
You can't have an argument of "0" for the minimum number of digits. See this page for details on play_and_get_digits args: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_play_and_get_digits
-MC