Update the app.lua script.

This commit is contained in:
Mark Crane
2014-01-09 03:04:28 +00:00
parent a13703544b
commit bce688667d

View File

@@ -33,17 +33,16 @@
app_name = argv[1];
--example use command
--luarun app.lua name 'a' 'b 123' 'c'
--luarun app.lua app_name 'a' 'b 123' 'c'
--for loop through arguments
arguments = "";
for key,value in pairs(argv) do
if (key > 1) then
arguments = arguments .. " '" .. value .. "'";
freeswitch.consoleLog("notice", "[voicemail] argv["..key.."]: " .. argv[key] .. "\n");
end
end
--route the request to the application
--freeswitch.consoleLog("notice", "[app] lua route: ".. scripts_dir .. "/app/" .. app_name .. "/index.lua" .. arguments .."\n");
dofile(scripts_dir .. "/app/" .. app_name .. "/index.lua" .. arguments);
--freeswitch.consoleLog("notice", "[app] lua route: ".. scripts_dir .. "/app/" .. app_name .. "/index.lua\n");
dofile(scripts_dir .. "/app/" .. app_name .. "/index.lua");