Fix issue with sending local faxes
When sip_to_user or sip_req_user are used then we need to add these variables so that it can find the correct inbound route.
This commit is contained in:
parent
d49e8e4d2c
commit
df90b758bb
|
|
@ -291,7 +291,9 @@
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
$parameters['destination_number'] = $fax_number;
|
$parameters['destination_number'] = $fax_number;
|
||||||
$destination_count = $database->select($sql, $parameters, 'column');
|
$destination_count = $database->select($sql, $parameters, 'column');
|
||||||
|
$local_destination = false;
|
||||||
if ($destination_count > 0) {
|
if ($destination_count > 0) {
|
||||||
|
$local_destination = true;
|
||||||
$route_array[] = 'loopback/'.$fax_number.'/public';
|
$route_array[] = 'loopback/'.$fax_number.'/public';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -307,6 +309,12 @@
|
||||||
$common_variables .= "fax_header='" . escape_quote($fax_caller_id_name) . "',";
|
$common_variables .= "fax_header='" . escape_quote($fax_caller_id_name) . "',";
|
||||||
$common_variables .= "fax_file='" . escape_quote($fax_file) . "',";
|
$common_variables .= "fax_file='" . escape_quote($fax_file) . "',";
|
||||||
|
|
||||||
|
//add the fax destination number variables
|
||||||
|
if ($local_destination) {
|
||||||
|
$common_variables .= "sip_to_user=".$fax_number.",";
|
||||||
|
$common_variables .= "sip_req_user=".$fax_number.",";
|
||||||
|
}
|
||||||
|
|
||||||
//prepare the fax command
|
//prepare the fax command
|
||||||
if (empty($route_array)) {
|
if (empty($route_array)) {
|
||||||
$route_array = outbound_route_to_bridge($domain_uuid, $fax_prefix . $fax_number, $channel_variables);
|
$route_array = outbound_route_to_bridge($domain_uuid, $fax_prefix . $fax_number, $channel_variables);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue