Update index.lua

This commit is contained in:
FusionPBX
2016-11-05 23:36:26 -06:00
committed by GitHub
parent 81e92ed003
commit 7180672fd1

View File

@@ -46,12 +46,17 @@ This method causes the script to get its manadatory arguments directly from the
-- Command line parameters -- Command line parameters
local params = { local params = {
cid_num = string.match(tostring(session:getVariable("caller_id_number")), "%d+"), cid_num = string.match(tostring(session:getVariable("caller_id_number")), "%d+"),
cid_name = session:getVariable("caller_id_name"), cid_name = session:getVariable("caller_id_name"),
domain_name = session:getVariable("domain_name"), domain_name = session:getVariable("domain_name"),
userid = "", -- session:getVariable("id") userid = "", -- session:getVariable("id")
loglevel = "W" -- Warning, Debug, Info loglevel = "W" -- Warning, Debug, Info
} }
--check if cid_num is numeric
if (tonumber(params["cid_num"]) == nil) then
return
end
-- local storage -- local storage
local sql = nil local sql = nil