mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Fix a bug with fax_success in a few places it was set to numeric 0 but used in an IF statement as a string. Fax retry worked in many situations but this bug prevented it from working all the time.
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
--set default variables
|
--set default variables
|
||||||
fax_retry_sleep = 30;
|
fax_retry_sleep = 30;
|
||||||
fax_retry_limit = 4;
|
fax_retry_limit = 4;
|
||||||
fax_busy_limit = 3;
|
fax_busy_limit = 5;
|
||||||
api = freeswitch.API();
|
api = freeswitch.API();
|
||||||
|
|
||||||
-- show all channel variables
|
-- show all channel variables
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
fax_busy_attempts = tonumber(env:getHeader("fax_busy_attempts"));
|
fax_busy_attempts = tonumber(env:getHeader("fax_busy_attempts"));
|
||||||
|
|
||||||
hangup_cause_q850 = tonumber(env:getHeader("hangup_cause_q850"));
|
hangup_cause_q850 = tonumber(env:getHeader("hangup_cause_q850"));
|
||||||
|
|
||||||
|
|
||||||
--set default values
|
--set default values
|
||||||
if (not origination_caller_id_name) then
|
if (not origination_caller_id_name) then
|
||||||
@@ -56,13 +56,13 @@
|
|||||||
end
|
end
|
||||||
--we got a busy signal.... hack we should really check sip_term_cause
|
--we got a busy signal.... hack we should really check sip_term_cause
|
||||||
if (not fax_success) then
|
if (not fax_success) then
|
||||||
fax_success = 0;
|
fax_success = "0";
|
||||||
fax_result_code = 2;
|
fax_result_code = 2;
|
||||||
end
|
end
|
||||||
|
|
||||||
if (hangup_cause_q850 == "17") then
|
if (hangup_cause_q850 == "17") then
|
||||||
fax_success = 0;
|
fax_success = "0";
|
||||||
fax_result_code=2;
|
fax_result_code = 2;
|
||||||
end
|
end
|
||||||
|
|
||||||
if (not fax_result_text) then
|
if (not fax_result_text) then
|
||||||
@@ -73,6 +73,9 @@
|
|||||||
--for email
|
--for email
|
||||||
email_address = env:getHeader("mailto_address");
|
email_address = env:getHeader("mailto_address");
|
||||||
--email_address = api:execute("system", "/bin/echo -n "..email_address.." | /bin/sed -e s/\,/\\\\,/g");
|
--email_address = api:execute("system", "/bin/echo -n "..email_address.." | /bin/sed -e s/\,/\\\\,/g");
|
||||||
|
--if (not email_address) then
|
||||||
|
-- email_address = '';
|
||||||
|
--end
|
||||||
email_address = email_address:gsub(",", "\\,");
|
email_address = email_address:gsub(",", "\\,");
|
||||||
from_address = env:getHeader("mailfrom_address");
|
from_address = env:getHeader("mailfrom_address");
|
||||||
if (from_address == null) then
|
if (from_address == null) then
|
||||||
|
|||||||
Reference in New Issue
Block a user