Are you calling the script from the dial plan? You will not be able to run this outside of fs. Joli Martinez <mrjoli021@gmail.com> wrote:
Hello,
I am trying to write a lua script and I am getting an error when calling it. I have moved the script to the scripts directory in Freeswitch and same result. The lua mod is enabled and loaded on Freeswitch.
Script------------------------------------------------------------------------------ #!/usr/bin/lua
api = freeswitch.API(); reply = api:executeString("version"); ~
Error--------------------------------------------------------------------------------- lua hello.lua lua: hello.lua:3: attempt to index global 'freeswitch' (a nil value) stack traceback: hello.lua:3: in main chunk [C]: ?
thanks, _________________________________________________________________________ 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
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
-- Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici covici@ccs.covici.com