diff --git a/app/dialplans/resources/classes/dialplan.php b/app/dialplans/resources/classes/dialplan.php index 485ca7ac47..0a139dc143 100644 --- a/app/dialplans/resources/classes/dialplan.php +++ b/app/dialplans/resources/classes/dialplan.php @@ -1386,11 +1386,15 @@ if (is_array($rows) && @sizeof($rows) != 0) { $y = 0; foreach ($rows as $x => $row) { - $primary_uuid = uuid(); + //set a unique uuid + $primary_uuid = uuid(); //copy data $array[$this->table][$x] = $row; + //dialplan copy should have a unique app_uuid + $array[$this->table][$x]['app_uuid'] = uuid(); + //overwrite $array[$this->table][$x][$this->uuid_prefix.'uuid'] = $primary_uuid; $array[$this->table][$x]['dialplan_description'] = trim($row['dialplan_description'].' ('.$text['label-copy'].')'); @@ -1436,6 +1440,7 @@ $database->app_name = $this->app_name; $database->app_uuid = $this->app_uuid; $database->save($array); + //view_array($database->message); unset($array); //revoke temporary permissions