Fix the white space and tabs issues with fax_retry.lua.
This commit is contained in:
parent
6733521ac4
commit
6ec053708f
|
|
@ -174,17 +174,16 @@
|
|||
|
||||
--bad number
|
||||
elseif (fax_retry_attempts == 10) then
|
||||
freeswitch.consoleLog("INFO","FAX_RETRY FAILED: BAD NUMBER\n");
|
||||
freeswitch.consoleLog("INFO", "FAX_RETRY_STATS FAILURE BAD NUMBER: GATEWAY[".. fax_uri .."]");
|
||||
email_message_fail = email_message_fail.."We tried sending, but the number entered was not a working phone number "
|
||||
email_address = email_address:gsub("\\,", ",");
|
||||
freeswitch.email("",
|
||||
"",
|
||||
"To: "..email_address.."\nFrom: "..from_address.."\nSubject: Fax to: "..number_dialed.." was INVALID",
|
||||
email_message_fail ,
|
||||
fax_file
|
||||
);
|
||||
|
||||
freeswitch.consoleLog("INFO","FAX_RETRY FAILED: BAD NUMBER\n");
|
||||
freeswitch.consoleLog("INFO", "FAX_RETRY_STATS FAILURE BAD NUMBER: GATEWAY[".. fax_uri .."]");
|
||||
email_message_fail = email_message_fail.."We tried sending, but the number entered was not a working phone number "
|
||||
email_address = email_address:gsub("\\,", ",");
|
||||
freeswitch.email("",
|
||||
"",
|
||||
"To: "..email_address.."\nFrom: "..from_address.."\nSubject: Fax to: "..number_dialed.." was INVALID",
|
||||
email_message_fail ,
|
||||
fax_file
|
||||
);
|
||||
|
||||
--busy number
|
||||
elseif (fax_retry_attempts == 17) then
|
||||
|
|
@ -193,11 +192,11 @@
|
|||
email_message_fail = email_message_fail.." We tried sending, but the call was busy "..fax_busy_attempts.." of those times."
|
||||
email_address = email_address:gsub("\\,", ",");
|
||||
freeswitch.email("",
|
||||
"",
|
||||
"To: "..email_address.."\nFrom: "..from_address.."\nSubject: Fax to: "..number_dialed.." was BUSY",
|
||||
email_message_fail ,
|
||||
fax_file
|
||||
);
|
||||
"",
|
||||
"To: "..email_address.."\nFrom: "..from_address.."\nSubject: Fax to: "..number_dialed.." was BUSY",
|
||||
email_message_fail ,
|
||||
fax_file
|
||||
);
|
||||
|
||||
else
|
||||
--the fax failed completely. send a message
|
||||
|
|
@ -205,21 +204,17 @@
|
|||
freeswitch.consoleLog("INFO", "FAX_RETRY_STATS FAILURE: GATEWAY[".. fax_uri .."], tried 5 combinations without success");
|
||||
|
||||
email_message_fail = email_message_fail.." We tried sending 5 times ways. You may also want to know that the call was busy "..fax_busy_attempts.." of those times."
|
||||
|
||||
email_address = email_address:gsub("\\,", ",");
|
||||
|
||||
freeswitch.email("",
|
||||
"",
|
||||
"To: "..email_address.."\nFrom: "..from_address.."\nSubject: Fax to: "..number_dialed.." FAILED",
|
||||
email_message_fail ,
|
||||
fax_file
|
||||
);
|
||||
"",
|
||||
"To: "..email_address.."\nFrom: "..from_address.."\nSubject: Fax to: "..number_dialed.." FAILED",
|
||||
email_message_fail ,
|
||||
fax_file
|
||||
);
|
||||
|
||||
fax_retry_attempts = fax_retry_attempts + 1;
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
api = freeswitch.API();
|
||||
if ( not cmd ) then
|
||||
|
|
@ -249,9 +244,9 @@
|
|||
email_address = email_address:gsub("\\,", ",");
|
||||
|
||||
freeswitch.email("",
|
||||
"",
|
||||
"To: "..email_address.."\nFrom: "..from_address.."\nSubject: Fax to: "..number_dialed.." SENT",
|
||||
email_message_success ,
|
||||
fax_file
|
||||
);
|
||||
"",
|
||||
"To: "..email_address.."\nFrom: "..from_address.."\nSubject: Fax to: "..number_dialed.." SENT",
|
||||
email_message_success ,
|
||||
fax_file
|
||||
);
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue