From 06f580ab05f9331d5385c71467526ebf7e9552d0 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 19 Nov 2021 22:07:26 -0700 Subject: [PATCH] app_uuid needs to be unique for copied dialplans except for inbound and outbound routes, fifo, time conditions --- app/dialplans/resources/classes/dialplan.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/dialplans/resources/classes/dialplan.php b/app/dialplans/resources/classes/dialplan.php index 0a139dc143..76aa43a59a 100644 --- a/app/dialplans/resources/classes/dialplan.php +++ b/app/dialplans/resources/classes/dialplan.php @@ -1392,8 +1392,19 @@ //copy data $array[$this->table][$x] = $row; + //app_uuid needs to be unique for copied dialplans + //except for inbound and outbound routes, fifo, time conditions + $app_uuid = $row['app_uuid']; + switch ($app_uuid) { + case "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4": break; + case "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3": break; + case "16589224-c876-aeb3-f59f-523a1c0801f7": break; + case "4b821450-926b-175a-af93-a03c441818b1": break; + default: $app_uuid = uuid(); + } + //dialplan copy should have a unique app_uuid - $array[$this->table][$x]['app_uuid'] = uuid(); + $array[$this->table][$x]['app_uuid'] = $app_uuid; //overwrite $array[$this->table][$x][$this->uuid_prefix.'uuid'] = $primary_uuid;