Fax queue setting prefer_local default false

This allows control over whether to prefer sending to the voip provider or attempt local fax call.
This commit is contained in:
FusionPBX 2025-02-04 18:40:46 -07:00 committed by GitHub
parent 73c37b6562
commit 7f2f0df9b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 2 deletions

View File

@ -76,6 +76,14 @@
$apps[$x]['default_settings'][$y]['default_setting_value'] = "30";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Number of days to retain the fax queue logs in the database for the maintenance app.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "5506cf35-e19d-4f02-ab9d-43fd0f8460f7";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "fax_queue";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "prefer_local";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Determine whether fax calls should attempt to stay local or route to the provider.";
//$y++;
//$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "afd729d9-cf69-4793-a140-21093814d314";
//$apps[$x]['default_settings'][$y]['default_setting_category'] = "fax_queue";

View File

@ -279,6 +279,8 @@
}
//check to see if the destination number is local
$local_destination = false;
if ($setting->get('fax_queue','prefer_local', false)) {
$sql = "select count(destination_uuid) ";
$sql .= "from v_destinations ";
$sql .= "where (";
@ -287,14 +289,14 @@
$sql .= " or concat(destination_trunk_prefix, destination_number) = :destination_number ";
$sql .= " or concat(destination_area_code, destination_number) = :destination_number ";
$sql .= " or concat(destination_prefix, destination_area_code, destination_number) = :destination_number ";
$sql .= ")";
$sql .= ") ";
$parameters['destination_number'] = $fax_number;
$destination_count = $database->select($sql, $parameters, 'column');
$local_destination = false;
if ($destination_count > 0) {
$local_destination = true;
$route_array[] = 'loopback/'.$fax_number.'/public';
}
}
//define the fax file
$common_variables = '';