added support for call_announce in callcenter

This commit is contained in:
James Rose
2014-08-08 03:14:20 +00:00
parent 311ebc6c69
commit 87c6d0c2df
3 changed files with 48 additions and 0 deletions

View File

@@ -209,6 +209,10 @@
$text['label-caller_id_name_prefix']['pt-pt'] = "Prefixo do nome do chamador";
$text['label-caller_id_name_prefix']['fr-fr'] = "Préfixe sur le nom d'appelant";
$text['label-caller_announce_sound']['en-us'] = "Announce Sound";
$text['label-caller_announce_frequency']['en-us'] = "Announce Frequency";
$text['label-description']['en-us'] = "Description";
$text['label-description']['es-cl'] = "descripción";
$text['label-description']['pt-pt'] = "Descrição";
@@ -380,6 +384,10 @@
$text['description-caller_id_name_prefix']['pt-pt'] = "Defina um prefixo no nome do originador.";
$text['description-caller_id_name_prefix']['fr-fr'] = "";
$text['description-caller_announce_sound']['en-us'] = "A sound to play to a caller every announce sound seconds. Needs the full path to the wav file.";
$text['description-caller_announce_frequency']['en-us'] = "How often should we play the announce sound. Enter a number in seconds";
$text['description-description']['en-us'] = "Enter a description, if desired.";
$text['description-description']['es-cl'] = "Ingrese una descripción, opcional.";
$text['description-description']['pt-pt'] = "Introduza uma descrição, se desejar.";

View File

@@ -70,6 +70,8 @@ else {
$queue_discard_abandoned_after = check_str($_POST["queue_discard_abandoned_after"]);
$queue_abandoned_resume_allowed = check_str($_POST["queue_abandoned_resume_allowed"]);
$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_description = check_str($_POST["queue_description"]);
//replace the space in the queue name with a dash
@@ -194,6 +196,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "queue_discard_abandoned_after, ";
$sql .= "queue_abandoned_resume_allowed, ";
$sql .= "queue_cid_prefix, ";
$sql .= "queue_announce_sound, ";
$sql .= "queue_announce_frequency, ";
$sql .= "queue_description ";
$sql .= ")";
$sql .= "values ";
@@ -217,6 +221,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "'$queue_discard_abandoned_after', ";
$sql .= "'$queue_abandoned_resume_allowed', ";
$sql .= "'$queue_cid_prefix', ";
$sql .= "'$queue_announce_sound', ";
$sql .= "'$queue_announce_frequency', ";
$sql .= "'$queue_description' ";
$sql .= ")";
$db->exec(check_sql($sql));
@@ -255,6 +261,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "queue_discard_abandoned_after = '$queue_discard_abandoned_after', ";
$sql .= "queue_abandoned_resume_allowed = '$queue_abandoned_resume_allowed', ";
$sql .= "queue_cid_prefix = '$queue_cid_prefix', ";
$sql .= "queue_announce_sound = '$queue_announce_sound', ";
$sql .= "queue_announce_frequency = '$queue_announce_frequency', ";
$sql .= "queue_description = '$queue_description' ";
$sql .= "where domain_uuid = '$domain_uuid' ";
$sql .= "and call_center_queue_uuid = '$call_center_queue_uuid'";
@@ -369,6 +377,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$queue_discard_abandoned_after = $row["queue_discard_abandoned_after"];
$queue_abandoned_resume_allowed = $row["queue_abandoned_resume_allowed"];
$queue_cid_prefix = $row["queue_cid_prefix"];
$queue_announce_sound = $row["queue_announce_sound"];
$queue_announce_frequency = $row["queue_announce_frequency"];
$queue_description = $row["queue_description"];
}
unset ($prep_statement);
@@ -901,6 +911,30 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-caller_announce_sound'].":\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='queue_announce_sound' maxlength='255' value='$queue_announce_sound'>\n";
echo "<br />\n";
echo $text['description-caller_announce_sound']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-caller_announce_frequency'].":\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='queue_announce_frequency' maxlength='255' value='$queue_announce_frequency'>\n";
echo "<br />\n";
echo $text['description-caller_announce_frequency']."\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

@@ -2559,6 +2559,8 @@ if (!function_exists('save_call_center_xml')) {
$queue_discard_abandoned_after = $row["queue_discard_abandoned_after"];
$queue_abandoned_resume_allowed = $row["queue_abandoned_resume_allowed"];
$queue_cid_prefix = $row["queue_cid_prefix"];
$queue_announce_sound = $row["queue_announce_sound"];
$queue_announce_frequency = $row["queue_announce_frequency"];
$queue_description = check_str($row["queue_description"]);
//replace space with an underscore
@@ -2771,6 +2773,8 @@ if (!function_exists('save_call_center_xml')) {
$queue_tier_rule_no_agent_no_wait = $row["queue_tier_rule_no_agent_no_wait"];
$queue_discard_abandoned_after = $row["queue_discard_abandoned_after"];
$queue_abandoned_resume_allowed = $row["queue_abandoned_resume_allowed"];
$queue_announce_sound = $row["queue_announce_sound"];
$queue_announce_frequency = $row ["queue_announce_frequency"];
$queue_description = $row["queue_description"];
if ($x > 0) {
$v_queues .= "\n";
@@ -2805,6 +2809,8 @@ if (!function_exists('save_call_center_xml')) {
$v_queues .= " <param name=\"tier-rule-no-agent-no-wait\" value=\"$queue_tier_rule_no_agent_no_wait\"/>\n";
$v_queues .= " <param name=\"discard-abandoned-after\" value=\"$queue_discard_abandoned_after\"/>\n";
$v_queues .= " <param name=\"abandoned-resume-allowed\" value=\"$queue_abandoned_resume_allowed\"/>\n";
$v_queues .= " <param name=\"announce-sound\" value=\"$queue_announce_sound\"/>\n";
$v_queues .= " <param name=\"announce_frequency\" value=\"$queue_announce_frequency\"/>\n";
$v_queues .= " </queue>";
$x++;
}