mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Update the Voicemail MWI LUA script to use the new scripts/resources/run directory.
This commit is contained in:
@@ -29,9 +29,11 @@
|
|||||||
dofile(config());
|
dofile(config());
|
||||||
|
|
||||||
--define general settings
|
--define general settings
|
||||||
tmp_file = "/usr/local/freeswitch/log/mwi.tmp";
|
|
||||||
sleep = 300;
|
sleep = 300;
|
||||||
|
|
||||||
|
--define the run file
|
||||||
|
run_file = scripts_dir .. "/resources/run/voicemail-mwi.tmp";
|
||||||
|
|
||||||
--debug
|
--debug
|
||||||
debug["sql"] = false;
|
debug["sql"] = false;
|
||||||
debug["info"] = false;
|
debug["info"] = false;
|
||||||
@@ -43,7 +45,7 @@
|
|||||||
dbh = database_handle('system');
|
dbh = database_handle('system');
|
||||||
|
|
||||||
--used to stop the lua service
|
--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");
|
file:write("remove this file to stop the script");
|
||||||
|
|
||||||
--add the trim function
|
--add the trim function
|
||||||
@@ -64,8 +66,8 @@
|
|||||||
while true do
|
while true do
|
||||||
|
|
||||||
--exit the loop when the file does not exist
|
--exit the loop when the file does not exist
|
||||||
if (not file_exists(tmp_file)) then
|
if (not file_exists(run_file)) then
|
||||||
freeswitch.consoleLog("NOTICE", tmp_file.." not found\n");
|
freeswitch.consoleLog("NOTICE", run_file.." not found\n");
|
||||||
break;
|
break;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user