While in sending mode it will not send again. The fax hangup hook will update the status to trying again if the fax fails or is set to failed if it reaches max tries.
The SQL query is missing the toll-allow setting from the virtual fax extension. All dialplans that have that condition will fail.
This patch makes sure the variable is present if need it.
Originate command is limited to around 1130 characters. So this work was to reduce the size. Single quotes aren't needed on everything as this is not a command line. Its an even socket command. Also moving fax_variables into the fax options prevents variable duplicates.
* Fix fax_queue to Email PDF Instead of TIF
Variables `$fax_file_tif` and `$fax_file_pdf` are missing a period before the extension so file_exists is always evaluating to false. Thus, TIF was always sent. Adds the period back into the path so the check works correctly.
NOTE: `$fax_file_tif` is completely unused and can be removed from this code for cleanup.
* Use single quotes.
* Add db field to v_fax_queue to link to fax log
* Add fax_duration field to v_fax_logs
Add fax duration to db to allow for logging of this data for fax email templates.
* Add new email variables to fax send
* Fix some logging variables and fax_log_uuid
Added back some missing session variables for the fax log.
Also update the email queue db field with the fax_log_uuid to allow us to add variables to the fax email templates later.
* Update hangup_tx.lua
- When the email address was not set then post process did not happen and the status was not updated to failed.
- Updated debug and file parameters for debugging.