mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Use the queue uuid for the cc_queue
This commit is contained in:
@@ -99,6 +99,12 @@ if ($domains_processed == 1) {
|
|||||||
$dialplan_xml .= " </condition>\n";
|
$dialplan_xml .= " </condition>\n";
|
||||||
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".$row["queue_extension"]."$\">\n";
|
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".$row["queue_extension"]."$\">\n";
|
||||||
$dialplan_xml .= " <action application=\"answer\" data=\"\"/>\n";
|
$dialplan_xml .= " <action application=\"answer\" data=\"\"/>\n";
|
||||||
|
if (is_uuid($row['call_center_queue_uuid'])) {
|
||||||
|
$dialplan_xml .= " <action application=\"set\" data=\"call_center_queue_uuid=".$row['call_center_queue_uuid']."\"/>\n";
|
||||||
|
}
|
||||||
|
if (is_numeric($queue_extension)) {
|
||||||
|
$dialplan_xml .= " <action application=\"set\" data=\"queue_extension=".$row['queue_extension']."\"/>\n";
|
||||||
|
}
|
||||||
$dialplan_xml .= " <action application=\"set\" data=\"hangup_after_bridge=true\"/>\n";
|
$dialplan_xml .= " <action application=\"set\" data=\"hangup_after_bridge=true\"/>\n";
|
||||||
if ($row['queue_time_base_score_sec'] != '') {
|
if ($row['queue_time_base_score_sec'] != '') {
|
||||||
$dialplan_xml .= " <action application=\"set\" data=\"cc_base_score=".$row['queue_time_base_score_sec']."\"/>\n";
|
$dialplan_xml .= " <action application=\"set\" data=\"cc_base_score=".$row['queue_time_base_score_sec']."\"/>\n";
|
||||||
|
|||||||
@@ -145,7 +145,7 @@
|
|||||||
//delete the agent over event socket
|
//delete the agent over event socket
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
//callcenter_config tier del [queue_name] [agent_name]
|
//callcenter_config tier del [queue_name] [agent_name]
|
||||||
if (is_uuid($call_center_queue_uuid) && is_uuid($call_center_agent_uuid)) {
|
if (is_numeric($queue_extension) && is_uuid($call_center_agent_uuid)) {
|
||||||
$cmd = "api callcenter_config tier del ".$queue_extension."@".$_SESSION['domain_name']." ".$call_center_agent_uuid;
|
$cmd = "api callcenter_config tier del ".$queue_extension."@".$_SESSION['domain_name']." ".$call_center_agent_uuid;
|
||||||
$response = event_socket_request($fp, $cmd);
|
$response = event_socket_request($fp, $cmd);
|
||||||
}
|
}
|
||||||
@@ -331,6 +331,12 @@
|
|||||||
$dialplan_xml .= " </condition>\n";
|
$dialplan_xml .= " </condition>\n";
|
||||||
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".$queue_extension."$\">\n";
|
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".$queue_extension."$\">\n";
|
||||||
$dialplan_xml .= " <action application=\"answer\" data=\"\"/>\n";
|
$dialplan_xml .= " <action application=\"answer\" data=\"\"/>\n";
|
||||||
|
if (is_uuid($call_center_queue_uuid)) {
|
||||||
|
$dialplan_xml .= " <action application=\"set\" data=\"call_center_queue_uuid=".$call_center_queue_uuid."\"/>\n";
|
||||||
|
}
|
||||||
|
if (is_numeric($queue_extension)) {
|
||||||
|
$dialplan_xml .= " <action application=\"set\" data=\"queue_extension=".$queue_extension."\"/>\n";
|
||||||
|
}
|
||||||
$dialplan_xml .= " <action application=\"set\" data=\"hangup_after_bridge=true\"/>\n";
|
$dialplan_xml .= " <action application=\"set\" data=\"hangup_after_bridge=true\"/>\n";
|
||||||
if ($queue_time_base_score_sec != '') {
|
if ($queue_time_base_score_sec != '') {
|
||||||
$dialplan_xml .= " <action application=\"set\" data=\"cc_base_score=".$queue_time_base_score_sec."\"/>\n";
|
$dialplan_xml .= " <action application=\"set\" data=\"cc_base_score=".$queue_time_base_score_sec."\"/>\n";
|
||||||
@@ -434,19 +440,19 @@
|
|||||||
callcenter_config tier set position [queue_name] [agent_name] [position]
|
callcenter_config tier set position [queue_name] [agent_name] [position]
|
||||||
*/
|
*/
|
||||||
//add the agent
|
//add the agent
|
||||||
if (is_uuid($call_center_queue_uuid) && is_numeric($queue_extension) && is_numeric($tier_level) && is_numeric($tier_position)) {
|
if (is_numeric($queue_extension) && is_uuid($call_center_agent_uuid) && is_numeric($tier_level) && is_numeric($tier_position)) {
|
||||||
$cmd = "api callcenter_config tier add ".$queue_extension."@".$_SESSION["domain_name"]." ".$call_center_agent_uuid." ".$tier_level." ".$tier_position;
|
$cmd = "api callcenter_config tier add ".$queue_extension."@".$_SESSION["domain_name"]." ".$call_center_agent_uuid." ".$tier_level." ".$tier_position;
|
||||||
$response = event_socket_request($fp, $cmd);
|
$response = event_socket_request($fp, $cmd);
|
||||||
}
|
}
|
||||||
usleep(200);
|
usleep(200);
|
||||||
//agent set level
|
//agent set level
|
||||||
if (is_uuid($call_center_queue_uuid) && is_numeric($queue_extension) && is_numeric($tier_level)) {
|
if (is_numeric($queue_extension) && is_numeric($tier_level)) {
|
||||||
$cmd = "api callcenter_config tier set level ".$queue_extension."@".$_SESSION["domain_name"]." ".$call_center_agent_uuid." ".$tier_level;
|
$cmd = "api callcenter_config tier set level ".$queue_extension."@".$_SESSION["domain_name"]." ".$call_center_agent_uuid." ".$tier_level;
|
||||||
$response = event_socket_request($fp, $cmd);
|
$response = event_socket_request($fp, $cmd);
|
||||||
}
|
}
|
||||||
usleep(200);
|
usleep(200);
|
||||||
//agent set position
|
//agent set position
|
||||||
if (is_uuid($call_center_queue_uuid) && is_numeric($queue_extension) && is_numeric($tier_position)) {
|
if (is_numeric($queue_extension) && is_numeric($tier_position)) {
|
||||||
$cmd = "api callcenter_config tier set position ".$queue_extension."@".$_SESSION["domain_name"]." ".$tier_position;
|
$cmd = "api callcenter_config tier set position ".$queue_extension."@".$_SESSION["domain_name"]." ".$tier_position;
|
||||||
$response = event_socket_request($fp, $cmd);
|
$response = event_socket_request($fp, $cmd);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -372,14 +372,6 @@ if (!class_exists('xml_cdr')) {
|
|||||||
$this->array[$key]['cc_side'] = urldecode($xml->variables->cc_side);
|
$this->array[$key]['cc_side'] = urldecode($xml->variables->cc_side);
|
||||||
$this->array[$key]['cc_member_uuid'] = urldecode($xml->variables->cc_member_uuid);
|
$this->array[$key]['cc_member_uuid'] = urldecode($xml->variables->cc_member_uuid);
|
||||||
$this->array[$key]['cc_queue_joined_epoch'] = urldecode($xml->variables->cc_queue_joined_epoch);
|
$this->array[$key]['cc_queue_joined_epoch'] = urldecode($xml->variables->cc_queue_joined_epoch);
|
||||||
//remove the @domain from the queue name
|
|
||||||
$cc_queue = urldecode($xml->variables->cc_queue);
|
|
||||||
if (strpos($cc_queue, "@")) {
|
|
||||||
$this->array[$key]['cc_queue'] = substr($cc_queue, 0, strpos($cc_queue, "@"));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$this->array[$key]['cc_queue'] = $cc_queue;
|
|
||||||
}
|
|
||||||
$this->array[$key]['cc_member_session_uuid'] = urldecode($xml->variables->cc_member_session_uuid);
|
$this->array[$key]['cc_member_session_uuid'] = urldecode($xml->variables->cc_member_session_uuid);
|
||||||
$this->array[$key]['cc_agent_uuid'] = urldecode($xml->variables->cc_agent_uuid);
|
$this->array[$key]['cc_agent_uuid'] = urldecode($xml->variables->cc_agent_uuid);
|
||||||
$this->array[$key]['cc_agent'] = urldecode($xml->variables->cc_agent);
|
$this->array[$key]['cc_agent'] = urldecode($xml->variables->cc_agent);
|
||||||
@@ -394,6 +386,9 @@ if (!class_exists('xml_cdr')) {
|
|||||||
if (urldecode($xml->variables->cc_side) == 'agent') {
|
if (urldecode($xml->variables->cc_side) == 'agent') {
|
||||||
$this->array[$key]['direction'] = 'inbound';
|
$this->array[$key]['direction'] = 'inbound';
|
||||||
}
|
}
|
||||||
|
if (is_uuid(urldecode($xml->variables->call_center_queue_uuid))) {
|
||||||
|
$this->array[$key]['cc_queue'] = urldecode($xml->variables->call_center_queue_uuid;
|
||||||
|
}
|
||||||
|
|
||||||
//app info
|
//app info
|
||||||
$this->array[$key]['last_app'] = urldecode($xml->variables->last_app);
|
$this->array[$key]['last_app'] = urldecode($xml->variables->last_app);
|
||||||
|
|||||||
@@ -178,7 +178,7 @@
|
|||||||
$database->fields['cc_side'] = urldecode($xml->variables->cc_side);
|
$database->fields['cc_side'] = urldecode($xml->variables->cc_side);
|
||||||
$database->fields['cc_member_uuid'] = urldecode($xml->variables->cc_member_uuid);
|
$database->fields['cc_member_uuid'] = urldecode($xml->variables->cc_member_uuid);
|
||||||
$database->fields['cc_queue_joined_epoch'] = urldecode($xml->variables->cc_queue_joined_epoch);
|
$database->fields['cc_queue_joined_epoch'] = urldecode($xml->variables->cc_queue_joined_epoch);
|
||||||
$database->fields['cc_queue'] = urldecode($xml->variables->cc_queue);
|
$database->fields['cc_queue'] = urldecode($xml->variables->call_center_queue_uuid);
|
||||||
$database->fields['cc_member_session_uuid'] = urldecode($xml->variables->cc_member_session_uuid);
|
$database->fields['cc_member_session_uuid'] = urldecode($xml->variables->cc_member_session_uuid);
|
||||||
$database->fields['cc_agent_uuid'] = urldecode($xml->variables->cc_agent_uuid);
|
$database->fields['cc_agent_uuid'] = urldecode($xml->variables->cc_agent_uuid);
|
||||||
$database->fields['cc_agent'] = urldecode($xml->variables->cc_agent);
|
$database->fields['cc_agent'] = urldecode($xml->variables->cc_agent);
|
||||||
@@ -193,6 +193,9 @@
|
|||||||
if (urldecode($xml->variables->cc_side) == 'agent') {
|
if (urldecode($xml->variables->cc_side) == 'agent') {
|
||||||
$database->fields['direction'] = 'inbound';
|
$database->fields['direction'] = 'inbound';
|
||||||
}
|
}
|
||||||
|
if (is_uuid(urldecode($xml->variables->call_center_queue_uuid))) {
|
||||||
|
$this->array[$key]['cc_queue'] = urldecode($xml->variables->call_center_queue_uuid;
|
||||||
|
}
|
||||||
|
|
||||||
//app info
|
//app info
|
||||||
$database->fields['last_app'] = urldecode($xml->variables->last_app);
|
$database->fields['last_app'] = urldecode($xml->variables->last_app);
|
||||||
|
|||||||
Reference in New Issue
Block a user