Fix the call center dialplan creation when adding a call center queue.
This commit is contained in:
parent
75b2742fbf
commit
4b8e61b094
|
|
@ -255,7 +255,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//syncrhonize the configuration
|
||||
//synchronize the configuration
|
||||
save_call_center_xml();
|
||||
remove_config_from_cache('configuration:callcenter.conf');
|
||||
|
||||
|
|
@ -311,20 +311,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
}
|
||||
unset ($prep_statement);
|
||||
|
||||
//dialplan add or update
|
||||
$c = new call_center;
|
||||
$c->db = $db;
|
||||
$c->domain_uuid = $_SESSION['domain_uuid'];
|
||||
$c->call_center_queue_uuid = $call_center_queue_uuid;
|
||||
$c->dialplan_uuid = $dialplan_uuid;
|
||||
$c->queue_name = $queue_name;
|
||||
$c->queue_name = $queue_name;
|
||||
$c->queue_cid_prefix = $queue_cid_prefix;
|
||||
$c->queue_timeout_action = $queue_timeout_action;
|
||||
$c->queue_description = $queue_description;
|
||||
$c->destination_number = $queue_extension;
|
||||
$a = $c->dialplan();
|
||||
|
||||
//synchronize the configuration
|
||||
save_call_center_xml();
|
||||
remove_config_from_cache('configuration:callcenter.conf');
|
||||
|
|
@ -337,6 +323,20 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$_SESSION["message"] = $text['message-update'];
|
||||
} //if ($action == "update")
|
||||
|
||||
//dialplan add or update
|
||||
$c = new call_center;
|
||||
$c->db = $db;
|
||||
$c->domain_uuid = $_SESSION['domain_uuid'];
|
||||
$c->call_center_queue_uuid = $call_center_queue_uuid;
|
||||
$c->dialplan_uuid = $dialplan_uuid;
|
||||
$c->queue_name = $queue_name;
|
||||
$c->queue_name = $queue_name;
|
||||
$c->queue_cid_prefix = $queue_cid_prefix;
|
||||
$c->queue_timeout_action = $queue_timeout_action;
|
||||
$c->queue_description = $queue_description;
|
||||
$c->destination_number = $queue_extension;
|
||||
$a = $c->dialplan();
|
||||
|
||||
//add agent/tier to queue
|
||||
$agent_name = check_str($_POST["agent_name"]);
|
||||
$tier_level = check_str($_POST["tier_level"]);
|
||||
|
|
@ -399,8 +399,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
}
|
||||
|
||||
//redirect
|
||||
header("Location: call_center_queue_edit.php?id=".$call_center_queue_uuid);
|
||||
return;
|
||||
header("Location: call_center_queue_edit.php?id=".$call_center_queue_uuid);
|
||||
return;
|
||||
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue