Update hangup_rx.lua
This commit is contained in:
parent
a1976b2aec
commit
644bcd5c4c
|
|
@ -22,9 +22,6 @@
|
||||||
-- Contributor(s):
|
-- Contributor(s):
|
||||||
-- Mark J. Crane
|
-- Mark J. Crane
|
||||||
|
|
||||||
--set the debug options
|
|
||||||
debug["sql"] = true;
|
|
||||||
|
|
||||||
--create the api object
|
--create the api object
|
||||||
api = freeswitch.API();
|
api = freeswitch.API();
|
||||||
|
|
||||||
|
|
@ -38,6 +35,9 @@
|
||||||
local Database = require "resources.functions.database";
|
local Database = require "resources.functions.database";
|
||||||
dbh = Database.new('system');
|
dbh = Database.new('system');
|
||||||
|
|
||||||
|
--set the debug options
|
||||||
|
debug["sql"] = false;
|
||||||
|
|
||||||
--include json library
|
--include json library
|
||||||
local json
|
local json
|
||||||
if (debug["sql"]) then
|
if (debug["sql"]) then
|
||||||
|
|
@ -144,10 +144,12 @@
|
||||||
hangup_cause_q850 = tonumber(env:getHeader("hangup_cause_q850"));
|
hangup_cause_q850 = tonumber(env:getHeader("hangup_cause_q850"));
|
||||||
fax_file = env:getHeader("fax_file");
|
fax_file = env:getHeader("fax_file");
|
||||||
|
|
||||||
--prevent nil errors
|
--update the fax file if fax_filename is set
|
||||||
if (fax_file == nil) then
|
if (env:getHeader("fax_filename") ~= nil) then
|
||||||
fax_file = env:getHeader("fax_filename");
|
fax_file = env:getHeader("fax_filename");
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--prevent nil errors
|
||||||
if (fax_uri == nil) then
|
if (fax_uri == nil) then
|
||||||
fax_uri = "";
|
fax_uri = "";
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue