From d03fca2970272145221a5a6493227fef191b2287 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 28 Mar 2023 12:46:54 -0600 Subject: [PATCH] Always update the fax_status We want to show fax_status to be updated to show busy if the call was busy. --- .../scripts/app/fax/resources/scripts/hangup_tx.lua | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/scripts/resources/scripts/app/fax/resources/scripts/hangup_tx.lua b/app/scripts/resources/scripts/app/fax/resources/scripts/hangup_tx.lua index ce70555cf4..4b9d1e939c 100644 --- a/app/scripts/resources/scripts/app/fax/resources/scripts/hangup_tx.lua +++ b/app/scripts/resources/scripts/app/fax/resources/scripts/hangup_tx.lua @@ -339,13 +339,11 @@ dbh:query(sql, params); --update the email queue status - if (fax_success == '1') then - sql = "update v_fax_queue "; - sql = sql .. "set fax_status = :fax_status, fax_log_uuid = :fax_log_uuid "; - sql = sql .. "where fax_queue_uuid = :fax_queue_uuid "; - local params = {fax_queue_uuid = fax_queue_uuid, fax_status = 'sent', fax_log_uuid = uuid} - dbh:query(sql, params); - end + sql = "update v_fax_queue "; + sql = sql .. "set fax_status = :fax_status, fax_log_uuid = :fax_log_uuid "; + sql = sql .. "where fax_queue_uuid = :fax_queue_uuid "; + local params = {fax_queue_uuid = fax_queue_uuid, fax_status = fax_status, fax_log_uuid = uuid} + dbh:query(sql, params); --prepare base64 if (storage_type == "base64") then