Update switch.php
This commit is contained in:
parent
9822b22b92
commit
a53acb4933
|
|
@ -451,7 +451,6 @@ function outbound_route_to_bridge($domain_uuid, $destination_number) {
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$result = $database->select($sql, $parameters, 'all');
|
$result = $database->select($sql, $parameters, 'all');
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|
||||||
if (is_array($result) && @sizeof($result) != 0) {
|
if (is_array($result) && @sizeof($result) != 0) {
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
|
|
@ -476,8 +475,7 @@ function outbound_route_to_bridge($domain_uuid, $destination_number) {
|
||||||
foreach ($sub_result as &$sub_row) {
|
foreach ($sub_result as &$sub_row) {
|
||||||
if ($sub_row['dialplan_detail_tag'] == "condition") {
|
if ($sub_row['dialplan_detail_tag'] == "condition") {
|
||||||
if ($sub_row['dialplan_detail_type'] == "destination_number") {
|
if ($sub_row['dialplan_detail_type'] == "destination_number") {
|
||||||
$dialplan_detail_data = $sub_row['dialplan_detail_data'];
|
$pattern = '/'.$sub_row['dialplan_detail_data'].'/';
|
||||||
$pattern = '/'.$dialplan_detail_data.'/';
|
|
||||||
preg_match($pattern, $destination_number, $matches, PREG_OFFSET_CAPTURE);
|
preg_match($pattern, $destination_number, $matches, PREG_OFFSET_CAPTURE);
|
||||||
if (count($matches) == 0) {
|
if (count($matches) == 0) {
|
||||||
$regex_match = false;
|
$regex_match = false;
|
||||||
|
|
@ -494,9 +492,9 @@ function outbound_route_to_bridge($domain_uuid, $destination_number) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($sub_result, $sub_result);
|
|
||||||
|
|
||||||
if ($regex_match) {
|
if ($regex_match) {
|
||||||
|
$x = 0;
|
||||||
foreach ($sub_result as &$sub_row) {
|
foreach ($sub_result as &$sub_row) {
|
||||||
$dialplan_detail_data = $sub_row['dialplan_detail_data'];
|
$dialplan_detail_data = $sub_row['dialplan_detail_data'];
|
||||||
if ($sub_row['dialplan_detail_tag'] == "action" && $sub_row['dialplan_detail_type'] == "bridge" && $dialplan_detail_data != "\${enum_auto_route}") {
|
if ($sub_row['dialplan_detail_tag'] == "action" && $sub_row['dialplan_detail_type'] == "bridge" && $dialplan_detail_data != "\${enum_auto_route}") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue