Merge pull request #5935 from greenbea/upstream/patch-39

[call_center] export call_center_queue_uuid channel variable to agent legs for cdr import
This commit is contained in:
FusionPBX
2021-05-10 12:29:55 -06:00
committed by GitHub
3 changed files with 8 additions and 15 deletions

View File

@@ -337,6 +337,7 @@
if (is_numeric($queue_extension)) {
$dialplan_xml .= " <action application=\"set\" data=\"queue_extension=".$queue_extension."\"/>\n";
}
$dialplan_xml .= " <action application=\"set\" data=\"cc_export_vars=call_center_queue_uuid\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"hangup_after_bridge=true\"/>\n";
if ($queue_time_base_score_sec != '') {
$dialplan_xml .= " <action application=\"set\" data=\"cc_base_score=".$queue_time_base_score_sec."\"/>\n";

View File

@@ -576,6 +576,10 @@
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "call_center_queue_uuid";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Queue uuid";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "cc_side";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Queue side is either member or agent";

View File

@@ -151,6 +151,7 @@ if (!class_exists('xml_cdr')) {
$this->fields[] = "last_app";
$this->fields[] = "last_arg";
$this->fields[] = "voicemail_message";
$this->fields[] = "call_center_queue_uuid";
$this->fields[] = "cc_side";
$this->fields[] = "cc_member_uuid";
$this->fields[] = "cc_queue_joined_epoch";
@@ -387,21 +388,8 @@ if (!class_exists('xml_cdr')) {
if (urldecode($xml->variables->cc_side) == 'agent') {
$this->array[$key]['direction'] = 'inbound';
}
if (strlen($xml->variables->cc_queue) > 0) {
$cc_queue = urldecode($xml->variables->cc_queue);
$cc_queue_array = explode('@', $cc_queue);
$cc_queue_extension = $cc_queue_array[0];
if (is_numeric($cc_queue_extension)) {
$sql = "select call_center_queue_uuid from v_call_center_queues ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and queue_extension = :queue_extension ";
$parameters['domain_uuid'] = urldecode($xml->variables->domain_uuid);
$parameters['queue_extension'] = $cc_queue_extension;
$database = new database;
$this->array[$key]['cc_queue'] = $database->select($sql, $parameters, 'column');
unset($parameters);
}
}
$this->array[$key]['cc_queue'] = urldecode($xml->variables->cc_queue);
$this->array[$key]['call_center_queue_uuid'] = urldecode($xml->variables->call_center_queue_uuid);
//app info
$this->array[$key]['last_app'] = urldecode($xml->variables->last_app);