[Freeswitch-users] lua trouble
Alex
alex at thewinelake.com
Mon Jun 18 21:07:04 MSD 2012
OK, so replying to myself, I think I need to include the string
library... I can see in lua.conf.xml that one can have a
"module-directory" but I'm not sure where I should get these modules
from. Any recommended quick reading on this?
> More lua trouble - real beginner stuff, I'm afraid.
>
> Why does this not work:
>
> destnum = session:playAndGetDigits(3, 20, 3, 5000, "#",
> "/home/oev/fs-pabx/prompts/dmsb12_mcm3.wav", "", "\\d+\\*")
> l = strlen(destnum)
>
> The objection is
>
>
> 2012-06-18 16:52:30.415261 [ERR] mod_lua.cpp:198
> /usr/local/freeswitch/scripts/mcm2.lua:13: attempt to call global
> 'strlen' (a nil value)
> stack traceback:
> /usr/local/freeswitch/scripts/mcm2.lua:13: in function
> 'getDestNumber'
> /usr/local/freeswitch/scripts/mcm2.lua:49: in function
> 'unattendedTransfer'
> /usr/local/freeswitch/scripts/mcm2.lua:24: in function
> 'processMcmOption'
> /usr/local/freeswitch/scripts/mcm2.lua:153: in main chunk
>
> I was just assuming that lua is lua and that anything in the lua wiki
> (eg. http://www.lua.org/manual/2.4/node32.html#exstring) would work.
>
>> Phrases let you mix and match speak, say, play-file, silence, other
>> macros, and even passing in options.
>>
>> http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_phrase
>> http://wiki.freeswitch.org/wiki/Speech_Phrase_Management
>>
>> -Avi
>>
>>
>> _________________________________________________________________________
>> 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
>>
>>
>> No virus found in this message.
>> Checked by AVG - www.avg.com <http://www.avg.com>
>> Version: 2012.0.2177 / Virus Database: 2433/5076 - Release Date: 06/17/12
>>
>
>
>
>
> _________________________________________________________________________
> 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
>
>
> No virus found in this message.
> Checked by AVG - www.avg.com <http://www.avg.com>
> Version: 2012.0.2177 / Virus Database: 2437/5077 - Release Date: 06/18/12
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120618/35ad70dc/attachment-0001.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list