diff --git a/app/dialplan/dialplan_copy.php b/app/dialplan/dialplan_copy.php index c99d664145..1160fc769f 100644 --- a/app/dialplan/dialplan_copy.php +++ b/app/dialplan/dialplan_copy.php @@ -77,6 +77,15 @@ else { } unset ($prep_statement); +//copy the app_uuid only for specific dialplans + switch ($app_uuid) { + case "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4": //inbound routes + case "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3": //outbound routes + case "4b821450-926b-175a-af93-a03c441818b1": //time conditions + default: + $app_uuid = null; + } + //copy the dialplan $dialplan_uuid = uuid(); $sql = "insert into v_dialplans "; @@ -95,7 +104,12 @@ else { $sql .= "("; $sql .= "'".$domain_uuid."', "; $sql .= "'$dialplan_uuid', "; - $sql .= "'$app_uuid', "; + if ($app_uuid == null) { + $sql .= "null, "; + } + else { + $sql .= "'$app_uuid', "; + } $sql .= "'".$dialplan_name."-copy', "; $sql .= "'$dialplan_order', "; $sql .= "'$dialplan_continue', ";