* Update fax_send.php to get total pages
1. Added the total number of the FAX
Introduce a $total_pages variable
Include the cover page in the page count
✅ 1. Initialize total pages (NEW)
Location: Right before adding the cover page
➤ Added: line 425
$total_pages = $fax_page_count;
📌 Meaning:
Starts total count with attachment pages (same as original behaviour baseline)
✅ 2. Replace original page display logic
❌ Original code:
if ($fax_page_count > 0) {
$pdf->Text($x + 2.0, $y + 2.6, $fax_page_count.' '.$text['label-fax-page'.(($fax_page_count > 1) ? 's' : null)]);
}
✅ Replacement: line 560
$total_pages = $fax_page_count + 1; // 1 = cover page
$pdf->Text(
$x + 2.0,
$y + 2.6,
$total_pages.' '.$text['label-fax-page'.(($total_pages > 1) ? 's' : null)]
);
📌 Meaning:
Adds +1 for cover page
Always shows total pages instead of just attachments
Removes conditional (if ($fax_page_count > 0))
✅ 3. Handle multi-page cover message (NEW)
Location: After:
$pages = $pdf->getNumPages();
➤ Added: line 583
$total_pages += $pages;
📌 Meaning:
If your cover page expands into multiple pages (long message), those pages are added to total
This is important edge-case handling (nice touch 👍)
🧠 Behaviour Change (Before vs After)
❌ Before:
Only counted attachment pages
Ignored cover page
Display could be misleading
✅ After:
Counts:
Attachments
Cover page
Extra cover pages (if message is long)
Displays true total fax pages
* Update fax_send.php to get fax_retry_date
Expose and display the fax retry date/time inside email notifications by:
Pulling it from the database
Injecting it into the email template using a variable
✅ 1. Fetch fax_retry_date from the database File Path:
/var/www/fusionpbx/app/fax_queue/resources/job/fax_send.php
Location: Under
//get the fax queue details to send
➤ Added (around line ~228):
$fax_retry_date = $row["fax_retry_date"];
📌 What this does:
Extracts fax_retry_date from the v_fax_queue (or related query result)
Stores it in a PHP variable for later use
✅ 2. Inject variable into email body
Same file: fax_send.php
Location: Under
//replace variables in email body
➤ Added (around line ~659):
$email_body = str_replace('${fax_retry_date}', $fax_retry_date, $email_body);
📌 What this does:
Replaces ${fax_retry_date} placeholder in email template
Dynamically inserts retry date into outgoing emails
* Update fax_send.php
* Update fax_send.php
* Update fax_send.php
---------
Co-authored-by: FusionPBX <markjcrane@gmail.com>
The cond_start and cond_stop time format has been normalized to 24-hour time. If they are not normalized to one format, then two different formats would be needed.
Y-m-d H:i 24-hour format
Y-m-d h:i a 12-hour format with AM/PM
- Reported that stdout could cause audio issue on some models so this provides an option to leave it empty.
- Default the value to empty
- Continued support for fanvil_syslog_enable