Update hangup_rx.lua
Enabled for now until code is completed to replace it.
This commit is contained in:
parent
f71e6563e7
commit
a66580eaa1
|
|
@ -210,38 +210,29 @@
|
||||||
end
|
end
|
||||||
|
|
||||||
--fax to email
|
--fax to email
|
||||||
---- cmd = "lua" .. " " .. quote(scripts_dir .. "/fax_to_email.lua") .. " ";
|
cmd = "lua" .. " " .. quote(scripts_dir .. "/fax_to_email.lua") .. " ";
|
||||||
--cmd = quote(shell_esc(php_dir).."/"..shell_esc(php_bin)).." "..quote(shell_esc(document_root).."/secure/fax_to_email.php").." ";
|
cmd = quote(shell_esc(php_dir).."/"..shell_esc(php_bin)).." "..quote(shell_esc(document_root).."/secure/fax_to_email.php").." ";
|
||||||
--cmd = cmd .. "email="..quote(shell_esc(fax_email)).." ";
|
cmd = cmd .. "email="..quote(shell_esc(fax_email)).." ";
|
||||||
--cmd = cmd .. "extension="..quote(shell_esc(fax_extension)).." ";
|
cmd = cmd .. "extension="..quote(shell_esc(fax_extension)).." ";
|
||||||
--cmd = cmd .. "name="..quote(shell_esc(fax_file)).." ";
|
cmd = cmd .. "name="..quote(shell_esc(fax_file)).." ";
|
||||||
--cmd = cmd .. "messages=" .. quote("result:"..shell_esc(fax_result_text).." sender:"..shell_esc(fax_remote_station_id).." pages:"..shell_esc(fax_document_total_pages)).." ";
|
cmd = cmd .. "messages=" .. quote("result:"..shell_esc(fax_result_text).." sender:"..shell_esc(fax_remote_station_id).." pages:"..shell_esc(fax_document_total_pages)).." ";
|
||||||
--cmd = cmd .. "domain="..quote(shell_esc(domain_name)).." ";
|
cmd = cmd .. "domain="..quote(shell_esc(domain_name)).." ";
|
||||||
--cmd = cmd .. "caller_id_name=" .. quote(shell_esc(caller_id_name) or '') .. " ";
|
cmd = cmd .. "caller_id_name=" .. quote(shell_esc(caller_id_name) or '') .. " ";
|
||||||
--cmd = cmd .. "caller_id_number=" .. quote(shell_esc(caller_id_number) or '') .. " ";
|
cmd = cmd .. "caller_id_number=" .. quote(shell_esc(caller_id_number) or '') .. " ";
|
||||||
--if #fax_forward_number > 0 then
|
if #fax_forward_number > 0 then
|
||||||
-- cmd = cmd .. "fax_relay=true ";
|
cmd = cmd .. "fax_relay=true ";
|
||||||
--else
|
else
|
||||||
-- cmd = cmd .. "fax_relay=false ";
|
cmd = cmd .. "fax_relay=false ";
|
||||||
--end
|
|
||||||
--if #fax_prefix > 0 then
|
|
||||||
-- cmd = cmd .. "fax_prefix=true ";
|
|
||||||
--else
|
|
||||||
-- cmd = cmd .. "fax_prefix=false ";
|
|
||||||
--end
|
|
||||||
--freeswitch.consoleLog("notice", "[fax] command: " .. cmd .. "\n");
|
|
||||||
--local handle = io.popen(cmd);
|
|
||||||
--result = handle:read("*a");
|
|
||||||
--handle:close();
|
|
||||||
|
|
||||||
--update the email queue status
|
|
||||||
if (fax_success == '1') then
|
|
||||||
sql = "update v_fax_queue ";
|
|
||||||
sql = sql .. "set fax_status = 'sent' ";
|
|
||||||
sql = sql .. "where fax_queue_uuid = :fax_queue_uuid ";
|
|
||||||
local params = {fax_queue_uuid = fax_queue_uuid}
|
|
||||||
dbh:query(sql, params);
|
|
||||||
end
|
end
|
||||||
|
if #fax_prefix > 0 then
|
||||||
|
cmd = cmd .. "fax_prefix=true ";
|
||||||
|
else
|
||||||
|
cmd = cmd .. "fax_prefix=false ";
|
||||||
|
end
|
||||||
|
freeswitch.consoleLog("notice", "[fax] command: " .. cmd .. "\n");
|
||||||
|
local handle = io.popen(cmd);
|
||||||
|
result = handle:read("*a");
|
||||||
|
handle:close();
|
||||||
|
|
||||||
--add to fax logs
|
--add to fax logs
|
||||||
sql = "insert into v_fax_logs ";
|
sql = "insert into v_fax_logs ";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue