Add extension_call_screen permission, and add call_screen_enabled to extensions/extension_edit.php.
This commit is contained in:
@@ -42,6 +42,8 @@
|
|||||||
$apps[$x]['permissions'][$y]['name'] = "extension_toll";
|
$apps[$x]['permissions'][$y]['name'] = "extension_toll";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
|
$apps[$x]['permissions'][$y]['name'] = "extension_call_screen";
|
||||||
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "extension_enabled";
|
$apps[$x]['permissions'][$y]['name'] = "extension_enabled";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
|
|||||||
@@ -1635,29 +1635,31 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
if (permission_exists('extension_call_screen')) {
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
echo "<tr>\n";
|
||||||
echo " ".$text['label-call_screen_enabled']."\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
echo "</td>\n";
|
echo " ".$text['label-call_screen_enabled']."\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "</td>\n";
|
||||||
echo " <select class='formfld' name='call_screen_enabled'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
if ($call_screen_enabled == "true") {
|
echo " <select class='formfld' name='call_screen_enabled'>\n";
|
||||||
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
|
if ($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 ($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-call_screen_enabled']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
|
||||||
}
|
|
||||||
if ($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-call_screen_enabled']."\n";
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "</tr>\n";
|
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
|
|||||||
+3
-45
@@ -314,51 +314,6 @@
|
|||||||
continue = false;
|
continue = false;
|
||||||
end
|
end
|
||||||
|
|
||||||
--outbound hot desking - get the extension variables
|
|
||||||
if (continue) then
|
|
||||||
sql = "SELECT * FROM v_extensions WHERE dial_domain = '" .. domain_name .. "' and dial_user = '" .. user .. "' and enabled = 'true' ";
|
|
||||||
if (debug["sql"]) then
|
|
||||||
freeswitch.consoleLog("notice", "[xml_handler] SQL: " .. sql .. "\n");
|
|
||||||
end
|
|
||||||
dbh:query(sql, function(row)
|
|
||||||
--get the values from the database
|
|
||||||
extension_uuid = row.extension_uuid;
|
|
||||||
domain_uuid = row.domain_uuid;
|
|
||||||
sip_from_user = row.extension;
|
|
||||||
call_group = row.call_group;
|
|
||||||
user_record = row.user_record;
|
|
||||||
hold_music = row.hold_music;
|
|
||||||
toll_allow = row.toll_allow;
|
|
||||||
accountcode = row.accountcode;
|
|
||||||
user_context = row.user_context;
|
|
||||||
effective_caller_id_name = row.effective_caller_id_name;
|
|
||||||
effective_caller_id_number = row.effective_caller_id_number;
|
|
||||||
outbound_caller_id_name = row.outbound_caller_id_name;
|
|
||||||
outbound_caller_id_number = row.outbound_caller_id_number;
|
|
||||||
emergency_caller_id_name = row.emergency_caller_id_name;
|
|
||||||
emergency_caller_id_number = row.emergency_caller_id_number;
|
|
||||||
missed_call_app = row.missed_call_app;
|
|
||||||
missed_call_data = row.missed_call_data;
|
|
||||||
directory_full_name = row.directory_full_name;
|
|
||||||
directory_visible = row.directory_visible;
|
|
||||||
directory_exten_visible = row.directory_exten_visible;
|
|
||||||
limit_max = row.limit_max;
|
|
||||||
call_timeout = row.call_timeout;
|
|
||||||
limit_destination = row.limit_destination;
|
|
||||||
sip_force_contact = row.sip_force_contact;
|
|
||||||
sip_force_expires = row.sip_force_expires;
|
|
||||||
nibble_account = row.nibble_account;
|
|
||||||
sip_bypass_media = row.sip_bypass_media;
|
|
||||||
forward_all_enabled = row.forward_all_enabled;
|
|
||||||
forward_all_destination = row.forward_all_destination;
|
|
||||||
forward_busy_enabled = row.forward_busy_enabled;
|
|
||||||
forward_busy_destination = row.forward_busy_destination;
|
|
||||||
forward_no_answer_enabled = row.forward_no_answer_enabled;
|
|
||||||
forward_no_answer_destination = row.forward_no_answer_destination;
|
|
||||||
do_not_disturb = row.do_not_disturb;
|
|
||||||
end);
|
|
||||||
end
|
|
||||||
|
|
||||||
--set the xml array and then concatenate the array to a string
|
--set the xml array and then concatenate the array to a string
|
||||||
if (continue and password) then
|
if (continue and password) then
|
||||||
--build the xml
|
--build the xml
|
||||||
@@ -419,6 +374,9 @@
|
|||||||
if (string.len(call_group) > 0) then
|
if (string.len(call_group) > 0) then
|
||||||
table.insert(xml, [[ <variable name="call_group" value="]] .. call_group .. [["/>]]);
|
table.insert(xml, [[ <variable name="call_group" value="]] .. call_group .. [["/>]]);
|
||||||
end
|
end
|
||||||
|
if (string.len(call_screen_enabled) > 0) then
|
||||||
|
table.insert(xml, [[ <variable name="call_screen_enabled" value="]] .. call_screen_enabled .. [["/>]]);
|
||||||
|
end
|
||||||
if (string.len(user_record) > 0) then
|
if (string.len(user_record) > 0) then
|
||||||
table.insert(xml, [[ <variable name="user_record" value="]] .. user_record .. [["/>]]);
|
table.insert(xml, [[ <variable name="user_record" value="]] .. user_record .. [["/>]]);
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user