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

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

Join Us At ClueCon - Aug 7-9, 2012

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org