CC Key Support for Call Center (#2518)

* Exit Keys support

* Multilanguage support

* CC Key Support

* Update call_center.php
This commit is contained in:
Luis Daniel Lucio Quiroz 2017-04-18 14:03:41 -04:00 committed by FusionPBX
parent b4b0014a26
commit 73af3e3dbd
4 changed files with 54 additions and 1 deletions

View File

@ -311,6 +311,10 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "queue_cc_exit_keys";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "queue_description";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";

View File

@ -772,6 +772,26 @@ $text['label-caller_announce_frequency']['fr-fr'] = "Annoncer Fréquence";
$text['label-caller_announce_frequency']['de-de'] = "Häufigkeit der Ankündigung";
$text['label-caller_announce_frequency']['de-at'] = "Häufigkeit der Ankündigung";
$text['label-exit_keys']['en-us'] = "Exit Key";
$text['label-exit_keys']['pt-br'] = "";
$text['label-exit_keys']['pl'] = "";
$text['label-exit_keys']['sv-se'] = "";
$text['label-exit_keys']['uk'] = "";
$text['label-exit_keys']['es-cl'] = "Tecla de salida";
$text['label-exit_keys']['pt-pt'] = "";
$text['label-exit_keys']['fr-fr'] = "Clé pour sortir la queue";
$text['label-exit_keys']['de-at'] = "";
$text['description-exit_keys']['en-us'] = "Keys to quite the current queue waiting.";
$text['description-exit_keys']['pt-br'] = "";
$text['description-exit_keys']['pl'] = "";
$text['description-exit_keys']['sv-se'] = "";
$text['description-exit_keys']['uk'] = "";
$text['description-exit_keys']['es-cl'] = "Teclas para salir de la espera de la cola.";
$text['description-exit_keys']['pt-pt'] = "";
$text['description-exit_keys']['fr-fr'] = "Clés pour sortir de l'attendance de la queue.";
$text['description-exit_keys']['de-at'] = "";
$text['label-call_timeout']['en-us'] = "Call Timeout";
$text['label-call_timeout']['es-cl'] = "Timeout de Llamada";
$text['label-call_timeout']['pt-pt'] = "Tempo limite da chamada";
@ -1431,4 +1451,4 @@ $text['button-agents']['uk'] = "Оператори";
$text['button-agents']['de-de'] = "Agenten";
$text['button-agents']['de-at'] = "Agenten";
?>
?>

View File

@ -97,6 +97,7 @@
$queue_cid_prefix = check_str($_POST["queue_cid_prefix"]);
$queue_announce_sound = check_str($_POST["queue_announce_sound"]);
$queue_announce_frequency = check_str($_POST["queue_announce_frequency"]);
$queue_cc_exit_keys = check_str($_POST["queue_cc_exit_keys"]);
$queue_description = check_str($_POST["queue_description"]);
//replace the space in the queue name with a dash
@ -223,6 +224,9 @@
if (strlen($queue_cid_prefix) > 0) {
$dialplan_xml .= " <action application=\"set\" data=\"effective_caller_id_name=".$queue_cid_prefix."#\${caller_id_name}\"/>\n";
}
if (strlen($queue_cc_exit_keys) > 0) {
$dialplan_xml .= " <action application=\"set\" data=\"cc_exit_keys=".$queue_cc_exit_keys."\"/>\n";
}
$dialplan_xml .= " <action application=\"callcenter\" data=\"".$queue_name.'@'.$_SESSION['domain_name']."\"/>\n";
$dialplan_xml .= " <action application=\"".$queue_timeout_application."\" data=\"".$queue_timeout_data."\"/>\n";
$dialplan_xml .= " </condition>\n";
@ -377,6 +381,7 @@
$queue_cid_prefix = $row["queue_cid_prefix"];
$queue_announce_sound = $row["queue_announce_sound"];
$queue_announce_frequency = $row["queue_announce_frequency"];
$queue_cc_exit_keys = check_str($_POST["queue_cc_exit_keys"]);
$queue_description = $row["queue_description"];
}
}
@ -885,6 +890,17 @@
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-exit_keys']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='queue_cc_exit_keys' value='$queue_cc_exit_keys'>\n";
echo "<br />\n";
echo $text['description-exit_keys']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-description']."\n";

View File

@ -41,6 +41,7 @@
public $queue_name;
public $queue_description;
public $destination_number;
public $queue_cc_exit_keys;
/**
* Called when the object is created
@ -143,6 +144,17 @@
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
$y++;
}
if (strlen($this->queue_cc_exit_keys) > 0) {
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "cc_exit_keys=".$this->queue_cc_exit_keys;
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
$y++;
}
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "callcenter";
@ -222,6 +234,7 @@ $c->queue_cid_prefix = "";
$c->queue_timeout_action = "";
$c->queue_description = "";
$c->destination_number = "";
$c->queue_cc_exit_keys = "";
$c->dialplan();
*/