Update index.lua
This commit is contained in:
parent
5fe295a818
commit
64623eaf40
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue