Add ability to set default accountcodes

This commit is contained in:
agree
2021-05-05 21:28:47 -04:00
parent b9b8bed853
commit cf4f8d1e36
2 changed files with 21 additions and 0 deletions

View File

@@ -397,6 +397,11 @@
if (permission_exists('extension_accountcode')) {
$array["extensions"][$i]["accountcode"] = $accountcode;
}
else {
if ($action == "add") {
$array["extensions"][$i]["accountcode"] = get_accountcode();
}
}
if (permission_exists("effective_caller_id_name")) {
$array["extensions"][$i]["effective_caller_id_name"] = $effective_caller_id_name;
}
@@ -878,6 +883,7 @@
//set the defaults
if (strlen($user_context) == 0) { $user_context = $_SESSION['domain_name']; }
if (strlen($max_registrations) == 0) { $max_registrations = $_SESSION['extension']['max_registrations']['numeric']; }
if (strlen($accountcode) == 0) { $accountcode = get_accountcode(); }
if (strlen($limit_max) == 0) { $limit_max = '5'; }
if (strlen($limit_destination) == 0) { $limit_destination = 'error/user_busy'; }
if (strlen($call_timeout) == 0) { $call_timeout = '30'; }