Make the two inbound lua scripts more robust when the domain is not found.
This commit is contained in:
parent
a9bbdd1f28
commit
11ee2be8f1
|
|
@ -86,10 +86,11 @@
|
|||
source = "memcache";
|
||||
end
|
||||
|
||||
if (domain_name ~= nil) then
|
||||
--set the call direction as a session variable
|
||||
session:setVariable("domain_name", domain_name);
|
||||
session:setVariable("domain", domain_name);
|
||||
session:setVariable("domain_uuid", domain_uuid);
|
||||
|
||||
--send information to the console
|
||||
freeswitch.consoleLog("notice", "[app:dialplan:inbound:get_domain] " .. cache .. " source: ".. source .."\n");
|
||||
end
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ This method causes the script to get its manadatory arguments directly from the
|
|||
21 Feb, 2014: move to app/diaplan/resources/call_block
|
||||
]]
|
||||
|
||||
if (session:getVariable("domain") ~= nil) then
|
||||
-- Command line parameters
|
||||
local params = { cmd = "",
|
||||
cid_num = string.gsub(tostring(session:getVariable("caller_id_number")), "+", ""),
|
||||
|
|
@ -121,3 +122,4 @@ This method causes the script to get its manadatory arguments directly from the
|
|||
end
|
||||
end
|
||||
--end
|
||||
end
|
||||
Loading…
Reference in New Issue