Update the app.lua script.
This commit is contained in:
parent
a13703544b
commit
bce688667d
|
|
@ -33,17 +33,16 @@
|
||||||
app_name = argv[1];
|
app_name = argv[1];
|
||||||
|
|
||||||
--example use command
|
--example use command
|
||||||
--luarun app.lua name 'a' 'b 123' 'c'
|
--luarun app.lua app_name 'a' 'b 123' 'c'
|
||||||
|
|
||||||
--for loop through arguments
|
--for loop through arguments
|
||||||
arguments = "";
|
arguments = "";
|
||||||
for key,value in pairs(argv) do
|
for key,value in pairs(argv) do
|
||||||
if (key > 1) then
|
if (key > 1) then
|
||||||
arguments = arguments .. " '" .. value .. "'";
|
arguments = arguments .. " '" .. value .. "'";
|
||||||
freeswitch.consoleLog("notice", "[voicemail] argv["..key.."]: " .. argv[key] .. "\n");
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--route the request to the application
|
--route the request to the application
|
||||||
--freeswitch.consoleLog("notice", "[app] lua route: ".. scripts_dir .. "/app/" .. app_name .. "/index.lua" .. arguments .."\n");
|
--freeswitch.consoleLog("notice", "[app] lua route: ".. scripts_dir .. "/app/" .. app_name .. "/index.lua\n");
|
||||||
dofile(scripts_dir .. "/app/" .. app_name .. "/index.lua" .. arguments);
|
dofile(scripts_dir .. "/app/" .. app_name .. "/index.lua");
|
||||||
Loading…
Reference in New Issue