diff --git a/app/extensions/app_config.php b/app/extensions/app_config.php index f51b828e6f..d99d130bdb 100644 --- a/app/extensions/app_config.php +++ b/app/extensions/app_config.php @@ -42,6 +42,8 @@ $apps[$x]['permissions'][$y]['name'] = "extension_toll"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "extension_call_screen"; + $y++; $apps[$x]['permissions'][$y]['name'] = "extension_enabled"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php index 52e69e59ef..c680f53837 100644 --- a/app/extensions/extension_edit.php +++ b/app/extensions/extension_edit.php @@ -1635,29 +1635,31 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; - echo " ".$text['label-call_screen_enabled']."\n"; - echo "\n"; - echo "\n"; - echo " \n"; + if ($call_screen_enabled == "true") { + echo " \n"; + } + else { + echo " \n"; + } + if ($call_screen_enabled == "false") { + echo " \n"; + } + else { + echo " \n"; + } + echo " \n"; + echo "
\n"; + echo $text['description-call_screen_enabled']."\n"; + echo "\n"; + echo "\n"; } - else { - echo " \n"; - } - if ($call_screen_enabled == "false") { - echo " \n"; - } - else { - echo " \n"; - } - echo " \n"; - echo "
\n"; - echo $text['description-call_screen_enabled']."\n"; - echo "\n"; - echo "\n"; echo "\n"; echo "\n"; diff --git a/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua b/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua index b7a5ab25b6..b1bcfaef5e 100644 --- a/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua +++ b/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua @@ -314,51 +314,6 @@ continue = false; 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 if (continue and password) then --build the xml @@ -419,6 +374,9 @@ if (string.len(call_group) > 0) then table.insert(xml, [[ ]]); end + if (string.len(call_screen_enabled) > 0) then + table.insert(xml, [[ ]]); + end if (string.len(user_record) > 0) then table.insert(xml, [[ ]]); end