From 73af3e3dbde999d66d321f589baee22ab1c2faff Mon Sep 17 00:00:00 2001 From: Luis Daniel Lucio Quiroz Date: Tue, 18 Apr 2017 14:03:41 -0400 Subject: [PATCH] CC Key Support for Call Center (#2518) * Exit Keys support * Multilanguage support * CC Key Support * Update call_center.php --- app/call_centers/app_config.php | 4 ++++ app/call_centers/app_languages.php | 22 ++++++++++++++++++- app/call_centers/call_center_queue_edit.php | 16 ++++++++++++++ .../resources/classes/call_center.php | 13 +++++++++++ 4 files changed, 54 insertions(+), 1 deletion(-) diff --git a/app/call_centers/app_config.php b/app/call_centers/app_config.php index 84fca42789..8023f78d02 100644 --- a/app/call_centers/app_config.php +++ b/app/call_centers/app_config.php @@ -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'] = ""; diff --git a/app/call_centers/app_languages.php b/app/call_centers/app_languages.php index dac09fab1e..2ba7a41237 100644 --- a/app/call_centers/app_languages.php +++ b/app/call_centers/app_languages.php @@ -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"; -?> \ No newline at end of file +?> diff --git a/app/call_centers/call_center_queue_edit.php b/app/call_centers/call_center_queue_edit.php index 74861d98c4..4b7914a339 100644 --- a/app/call_centers/call_center_queue_edit.php +++ b/app/call_centers/call_center_queue_edit.php @@ -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 .= " \n"; } + if (strlen($queue_cc_exit_keys) > 0) { + $dialplan_xml .= " \n"; + } $dialplan_xml .= " \n"; $dialplan_xml .= " \n"; $dialplan_xml .= " \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 "\n"; echo "\n"; + echo "\n"; + echo "\n"; + echo " ".$text['label-exit_keys']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-exit_keys']."\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; echo " ".$text['label-description']."\n"; diff --git a/app/call_centers/resources/classes/call_center.php b/app/call_centers/resources/classes/call_center.php index 32e8d2d481..2ad6426479 100644 --- a/app/call_centers/resources/classes/call_center.php +++ b/app/call_centers/resources/classes/call_center.php @@ -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(); */