[Freeswitch-users] lua trouble

Avi Marcus avi at avimarcus.net
Mon Jun 18 19:00:34 MSD 2012


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 at 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 at freeswitch.org
> http://www.freeswitchsolutions.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 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120618/43f62f96/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list