Fix the dialplan_uuid for call center dialplan.

This commit is contained in:
markjcrane
2015-07-09 01:01:12 -03:00
parent 2b0c9d6016
commit fb5c1a6ef9

View File

@@ -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;