This commit is contained in:
markjcrane
2015-12-09 17:19:26 -07:00
11 changed files with 160 additions and 8 deletions
+22
View File
@@ -122,6 +122,17 @@ $text['label-no_answer']['sv-se'] = "Inget Svar ";
$text['label-no_answer']['uk'] = "Без відповіді"; $text['label-no_answer']['uk'] = "Без відповіді";
$text['label-no_answer']['de-at'] = "Keine Antwort"; $text['label-no_answer']['de-at'] = "Keine Antwort";
$text['label-not_registered']['en-us'] = "Not Registered";
$text['label-not_registered']['es-cl'] = "";
$text['label-not_registered']['pt-pt'] = "";
$text['label-not_registered']['fr-fr'] = "";
$text['label-not_registered']['it-it'] = "";
$text['label-not_registered']['pt-br'] = "";
$text['label-not_registered']['pl'] = "";
$text['label-not_registered']['sv-se'] = "";
$text['label-not_registered']['uk'] = "";
$text['label-not_registered']['de-at'] = "";
$text['label-ignore-busy']['en-us'] = "Ignore Busy"; $text['label-ignore-busy']['en-us'] = "Ignore Busy";
$text['label-ignore-busy']['es-cl'] = ""; $text['label-ignore-busy']['es-cl'] = "";
$text['label-ignore-busy']['pt-pt'] = ""; $text['label-ignore-busy']['pt-pt'] = "";
@@ -335,6 +346,17 @@ $text['description-no_answer']['sv-se'] = "Om aktiverad, så tar den överhand f
$text['description-no_answer']['uk'] = ""; $text['description-no_answer']['uk'] = "";
$text['description-no_answer']['de-at'] = "Falls aktiv, wird der Wert 'Mailbox eingeschaltet' in der Nebenstelle überschrieben"; $text['description-no_answer']['de-at'] = "Falls aktiv, wird der Wert 'Mailbox eingeschaltet' in der Nebenstelle überschrieben";
$text['description-not_registered']['en-us'] = "If endpoint is not reachable, forward to this destination before going to voicemail.";
$text['description-not_registered']['es-cl'] = "";
$text['description-not_registered']['pt-pt'] = "";
$text['description-not_registered']['fr-fr'] = "";
$text['description-not_registered']['it-it'] = "";
$text['description-not_registered']['pt-br'] = "";
$text['description-not_registered']['pl'] = "";
$text['description-not_registered']['sv-se'] = "";
$text['description-not_registered']['uk'] = "";
$text['description-not_registered']['de-at'] = "";
$text['description-cid-number-prefix']['en-us'] = "Set the caller ID number prefix."; $text['description-cid-number-prefix']['en-us'] = "Set the caller ID number prefix.";
$text['description-cid-number-prefix']['es-cl'] = "Configure el prefijo de número de caller ID."; $text['description-cid-number-prefix']['es-cl'] = "Configure el prefijo de número de caller ID.";
$text['description-cid-number-prefix']['pt-pt'] = "Defina o número do Chamador"; $text['description-cid-number-prefix']['pt-pt'] = "Defina o número do Chamador";
+24
View File
@@ -102,6 +102,8 @@ else {
$forward_busy_enabled = $row["forward_busy_enabled"]; $forward_busy_enabled = $row["forward_busy_enabled"];
$forward_no_answer_destination = $row["forward_no_answer_destination"]; $forward_no_answer_destination = $row["forward_no_answer_destination"];
$forward_no_answer_enabled = $row["forward_no_answer_enabled"]; $forward_no_answer_enabled = $row["forward_no_answer_enabled"];
$forward_user_not_registered_destination = $row["forward_user_not_registered_destination"];
$forward_user_not_registered_enabled = $row["forward_user_not_registered_enabled"];
$follow_me_uuid = $row["follow_me_uuid"]; $follow_me_uuid = $row["follow_me_uuid"];
$forward_caller_id_uuid = $row["forward_caller_id_uuid"]; $forward_caller_id_uuid = $row["forward_caller_id_uuid"];
break; //limit to 1 row break; //limit to 1 row
@@ -122,6 +124,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$forward_busy_destination = check_str($_POST["forward_busy_destination"]); $forward_busy_destination = check_str($_POST["forward_busy_destination"]);
$forward_no_answer_enabled = check_str($_POST["forward_no_answer_enabled"]); $forward_no_answer_enabled = check_str($_POST["forward_no_answer_enabled"]);
$forward_no_answer_destination = check_str($_POST["forward_no_answer_destination"]); $forward_no_answer_destination = check_str($_POST["forward_no_answer_destination"]);
$forward_user_not_registered_destination = check_str($_POST["forward_user_not_registered_destination"]);
$forward_user_not_registered_enabled = check_str($_POST["forward_user_not_registered_enabled"]);
$forward_caller_id_uuid = check_str($_POST["forward_caller_id_uuid"]); $forward_caller_id_uuid = check_str($_POST["forward_caller_id_uuid"]);
$cid_name_prefix = check_str($_POST["cid_name_prefix"]); $cid_name_prefix = check_str($_POST["cid_name_prefix"]);
$cid_number_prefix = check_str($_POST["cid_number_prefix"]); $cid_number_prefix = check_str($_POST["cid_number_prefix"]);
@@ -371,6 +375,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "forward_busy_enabled = '".$forward_busy_enabled."', "; $sql .= "forward_busy_enabled = '".$forward_busy_enabled."', ";
$sql .= "forward_no_answer_destination = '".$forward_no_answer_destination."', "; $sql .= "forward_no_answer_destination = '".$forward_no_answer_destination."', ";
$sql .= "forward_no_answer_enabled = '".$forward_no_answer_enabled."', "; $sql .= "forward_no_answer_enabled = '".$forward_no_answer_enabled."', ";
$sql .= "forward_user_not_registered_destination = '".$forward_user_not_registered_destination."', ";
$sql .= "forward_user_not_registered_enabled = '".$forward_user_not_registered_enabled."', ";
$sql .= "forward_caller_id_uuid = ".(($forward_caller_id_uuid != '') ? "'".$forward_caller_id_uuid."' " : "null "); $sql .= "forward_caller_id_uuid = ".(($forward_caller_id_uuid != '') ? "'".$forward_caller_id_uuid."' " : "null ");
$sql .= "where domain_uuid = '".$domain_uuid."' "; $sql .= "where domain_uuid = '".$domain_uuid."' ";
$sql .= "and extension_uuid = '".$extension_uuid."'"; $sql .= "and extension_uuid = '".$extension_uuid."'";
@@ -596,6 +602,24 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
//CJB
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-not_registered']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
$on_click = "document.getElementById('dnd_disabled').checked=true;";
$on_click .= "document.getElementById('forward_user_not_registered_destination').focus();";
echo " <label for='forward_user_not_registered_disabled'><input type='radio' name='forward_user_not_registered_enabled' id='forward_user_not_registered_disabled' onclick=\"\" value='false' ".(($forward_user_not_registered_enabled == "false" || $forward_user_not_registered_enabled == "") ? "checked='checked'" : null)." /> ".$text['label-disabled']."</label> \n";
echo " <label for='forward_user_not_registered_enabled'><input type='radio' name='forward_user_not_registered_enabled' id='forward_user_not_registered_enabled' onclick=\"$on_click\" value='true' ".(($forward_user_not_registered_enabled == "true") ? "checked='checked'" : null)."/> ".$text['label-enabled']."</label> \n";
unset($on_click);
echo "&nbsp;&nbsp;&nbsp;";
echo " <input class='formfld' type='text' name='forward_user_not_registered_destination' id='forward_user_not_registered_destination' maxlength='255' placeholder=\"".$text['label-destination']."\" value=\"".$forward_user_not_registered_destination."\">\n";
echo " <br />".$text['description-not_registered'].".\n";
echo "</td>\n";
echo "</tr>\n";
//CJB
echo "<tr><td colspan='2'><br /></td></tr>\n"; echo "<tr><td colspan='2'><br /></td></tr>\n";
echo "<tr>\n"; echo "<tr>\n";
+5 -1
View File
@@ -99,7 +99,11 @@ else {
//prepare to page the results //prepare to page the results
$rows_per_page = 150; $rows_per_page = 150;
$param = ""; if ($_GET['showall'] && permission_exists('device_all')) {
$param = "&showall=true";
} else {
$param = "";
}
$page = $_GET['page']; $page = $_GET['page'];
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page); list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
@@ -12,6 +12,8 @@
<action application="set" data="forward_busy_destination=${user_data ${destination_number}@${domain_name} var forward_busy_destination}"/> <action application="set" data="forward_busy_destination=${user_data ${destination_number}@${domain_name} var forward_busy_destination}"/>
<action application="set" data="forward_no_answer_enabled=${user_data ${destination_number}@${domain_name} var forward_no_answer_enabled}"/> <action application="set" data="forward_no_answer_enabled=${user_data ${destination_number}@${domain_name} var forward_no_answer_enabled}"/>
<action application="set" data="forward_no_answer_destination=${user_data ${destination_number}@${domain_name} var forward_no_answer_destination}"/> <action application="set" data="forward_no_answer_destination=${user_data ${destination_number}@${domain_name} var forward_no_answer_destination}"/>
<action application="set" data="forward_user_not_registered_enabled=${user_data ${destination_number}@${domain_name} var forward_user_not_registered_enabled}"/>
<action application="set" data="forward_user_not_registered_destination=${user_data ${destination_number}@${domain_name} var forward_user_not_registered_destination}"/>
<action application="set" data="do_not_disturb=${user_data ${destination_number}@${domain_name} var do_not_disturb}"/> <action application="set" data="do_not_disturb=${user_data ${destination_number}@${domain_name} var do_not_disturb}"/>
<action application="set" data="call_timeout=${user_data ${destination_number}@${domain_name} var call_timeout}"/> <action application="set" data="call_timeout=${user_data ${destination_number}@${domain_name} var call_timeout}"/>
<action application="set" data="missed_call_app=${user_data ${destination_number}@${domain_name} var missed_call_app}"/> <action application="set" data="missed_call_app=${user_data ${destination_number}@${domain_name} var missed_call_app}"/>
+8
View File
@@ -366,6 +366,14 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = ""; $apps[$x]['db'][$y]['fields'][$z]['description']['en'] = "";
$z++; $z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "forward_user_not_registered_destination";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "forward_user_not_registered_enabled";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "follow_me_uuid"; $apps[$x]['db'][$y]['fields'][$z]['name'] = "follow_me_uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid"; $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
@@ -382,6 +382,13 @@
if (strlen($row['forward_no_answer_destination']) > 0) { if (strlen($row['forward_no_answer_destination']) > 0) {
$xml .= " <variable name=\"forward_no_answer_destination\" value=\"" . $row['forward_no_answer_destination'] . "\"/>\n"; $xml .= " <variable name=\"forward_no_answer_destination\" value=\"" . $row['forward_no_answer_destination'] . "\"/>\n";
} }
if (strlen($row['forward_user_not_registered_enabled']) > 0) {
$xml .= " <variable name=\"forward_user_not_registered_enabled\" value=\"" . $row['forward_user_not_registered_enabled'] . "\"/>\n";
}
if (strlen($row['forward_user_not_registered_destination']) > 0) {
$xml .= " <variable name=\"forward_user_not_registered_destination\" value=\"" . $row['forward_user_not_registered_destination'] . "\"/>\n";
}
if (strlen($row['do_not_disturb']) > 0) { if (strlen($row['do_not_disturb']) > 0) {
$xml .= " <variable name=\"do_not_disturb\" value=\"" . $row['do_not_disturb'] . "\"/>\n"; $xml .= " <variable name=\"do_not_disturb\" value=\"" . $row['do_not_disturb'] . "\"/>\n";
} }
+11
View File
@@ -615,6 +615,17 @@ $text['label-network_addr']['uk'] = "";
$text['label-network_addr']['de-at'] = "Netzwerk Adresse"; $text['label-network_addr']['de-at'] = "Netzwerk Adresse";
$text['label-network_addr']['he'] = "כתובת רשת"; $text['label-network_addr']['he'] = "כתובת רשת";
$text['label-mos_score']['en-us'] = "MOS Score";
$text['label-mos_score']['es-cl'] = "";
$text['label-mos_score']['pt-pt'] = "";
$text['label-mos_score']['fr-fr'] = "";
$text['label-mos_score']['pt-br'] = "";
$text['label-mos_score']['pl'] = "";
$text['label-mos_score']['sv-se'] = "";
$text['label-mos_score']['uk'] = "";
$text['label-mos_score']['de-at'] = "";
$text['label-mos_score']['he'] = "";
$text['label-name']['en-us'] = "Name"; $text['label-name']['en-us'] = "Name";
$text['label-name']['es-cl'] = "Nombre"; $text['label-name']['es-cl'] = "Nombre";
$text['label-name']['pt-pt'] = "Nome"; $text['label-name']['pt-pt'] = "Nome";
+33
View File
@@ -74,8 +74,36 @@ else {
$bridge_uuid = check_str($_REQUEST["network_addr"]); $bridge_uuid = check_str($_REQUEST["network_addr"]);
$order_by = check_str($_REQUEST["order_by"]); $order_by = check_str($_REQUEST["order_by"]);
$order = check_str($_REQUEST["order"]); $order = check_str($_REQUEST["order"]);
if (strlen(check_str($_REQUEST["mos_comparison"])) > 0) {
switch(check_str($_REQUEST["mos_comparison"])) {
case 'less':
$mos_comparison = "<";
break;
case 'greater':
$mos_comparison = ">";
break;
case 'lessorequal':
$mos_comparison = "<=";
break;
case 'greaterorequal':
$mos_comparison = ">=";
break;
case 'equal':
$mos_comparison = "<";
break;
case 'notequal':
$mos_comparison = "<>";
break;
}
} else {
$mos_comparison = '';
}
//$mos_comparison = check_str($_REQUEST["mos_comparison"]);
$mos_score = check_str($_REQUEST["mos_score"]);
} }
//build the sql where string //build the sql where string
if ($missed == true) { if ($missed == true) {
$sql_where_ands[] = "billsec = '0'"; $sql_where_ands[] = "billsec = '0'";
@@ -126,6 +154,7 @@ else {
if (strlen($write_codec) > 0) { $sql_where_ands[] = "write_codec like '%".$write_codec."%'"; } if (strlen($write_codec) > 0) { $sql_where_ands[] = "write_codec like '%".$write_codec."%'"; }
if (strlen($remote_media_ip) > 0) { $sql_where_ands[] = "remote_media_ip like '%".$remote_media_ip."%'"; } if (strlen($remote_media_ip) > 0) { $sql_where_ands[] = "remote_media_ip like '%".$remote_media_ip."%'"; }
if (strlen($network_addr) > 0) { $sql_where_ands[] = "network_addr like '%".$network_addr."%'"; } if (strlen($network_addr) > 0) { $sql_where_ands[] = "network_addr like '%".$network_addr."%'"; }
if (strlen($mos_comparison) > 0 && strlen($mos_score) > 0 ) { $sql_where_ands[] = "rtp_audio_in_mos " . $mos_comparison . " ".$mos_score.""; }
//if not admin or superadmin, only show own calls //if not admin or superadmin, only show own calls
if (!permission_exists('xml_cdr_domain')) { if (!permission_exists('xml_cdr_domain')) {
@@ -201,6 +230,9 @@ else {
$param .= "&remote_media_ip=".$remote_media_ip; $param .= "&remote_media_ip=".$remote_media_ip;
$param .= "&network_addr=".$network_addr; $param .= "&network_addr=".$network_addr;
$param .= "&bridge_uuid=".$bridge_uuid; $param .= "&bridge_uuid=".$bridge_uuid;
$param .= "&mos_comparison=".$mos_comparison;
$param .= "&mos_score=".$mos_score;
if ($_GET['showall'] && permission_exists('xml_cdr_all')) { if ($_GET['showall'] && permission_exists('xml_cdr_all')) {
$param .= "&showall=" . $_GET['showall']; $param .= "&showall=" . $_GET['showall'];
} }
@@ -297,6 +329,7 @@ else {
else { else {
$sql .= " limit ".$rows_per_page." offset ".$offset." "; $sql .= " limit ".$rows_per_page." offset ".$offset." ";
} }
$prep_statement = $db->prepare(check_sql($sql)); $prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute(); $prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); $result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
+14
View File
@@ -203,6 +203,20 @@ echo " <td class='vncell'>".$text['label-network_addr']."</td>";
echo " <td class='vtable'><input type='text' class='formfld' name='network_addr' value='$network_addr'></td>"; echo " <td class='vtable'><input type='text' class='formfld' name='network_addr' value='$network_addr'></td>";
echo " </tr>"; echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td class='vncell'>".$text['label-mos_score']."</td>";
echo " <td class='vtable'>";
echo " <select name='mos_comparison' class='formfld'>\n";
echo " <option value=''></option>\n";
echo " <option value='less'>&lt;</option>\n";
echo " <option value='greater'>&gt;</option>\n";
echo " <option value='lessorequal'>&lt;&#61;</option>\n";
echo " <option value='greaterorequal'>&gt;&#61;</option>\n";
echo " <option value='equal'>&#61;</option>\n";
echo " <option value='notequal'>&lt;&gt;</option>\n";
echo " </select>\n";
echo " <input type='text' class='formfld' name='mos_score' value='$mos_score'></td>";
echo " </tr>";
echo " <tr>";
echo " <td colspan='2' align='right'><br><input type='submit' name='submit' class='btn' value='".$text['button-search']."'></td>"; echo " <td colspan='2' align='right'><br><input type='submit' name='submit' class='btn' value='".$text['button-search']."'></td>";
echo " </tr>"; echo " </tr>";
echo "</table>"; echo "</table>";
@@ -188,8 +188,25 @@
end end
elseif (originate_disposition == "USER_NOT_REGISTERED") then elseif (originate_disposition == "USER_NOT_REGISTERED") then
--handle USER_NOT_REGISTERED
forward_user_not_registered_enabled = session:getVariable("forward_user_not_registered_enabled");
if (forward_user_not_registered_enabled == "true") then
forward_user_not_registered_destination = session:getVariable("forward_user_not_registered_destination");
if (forward_user_not_registered_destination == nil) then
freeswitch.consoleLog("NOTICE", "[failure_handler] forwarding user not registered to hangup\n");
session:hangup("NO_ANSWER");
else
freeswitch.consoleLog("NOTICE", "[failure_handler] forwarding user not registerd to: " .. forward_user_not_registered_destination .. "\n");
session:transfer(forward_user_not_registered_destination, "XML", context);
end
else
--send missed call notification
missed();
end
--send missed call notification --send missed call notification
missed(); --missed();
--handle USER_NOT_REGISTERED --handle USER_NOT_REGISTERED
if (debug["info"] ) then if (debug["info"] ) then
@@ -251,6 +251,9 @@
forward_busy_destination = row.forward_busy_destination; forward_busy_destination = row.forward_busy_destination;
forward_no_answer_enabled = row.forward_no_answer_enabled; forward_no_answer_enabled = row.forward_no_answer_enabled;
forward_no_answer_destination = row.forward_no_answer_destination; forward_no_answer_destination = row.forward_no_answer_destination;
forward_user_not_registered_enabled = row.forward_user_not_registered_enabled;
forward_user_not_registered_destination = row.forward_user_not_registered_destination;
do_not_disturb = row.do_not_disturb; do_not_disturb = row.do_not_disturb;
--set the dial_string --set the dial_string
@@ -477,6 +480,13 @@
if (string.len(forward_no_answer_destination) > 0) then if (string.len(forward_no_answer_destination) > 0) then
table.insert(xml, [[ <variable name="forward_no_answer_destination" value="]] .. forward_no_answer_destination .. [["/>]]); table.insert(xml, [[ <variable name="forward_no_answer_destination" value="]] .. forward_no_answer_destination .. [["/>]]);
end end
if (string.len(forward_user_not_registered_enabled) > 0) then
table.insert(xml, [[ <variable name="forward_user_not_registered_enabled" value="]] .. forward_user_not_registered_enabled .. [["/>]]);
end
if (string.len(forward_user_not_registered_destination) > 0) then
table.insert(xml, [[ <variable name="forward_user_not_registered_destination" value="]] .. forward_user_not_registered_destination .. [["/>]]);
end
if (string.len(do_not_disturb) > 0) then if (string.len(do_not_disturb) > 0) then
table.insert(xml, [[ <variable name="do_not_disturb" value="]] .. do_not_disturb .. [["/>]]); table.insert(xml, [[ <variable name="do_not_disturb" value="]] .. do_not_disturb .. [["/>]]);
end end