diff --git a/app/call_center/resources/classes/call_center.php b/app/call_center/resources/classes/call_center.php index 75559bed36..094593186b 100644 --- a/app/call_center/resources/classes/call_center.php +++ b/app/call_center/resources/classes/call_center.php @@ -70,7 +70,6 @@ $sql = "select dialplan_uuid, dialplan_name, dialplan_description from v_dialplans "; $sql .= "where dialplan_uuid = '".$this->dialplan_uuid."' "; $sql .= "and domain_uuid = '".$this->domain_uuid."' "; - //echo $sql; $prep_statement = $this->db->prepare($sql); if ($prep_statement) { $prep_statement->execute(); @@ -80,14 +79,8 @@ $dialplan_name = $row['dialplan_name']; $dialplan_description = $row['dialplan_description']; } - else { - $this->dialplan_uuid = ""; - } unset($prep_statement); } - else { - $this->dialplan_uuid = ""; - } } //build the dialplan array @@ -95,6 +88,9 @@ if (strlen($this->dialplan_uuid) > 0) { $dialplan["dialplan_uuid"] = $this->dialplan_uuid; } + else { + $this->dialplan_uuid = uuid(); + } $dialplan["domain_uuid"] = $this->domain_uuid; $dialplan["dialplan_name"] = ($this->queue_name != '') ? $this->queue_name : format_phone($this->destination_number); $dialplan["dialplan_number"] = $this->destination_number;