Add ring group call screening

This commit is contained in:
FusionPBX
2024-09-15 16:47:53 -06:00
committed by GitHub
parent 795343379c
commit 340c6e17f3
4 changed files with 118 additions and 4 deletions

View File

@@ -142,6 +142,10 @@
$apps[$x]['permissions'][$y]['name'] = "ring_group_destinations";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "ring_group_call_screen_enabled";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
//default settings
$y=0;
@@ -313,6 +317,10 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Select the ringback.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "ring_group_call_screen_enabled";
$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'] = "ring_group_call_forward_enabled";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Choose to follow a ring group destination's call forward.";

View File

@@ -186,6 +186,7 @@
$ring_group_cid_number_prefix = $_POST["ring_group_cid_number_prefix"] ?? null;
$ring_group_distinctive_ring = $_POST["ring_group_distinctive_ring"];
$ring_group_ringback = $_POST["ring_group_ringback"];
$ring_group_call_screen_enabled = $_POST["ring_group_call_screen_enabled"];
$ring_group_call_forward_enabled = $_POST["ring_group_call_forward_enabled"];
$ring_group_follow_me_enabled = $_POST["ring_group_follow_me_enabled"];
$ring_group_missed_call_app = $_POST["ring_group_missed_call_app"];
@@ -375,6 +376,7 @@
}
$array["ring_groups"][0]["ring_group_distinctive_ring"] = $ring_group_distinctive_ring;
$array["ring_groups"][0]["ring_group_ringback"] = $ring_group_ringback;
$array["ring_groups"][0]["ring_group_call_screen_enabled"] = $ring_group_call_screen_enabled;
$array["ring_groups"][0]["ring_group_call_forward_enabled"] = $ring_group_call_forward_enabled;
$array["ring_groups"][0]["ring_group_follow_me_enabled"] = $ring_group_follow_me_enabled;
if (permission_exists('ring_group_missed_call')) {
@@ -559,6 +561,7 @@
$ring_group_cid_number_prefix = $row["ring_group_cid_number_prefix"];
$ring_group_distinctive_ring = $row["ring_group_distinctive_ring"];
$ring_group_ringback = $row["ring_group_ringback"];
$ring_group_call_screen_enabled = $row["ring_group_call_screen_enabled"];
$ring_group_call_forward_enabled = $row["ring_group_call_forward_enabled"];
$ring_group_follow_me_enabled = $row["ring_group_follow_me_enabled"];
$ring_group_missed_call_app = $row["ring_group_missed_call_app"];
@@ -1139,6 +1142,33 @@
echo " </td>";
echo " </tr>";
if (permission_exists('ring_group_call_screen_enabled')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-ring_group_call_screen_enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='ring_group_call_screen_enabled'>\n";
echo " <option value=''></option>\n";
if ($ring_group_call_screen_enabled == "true") {
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
}
else {
echo " <option value='true'>".$text['label-true']."</option>\n";
}
if ($ring_group_call_screen_enabled == "false") {
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
}
else {
echo " <option value='false'>".$text['label-false']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo $text['description-ring_group_call_screen_enabled']."\n";
echo "</td>\n";
echo "</tr>\n";
}
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-ring_group_call_forward_enabled']."\n";