diff --git a/app/fax_queue/resources/job/fax_send.php b/app/fax_queue/resources/job/fax_send.php index 90ce8bb624..b733548e0f 100644 --- a/app/fax_queue/resources/job/fax_send.php +++ b/app/fax_queue/resources/job/fax_send.php @@ -346,11 +346,16 @@ $common_variables .= "sip_req_user=".$fax_number.","; } + //prepare the channel variables + $channel_variables = []; + if (!empty($fax_toll_allow)) { + $channel_variables["toll_allow"] = $fax_toll_allow; + } - //prepare the fax command - $channel_variables["toll_allow"] = !empty($fax_toll_allow) ? $fax_toll_allow : null; + //get the outbound route array $route_array = outbound_route_to_bridge($domain_uuid, $fax_prefix . $fax_number, $channel_variables); + //prepare the fax_uri if (empty($route_array)) { //send the internal call to the registered extension if (count($route_array) == 0) {