Update the Voicemail MWI LUA script to use the new scripts/resources/run directory.

This commit is contained in:
Mark Crane
2014-10-22 08:09:10 +00:00
parent 899e5a853c
commit aab04f3019

View File

@@ -29,9 +29,11 @@
dofile(config());
--define general settings
tmp_file = "/usr/local/freeswitch/log/mwi.tmp";
sleep = 300;
--define the run file
run_file = scripts_dir .. "/resources/run/voicemail-mwi.tmp";
--debug
debug["sql"] = false;
debug["info"] = false;
@@ -43,7 +45,7 @@
dbh = database_handle('system');
--used to stop the lua service
local file = assert(io.open(tmp_file, "w"));
local file = assert(io.open(run_file, "w"));
file:write("remove this file to stop the script");
--add the trim function
@@ -64,8 +66,8 @@
while true do
--exit the loop when the file does not exist
if (not file_exists(tmp_file)) then
freeswitch.consoleLog("NOTICE", tmp_file.." not found\n");
if (not file_exists(run_file)) then
freeswitch.consoleLog("NOTICE", run_file.." not found\n");
break;
end