[Freeswitch-users] lua trouble

Avi Marcus avi at avimarcus.net
Mon Jun 18 19:15:11 MSD 2012


For me there was. "enter the value or press # to skip" because it's
optional... seems a very possible use-case. It's an IVR for gathering
information, not navigating a menu.
-Avi


On Mon, Jun 18, 2012 at 6:09 PM, Michael Collins <msc at freeswitch.org> wrote:

> 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 at 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 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/01493cc6/attachment-0001.html 


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