mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Update the app.lua script.
This commit is contained in:
@@ -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");
|
||||
Reference in New Issue
Block a user