Create a new app_uuid when creating a dialplan however when copying a time condition, inbound and outbound route keep the original app_uuid.

This commit is contained in:
markjcrane
2015-12-06 10:02:24 -07:00
parent 689300e9cd
commit 85f84e0ef6

View File

@@ -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', ";