On Thursday, December 5, 2013 at 11:42 AM, Joli Martinez wrote:
yes I would like an external lua script to call freeswitch commands. IE check who is on a conference, mute, unmute callers. etcThanks,On Dec 5, 2013, at 2:37 PM, covici@ccs.covici.com wrote:Are you calling the script from the dial plan? You will not be able torun 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/luaapi = freeswitch.API();reply = api:executeString("version");~Error---------------------------------------------------------------------------------lua hello.lualua: 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:FreeSWITCH-powered IP PBX: The CudaTel Communication ServerOfficial FreeSWITCH SitesFreeSWITCH-users mailing list--Your life is like a penny. You're going to lose it. The question is:How doyou spend it?John Covici_________________________________________________________________________Professional FreeSWITCH Consulting Services:FreeSWITCH-powered IP PBX: The CudaTel Communication ServerOfficial FreeSWITCH SitesFreeSWITCH-users mailing list_________________________________________________________________________Professional FreeSWITCH Consulting Services:FreeSWITCH-powered IP PBX: The CudaTel Communication ServerOfficial FreeSWITCH SitesFreeSWITCH-users mailing list