From 368d7a6987e93ee56f2648c60d673482de677cf1 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 24 Apr 2020 17:14:41 -0600 Subject: [PATCH 001/621] Update database.php --- resources/classes/database.php | 40 +++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/resources/classes/database.php b/resources/classes/database.php index daec7a2f23..7580b1c801 100644 --- a/resources/classes/database.php +++ b/resources/classes/database.php @@ -1263,9 +1263,6 @@ include "root.php"; if (!$parent_key_exists) { $sql .= $parent_key_name.", "; } - //foreach ($parent_field_names as $field_name) { - // $sql .= check_str($field_name).", "; - //} if (is_array($array)) { foreach ($array as $array_key => $array_value) { if (!is_array($array_value)) { @@ -1289,8 +1286,15 @@ include "root.php"; elseif ($array_value === "now()") { $sql .= "now(), "; } + elseif ($array_value === "user_uuid()") { + $sql .= ':'.$array_key.", "; + $params[$array_key] = $_SESSION['username']; + } + elseif ($array_value === "remote_address()") { + $sql .= ':'.$array_key.", "; + $params[$array_key] = $_SERVER['REMOTE_ADDR']; + } else { - //$sql .= "'".check_str($array_value)."', "; $sql .= ':'.$array_key.", "; $params[$array_key] = trim($array_value); } @@ -1370,8 +1374,15 @@ include "root.php"; elseif ($array_value === "now()") { $sql .= $array_key." = now(), "; } + elseif ($array_value === "user_uuid()") { + $sql .= $array_key." = :".$array_key.", "; + $params[$array_key] = $_SESSION['username']; + } + elseif ($array_value === "remote_address()") { + $sql .= $array_key." = :".$array_key.", "; + $params[$array_key] = $_SERVER['REMOTE_ADDR']; + } else { - //$sql .= $array_key." = '".check_str($array_value)."', "; $sql .= $array_key." = :".$array_key.", "; $params[$array_key] = trim($array_value); } @@ -1521,8 +1532,15 @@ include "root.php"; elseif ($v === "now()") { $sql .= $k." = now(), "; } + elseif ($v === "user_uuid()") { + $sql .= $k." = :".$k.", "; + $params[$k] = $_SESSION['username']; + } + elseif ($v === "remote_address()") { + $sql .= $k." = :".$k.", "; + $params[$k] = $_SERVER['REMOTE_ADDR']; + } else { - //$sql .= "$k = '".check_str($v)."', "; $sql .= $k." = :".$k.", "; $params[$k] = trim($v); } @@ -1639,9 +1657,16 @@ include "root.php"; elseif ($v === "now()") { $sql .= "now(), "; } + elseif ($v === "user_uuid()") { + $sql .= ':'.$k.", "; + $params[$k] = $_SESSION['username']; + } + elseif ($v === "remote_address()") { + $sql .= ':'.$k.", "; + $params[$k] = $_SERVER['REMOTE_ADDR']; + } else { $k = preg_replace('#[^a-zA-Z0-9_\-]#', '', $k); - //$sql .= "'".check_str($v)."', "; $sql .= ':'.$k.", "; $params[$k] = trim($v); } @@ -1652,7 +1677,6 @@ include "root.php"; $sql = str_replace(", )", ")", $sql); $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); try { - //$this->db->query(check_sql($sql)); $prep_statement = $this->db->prepare($sql); $prep_statement->execute($params); unset($prep_statement); From d29ea55bcfe7e172903739f57d51f15b2ffda11b Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 24 Apr 2020 17:36:14 -0600 Subject: [PATCH 002/621] Update database.php --- resources/classes/database.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/classes/database.php b/resources/classes/database.php index 7580b1c801..1ab0f06acc 100644 --- a/resources/classes/database.php +++ b/resources/classes/database.php @@ -1288,7 +1288,7 @@ include "root.php"; } elseif ($array_value === "user_uuid()") { $sql .= ':'.$array_key.", "; - $params[$array_key] = $_SESSION['username']; + $params[$array_key] = $_SESSION['user_uuid']; } elseif ($array_value === "remote_address()") { $sql .= ':'.$array_key.", "; @@ -1376,7 +1376,7 @@ include "root.php"; } elseif ($array_value === "user_uuid()") { $sql .= $array_key." = :".$array_key.", "; - $params[$array_key] = $_SESSION['username']; + $params[$array_key] = $_SESSION['user_uuid']; } elseif ($array_value === "remote_address()") { $sql .= $array_key." = :".$array_key.", "; @@ -1534,7 +1534,7 @@ include "root.php"; } elseif ($v === "user_uuid()") { $sql .= $k." = :".$k.", "; - $params[$k] = $_SESSION['username']; + $params[$k] = $_SESSION['user_uuid']; } elseif ($v === "remote_address()") { $sql .= $k." = :".$k.", "; @@ -1659,7 +1659,7 @@ include "root.php"; } elseif ($v === "user_uuid()") { $sql .= ':'.$k.", "; - $params[$k] = $_SESSION['username']; + $params[$k] = $_SESSION['user_uuid']; } elseif ($v === "remote_address()") { $sql .= ':'.$k.", "; From 61896c3e3f6ebc2c19b4b786c9ca3c56ea2dae12 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 25 Apr 2020 11:43:44 -0600 Subject: [PATCH 003/621] Update index.lua --- .../resources/scripts/app/voicemail/index.lua | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/app/scripts/resources/scripts/app/voicemail/index.lua b/app/scripts/resources/scripts/app/voicemail/index.lua index 61e9b095f8..d02f5afdd3 100644 --- a/app/scripts/resources/scripts/app/voicemail/index.lua +++ b/app/scripts/resources/scripts/app/voicemail/index.lua @@ -346,8 +346,29 @@ domain_uuid = string.lower(row["domain_uuid"]); end); - --get the message count and send the mwi event - message_waiting(voicemail_id, domain_uuid); + --get voicemail message details + if (voicemail_id) then + local sql = [[SELECT * FROM v_voicemails + WHERE domain_uuid = :domain_uuid + AND voicemail_id = :voicemail_id]] + local params = {domain_uuid = domain_uuid, voicemail_id = id}; + if (debug["sql"]) then + freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n"); + end + dbh:query(sql, params, function(row) + voicemail_local_after_email = row["voicemail_local_after_email"]; + end); + + --set default values + if (voicemail_local_after_email == nil) then + voicemail_local_after_email = "true"; + end + + --get the message count and send the mwi event + if (voicemail_local_after_email == 'true') then + message_waiting(voicemail_id, domain_uuid); + end + end end --check messages From 88846e822cc99bdaf0b1279c4e80c7e554fc87d3 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 28 Apr 2020 12:00:07 -0600 Subject: [PATCH 004/621] Update xml_cdr.php --- app/xml_cdr/xml_cdr.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/xml_cdr/xml_cdr.php b/app/xml_cdr/xml_cdr.php index 1c25691826..7455fb4aca 100644 --- a/app/xml_cdr/xml_cdr.php +++ b/app/xml_cdr/xml_cdr.php @@ -818,6 +818,9 @@ $content .= "\n"; //show the leg b only to those with the permission + if (!permission_exists('xml_cdr_lose_race') && $row['hangup_cause'] == 'LOSE_RACE') { + $content = ''; + } if ($row['leg'] == 'a') { echo $content; } From a872a6c84804f05583bddc12b247168e92f37553 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 28 Apr 2020 12:01:03 -0600 Subject: [PATCH 005/621] Update app_config.php --- app/xml_cdr/app_config.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/xml_cdr/app_config.php b/app/xml_cdr/app_config.php index a6fa04e325..4a35ad3798 100644 --- a/app/xml_cdr/app_config.php +++ b/app/xml_cdr/app_config.php @@ -193,6 +193,9 @@ $apps[$x]['permissions'][$y]['name'] = "xml_cdr_b_leg"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "xml_cdr_lose_race"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; $apps[$x]['permissions'][$y]['name'] = "xml_cdr_archive"; //$apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; From b261c7e6d532c6e0ab07caf6b405f4566609bc54 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 28 Apr 2020 16:11:06 -0600 Subject: [PATCH 006/621] Update xml_cdr.php --- app/xml_cdr/resources/classes/xml_cdr.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index 3880ab4591..d07d31c202 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -783,8 +783,8 @@ if (!class_exists('xml_cdr')) { $import = true; } - //import the call detail record - if ($import) { + //import the call detail files are less than 3 mb - 3 million bytes + if ($import && filesize($xml_cdr_dir.'/'.$file) < 3000000) { //get the xml cdr string $xml_string = file_get_contents($xml_cdr_dir.'/'.$file); @@ -796,11 +796,9 @@ if (!class_exists('xml_cdr')) { //delete the file after it has been imported unlink($xml_cdr_dir.'/'.$file); - } - //increment the value - if ($import) { - $x++; + //increment the value + $x++; } //if limit exceeded exit the loop From d53c90d1dd514bd661d6163f68fd71c64fc10116 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 28 Apr 2020 16:15:18 -0600 Subject: [PATCH 007/621] Update v_xml_cdr_import.php --- app/xml_cdr/v_xml_cdr_import.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/xml_cdr/v_xml_cdr_import.php b/app/xml_cdr/v_xml_cdr_import.php index 58535cb6d5..086fcfee33 100644 --- a/app/xml_cdr/v_xml_cdr_import.php +++ b/app/xml_cdr/v_xml_cdr_import.php @@ -661,7 +661,8 @@ $x = 0; while($file = readdir($dir_handle)) { if ($file != '.' && $file != '..') { - if ( !is_dir($xml_cdr_dir . '/' . $file) ) { + //import the call detail files are less than 3 mb - 3 million bytes + if (!is_dir($xml_cdr_dir . '/' . $file) && filesize($xml_cdr_dir.'/'.$file) < 3000000) { //get the leg of the call if (substr($file, 0, 2) == "a_") { $leg = "a"; From 0d4aeb6c87d1bcb49b9d0845ed05841fe1a89ee7 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 29 Apr 2020 09:26:53 -0600 Subject: [PATCH 008/621] Conference Center - Sessions: Adjust permissions to allow Admin to play recordings. --- app/conference_centers/download.php | 2 +- app/conference_centers/resources/classes/conference_centers.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/conference_centers/download.php b/app/conference_centers/download.php index 519104fa68..8bfbeb2186 100644 --- a/app/conference_centers/download.php +++ b/app/conference_centers/download.php @@ -30,7 +30,7 @@ //check permisions require_once "resources/check_auth.php"; - if (permission_exists('call_recording_view')) { + if (permission_exists('call_recording_view') || permission_exists('conference_session_play')) { //access granted } else { diff --git a/app/conference_centers/resources/classes/conference_centers.php b/app/conference_centers/resources/classes/conference_centers.php index bc65a83dad..a7faa2dc48 100644 --- a/app/conference_centers/resources/classes/conference_centers.php +++ b/app/conference_centers/resources/classes/conference_centers.php @@ -221,7 +221,7 @@ if (!class_exists('conference_centers')) { * download the recordings */ public function download() { - if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) { + if (permission_exists('conference_session_play') || permission_exists('call_recording_play') || permission_exists('call_recording_download')) { //cache limiter session_cache_limiter('public'); From 2d6e2a06f3c4d0f2b500d9bd3cc0b2f60e58c849 Mon Sep 17 00:00:00 2001 From: Mark J Crane Date: Fri, 1 May 2020 18:05:57 -0600 Subject: [PATCH 009/621] Remove this because it breaks some systems and this information isalready available on the status -> sip status page --- core/user_settings/user_dashboard.php | 34 --------------------------- 1 file changed, 34 deletions(-) diff --git a/core/user_settings/user_dashboard.php b/core/user_settings/user_dashboard.php index 92b9a3ac99..328094ab30 100644 --- a/core/user_settings/user_dashboard.php +++ b/core/user_settings/user_dashboard.php @@ -993,40 +993,6 @@ $hud[$n]['html'] .= "\n"; $c = ($c) ? 0 : 1; - $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); - if ($fp) { - //switch version - $switch_version = event_socket_request($fp, 'api version'); - preg_match("/FreeSWITCH Version (\d+\.\d+\.\d+(?:\.\d+)?).*\(.*?(\d+\w+)\s*\)/", $switch_version, $matches); - $switch_version = $matches[1]; - $switch_bits = $matches[2]; - if ($switch_version != '' && $switch_bits != '') { - $hud[$n]['html'] .= "\n"; - $hud[$n]['html'] .= "".$text['label-switch']."\n"; - $hud[$n]['html'] .= "".$switch_version." (".$switch_bits.")\n"; - $hud[$n]['html'] .= "\n"; - $c = ($c) ? 0 : 1; - } - - //switch uptime - $tmp = event_socket_request($fp, 'api status'); - $tmp = explode("\n", $tmp); - $tmp = $tmp[0]; - $tmp = explode(' ', $tmp); - $uptime = (($tmp[1]) ? $tmp[1].'y ' : null); - $uptime .= (($tmp[3]) ? $tmp[3].'d ' : null); - $uptime .= (($tmp[5]) ? $tmp[5].'h ' : null); - $uptime .= (($tmp[7]) ? $tmp[7].'m ' : null); - $uptime .= (($tmp[9]) ? $tmp[9].'s' : null); - if ($uptime != '') { - $hud[$n]['html'] .= "\n"; - $hud[$n]['html'] .= "".$text['label-switch_uptime']."\n"; - $hud[$n]['html'] .= "".$uptime."\n"; - $hud[$n]['html'] .= "\n"; - $c = ($c) ? 0 : 1; - } - } - //os uptime if (stristr(PHP_OS, 'Linux')) { unset($tmp); From 0279b655f21adefcd392dac2daf56c9e123f7b85 Mon Sep 17 00:00:00 2001 From: vivoras <60329535+vivoras@users.noreply.github.com> Date: Sat, 2 May 2020 03:29:23 +0200 Subject: [PATCH 010/621] Add Language options for GXP16XX (#5249) * Update {$mac}.xml Add language options --- resources/templates/provision/grandstream/gxp16xx/{$mac}.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/templates/provision/grandstream/gxp16xx/{$mac}.xml b/resources/templates/provision/grandstream/gxp16xx/{$mac}.xml index aede89f47a..d4405cfb30 100644 --- a/resources/templates/provision/grandstream/gxp16xx/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp16xx/{$mac}.xml @@ -2161,7 +2161,11 @@ +{if isset($grandstream_display_language) } +{$grandstream_display_language} +{else} auto +{/if} From c536beed3792275794e851f962eebd48f173c075 Mon Sep 17 00:00:00 2001 From: Igor Olhovskiy Date: Sat, 2 May 2020 04:30:45 +0300 Subject: [PATCH 011/621] Change min number of digis to 1 (#5246) As per https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools%3A+read And aligned to 310_att_xfer --- app/dialplans/resources/switch/conf/dialplan/300_dx.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/dialplans/resources/switch/conf/dialplan/300_dx.xml b/app/dialplans/resources/switch/conf/dialplan/300_dx.xml index ce5bf03fd3..418b8bfefe 100644 --- a/app/dialplans/resources/switch/conf/dialplan/300_dx.xml +++ b/app/dialplans/resources/switch/conf/dialplan/300_dx.xml @@ -3,7 +3,7 @@ - + From 6bea0b057e0076149845ea1e144b6d77a66728a3 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 2 May 2020 13:51:50 -0600 Subject: [PATCH 012/621] Update app_config.php --- app/grandstream/app_config.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/grandstream/app_config.php b/app/grandstream/app_config.php index fefceba8a8..f4ef676754 100644 --- a/app/grandstream/app_config.php +++ b/app/grandstream/app_config.php @@ -630,5 +630,13 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable Blind Transfer to BLF Yes=1, No=0. Default=0"; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "82b7076b-e596-49e8-b535-af86e21e0453"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_ip_address_mode"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "IP Address Mode. 0 - DHCP, 1 - Static IP, 2 - PPPoE. Default is 0"; + $y++; ?> From 5621f70820ee9295de5e828cb1b6843d00c9c25e Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 2 May 2020 13:52:17 -0600 Subject: [PATCH 013/621] Update {$mac}.xml --- resources/templates/provision/grandstream/gxp2170/{$mac}.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/templates/provision/grandstream/gxp2170/{$mac}.xml b/resources/templates/provision/grandstream/gxp2170/{$mac}.xml index 7bd317a45b..35414e92b9 100644 --- a/resources/templates/provision/grandstream/gxp2170/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2170/{$mac}.xml @@ -5720,6 +5720,7 @@ + {$grandstream_ip_address_mode} From 44e76067cb2a34125f8514a6b409d775ef9ec18f Mon Sep 17 00:00:00 2001 From: Len Date: Sat, 2 May 2020 19:36:31 -0400 Subject: [PATCH 014/621] Update {$mac}.xml (#5255) --- resources/templates/provision/grandstream/gxp2160/{$mac}.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/templates/provision/grandstream/gxp2160/{$mac}.xml b/resources/templates/provision/grandstream/gxp2160/{$mac}.xml index c143cabeaa..f056603eb7 100644 --- a/resources/templates/provision/grandstream/gxp2160/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2160/{$mac}.xml @@ -5720,6 +5720,7 @@ + {$grandstream_ip_address_mode} From af118b276eaa3a9eaa93534e96eda5c734ee6bcc Mon Sep 17 00:00:00 2001 From: Len Date: Sat, 2 May 2020 19:37:56 -0400 Subject: [PATCH 015/621] Update {$mac}.xml (#5253) --- resources/templates/provision/grandstream/gxp2135/{$mac}.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/templates/provision/grandstream/gxp2135/{$mac}.xml b/resources/templates/provision/grandstream/gxp2135/{$mac}.xml index c143cabeaa..b842a121a4 100644 --- a/resources/templates/provision/grandstream/gxp2135/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2135/{$mac}.xml @@ -5720,6 +5720,7 @@ + {$grandstream_ip_address_mode} @@ -6438,7 +6439,7 @@ - Auto + {$grandstream_display_language} From 368f4bc4d2b7a5b79d5d33b88965f79105f5d23d Mon Sep 17 00:00:00 2001 From: Len Date: Sat, 2 May 2020 19:38:26 -0400 Subject: [PATCH 017/621] Update {$mac}.xml (#5252) --- resources/templates/provision/grandstream/gxp2140/{$mac}.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/templates/provision/grandstream/gxp2140/{$mac}.xml b/resources/templates/provision/grandstream/gxp2140/{$mac}.xml index 4f7dd6803c..b842a121a4 100644 --- a/resources/templates/provision/grandstream/gxp2140/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2140/{$mac}.xml @@ -5720,6 +5720,7 @@ + {$grandstream_ip_address_mode} From 43c431894b91011e11c61e47fcfce302dfb25dfc Mon Sep 17 00:00:00 2001 From: Len Date: Tue, 5 May 2020 00:13:37 -0400 Subject: [PATCH 018/621] Update {$mac}.xml (#5254) --- resources/templates/provision/grandstream/gxp2130/{$mac}.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/templates/provision/grandstream/gxp2130/{$mac}.xml b/resources/templates/provision/grandstream/gxp2130/{$mac}.xml index 234acc5394..24c0af222c 100644 --- a/resources/templates/provision/grandstream/gxp2130/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2130/{$mac}.xml @@ -5720,6 +5720,7 @@ + {$grandstream_ip_address_mode} @@ -8098,7 +8099,7 @@ - {$grandstream_wallpaper_source} + From 30be1a99a8b8724c907f5704a91914b3b871d86c Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Tue, 5 May 2020 00:15:16 -0400 Subject: [PATCH 019/621] Add optional endconf flag for conference moderators (#5245) * Update index.lua * Update app_languages.php * Update app_config.php * Update conference_room_edit.php * Update app_config.php * Update conference_room_edit.php * Update app_languages.php * Update index.lua --- app/conference_centers/app_config.php | 9 ++++++ app/conference_centers/app_languages.php | 21 ++++++++++++ .../conference_room_edit.php | 32 +++++++++++++++++++ .../scripts/app/conference_center/index.lua | 6 +++- 4 files changed, 67 insertions(+), 1 deletion(-) diff --git a/app/conference_centers/app_config.php b/app/conference_centers/app_config.php index b5177a9972..d609b2e8ef 100644 --- a/app/conference_centers/app_config.php +++ b/app/conference_centers/app_config.php @@ -118,6 +118,11 @@ $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; $y++; + $apps[$x]['permissions'][$y]['name'] = "conference_room_moderator_endconf"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $apps[$x]['permissions'][$y]['groups'][] = "user"; + $y++; $apps[$x]['permissions'][$y]['name'] = "conference_room_schedule"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; @@ -310,6 +315,10 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Wait for the moderator to join before starting the conference."; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "moderator_endconf"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "When moderator exits end conference."; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "announce_name"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Introduce participants as they enter the conference."; diff --git a/app/conference_centers/app_languages.php b/app/conference_centers/app_languages.php index 5f230be770..cc2f27b218 100644 --- a/app/conference_centers/app_languages.php +++ b/app/conference_centers/app_languages.php @@ -527,6 +527,27 @@ $text['label-wait_for_moderator']['ru-ru'] = "Ждать модератора"; $text['label-wait_for_moderator']['sv-se'] = "Vänta på Moderator"; $text['label-wait_for_moderator']['uk-ua'] = "Очікування на модератора"; +$text['label-moderator_endconf']['en-us'] = "Moderator endconf"; +$text['label-moderator_endconf']['en-gb'] = "Moderator endconf"; +$text['label-moderator_endconf']['ar-eg'] = ""; +$text['label-moderator_endconf']['de-at'] = ""; //copied from de-de +$text['label-moderator_endconf']['de-ch'] = ""; //copied from de-de +$text['label-moderator_endconf']['de-de'] = ""; +$text['label-moderator_endconf']['es-cl'] = ""; +$text['label-moderator_endconf']['es-mx'] = ""; //copied from es-cl +$text['label-moderator_endconf']['fr-ca'] = ""; //copied from fr-fr +$text['label-moderator_endconf']['fr-fr'] = ""; +$text['label-moderator_endconf']['he-il'] = ""; +$text['label-moderator_endconf']['it-it'] = ""; +$text['label-moderator_endconf']['nl-nl'] = ""; +$text['label-moderator_endconf']['pl-pl'] = ""; +$text['label-moderator_endconf']['pt-br'] = ""; +$text['label-moderator_endconf']['pt-pt'] = ""; +$text['label-moderator_endconf']['ro-ro'] = ""; +$text['label-moderator_endconf']['ru-ru'] = ""; +$text['label-moderator_endconf']['sv-se'] = ""; +$text['label-moderator_endconf']['uk-ua'] = ""; + $text['label-view']['en-us'] = "View"; $text['label-view']['en-gb'] = "View"; $text['label-view']['ar-eg'] = ""; diff --git a/app/conference_centers/conference_room_edit.php b/app/conference_centers/conference_room_edit.php index 13fadb50ff..1a713b4e2e 100644 --- a/app/conference_centers/conference_room_edit.php +++ b/app/conference_centers/conference_room_edit.php @@ -66,6 +66,7 @@ $start_datetime = $_POST["start_datetime"]; $stop_datetime = $_POST["stop_datetime"]; $wait_mod = $_POST["wait_mod"]; + $moderator_endconf = $_POST["moderator_endconf"]; $announce_name = $_POST["announce_name"]; $announce_recording = $_POST["announce_recording"]; $announce_count = $_POST["announce_count"]; @@ -287,6 +288,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { if (strlen($record) == 0) { $record = 'false'; } if (strlen($max_members) == 0) { $max_members = 0; } if (strlen($wait_mod) == 0) { $wait_mod = 'true'; } + if (strlen($moderator_endconf) == 0) { $moderator_endconf = 'false'; } if (strlen($announce_name) == 0) { $announce_name = 'true'; } if (strlen($announce_recording) == 0) { $announce_recording = 'true'; } if (strlen($announce_count) == 0) { $announce_count = 'true'; } @@ -327,6 +329,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $array['conference_rooms'][0]['start_datetime'] = $start_datetime; $array['conference_rooms'][0]['stop_datetime'] = $stop_datetime; $array['conference_rooms'][0]['wait_mod'] = $wait_mod; + $array['conference_rooms'][0]['moderator_endconf'] = $moderator_endconf; $array['conference_rooms'][0]['announce_name'] = $announce_name; $array['conference_rooms'][0]['announce_recording'] = $announce_recording; $array['conference_rooms'][0]['announce_count'] = $announce_count; @@ -421,6 +424,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { if (strlen($wait_mod) > 0) { $array['conference_rooms'][0]['wait_mod'] = $wait_mod; } + if (strlen($moderator_endconf) > 0) { + $array['conference_rooms'][0]['moderator_endconf'] = $moderator_endconf; + } if (strlen($announce_name) > 0) { $array['conference_rooms'][0]['announce_name'] = $announce_name; } @@ -502,6 +508,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $start_datetime = $row["start_datetime"]; $stop_datetime = $row["stop_datetime"]; $wait_mod = $row["wait_mod"]; + $moderator_endconf = $row["moderator_endconf"]; $announce_name = $row["announce_name"]; $announce_recording = $row["announce_recording"]; $announce_count = $row["announce_count"]; @@ -569,6 +576,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { if (strlen($record) == 0) { $record = 'false'; } if (strlen($max_members) == 0) { $max_members = 0; } if (strlen($wait_mod) == 0) { $wait_mod = 'true'; } + if (strlen($moderator_endconf) == 0) { $moderator_endconf = 'false'; } if (strlen($announce_name) == 0) { $announce_name = 'true'; } if (strlen($announce_recording) == 0) { $announce_recording = 'true'; } if (strlen($announce_count) == 0) { $announce_count = 'true'; } @@ -772,6 +780,30 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; } + if (permission_exists('conference_room_moderator_endconf')) { + echo "\n"; + echo "".$text['label-moderator_endconf']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo "\n"; + echo "\n"; + } + if (permission_exists('conference_room_announce_name')) { echo "\n"; echo "".$text['label-announce_name']."\n"; diff --git a/app/scripts/resources/scripts/app/conference_center/index.lua b/app/scripts/resources/scripts/app/conference_center/index.lua index 7736623fe0..aa9290cd0d 100644 --- a/app/scripts/resources/scripts/app/conference_center/index.lua +++ b/app/scripts/resources/scripts/app/conference_center/index.lua @@ -568,6 +568,7 @@ profile = string.lower(row["profile"]); max_members = row["max_members"]; wait_mod = row["wait_mod"]; + moderator_endconf = row["moderator_endconf"]; moderator_pin = row["moderator_pin"]; participant_pin = row["participant_pin"]; announce_name = row["announce_name"]; @@ -690,11 +691,14 @@ flags = flags .. "|mute"; end end + if (member_type == "moderator") then --set as the moderator flags = flags .. "|moderator"; --when the moderator leaves end the conference - --flags = flags .. "|endconf"; + if (moderator_endconf == "true") then + flags = flags .. "|endconf"; + end --set the moderator controls session:execute("set","conference_controls=moderator"); end From 314a217d56fe0317f17f8d71ca2cbfa2a794dbf1 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 5 May 2020 21:32:33 -0600 Subject: [PATCH 020/621] Update xml_cdr.php --- app/xml_cdr/resources/classes/xml_cdr.php | 55 +++++++++++------------ 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index d07d31c202..fc2d416f1d 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -284,19 +284,33 @@ if (!class_exists('xml_cdr')) { //process data if the call detail record is not a duplicate if ($duplicate_uuid == false && is_uuid($uuid)) { - //get the destination number - if ($xml->variables->current_application == "bridge") { - $current_application_data = urldecode($xml->variables->current_application_data); - $bridge_array = explode("/", $current_application_data); - $destination_number = end($bridge_array); - if (strpos($destination_number,'@') !== FALSE) { - $destination_array = explode("@", $destination_number); - $destination_number = $destination_array[0]; + //get the caller details + $caller_id_name = urldecode($xml->variables->caller_id_name); + $caller_id_number = urldecode($xml->variables->caller_id_number); + if (isset($xml->variables->effective_caller_id_name)) { + $caller_id_name = urldecode($xml->variables->effective_caller_id_name); + } + if (isset($xml->variables->effective_caller_id_number)) { + $caller_id_number = urldecode($xml->variables->effective_caller_id_number); + } + + //get the values from the callflow. + $i = 0; + foreach ($xml->callflow as $row) { + if ($i == 0) { + $context = urldecode($row->caller_profile->context); + $destination_number = urldecode($row->caller_profile->destination_number); + $network_addr = urldecode($row->caller_profile->network_addr); } + if (strlen($caller_id_name) == 0) { + $caller_id_name = urldecode($row->caller_profile->caller_id_name); + } + if (strlen($caller_id_number) == 0) { + $caller_id_number = urldecode($row->caller_profile->caller_id_number); + } + $i++; } - else { - $destination_number = urldecode($xml->variables->sip_to_user); - } + unset($i); //if last_sent_callee_id_number is set use it for the destination_number if (strlen($xml->variables->last_sent_callee_id_number) > 0) { @@ -322,25 +336,6 @@ if (!class_exists('xml_cdr')) { $missed_call = 'true'; } - //get the caller details - $caller_id_name = urldecode($xml->variables->caller_id_name); - $caller_id_number = urldecode($xml->variables->caller_id_number); - if (isset($xml->variables->effective_caller_id_name)) { - $caller_id_name = urldecode($xml->variables->effective_caller_id_name); - } - if (isset($xml->variables->effective_caller_id_number)) { - $caller_id_number = urldecode($xml->variables->effective_caller_id_number); - } - $caller_id_destination = urldecode($xml->variables->caller_destination); - foreach ($xml->callflow as $row) { - $caller_id_number = urldecode($row->caller_profile->caller_id_number); - } - if (strlen($caller_id_name) == 0) { - foreach ($xml->callflow as $row) { - $caller_id_name = urldecode($row->caller_profile->caller_id_name); - } - } - //misc $uuid = urldecode($xml->variables->uuid); $this->array[$key]['xml_cdr_uuid'] = $uuid; From 1b5a14333e80df18a19a0a62d4cb01cc8f17a4d6 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 5 May 2020 22:47:18 -0600 Subject: [PATCH 021/621] Update menu.php --- resources/classes/menu.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/classes/menu.php b/resources/classes/menu.php index 368ab80cd3..36d73f1736 100644 --- a/resources/classes/menu.php +++ b/resources/classes/menu.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Copyright (C) 2010 - 2019 + Copyright (C) 2010 - 2020 All Rights Reserved. Contributor(s): @@ -1115,7 +1115,8 @@ if (!class_exists('menu')) { //main menu items if (is_array($menu_array) && sizeof($menu_array) != 0) { foreach ($menu_array as $menu_index_main => $menu_item_main) { - $html .= " "; + $menu_target = ($menu_field['menu_item_category'] == 'external') ? '_blank' : null; + $html .= " "; if ($menu_item_main['menu_item_icon'] != '') { $html .= ""; } From 5166308dd2aba8c6cd9f21833589405faa100aa7 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 5 May 2020 23:02:29 -0600 Subject: [PATCH 022/621] Update menu.php --- resources/classes/menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/classes/menu.php b/resources/classes/menu.php index 36d73f1736..f7411efcff 100644 --- a/resources/classes/menu.php +++ b/resources/classes/menu.php @@ -1115,7 +1115,7 @@ if (!class_exists('menu')) { //main menu items if (is_array($menu_array) && sizeof($menu_array) != 0) { foreach ($menu_array as $menu_index_main => $menu_item_main) { - $menu_target = ($menu_field['menu_item_category'] == 'external') ? '_blank' : null; + $menu_target = ($menu_item_main['menu_item_category'] == 'external') ? '_blank' : ''; $html .= " "; if ($menu_item_main['menu_item_icon'] != '') { $html .= ""; From e58f488677ff4e1241dc006ce5d5104550146f5d Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 6 May 2020 11:34:08 -0600 Subject: [PATCH 023/621] Ring Group - Edit: RG Forward permission adjustment. --- app/ring_groups/ring_group_edit.php | 42 ++++++++++++++++------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/app/ring_groups/ring_group_edit.php b/app/ring_groups/ring_group_edit.php index ce864d13df..5d40c8fd03 100644 --- a/app/ring_groups/ring_group_edit.php +++ b/app/ring_groups/ring_group_edit.php @@ -339,8 +339,10 @@ $array["ring_groups"][0]["ring_group_missed_call_app"] = $ring_group_missed_call_app; $array["ring_groups"][0]["ring_group_missed_call_data"] = $ring_group_missed_call_data; } - $array["ring_groups"][0]["ring_group_forward_enabled"] = $ring_group_forward_enabled; - $array["ring_groups"][0]["ring_group_forward_destination"] = $ring_group_forward_destination; + if (permission_exists('ring_group_forward')) { + $array["ring_groups"][0]["ring_group_forward_enabled"] = $ring_group_forward_enabled; + $array["ring_groups"][0]["ring_group_forward_destination"] = $ring_group_forward_destination; + } $array["ring_groups"][0]["ring_group_forward_toll_allow"] = $ring_group_forward_toll_allow; if (isset($ring_group_context)) { $array["ring_groups"][0]["ring_group_context"] = $ring_group_context; @@ -439,15 +441,15 @@ if ($action == "add") { //save the message to a session variable message::add($text['message-add']); - //redirect the browser - header("Location: ring_group_edit.php?id=".urlencode($ring_group_uuid)); - exit; } if ($action == "update") { //save the message to a session variable message::add($text['message-update']); } + //redirect the browser + header("Location: ring_group_edit.php?id=".urlencode($ring_group_uuid)); + exit; } //pre-populate the form @@ -1015,20 +1017,22 @@ echo "\n"; } - echo "\n"; - echo "\n"; - echo " ".$text['label-ring_group_forward']."\n"; - echo "\n"; - echo "\n"; - echo " "; - echo ""; - echo "
\n"; - echo $text['description-ring-group-forward']."\n"; - echo "\n"; - echo "\n"; + if (permission_exists('ring_group_forward')) { + echo "\n"; + echo "\n"; + echo " ".$text['label-ring_group_forward']."\n"; + echo "\n"; + echo "\n"; + echo " "; + echo ""; + echo "
\n"; + echo $text['description-ring-group-forward']."\n"; + echo "\n"; + echo "\n"; + } if (permission_exists('ring_group_forward_toll_allow')) { echo "\n"; From 90a4e6c47ff92a528b6f61808da827e7c0fceeec Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 6 May 2020 12:13:12 -0600 Subject: [PATCH 024/621] Contacts - List: Search in emails and/or notes. --- app/contacts/contacts.php | 58 +++++++++++++++++++++++++++------------ 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/app/contacts/contacts.php b/app/contacts/contacts.php index c601bbae82..3e55872cd0 100644 --- a/app/contacts/contacts.php +++ b/app/contacts/contacts.php @@ -138,23 +138,47 @@ $sql_search .= ") "; } else { - $sql_search .= "and contact_uuid in ( "; - $sql_search .= " select contact_uuid from v_contacts "; - $sql_search .= " where domain_uuid = :domain_uuid "; - $sql_search .= " and ( "; - $sql_search .= " lower(contact_organization) like :search or "; - $sql_search .= " lower(contact_name_given) like :search or "; - $sql_search .= " lower(contact_name_family) like :search or "; - $sql_search .= " lower(contact_nickname) like :search or "; - $sql_search .= " lower(contact_title) like :search or "; - $sql_search .= " lower(contact_category) like :search or "; - $sql_search .= " lower(contact_role) like :search or "; - $sql_search .= " lower(contact_url) like :search or "; - $sql_search .= " lower(contact_time_zone) like :search or "; - $sql_search .= " lower(contact_note) like :search or "; - $sql_search .= " lower(contact_type) like :search "; - $sql_search .= " ) "; - $sql_search .= ") "; + //open container + $sql_search .= "and ( "; + //search contact + $sql_search .= "contact_uuid in ( "; + $sql_search .= " select contact_uuid from v_contacts "; + $sql_search .= " where domain_uuid = :domain_uuid "; + $sql_search .= " and ( "; + $sql_search .= " lower(contact_organization) like :search or "; + $sql_search .= " lower(contact_name_given) like :search or "; + $sql_search .= " lower(contact_name_family) like :search or "; + $sql_search .= " lower(contact_nickname) like :search or "; + $sql_search .= " lower(contact_title) like :search or "; + $sql_search .= " lower(contact_category) like :search or "; + $sql_search .= " lower(contact_role) like :search or "; + $sql_search .= " lower(contact_url) like :search or "; + $sql_search .= " lower(contact_time_zone) like :search or "; + $sql_search .= " lower(contact_note) like :search or "; + $sql_search .= " lower(contact_type) like :search "; + $sql_search .= " ) "; + $sql_search .= ") "; + //search contact emails + if (permission_exists('contact_email_view')) { + $sql_search .= "or contact_uuid in ( "; + $sql_search .= " select contact_uuid from v_contact_emails "; + $sql_search .= " where domain_uuid = :domain_uuid "; + $sql_search .= " and ( "; + $sql_search .= " lower(email_address) like :search or "; + $sql_search .= " lower(email_description) like :search "; + $sql_search .= " ) "; + $sql_search .= ") "; + } + //search contact notes + if (permission_exists('contact_note_view')) { + $sql_search .= "or contact_uuid in ( "; + $sql_search .= " select contact_uuid from v_contact_notes "; + $sql_search .= " where domain_uuid = :domain_uuid "; + $sql_search .= " and lower(contact_note) like :search "; + $sql_search .= ") "; + } + //close container + $sql_search .= ") "; } $parameters['search'] = '%'.$search.'%'; } From 33d06e7f67ae1e26f8ec4dc18f5ce0acee5bb71d Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 6 May 2020 12:40:59 -0600 Subject: [PATCH 025/621] Upgrade - Add step identifier to Data Types. --- core/upgrade/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/upgrade/index.php b/core/upgrade/index.php index 3cbc66113e..45ef27cafe 100644 --- a/core/upgrade/index.php +++ b/core/upgrade/index.php @@ -182,7 +182,7 @@ echo "\n"; echo "\n"; echo " \n"; echo " \n"; echo "".(permission_exists('xml_cdr_details') ? "" : null)."\n"; - echo "\n"; // dummy row to maintain alternating background color - } + if (permission_exists('call_recording_play')) { + echo "".(permission_exists('xml_cdr_details') ? "" : null)."\n"; + echo "\n"; // dummy row to maintain alternating background color + } if (permission_exists('call_recording_play')) { $list_row_url = "javascript:recording_play('".escape($row['call_recording_uuid'])."');"; } From 113b9d15d12334be1701655b31009cfd59477813 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 20 May 2020 20:06:16 -0600 Subject: [PATCH 088/621] IBM Watson remove *HESITATION --- .../scripts/app/voicemail/resources/functions/record_message.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/app/scripts/resources/scripts/app/voicemail/resources/functions/record_message.lua b/app/scripts/resources/scripts/app/voicemail/resources/functions/record_message.lua index b2de6f3997..74fd818017 100644 --- a/app/scripts/resources/scripts/app/voicemail/resources/functions/record_message.lua +++ b/app/scripts/resources/scripts/app/voicemail/resources/functions/record_message.lua @@ -221,6 +221,7 @@ end local handle = io.popen(transcribe_cmd); local transcribe_result = handle:read("*a"); + transcribe_result = transcribe_result:gsub('*HESITATION ', ''); handle:close(); if (debug["info"]) then freeswitch.consoleLog("notice", "[voicemail] CMD: " .. transcribe_cmd .. "\n"); From f5bfc2199a1d6154d0cdbc6521f3a0c70f6dc09e Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 20 May 2020 21:24:19 -0600 Subject: [PATCH 089/621] Theme: Side Menu default state controls. --- .../default_settings/default_setting_edit.php | 6 + core/default_settings/default_settings.php | 3 + core/domain_settings/domain_setting_edit.php | 6 + core/domain_settings/domain_settings.php | 3 + core/user_settings/user_setting_edit.php | 6 + core/user_settings/user_setting_set.php | 121 +++++++++++++++ core/user_settings/user_settings.php | 7 +- resources/app_languages.php | 48 +++++- resources/classes/menu.php | 43 ++++-- resources/footer.php | 1 + themes/default/app_config.php | 8 + themes/default/app_languages.php | 140 +++++++++++++++++- themes/default/css.php | 52 ++++++- themes/default/template.php | 136 ++++++++++------- 14 files changed, 498 insertions(+), 82 deletions(-) create mode 100644 core/user_settings/user_setting_set.php diff --git a/core/default_settings/default_setting_edit.php b/core/default_settings/default_setting_edit.php index 27b4491881..75c6ed4509 100644 --- a/core/default_settings/default_setting_edit.php +++ b/core/default_settings/default_setting_edit.php @@ -609,6 +609,12 @@ echo " \n"; echo " \n"; } + elseif ($category == "theme" && $subcategory == "menu_side_state" && $name == "text" ) { + echo " \n"; + } elseif ($category == "voicemail" && $subcategory == "voicemail_file" && $name == "text" ) { echo " \n"; } + elseif ($category == "theme" && $subcategory == "menu_side_state" && $name == "text" ) { + echo " \n"; + } elseif ($category == "voicemail" && $subcategory == "voicemail_file" && $name == "text" ) { echo " \n"; } + elseif ($user_setting_category == "theme" && $user_setting_subcategory == "menu_side_state" && $user_setting_name == "text" ) { + echo " \n"; + } else { echo " \n"; } diff --git a/core/user_settings/user_setting_set.php b/core/user_settings/user_setting_set.php new file mode 100644 index 0000000000..9aea30f50c --- /dev/null +++ b/core/user_settings/user_setting_set.php @@ -0,0 +1,121 @@ + +Portions created by the Initial Developer are Copyright (C) 2020 +the Initial Developer. All Rights Reserved. + +Contributor(s): +Mark J Crane +*/ + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//get http post variables and set them to php variables + if (is_array($_GET) && @sizeof($_GET) != 0) { + $user_setting_category = strtolower($_GET['category']); + $user_setting_subcategory = strtolower($_GET['subcategory']); + $user_setting_name = strtolower($_GET['name']); + $submitted_value = $_GET['value']; + //$submitted_order = is_numeric($_GET['order']) ? $_GET['order'] : null; + $submitted_enabled = strtolower($_GET['enabled']); + } + +//validate allowed user setting + switch ($user_setting_category) { + case 'theme': + switch ($user_setting_subcategory) { + case 'menu_side_state': + if ($submitted_value == 'expanded' || $submitted_value == 'contracted') { + $user_setting_value = $submitted_value; + $user_setting_enabled = 'true'; + } + break 2; + default: + //setting not allowed + echo 'false'; + exit; + } + break; + default: + //setting not allowed + echo 'false'; + exit; + } + +//add/update user setting + if (isset($user_setting_value) && isset($user_setting_enabled)) { + + //get existing user setting uuid, if exists + $sql = "select user_setting_uuid from v_user_settings "; + $sql .= "where user_uuid = :user_uuid "; + $sql .= "and domain_uuid = :domain_uuid "; + $sql .= "and user_setting_category = :user_setting_category "; + $sql .= "and user_setting_subcategory = :user_setting_subcategory "; + $sql .= "and user_setting_name = :user_setting_name "; + $parameters['user_uuid'] = $_SESSION['user_uuid']; + $parameters['domain_uuid'] = $_SESSION['domain_uuid']; + $parameters['user_setting_category'] = $user_setting_category; + $parameters['user_setting_subcategory'] = $user_setting_subcategory; + $parameters['user_setting_name'] = $user_setting_name; + $database = new database; + $user_setting_uuid = $database->select($sql, $parameters, 'column'); + unset($sql, $parameters); + + //create data array + $array['user_settings'][0]['user_setting_uuid'] = is_uuid($user_setting_uuid) ? $user_setting_uuid : uuid(); + $array['user_settings'][0]['user_uuid'] = $_SESSION['user_uuid']; + $array['user_settings'][0]['domain_uuid'] = $_SESSION['domain_uuid']; + $array['user_settings'][0]['user_setting_category'] = $user_setting_category; + $array['user_settings'][0]['user_setting_subcategory'] = $user_setting_subcategory; + $array['user_settings'][0]['user_setting_name'] = $user_setting_name; + $array['user_settings'][0]['user_setting_value'] = $user_setting_value; + //$array['user_settings'][0]['user_setting_order'] = $user_setting_order; + $array['user_settings'][0]['user_setting_enabled'] = $user_setting_enabled; + + //grant temporary permissions + $p = new permissions; + $p->add('user_setting_add', 'temp'); + $p->add('user_setting_edit', 'temp'); + + //execute + $database = new database; + $database->app_name = 'user_settings'; + $database->app_uuid = '3a3337f7-78d1-23e3-0cfd-f14499b8ed97'; + $database->save($array); + unset($array); + + //revoke temporary permissions + $p->delete('user_setting_add', 'temp'); + $p->delete('user_setting_edit', 'temp'); + + //update session variable + $_SESSION[$user_setting_category][$user_setting_subcategory][$user_setting_name] = $user_setting_value; + + //set response + echo 'true'; + } + +?> \ No newline at end of file diff --git a/core/user_settings/user_settings.php b/core/user_settings/user_settings.php index 81a0dca8be..ea1dbd69fc 100644 --- a/core/user_settings/user_settings.php +++ b/core/user_settings/user_settings.php @@ -280,14 +280,17 @@ echo " ".str_repeat('*', strlen(escape($row['user_setting_value']))); } else if ($category == 'theme' && $subcategory == 'button_icons' && $name == 'text') { - echo " ".$text['option-button_icons_'.$row['domain_setting_value']]."\n"; + echo " ".$text['option-button_icons_'.$row['user_setting_value']]."\n"; + } + else if ($category == 'theme' && $subcategory == 'menu_side_state' && $name == 'text') { + echo " ".$text['option-'.$row['user_setting_value']]."\n"; } else if ($category == "theme" && substr_count($subcategory, "_color") > 0 && ($name == "text" || $name == 'array')) { echo " ".(img_spacer('15px', '15px', 'background: '.escape($row['user_setting_value']).'; margin-right: 4px; vertical-align: middle; border: 1px solid '.(color_adjust($row['user_setting_value'], -0.18)).'; padding: -1px;')); echo "".escape($row['user_setting_value'])."\n"; } else if ($category == 'recordings' && $subcategory == 'storage_type' && $name == 'text') { - echo " ".$text['label-'.$row['domain_setting_value']]."\n"; + echo " ".$text['label-'.$row['user_setting_value']]."\n"; } else { echo " ".escape($row['user_setting_value'])."\n"; diff --git a/resources/app_languages.php b/resources/app_languages.php index 51f3f160ea..0cae7fbc28 100644 --- a/resources/app_languages.php +++ b/resources/app_languages.php @@ -4403,4 +4403,50 @@ $text['title-login']['sv-se'] = "Logga In"; $text['title-login']['uk-ua'] = "Логін"; $text['title-login']['tr-tr'] = "Giriş Yap"; -?> +$text['option-expanded']['en-us'] = "Expanded"; +$text['option-expanded']['en-gb'] = "Expanded"; +$text['option-expanded']['ar-eg'] = "Expanded"; +$text['option-expanded']['de-at'] = "Expanded"; +$text['option-expanded']['de-ch'] = "Expanded"; +$text['option-expanded']['de-de'] = "Expanded"; +$text['option-expanded']['el-gr'] = "Expanded"; +$text['option-expanded']['es-cl'] = "Expanded"; +$text['option-expanded']['es-mx'] = "Expanded"; +$text['option-expanded']['fr-ca'] = "Expanded"; +$text['option-expanded']['fr-fr'] = "Expanded"; +$text['option-expanded']['he-il'] = "Expanded"; +$text['option-expanded']['it-it'] = "Expanded"; +$text['option-expanded']['nl-nl'] = "Expanded"; +$text['option-expanded']['pl-pl'] = "Expanded"; +$text['option-expanded']['pt-br'] = "Expanded"; +$text['option-expanded']['pt-pt'] = "Expanded"; +$text['option-expanded']['ro-ro'] = "Expanded"; +$text['option-expanded']['ru-ru'] = "Expanded"; +$text['option-expanded']['sv-se'] = "Expanded"; +$text['option-expanded']['uk-ua'] = "Expanded"; +$text['option-expanded']['tr-tr'] = "Expanded"; + +$text['option-contracted']['en-us'] = "Contracted"; +$text['option-contracted']['en-gb'] = "Contracted"; +$text['option-contracted']['ar-eg'] = "Contracted"; +$text['option-contracted']['de-at'] = "Contracted"; +$text['option-contracted']['de-ch'] = "Contracted"; +$text['option-contracted']['de-de'] = "Contracted"; +$text['option-contracted']['el-gr'] = "Contracted"; +$text['option-contracted']['es-cl'] = "Contracted"; +$text['option-contracted']['es-mx'] = "Contracted"; +$text['option-contracted']['fr-ca'] = "Contracted"; +$text['option-contracted']['fr-fr'] = "Contracted"; +$text['option-contracted']['he-il'] = "Contracted"; +$text['option-contracted']['it-it'] = "Contracted"; +$text['option-contracted']['nl-nl'] = "Contracted"; +$text['option-contracted']['pl-pl'] = "Contracted"; +$text['option-contracted']['pt-br'] = "Contracted"; +$text['option-contracted']['pt-pt'] = "Contracted"; +$text['option-contracted']['ro-ro'] = "Contracted"; +$text['option-contracted']['ru-ru'] = "Contracted"; +$text['option-contracted']['sv-se'] = "Contracted"; +$text['option-contracted']['uk-ua'] = "Contracted"; +$text['option-contracted']['tr-tr'] = "Contracted"; + +?> \ No newline at end of file diff --git a/resources/classes/menu.php b/resources/classes/menu.php index 3234d37ba3..b971e6fea2 100644 --- a/resources/classes/menu.php +++ b/resources/classes/menu.php @@ -951,7 +951,7 @@ if (!class_exists('menu')) { $menu_brand_text = ($_SESSION['theme']['menu_brand_text']['text'] != '') ? escape($_SESSION['theme']['menu_brand_text']['text']) : "FusionPBX"; switch ($_SESSION['theme']['menu_brand_type']['text']) { case 'text': - $html .= " ".$menu_brand_text."\n"; + $html .= " ".$menu_brand_text."\n"; break; case 'image_text': $menu_brand_image = ($_SESSION['theme']['menu_brand_image']['text'] != '') ? escape($_SESSION['theme']['menu_brand_image']['text']) : PROJECT_PATH."/themes/default/images/logo.png"; @@ -1079,17 +1079,25 @@ if (!class_exists('menu')) { //menu brand image and/or text if ($_SESSION['theme']['menu_brand_type']['text'] == 'none') { - $html = "
\n"; - $html .= ""; - $html .= ""; - $html .= "
\n"; + $html = " \n"; } else { $html = " \n"; } + //main menu items if (is_array($menu_array) && sizeof($menu_array) != 0) { foreach ($menu_array as $menu_index_main => $menu_item_main) { @@ -1121,14 +1130,14 @@ if (!class_exists('menu')) { if ($menu_item_main['menu_item_icon'] != '') { $html .= ""; } - $html .= ""; + $html .= "".$menu_item_main['menu_language_title'].""; $html .= "\n"; //sub menu items if (is_array($menu_item_main['menu_items']) && sizeof($menu_item_main['menu_items']) != 0) { $html .= " \n"; @@ -1137,7 +1146,13 @@ if (!class_exists('menu')) { $html .= "
\n"; } $html .= "\n"; - $html .= "
\n"; + if ($_SESSION['theme']['menu_side_state']['text'] == 'expanded') { + $content_container_width = is_numeric($_SESSION['theme']['menu_side_width_expanded']['text']) ? $_SESSION['theme']['menu_side_width_expanded']['text'] : '225'; + } + else { + $content_container_width = is_numeric($_SESSION['theme']['menu_side_width_contracted']['text']) ? $_SESSION['theme']['menu_side_width_contracted']['text'] : '60'; + } + $html .= "
\n"; $html .= "
\n"; //header: left $html .= "
\n"; diff --git a/resources/footer.php b/resources/footer.php index 0b94f30fe6..c0c0085201 100644 --- a/resources/footer.php +++ b/resources/footer.php @@ -187,6 +187,7 @@ $menu->text = $text; $menu_html = $menu->menu_vertical($_SESSION['menu']['array']); unset($menu); + $view->assign('menu_side_state', (isset($_SESSION['theme']['menu_side_state']['text']) && $_SESSION['theme']['menu_side_state']['text'] != '' ? $_SESSION['theme']['menu_side_state']['text'] : 'contracted')); break; case 'inline': $container_open = "
\n"; diff --git a/themes/default/app_config.php b/themes/default/app_config.php index e819bfc2db..d98d0c4c0e 100644 --- a/themes/default/app_config.php +++ b/themes/default/app_config.php @@ -1703,6 +1703,14 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the expanded brand image path for the Side menu."; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "66d37950-15db-4dd0-888a-17ded7b5c0dc"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "menu_side_state"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "contracted"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the default state of the Side Menu: expanded (pinned) or contracted (unpinned)."; + $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "97a620e1-d7b2-4550-8648-726c3029143d"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "action_bar_border_top"; diff --git a/themes/default/app_languages.php b/themes/default/app_languages.php index ea25b0511f..d58e7d09ff 100644 --- a/themes/default/app_languages.php +++ b/themes/default/app_languages.php @@ -231,4 +231,142 @@ $text['theme-label-domain']['sv-se'] = "Domän"; $text['theme-label-domain']['uk-ua'] = "Домен"; $text['theme-label-domain']['tr-tr'] = "Alan Adı"; -?> +$text['theme-label-expand_menu']['en-us'] = "Expand Menu"; +$text['theme-label-expand_menu']['en-gb'] = "Expand Menu"; +$text['theme-label-expand_menu']['ar-eg'] = "Expand Menu"; +$text['theme-label-expand_menu']['de-at'] = "Expand Menu"; +$text['theme-label-expand_menu']['de-ch'] = "Expand Menu"; +$text['theme-label-expand_menu']['de-de'] = "Expand Menu"; +$text['theme-label-expand_menu']['el-gr'] = "Expand Menu"; +$text['theme-label-expand_menu']['es-cl'] = "Expand Menu"; +$text['theme-label-expand_menu']['es-mx'] = "Expand Menu"; +$text['theme-label-expand_menu']['fr-ca'] = "Expand Menu"; +$text['theme-label-expand_menu']['fr-fr'] = "Expand Menu"; +$text['theme-label-expand_menu']['he-il'] = "Expand Menu"; +$text['theme-label-expand_menu']['it-it'] = "Expand Menu"; +$text['theme-label-expand_menu']['nl-nl'] = "Expand Menu"; +$text['theme-label-expand_menu']['pl-pl'] = "Expand Menu"; +$text['theme-label-expand_menu']['pt-br'] = "Expand Menu"; +$text['theme-label-expand_menu']['pt-pt'] = "Expand Menu"; +$text['theme-label-expand_menu']['ro-ro'] = "Expand Menu"; +$text['theme-label-expand_menu']['ru-ru'] = "Expand Menu"; +$text['theme-label-expand_menu']['sv-se'] = "Expand Menu"; +$text['theme-label-expand_menu']['uk-ua'] = "Expand Menu"; +$text['theme-label-expand_menu']['tr-tr'] = "Expand Menu"; + +$text['theme-label-contract_menu']['en-us'] = "Contract Menu"; +$text['theme-label-contract_menu']['en-gb'] = "Contract Menu"; +$text['theme-label-contract_menu']['ar-eg'] = "Contract Menu"; +$text['theme-label-contract_menu']['de-at'] = "Contract Menu"; +$text['theme-label-contract_menu']['de-ch'] = "Contract Menu"; +$text['theme-label-contract_menu']['de-de'] = "Contract Menu"; +$text['theme-label-contract_menu']['el-gr'] = "Contract Menu"; +$text['theme-label-contract_menu']['es-cl'] = "Contract Menu"; +$text['theme-label-contract_menu']['es-mx'] = "Contract Menu"; +$text['theme-label-contract_menu']['fr-ca'] = "Contract Menu"; +$text['theme-label-contract_menu']['fr-fr'] = "Contract Menu"; +$text['theme-label-contract_menu']['he-il'] = "Contract Menu"; +$text['theme-label-contract_menu']['it-it'] = "Contract Menu"; +$text['theme-label-contract_menu']['nl-nl'] = "Contract Menu"; +$text['theme-label-contract_menu']['pl-pl'] = "Contract Menu"; +$text['theme-label-contract_menu']['pt-br'] = "Contract Menu"; +$text['theme-label-contract_menu']['pt-pt'] = "Contract Menu"; +$text['theme-label-contract_menu']['ro-ro'] = "Contract Menu"; +$text['theme-label-contract_menu']['ru-ru'] = "Contract Menu"; +$text['theme-label-contract_menu']['sv-se'] = "Contract Menu"; +$text['theme-label-contract_menu']['uk-ua'] = "Contract Menu"; +$text['theme-label-contract_menu']['tr-tr'] = "Contract Menu"; + +$text['theme-label-pin_menu']['en-us'] = "Pin Menu"; +$text['theme-label-pin_menu']['en-gb'] = "Pin Menu"; +$text['theme-label-pin_menu']['ar-eg'] = "Pin Menu"; +$text['theme-label-pin_menu']['de-at'] = "Pin Menu"; +$text['theme-label-pin_menu']['de-ch'] = "Pin Menu"; +$text['theme-label-pin_menu']['de-de'] = "Pin Menu"; +$text['theme-label-pin_menu']['el-gr'] = "Pin Menu"; +$text['theme-label-pin_menu']['es-cl'] = "Pin Menu"; +$text['theme-label-pin_menu']['es-mx'] = "Pin Menu"; +$text['theme-label-pin_menu']['fr-ca'] = "Pin Menu"; +$text['theme-label-pin_menu']['fr-fr'] = "Pin Menu"; +$text['theme-label-pin_menu']['he-il'] = "Pin Menu"; +$text['theme-label-pin_menu']['it-it'] = "Pin Menu"; +$text['theme-label-pin_menu']['nl-nl'] = "Pin Menu"; +$text['theme-label-pin_menu']['pl-pl'] = "Pin Menu"; +$text['theme-label-pin_menu']['pt-br'] = "Pin Menu"; +$text['theme-label-pin_menu']['pt-pt'] = "Pin Menu"; +$text['theme-label-pin_menu']['ro-ro'] = "Pin Menu"; +$text['theme-label-pin_menu']['ru-ru'] = "Pin Menu"; +$text['theme-label-pin_menu']['sv-se'] = "Pin Menu"; +$text['theme-label-pin_menu']['uk-ua'] = "Pin Menu"; +$text['theme-label-pin_menu']['tr-tr'] = "Pin Menu"; + +$text['theme-label-unpin_menu']['en-us'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['en-gb'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['ar-eg'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['de-at'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['de-ch'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['de-de'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['el-gr'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['es-cl'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['es-mx'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['fr-ca'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['fr-fr'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['he-il'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['it-it'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['nl-nl'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['pl-pl'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['pt-br'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['pt-pt'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['ro-ro'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['ru-ru'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['sv-se'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['uk-ua'] = "Unpin Menu"; +$text['theme-label-unpin_menu']['tr-tr'] = "Unpin Menu"; + +$text['theme-message-menu_expanded']['en-us'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['en-gb'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['ar-eg'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['de-at'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['de-ch'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['de-de'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['el-gr'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['es-cl'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['es-mx'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['fr-ca'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['fr-fr'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['he-il'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['it-it'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['nl-nl'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['pl-pl'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['pt-br'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['pt-pt'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['ro-ro'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['ru-ru'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['sv-se'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['uk-ua'] = "Menu Pinned"; +$text['theme-message-menu_expanded']['tr-tr'] = "Menu Pinned"; + +$text['theme-message-menu_contracted']['en-us'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['en-gb'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['ar-eg'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['de-at'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['de-ch'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['de-de'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['el-gr'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['es-cl'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['es-mx'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['fr-ca'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['fr-fr'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['he-il'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['it-it'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['nl-nl'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['pl-pl'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['pt-br'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['pt-pt'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['ro-ro'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['ru-ru'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['sv-se'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['uk-ua'] = "Menu Unpinned"; +$text['theme-message-menu_contracted']['tr-tr'] = "Menu Unpinned"; + +?> \ No newline at end of file diff --git a/themes/default/css.php b/themes/default/css.php index 28f0ed433c..dee6f2da7c 100644 --- a/themes/default/css.php +++ b/themes/default/css.php @@ -457,7 +457,14 @@ header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600).' GMT'); position: fixed; top: 0; left: 0; - width: px; + height: 100%; overflow: auto; @@ -538,9 +545,37 @@ header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600).' GMT'); text-decoration: none; } + /* menu side control container */ + div#menu_side_control_container { + position: -webkit-sticky; + position: sticky; + z-index: 99901; + top: 0; + padding: 0; + min-height: 75px; + text-align: left; + + background-image: url(""); + background-position: 0px 0px; + background-repeat: repeat-y; + + background: ; + + + -moz-border-radius: ; + -webkit-border-radius: ; + -khtml-border-radius: ; + border-radius: ; + } + div#menu_side_container > a.menu_side_item_main, div#menu_side_container > div > a.menu_side_item_main, - div#menu_side_container > div#menu_side_brand_container > div > a.menu_side_item_main { + div#menu_side_container > div#menu_side_brand_container a.menu_side_item_main, + div#menu_side_container > div#menu_side_control_container a.menu_side_item_main { display: block; width: 100%; padding: 10px 20px; @@ -552,14 +587,17 @@ header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600).' GMT'); } div#menu_side_container > a.menu_side_item_main:hover, - div#menu_side_container a.menu_side_item_main:focus, - div#menu_side_container a.menu_side_item_main:active, + div#menu_side_container > a.menu_side_item_main:focus, + div#menu_side_container > a.menu_side_item_main:active, div#menu_side_container > div > a.menu_side_item_main:hover, div#menu_side_container > div > a.menu_side_item_main:focus, div#menu_side_container > div > a.menu_side_item_main:active, - div#menu_side_container > div#menu_side_brand_container > div > a.menu_side_item_main:hover, - div#menu_side_container > div#menu_side_brand_container > div > a.menu_side_item_main:focus, - div#menu_side_container > div#menu_side_brand_container > div > a.menu_side_item_main:active { + div#menu_side_container > div#menu_side_control_container > div a.menu_side_item_main:hover, + div#menu_side_container > div#menu_side_control_container > div a.menu_side_item_main:focus, + div#menu_side_container > div#menu_side_control_container > div a.menu_side_item_main:active, + div#menu_side_container > div#menu_side_brand_container > div a.menu_side_item_main:hover, + div#menu_side_container > div#menu_side_brand_container > div a.menu_side_item_main:focus, + div#menu_side_container > div#menu_side_brand_container > div a.menu_side_item_main:active { color: ; background: ; text-decoration: none; diff --git a/themes/default/template.php b/themes/default/template.php index 1eeb910705..d8dee8ef59 100644 --- a/themes/default/template.php +++ b/themes/default/template.php @@ -82,76 +82,97 @@ {if $settings.theme.menu_style == 'side'} //side menu visibility toggle + var menu_side_state_current = '{$menu_side_state}'; {literal} - var menu_side_state = 'contracted'; function menu_side_contract() { - $('.menu_side_sub').slideUp(180); - $('.menu_side_item_title').hide(); - {/literal} - {if $settings.theme.menu_brand_type == 'image' || $settings.theme.menu_brand_type == ''} + if (menu_side_state_current == 'expanded') { + $('.menu_side_sub').slideUp(180); + $('.menu_side_item_title').hide(); + {/literal} + {if $settings.theme.menu_brand_type == 'image' || $settings.theme.menu_brand_type == ''} + {literal} + $('#menu_brand_image_expanded').fadeOut(180, function() { + $('#menu_brand_image_contracted').fadeIn(180); + }); + {/literal} + {elseif $settings.theme.menu_brand_type == 'image_text'} + {literal} + $('.menu_brand_text').hide(); + $('#menu_brand_image_contracted').animate({ width: '20px', 'margin-left': '-2px' }, 250); + {/literal} + {else if $settings.theme.menu_brand_type == 'text'} + {literal} + $('.menu_brand_text').fadeOut(180); + {/literal} + {/if} {literal} - $('#menu_brand_image_expanded').fadeOut(180, function() { - $('#menu_brand_image_contracted').fadeIn(180); + $('#menu_side_container').animate({ width: '{/literal}{$settings.theme.menu_side_width_contracted}{literal}px' }, 250); + $('#content_container').animate({ width: $(window).width() - {/literal}{$settings.theme.menu_side_width_contracted}{literal} }, 250, function() { + menu_side_state_current = 'contracted'; }); - {/literal} - {elseif $settings.theme.menu_brand_type == 'image_text'} - {literal} - $('.menu_brand_text').hide(); - $('#menu_brand_image_contracted').animate({ width: '20px', 'margin-left': '-2px' }, 250); - {/literal} - {else if $settings.theme.menu_brand_type == 'text'} - {literal} - $('.menu_brand_text').fadeOut(180); - {/literal} - {/if} - {literal} - $('#menu_side_container').animate({ width: '{/literal}{$settings.theme.menu_side_width_contracted}{literal}px' }, 250); - $('#content_container').animate({ width: $(window).width() - {/literal}{$settings.theme.menu_side_width_contracted}{literal} }, 250, function() { - menu_side_state = 'contracted'; - }); - $('.menu_side_contract').hide(); - $('.menu_side_expand').show(); + $('.menu_side_contract').hide(); + $('.menu_side_expand').show(); + } } function menu_side_expand() { - {/literal} - {if $settings.theme.menu_brand_type == 'image_text'} - {literal} - $('#menu_brand_image_contracted').animate({ width: '30px', 'margin-left': '0' }, 250); + if (menu_side_state_current == 'contracted') { {/literal} - {elseif $settings.theme.menu_brand_type == 'image' || $settings.theme.menu_brand_type == ''} - {literal} - $('#menu_brand_image_contracted').fadeOut(180); - {/literal} - {/if} - {literal} - $('#menu_side_container').animate({ width: '{/literal}{$settings.theme.menu_side_width_expanded}{literal}px' }, 250); - $('#content_container').animate({ width: $(window).width() - {/literal}{$settings.theme.menu_side_width_expanded}{literal} }, 250, function() { - $('.menu_brand_text').fadeIn(180); - $('.menu_side_item_title').fadeIn(180); - {/literal} - {if $settings.theme.menu_brand_type != 'none'} + {if $settings.theme.menu_brand_type == 'image_text'} {literal} + $('#menu_brand_image_contracted').animate({ width: '30px', 'margin-left': '0' }, 250); + {/literal} + {elseif $settings.theme.menu_brand_type == 'image' || $settings.theme.menu_brand_type == ''} + {literal} + $('#menu_brand_image_contracted').fadeOut(180); + {/literal} + {/if} + {literal} + $('#menu_side_container').animate({ width: '{/literal}{$settings.theme.menu_side_width_expanded}{literal}px' }, 250, function() { $('.menu_side_contract').fadeIn(180); + }); + $('#content_container').animate({ width: $(window).width() - {/literal}{$settings.theme.menu_side_width_expanded}{literal} }, 250, function() { + $('.menu_brand_text').fadeIn(180); + $('.menu_side_item_title').fadeIn(180); {/literal} - {/if} - {if $settings.theme.menu_brand_type == 'image' || $settings.theme.menu_brand_type == ''} + {if $settings.theme.menu_brand_type == 'image' || $settings.theme.menu_brand_type == ''} + {literal} + $('#menu_brand_image_expanded').fadeIn(180); + {/literal} + {/if} {literal} - $('#menu_brand_image_expanded').fadeIn(180); - {/literal} - {/if} - {literal} - menu_side_state = 'expanded'; - }); - {/literal} - {if $settings.theme.menu_brand_type == 'none'} - {literal} - $('.menu_side_contract').show(); - {/literal} - {/if} - {literal} - $('.menu_side_expand').hide(); + menu_side_state_current = 'expanded'; + }); + $('.menu_side_expand').hide(); + } + } + + function menu_side_state_set(state) { + var user_setting_set_path = '{/literal}{$project_path}{literal}/core/user_settings/user_setting_set.php?category=theme&subcategory=menu_side_state&name=text&value='+state; + var xhr = new XMLHttpRequest(); + xhr.open('GET', user_setting_set_path); + xhr.send(null); + xhr.onreadystatechange = function () { + var setting_modified; + if (xhr.readyState === 4) { + if (xhr.status === 200) { + setting_modified = xhr.responseText; + if (setting_modified == 'true') { + document.getElementById('menu_side_state_set_expanded').style.display = state == 'expanded' ? 'none' : 'block'; + document.getElementById('menu_side_state_set_contracted').style.display = state == 'contracted' ? 'none' : 'block'; + if (state == 'expanded') { + document.getElementById('menu_side_state_current').value = 'expanded'; + display_message("{/literal}{$text.theme_message_menu_expanded}{literal}", 'positive', 1000); + } + else { + document.getElementById('menu_side_state_current').value = 'contracted'; + display_message("{/literal}{$text.theme_message_menu_contracted}{literal}", 'positive', 1000); + } + } + } + } + } } {/literal} {/if} @@ -912,6 +933,7 @@ {if $settings.theme.menu_style == 'inline'}{$logo}{/if} {$menu} {if $settings.theme.menu_style == 'inline' || $settings.theme.menu_style == 'static'}
{/if} + {if $settings.theme.menu_style == 'side'}{/if} {else} {*//default: fixed *} {$menu} {$container_open} From 056ee9f10ba8c72fbf2375cf8603434e509fea62 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 21 May 2020 11:25:14 -0600 Subject: [PATCH 090/621] Change nibble_account from numeric to text. --- app/extensions/app_config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/extensions/app_config.php b/app/extensions/app_config.php index b8709831ee..55a86ace07 100644 --- a/app/extensions/app_config.php +++ b/app/extensions/app_config.php @@ -495,7 +495,7 @@ $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "nibble_account"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric"; + $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'] = "sip_force_expires"; From 8100f968c3d643909da0bf04a64a2aa8a200a3ee Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 21 May 2020 18:24:13 -0600 Subject: [PATCH 091/621] Fix the indentation and white space. --- .../resources/functions/record_message.lua | 291 +++++++++--------- 1 file changed, 144 insertions(+), 147 deletions(-) diff --git a/app/scripts/resources/scripts/app/voicemail/resources/functions/record_message.lua b/app/scripts/resources/scripts/app/voicemail/resources/functions/record_message.lua index 74fd818017..8e9f567641 100644 --- a/app/scripts/resources/scripts/app/voicemail/resources/functions/record_message.lua +++ b/app/scripts/resources/scripts/app/voicemail/resources/functions/record_message.lua @@ -123,164 +123,161 @@ return transcription; end end - + if (transcribe_provider == "azure") then - local api_key1 = settings:get('voicemail', 'azure_key1', 'text') or ''; - local api_server_region = settings:get('voicemail', 'azure_server_region', 'text') or ''; - if (api_server_region ~= '') then - api_server_region = api_server_region .. "."; - else - if (debug["info"]) then - freeswitch.consoleLog("notice", "[voicemail] azure_server_region default setting must be set\n"); - end - return ''; - end - if (api_key1 ~= '') then - -- search in memcache first, azure documentation claims that the access token is valid for 10 minutes - local cache = require "resources.functions.cache"; - local key = "app:voicemail:azure:access_token"; - local access_token_result = cache.get(key) + local api_key1 = settings:get('voicemail', 'azure_key1', 'text') or ''; + local api_server_region = settings:get('voicemail', 'azure_server_region', 'text') or ''; + if (api_server_region ~= '') then + api_server_region = api_server_region .. "."; + else + if (debug["info"]) then + freeswitch.consoleLog("notice", "[voicemail] azure_server_region default setting must be set\n"); + end + return ''; + end + if (api_key1 ~= '') then + -- search in memcache first, azure documentation claims that the access token is valid for 10 minutes + local cache = require "resources.functions.cache"; + local key = "app:voicemail:azure:access_token"; + local access_token_result = cache.get(key) - if access_token_result then - if (debug["info"]) then - freeswitch.consoleLog("notice", "[voicemail] Azure access_token recovered from memcached\n"); - end - else - access_token_cmd = "curl -X POST \"https://"..api_server_region.."api.cognitive.microsoft.com/sts/v1.0/issueToken\" -H \"Content-type: application/x-www-form-urlencoded\" -H \"Content-Length: 0\" -H \"Ocp-Apim-Subscription-Key: "..api_key1.."\""; - local handle = io.popen(access_token_cmd); - access_token_result = handle:read("*a"); - handle:close(); - if (debug["info"]) then - freeswitch.consoleLog("notice", "[voicemail] CMD: " .. access_token_cmd .. "\n"); - freeswitch.consoleLog("notice", "[voicemail] ACCESS TOKEN: " .. access_token_result .. "\n"); - end - --Access token request can fail - if (access_token_result == '') then - if (debug["info"]) then - freeswitch.consoleLog("notice", "[voicemail] ACCESS TOKEN: (null) \n"); - end - return '' - end + if access_token_result then + if (debug["info"]) then + freeswitch.consoleLog("notice", "[voicemail] Azure access_token recovered from memcached\n"); + end + else + access_token_cmd = "curl -X POST \"https://"..api_server_region.."api.cognitive.microsoft.com/sts/v1.0/issueToken\" -H \"Content-type: application/x-www-form-urlencoded\" -H \"Content-Length: 0\" -H \"Ocp-Apim-Subscription-Key: "..api_key1.."\""; + local handle = io.popen(access_token_cmd); + access_token_result = handle:read("*a"); + handle:close(); + if (debug["info"]) then + freeswitch.consoleLog("notice", "[voicemail] CMD: " .. access_token_cmd .. "\n"); + freeswitch.consoleLog("notice", "[voicemail] ACCESS TOKEN: " .. access_token_result .. "\n"); + end + --Access token request can fail + if (access_token_result == '') then + if (debug["info"]) then + freeswitch.consoleLog("notice", "[voicemail] ACCESS TOKEN: (null) \n"); + end + return '' + end - --Azure returns JSON when it has to report an error - if (string.sub(access_token_result, 1, 1) == '{') then - if (debug["info"]) then - freeswitch.consoleLog("notice", "[voicemail] ERROR STRING: ".. access_token_result .. "\n"); - end - return '' - end + --Azure returns JSON when it has to report an error + if (string.sub(access_token_result, 1, 1) == '{') then + if (debug["info"]) then + freeswitch.consoleLog("notice", "[voicemail] ERROR STRING: ".. access_token_result .. "\n"); + end + return '' + end - cache.set(key, access_token_result, 120); - if (debug["info"]) then - freeswitch.consoleLog("notice", "[voicemail] Azure access_token saved into memcached: " .. access_token_result .. "\n"); - end - end + cache.set(key, access_token_result, 120); + if (debug["info"]) then + freeswitch.consoleLog("notice", "[voicemail] Azure access_token saved into memcached: " .. access_token_result .. "\n"); + end + end - transcribe_cmd = "curl -X POST \"https://"..api_server_region.."stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=".. transcribe_language .."&format=detailed\" -H 'Authorization: Bearer " .. access_token_result .. "' -H 'Content-type: audio/wav; codec=\"audio/pcm\"; samplerate=8000; trustsourcerate=false' --data-binary @"..file_path - local handle = io.popen(transcribe_cmd); - local transcribe_result = handle:read("*a"); - handle:close(); - if (debug["info"]) then - freeswitch.consoleLog("notice", "[voicemail] CMD: " .. transcribe_cmd .. "\n"); - freeswitch.consoleLog("notice", "[voicemail] RESULT: " .. transcribe_result .. "\n"); - end - --Trancribe request can fail - if (transcribe_result == '') then - freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: (null) \n"); - return '' - end - local transcribe_json = JSON.decode(transcribe_result); - if (debug["info"]) then - if (transcribe_json["NBest"][1]["Display"] == nil) then - freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: (null) \n"); - else - freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: " .. transcribe_json["NBest"][1]["Display"] .. "\n"); - end - if (transcribe_json["NBest"][1]["Confidence"] == nil) then - freeswitch.consoleLog("notice", "[voicemail] CONFIDENCE: (null) \n"); - else - freeswitch.consoleLog("notice", "[voicemail] CONFIDENCE: " .. transcribe_json["NBest"][1]["Confidence"] .. "\n"); - end - end - - transcription = transcribe_json["NBest"][1]["Display"]; - confidence = transcribe_json["NBest"][1]["Confidence"]; - return transcription; - end + transcribe_cmd = "curl -X POST \"https://"..api_server_region.."stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=".. transcribe_language .."&format=detailed\" -H 'Authorization: Bearer " .. access_token_result .. "' -H 'Content-type: audio/wav; codec=\"audio/pcm\"; samplerate=8000; trustsourcerate=false' --data-binary @"..file_path + local handle = io.popen(transcribe_cmd); + local transcribe_result = handle:read("*a"); + handle:close(); + if (debug["info"]) then + freeswitch.consoleLog("notice", "[voicemail] CMD: " .. transcribe_cmd .. "\n"); + freeswitch.consoleLog("notice", "[voicemail] RESULT: " .. transcribe_result .. "\n"); + end + --Trancribe request can fail + if (transcribe_result == '') then + freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: (null) \n"); + return '' + end + local transcribe_json = JSON.decode(transcribe_result); + if (debug["info"]) then + if (transcribe_json["NBest"][1]["Display"] == nil) then + freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: (null) \n"); + else + freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: " .. transcribe_json["NBest"][1]["Display"] .. "\n"); + end + if (transcribe_json["NBest"][1]["Confidence"] == nil) then + freeswitch.consoleLog("notice", "[voicemail] CONFIDENCE: (null) \n"); + else + freeswitch.consoleLog("notice", "[voicemail] CONFIDENCE: " .. transcribe_json["NBest"][1]["Confidence"] .. "\n"); + end + end + + transcription = transcribe_json["NBest"][1]["Display"]; + confidence = transcribe_json["NBest"][1]["Confidence"]; + return transcription; + end end --Watson - if (transcribe_provider == "watson") then - local api_key = settings:get('voicemail', 'watson_key', 'text') or ''; - local transcription_server = settings:get('voicemail', 'watson_url', 'text') or ''; - if (api_key ~= '') then + if (transcribe_provider == "watson") then + local api_key = settings:get('voicemail', 'watson_key', 'text') or ''; + local transcription_server = settings:get('voicemail', 'watson_url', 'text') or ''; + if (api_key ~= '') then if (vm_message_ext == "mp3") then - transcribe_cmd = [[ curl -X POST -u "apikey:]]..api_key..[[" --header "Content-type: audio/mp3" --data-binary @]]..file_path..[[ "]]..transcription_server..[[" ]] - else - transcribe_cmd = [[ curl -X POST -u "apikey:]]..api_key..[[" --header "Content-type: audio/wav" --data-binary @]]..file_path..[[ "]]..transcription_server..[[" ]] - end - local handle = io.popen(transcribe_cmd); - local transcribe_result = handle:read("*a"); - transcribe_result = transcribe_result:gsub('*HESITATION ', ''); - handle:close(); - if (debug["info"]) then - freeswitch.consoleLog("notice", "[voicemail] CMD: " .. transcribe_cmd .. "\n"); - freeswitch.consoleLog("notice", "[voicemail] RESULT: " .. transcribe_result .. "\n"); - end + transcribe_cmd = [[ curl -X POST -u "apikey:]]..api_key..[[" --header "Content-type: audio/mp3" --data-binary @]]..file_path..[[ "]]..transcription_server..[[" ]] + else + transcribe_cmd = [[ curl -X POST -u "apikey:]]..api_key..[[" --header "Content-type: audio/wav" --data-binary @]]..file_path..[[ "]]..transcription_server..[[" ]] + end + local handle = io.popen(transcribe_cmd); + local transcribe_result = handle:read("*a"); + transcribe_result = transcribe_result:gsub('*HESITATION ', ''); + handle:close(); + if (debug["info"]) then + freeswitch.consoleLog("notice", "[voicemail] CMD: " .. transcribe_cmd .. "\n"); + freeswitch.consoleLog("notice", "[voicemail] RESULT: " .. transcribe_result .. "\n"); + end - --Trancribe request can fail - if (transcribe_result == '') then - freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: (null) \n"); - return '' - else - status, transcribe_json = pcall(JSON.decode, transcribe_result); + --Trancribe request can fail + if (transcribe_result == '') then + freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: (null) \n"); + return '' + else + status, transcribe_json = pcall(JSON.decode, transcribe_result); + if not status then + if (debug["info"]) then + freeswitch.consoleLog("notice", "[voicemail] error decoding watson json\n"); + end + return ''; + end + end - if not status then - if (debug["info"]) then - freeswitch.consoleLog("notice", "[voicemail] error decoding watson json\n"); - end - return ''; - end - end - - - if (transcribe_json["results"] ~= nil) then - --Transcription - if (transcribe_json["results"][1]["alternatives"][1]["transcript"] ~= nil) then - transcription = ''; - for key, row in pairs(transcribe_json["results"]) do - transcription = transcription .. row["alternatives"][1]["transcript"]; - end - if (debug["info"]) then - freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: " .. transcription .. "\n"); - end - else - if (debug["info"]) then - freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: (null) \n"); - end - return ''; - end - --Confidence - if (transcribe_json["results"][1]["alternatives"][1]["confidence"]) then - if (debug["info"]) then - freeswitch.consoleLog("notice", "[voicemail] CONFIDENCE: " .. transcribe_json["results"][1]["alternatives"][1]["confidence"] .. "\n"); - end - confidence = transcribe_json["results"][1]["alternatives"][1]["confidence"]; - else - if (debug["info"]) then - freeswitch.consoleLog("notice", "[voicemail] CONFIDENCE: (null) \n"); - end - end - - return transcription; - else - if (debug["info"]) then - freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: json error \n"); - end - return ''; - end - end - end + if (transcribe_json["results"] ~= nil) then + --Transcription + if (transcribe_json["results"][1]["alternatives"][1]["transcript"] ~= nil) then + transcription = ''; + for key, row in pairs(transcribe_json["results"]) do + transcription = transcription .. row["alternatives"][1]["transcript"]; + end + if (debug["info"]) then + freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: " .. transcription .. "\n"); + end + else + if (debug["info"]) then + freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: (null) \n"); + end + return ''; + end + --Confidence + if (transcribe_json["results"][1]["alternatives"][1]["confidence"]) then + if (debug["info"]) then + freeswitch.consoleLog("notice", "[voicemail] CONFIDENCE: " .. transcribe_json["results"][1]["alternatives"][1]["confidence"] .. "\n"); + end + confidence = transcribe_json["results"][1]["alternatives"][1]["confidence"]; + else + if (debug["info"]) then + freeswitch.consoleLog("notice", "[voicemail] CONFIDENCE: (null) \n"); + end + end + return transcription; + else + if (debug["info"]) then + freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: json error \n"); + end + return ''; + end + end + end if (transcribe_provider == "custom") then local transcription_server = settings:get('voicemail', 'transcription_server', 'text') or ''; From d03b0e11d6b2577b89f3a906292b26bbc1435950 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 21 May 2020 18:39:53 -0600 Subject: [PATCH 092/621] Domains - Add: Use lowercase, alert on duplicate. --- core/domains/app_languages.php | 21 +++++ core/domains/domain_edit.php | 143 +++++++++++++++++---------------- 2 files changed, 96 insertions(+), 68 deletions(-) diff --git a/core/domains/app_languages.php b/core/domains/app_languages.php index c2bb3aae0c..7be369027d 100644 --- a/core/domains/app_languages.php +++ b/core/domains/app_languages.php @@ -280,6 +280,27 @@ $text['message-delete_failed']['ru-ru'] = "Не выбрана настройк $text['message-delete_failed']['sv-se'] = "Ingen Inställning Markerad"; $text['message-delete_failed']['uk-ua'] = "Налаштування не вказано"; +$text['message-domain_exists']['en-us'] = "Domain Already Exists"; +$text['message-domain_exists']['en-gb'] = "Domain Already Exists"; +$text['message-domain_exists']['ar-eg'] = "Domain Already Exists"; +$text['message-domain_exists']['de-at'] = "Domain Already Exists"; +$text['message-domain_exists']['de-ch'] = "Domain Already Exists"; +$text['message-domain_exists']['de-de'] = "Domain Already Exists"; +$text['message-domain_exists']['es-cl'] = "Domain Already Exists"; +$text['message-domain_exists']['es-mx'] = "Domain Already Exists"; +$text['message-domain_exists']['fr-ca'] = "Domain Already Exists"; +$text['message-domain_exists']['fr-fr'] = "Domain Already Exists"; +$text['message-domain_exists']['he-il'] = "Domain Already Exists"; +$text['message-domain_exists']['it-it'] = "Domain Already Exists"; +$text['message-domain_exists']['nl-nl'] = "Domain Already Exists"; +$text['message-domain_exists']['pl-pl'] = "Domain Already Exists"; +$text['message-domain_exists']['pt-br'] = "Domain Already Exists"; +$text['message-domain_exists']['pt-pt'] = "Domain Already Exists"; +$text['message-domain_exists']['ro-ro'] = "Domain Already Exists"; +$text['message-domain_exists']['ru-ru'] = "Domain Already Exists"; +$text['message-domain_exists']['sv-se'] = "Domain Already Exists"; +$text['message-domain_exists']['uk-ua'] = "Domain Already Exists"; + $text['label-web_fonts']['en-us'] = "Web Fonts"; $text['label-web_fonts']['en-gb'] = "Web Fonts"; $text['label-web_fonts']['ar-eg'] = "الخطوط على شبكة الإنترنت"; diff --git a/core/domains/domain_edit.php b/core/domains/domain_edit.php index 11054c02ed..6a286a9e2e 100644 --- a/core/domains/domain_edit.php +++ b/core/domains/domain_edit.php @@ -61,7 +61,7 @@ //get http post variables and set them to php variables if (count($_POST) > 0) { - $domain_name = $_POST["domain_name"]; + $domain_name = strtolower($_POST["domain_name"]); $domain_enabled = $_POST["domain_enabled"]; $domain_description = $_POST["domain_description"]; } @@ -118,16 +118,60 @@ if ($_POST["persistformvar"] != "true") { if ($action == "add" && permission_exists('domain_add')) { $sql = "select count(*) from v_domains "; - $sql .= "where domain_name = :domain_name "; + $sql .= "where lower(domain_name) = :domain_name "; $parameters['domain_name'] = $domain_name; $database = new database; $num_rows = $database->select($sql, $parameters, 'column'); unset($sql, $parameters); if ($num_rows == 0) { + //add the domain name - $domain_enabled = 'true'; - $domain_uuid = uuid(); + $domain_enabled = 'true'; + $domain_uuid = uuid(); + $array['domains'][0]['domain_uuid'] = $domain_uuid; + $array['domains'][0]['domain_name'] = $domain_name; + $array['domains'][0]['domain_enabled'] = $domain_enabled; + $array['domains'][0]['domain_description'] = $domain_description; + $database = new database; + $database->app_name = 'domains'; + $database->app_uuid = '8b91605b-f6d2-42e6-a56d-5d1ded01bb44'; + $database->save($array); + + //add dialplans to the domain + if (file_exists($_SERVER["PROJECT_ROOT"]."/app/dialplans/app_config.php")) { + //import the dialplans + $dialplan = new dialplan; + $dialplan->import($array['domains']); + unset($array); + + //add xml for each dialplan where the dialplan xml is empty + $dialplans = new dialplan; + $dialplans->source = "details"; + $dialplans->destination = "database"; + $dialplans->context = $domain_name; + $dialplans->is_empty = "dialplan_xml"; + $array = $dialplans->xml(); + } + } + else { + message::add($text['message-domain_exists'],'negative'); + header("Location: domains.php"); + exit; + } + } + + if ($action == "update" && permission_exists('domain_edit')) { + + //get original domain name + $sql = "select domain_name from v_domains "; + $sql .= "where domain_uuid = :domain_uuid "; + $parameters['domain_uuid'] = $domain_uuid; + $database = new database; + $original_domain_name = $database->select($sql, $parameters, 'column'); + unset($sql, $parameters); + + //update domain name, description $array['domains'][0]['domain_uuid'] = $domain_uuid; $array['domains'][0]['domain_name'] = $domain_name; $array['domains'][0]['domain_enabled'] = $domain_enabled; @@ -137,7 +181,7 @@ $database->app_uuid = '8b91605b-f6d2-42e6-a56d-5d1ded01bb44'; $database->save($array); - //add dialplans to the domain + //add dialplans to the domain if (file_exists($_SERVER["PROJECT_ROOT"]."/app/dialplans/app_config.php")) { //import the dialplans $dialplan = new dialplan; @@ -152,47 +196,10 @@ $dialplans->is_empty = "dialplan_xml"; $array = $dialplans->xml(); } - } - } - - if ($action == "update" && permission_exists('domain_edit')) { - // get original domain name - $sql = "select domain_name from v_domains "; - $sql .= "where domain_uuid = :domain_uuid "; - $parameters['domain_uuid'] = $domain_uuid; - $database = new database; - $original_domain_name = $database->select($sql, $parameters, 'column'); - unset($sql, $parameters); - - // update domain name, description - $array['domains'][0]['domain_uuid'] = $domain_uuid; - $array['domains'][0]['domain_name'] = $domain_name; - $array['domains'][0]['domain_enabled'] = $domain_enabled; - $array['domains'][0]['domain_description'] = $domain_description; - $database = new database; - $database->app_name = 'domains'; - $database->app_uuid = '8b91605b-f6d2-42e6-a56d-5d1ded01bb44'; - $database->save($array); - - // add dialplans to the domain - if (file_exists($_SERVER["PROJECT_ROOT"]."/app/dialplans/app_config.php")) { - //import the dialplans - $dialplan = new dialplan; - $dialplan->import($array['domains']); - unset($array); - - //add xml for each dialplan where the dialplan xml is empty - $dialplans = new dialplan; - $dialplans->source = "details"; - $dialplans->destination = "database"; - $dialplans->context = $domain_name; - $dialplans->is_empty = "dialplan_xml"; - $array = $dialplans->xml(); - } if ($original_domain_name != $domain_name) { - // update dialplans + //update dialplans if (file_exists($_SERVER["PROJECT_ROOT"]."/app/dialplans/app_config.php")) { $sql = "update v_dialplans set "; $sql .= "dialplan_context = replace(dialplan_context, :domain_name_old, :domain_name_new), "; @@ -216,7 +223,7 @@ unset($sql, $parameters); } - // update destinations + //update destinations if (file_exists($_SERVER["PROJECT_ROOT"]."/app/destinations/app_config.php")) { $sql = "update v_destinations set "; $sql .= "destination_data = replace(destination_data, :destination_data_old, :destination_data_new) "; @@ -229,7 +236,7 @@ unset($sql, $parameters); } - // update extensions (accountcode, user_context, dial_domain) + //update extensions (accountcode, user_context, dial_domain) if (file_exists($_SERVER["PROJECT_ROOT"]."/app/extensions/app_config.php")) { $sql = "update v_extensions set "; $sql .= "user_context = replace(user_context, :domain_name_old, :domain_name_new), "; @@ -244,7 +251,7 @@ unset($sql, $parameters); } - // update ivr_menus (ivr_menu_context, ivr_menu_greet_long, ivr_menu_greet_short) and ivr_menu_options (ivr_menu_option_param) + //update ivr_menus (ivr_menu_context, ivr_menu_greet_long, ivr_menu_greet_short) and ivr_menu_options (ivr_menu_option_param) if (file_exists($_SERVER["PROJECT_ROOT"]."/app/ivr_menus/app_config.php")) { $sql = "update v_ivr_menus set "; $sql .= "ivr_menu_context = replace(ivr_menu_context, :domain_name_old, :domain_name_new), "; @@ -269,7 +276,7 @@ unset($sql, $parameters); } - // update ring_groups (ring_group_context, ring_group_forward_destination, ring_group_timeout_data) + //update ring_groups (ring_group_context, ring_group_forward_destination, ring_group_timeout_data) if (file_exists($_SERVER["PROJECT_ROOT"]."/app/ring_groups/app_config.php")) { $sql = "update v_ring_groups set "; $sql .= "ring_group_context = replace(ring_group_context, :domain_name_old, :domain_name_new), "; @@ -284,7 +291,7 @@ unset($sql, $parameters); } - // update cdr records (domain_name, context) + //update cdr records (domain_name, context) if (file_exists($_SERVER["PROJECT_ROOT"]."/app/xml_cdr/app_config.php")){ $sql = "update v_xml_cdr set "; $sql .= "domain_name = :domain_name_new "; @@ -309,7 +316,7 @@ unset($sql, $parameters); } - // update billing, if installed + //update billing, if installed if (file_exists($_SERVER["PROJECT_ROOT"]."/app/billing/app_config.php")){ $sql = "update v_billings set "; $sql .= "type_value = :type_value_new "; @@ -323,7 +330,7 @@ unset($sql, $parameters); } - // update conference session recording paths + //update conference session recording paths if (file_exists($_SERVER["PROJECT_ROOT"]."/app/conference_centers/app_config.php")) { $sql = "update v_conference_sessions set "; $sql .= "recording = replace(recording, :domain_name_old, :domain_name_new) "; @@ -336,7 +343,7 @@ unset($sql, $parameters); } - // update conference center greetings + //update conference center greetings if (file_exists($_SERVER["PROJECT_ROOT"]."/app/conference_centers/app_config.php")) { $sql = "update v_conference_centers set "; $sql .= "conference_center_greeting = replace(conference_center_greeting, :domain_name_old, :domain_name_new) "; @@ -349,7 +356,7 @@ unset($sql, $parameters); } - // update call center queue record templates + //update call center queue record templates if (file_exists($_SERVER["PROJECT_ROOT"]."/app/call_center/app_config.php")) { $sql = "update v_call_center_queues set "; $sql .= "queue_record_template = replace(queue_record_template, :domain_name_old, :domain_name_new) "; @@ -362,7 +369,7 @@ unset($sql, $parameters); } - // update call center agent contacts + //update call center agent contacts if (file_exists($_SERVER["PROJECT_ROOT"]."/app/call_center/app_config.php")) { $sql = "update v_call_center_agents set "; $sql .= "agent_contact = replace(agent_contact, :domain_name_old, :domain_name_new) "; @@ -375,7 +382,7 @@ unset($sql, $parameters); } - // update call flows data, alternate-data and contexts + //update call flows data, alternate-data and contexts if (file_exists($_SERVER["PROJECT_ROOT"]."/app/call_flows/app_config.php")) { $sql = "update v_call_flows set "; $sql .= "call_flow_data = replace(call_flow_data, :domain_name_old, :domain_name_new), "; @@ -390,7 +397,7 @@ unset($sql, $parameters); } - // update device lines server_address, server_address_primary, server_address_secondary, outbound_proxy_primary, outbound_proxy_secondary + //update device lines server_address, server_address_primary, server_address_secondary, outbound_proxy_primary, outbound_proxy_secondary if (file_exists($_SERVER["PROJECT_ROOT"]."/app/devices/app_config.php")) { $sql = "update v_device_lines set "; $sql .= "server_address = replace(server_address, :domain_name_old, :domain_name_new), "; @@ -407,17 +414,17 @@ unset($sql, $parameters); } - // rename switch/storage/voicemail/default/[domain] (folder) + //rename switch/storage/voicemail/default/[domain] (folder) if (isset($_SESSION['switch']['voicemail']['dir']) && file_exists($_SESSION['switch']['voicemail']['dir']."/default/".$original_domain_name)) { @rename($_SESSION['switch']['voicemail']['dir']."/default/".$original_domain_name, $_SESSION['switch']['voicemail']['dir']."/default/".$domain_name); // folder } - // rename switch/storage/fax/[domain] (folder) + //rename switch/storage/fax/[domain] (folder) if (isset($_SESSION['switch']['storage']['dir']) && file_exists($_SESSION['switch']['storage']['dir']."/fax/".$original_domain_name)) { @rename($_SESSION['switch']['storage']['dir']."/fax/".$original_domain_name, $_SESSION['switch']['storage']['dir']."/fax/".$domain_name); // folder } - // rename switch/conf/dialplan/[domain] (folder/file) + //rename switch/conf/dialplan/[domain] (folder/file) if (isset($_SESSION['switch']['dialplan']['dir'])) { if (file_exists($_SESSION['switch']['dialplan']['dir']."/".$original_domain_name)) { @rename($_SESSION['switch']['dialplan']['dir']."/".$original_domain_name, $_SESSION['switch']['dialplan']['dir']."/".$domain_name); // folder @@ -427,7 +434,7 @@ } } - // rename switch/conf/dialplan/public/[domain] (folder/file) + //rename switch/conf/dialplan/public/[domain] (folder/file) if (isset($_SESSION['switch']['dialplan']['dir'])) { if (file_exists($_SESSION['switch']['dialplan']['dir']."/public/".$original_domain_name)) { @rename($_SESSION['switch']['dialplan']['dir']."/public/".$original_domain_name, $_SESSION['switch']['dialplan']['dir']."/public/".$domain_name); // folder @@ -437,7 +444,7 @@ } } - // rename switch/conf/directory/[domain] (folder/file) + //rename switch/conf/directory/[domain] (folder/file) if (isset($_SESSION['switch']['extensions']['dir'])) { if (file_exists($_SESSION['switch']['extensions']['dir']."/".$original_domain_name)) { @rename($_SESSION['switch']['extensions']['dir']."/".$original_domain_name, $_SESSION['switch']['extensions']['dir']."/".$domain_name); // folder @@ -447,7 +454,7 @@ } } - // rename switch/recordings/[domain] (folder) + //rename switch/recordings/[domain] (folder) if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'])) { $switch_recordings_dir = str_replace("/".$_SESSION["domain_name"], "", $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']); if (file_exists($switch_recordings_dir."/".$original_domain_name)) { @@ -455,7 +462,7 @@ } } - // update dialplan, dialplan/public xml files + //update dialplan, dialplan/public xml files $dialplan_xml = file_get_contents($_SESSION['switch']['dialplan']['dir']."/".$domain_name.".xml"); $dialplan_xml = str_replace($original_domain_name, $domain_name, $dialplan_xml); file_put_contents($_SESSION['switch']['dialplan']['dir']."/".$domain_name.".xml", $dialplan_xml); @@ -466,10 +473,10 @@ file_put_contents($_SESSION['switch']['dialplan']['dir']."/public/".$domain_name.".xml", $dialplan_public_xml); unset($dialplan_public_xml); - // update session domain name + //update session domain name $_SESSION['domains'][$domain_uuid]['domain_name'] = $domain_name; - // recreate dialplan and extension xml files + //recreate dialplan and extension xml files if (is_readable($_SESSION['switch']['dialplan']['dir'])) { save_dialplan_xml(); } @@ -479,7 +486,7 @@ $extension->xml(); } - // if single-tenant and variables exist, update variables > domain value to match new domain + //if single-tenant and variables exist, update variables > domain value to match new domain if (count($_SESSION['domains']) == 1 && file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/vars/")) { $sql = "update v_vars set "; $sql .= "var_value = :var_value "; @@ -515,9 +522,9 @@ message::add($text['message-add']); header("Location: domains.php"); } - return; - } //if ($_POST["persistformvar"] != "true") - } //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) + exit; + } + } //pre-populate the form (admin won't have domain_add permissions, but domain_uuid will already be set above) if ((count($_GET) > 0 || (!permission_exists('domain_add') && $domain_uuid != '')) && $_POST["persistformvar"] != "true") { From 4672cb1115088802d497680012decbeeb6e1db0c Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 21 May 2020 18:55:41 -0600 Subject: [PATCH 093/621] More work to remove HESITATION from the translation. --- .../voicemail/resources/functions/record_message.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/scripts/resources/scripts/app/voicemail/resources/functions/record_message.lua b/app/scripts/resources/scripts/app/voicemail/resources/functions/record_message.lua index 8e9f567641..f15bcd3771 100644 --- a/app/scripts/resources/scripts/app/voicemail/resources/functions/record_message.lua +++ b/app/scripts/resources/scripts/app/voicemail/resources/functions/record_message.lua @@ -1,5 +1,5 @@ -- Part of FusionPBX --- Copyright (C) 2013-2019 Mark J Crane +-- Copyright (C) 2013-2020 Mark J Crane -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -209,7 +209,6 @@ end end - --Watson if (transcribe_provider == "watson") then local api_key = settings:get('voicemail', 'watson_key', 'text') or ''; local transcription_server = settings:get('voicemail', 'watson_url', 'text') or ''; @@ -221,7 +220,7 @@ end local handle = io.popen(transcribe_cmd); local transcribe_result = handle:read("*a"); - transcribe_result = transcribe_result:gsub('*HESITATION ', ''); + transcribe_result = transcribe_result:gsub('%%HESITATION ', ''); handle:close(); if (debug["info"]) then freeswitch.consoleLog("notice", "[voicemail] CMD: " .. transcribe_cmd .. "\n"); @@ -318,13 +317,12 @@ freeswitch.consoleLog("notice", "[voicemail] message too short for transcription.\n"); end end - return ''; end --save the recording function record_message() - + --set the variables local db = dbh or Database.new('system') local settings = Settings.new(db, domain_name, domain_uuid) @@ -333,7 +331,7 @@ local message_silence_seconds = settings:get('voicemail', 'message_silence_seconds', 'numeric') or 3; transcribe_enabled = settings:get('voicemail', 'transcribe_enabled', 'boolean') or "false"; local transcribe_provider = settings:get('voicemail', 'transcribe_provider', 'text') or ''; - + --debug information if (debug["info"]) then freeswitch.consoleLog("notice", "[voicemail] transcribe_enabled: " .. transcribe_enabled .. "\n"); From b699dbafdedbc66d692c2637a48bee76776f18cb Mon Sep 17 00:00:00 2001 From: Jason Kinner Date: Thu, 21 May 2020 20:57:09 -0400 Subject: [PATCH 094/621] Remove duplicate declaration of P2916 (#5283) P2916 (wallpaper source) is defined twice in the file: once statically and then again immediately after in an if/else statement. The latter is correct. Having it defined twice causes the phone to ignore the second declaration. --- resources/templates/provision/grandstream/gxp2160/{$mac}.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/templates/provision/grandstream/gxp2160/{$mac}.xml b/resources/templates/provision/grandstream/gxp2160/{$mac}.xml index f056603eb7..1bca9f1afb 100644 --- a/resources/templates/provision/grandstream/gxp2160/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2160/{$mac}.xml @@ -8099,7 +8099,8 @@ - 0 + + From 847d78cc40cf1eebaf537f4005f96bedf0a7fedb Mon Sep 17 00:00:00 2001 From: Jason Kinner Date: Thu, 21 May 2020 20:57:28 -0400 Subject: [PATCH 095/621] Remove duplicate declaration of P2916 (#5282) P2916 (wallpaper source) is defined twice in the file: once statically and then again immediately after in an if/else statement. The latter is correct. Having it defined twice causes the phone to ignore the second declaration. --- resources/templates/provision/grandstream/gxp2140/{$mac}.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/templates/provision/grandstream/gxp2140/{$mac}.xml b/resources/templates/provision/grandstream/gxp2140/{$mac}.xml index b842a121a4..97771d831f 100644 --- a/resources/templates/provision/grandstream/gxp2140/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2140/{$mac}.xml @@ -8099,7 +8099,8 @@ - 0 + + From 0e86cc4d89a6b2471d25c7199dffe67ab9a70c95 Mon Sep 17 00:00:00 2001 From: Jason Kinner Date: Thu, 21 May 2020 20:57:51 -0400 Subject: [PATCH 096/621] Remove duplicate declaration of P2916 (#5281) P2916 (wallpaper source) is defined twice in the file: once statically and then again immediately after in an if/else statement. The latter is correct. Having it defined twice causes the phone to ignore the second declaration. --- resources/templates/provision/grandstream/gxp2170/{$mac}.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/templates/provision/grandstream/gxp2170/{$mac}.xml b/resources/templates/provision/grandstream/gxp2170/{$mac}.xml index 35414e92b9..0f32d27a20 100644 --- a/resources/templates/provision/grandstream/gxp2170/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2170/{$mac}.xml @@ -8099,7 +8099,8 @@ - 0 + + From 23c7d64d446eef324314e02a1fcc3cd0b7510618 Mon Sep 17 00:00:00 2001 From: Jason Kinner Date: Thu, 21 May 2020 20:58:03 -0400 Subject: [PATCH 097/621] Remove duplicate declaration of P2916 (#5280) P2916 (wallpaper source) is defined twice in the file: once statically and then again immediately after in an if/else statement. The latter is correct. Having it defined twice causes the phone to ignore the second declaration. --- resources/templates/provision/grandstream/gxp2135/{$mac}.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/templates/provision/grandstream/gxp2135/{$mac}.xml b/resources/templates/provision/grandstream/gxp2135/{$mac}.xml index b842a121a4..97771d831f 100644 --- a/resources/templates/provision/grandstream/gxp2135/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2135/{$mac}.xml @@ -8099,7 +8099,8 @@ - 0 + + From f18e2423eded59abddd867f63826f18ac47da98a Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 23 May 2020 14:00:49 -0600 Subject: [PATCH 098/621] Theme: Side Menu updates. --- resources/classes/menu.php | 74 +++++++++++++---------------------- resources/footer.php | 3 +- themes/default/app_config.php | 16 ++++++++ themes/default/css.php | 63 +++++++++++++++++++++++------ themes/default/template.php | 60 +++++++++++++++++++++------- 5 files changed, 141 insertions(+), 75 deletions(-) diff --git a/resources/classes/menu.php b/resources/classes/menu.php index b971e6fea2..4feddb6c92 100644 --- a/resources/classes/menu.php +++ b/resources/classes/menu.php @@ -1078,50 +1078,35 @@ if (!class_exists('menu')) { public function menu_vertical($menu_array) { //menu brand image and/or text + $html .= " \n"; //main menu items if (is_array($menu_array) && sizeof($menu_array) != 0) { foreach ($menu_array as $menu_index_main => $menu_item_main) { @@ -1146,16 +1131,11 @@ if (!class_exists('menu')) { $html .= "
\n"; } $html .= "
\n"; - if ($_SESSION['theme']['menu_side_state']['text'] == 'expanded') { - $content_container_width = is_numeric($_SESSION['theme']['menu_side_width_expanded']['text']) ? $_SESSION['theme']['menu_side_width_expanded']['text'] : '225'; - } - else { - $content_container_width = is_numeric($_SESSION['theme']['menu_side_width_contracted']['text']) ? $_SESSION['theme']['menu_side_width_contracted']['text'] : '60'; - } - $html .= "
\n"; + $html .= "
= 576 && document.getElementById('menu_side_state_current').value != 'expanded') { menu_side_contract(); }\"" : null).">\n"; $html .= "
\n"; //header: left $html .= "
\n"; + $html .= button::create(['type'=>'button','title'=>$this->text['theme-label-expand_menu'],'icon'=>'bars','class'=>'default hide-sm-up','onclick'=>'menu_side_expand();']); $html .= "
\n"; //header: right $html .= ""; diff --git a/resources/footer.php b/resources/footer.php index c0c0085201..a844824fcc 100644 --- a/resources/footer.php +++ b/resources/footer.php @@ -182,7 +182,8 @@ //build menu by style switch ($_SESSION['theme']['menu_style']['text']) { case 'side': - $container_open = "
\n"; - echo "
".$step++."
"; + echo "
".$step."
"; echo " ".$text['label-upgrade_schema']; echo "
\n"; @@ -195,6 +195,7 @@ echo "\n"; echo "\n"; echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; if (permission_exists('group_edit')) { @@ -278,4 +265,4 @@ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> From a32244f4e47a8d002d0e2fac604d4373537e9d86 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 8 May 2020 19:13:06 -0600 Subject: [PATCH 032/621] Update and rename groupmembers.php to group_members.php --- core/groups/{groupmembers.php => group_members.php} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename core/groups/{groupmembers.php => group_members.php} (99%) diff --git a/core/groups/groupmembers.php b/core/groups/group_members.php similarity index 99% rename from core/groups/groupmembers.php rename to core/groups/group_members.php index 02312658d3..8b9ea2adbe 100644 --- a/core/groups/groupmembers.php +++ b/core/groups/group_members.php @@ -67,7 +67,7 @@ break; } - header('Location: groupmembers.php?group_uuid='.urlencode($group_uuid)); + header('Location: group_members.php?group_uuid='.urlencode($group_uuid)); exit; } @@ -224,4 +224,4 @@ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> From b79770f2d36bd6d45d1e2c85a0a94681c38fb21d Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 8 May 2020 19:14:08 -0600 Subject: [PATCH 033/621] Make group_members.php more efficient. --- core/groups/group_members.php | 66 +++++++++++++++-------------------- 1 file changed, 29 insertions(+), 37 deletions(-) diff --git a/core/groups/group_members.php b/core/groups/group_members.php index 8b9ea2adbe..2506755376 100644 --- a/core/groups/group_members.php +++ b/core/groups/group_members.php @@ -84,23 +84,6 @@ } unset($sql, $parameters, $row); -//define the if group members function - function is_group_member($group_uuid, $user_uuid) { - global $domain_uuid; - $sql = "select count(*) from v_user_groups "; - $sql .= "where user_uuid = :user_uuid "; - $sql .= "and group_uuid = :group_uuid "; - $sql .= "and domain_uuid = :domain_uuid "; - $parameters['user_uuid'] = $user_uuid; - $parameters['group_uuid'] = $group_uuid; - $parameters['domain_uuid'] = is_uuid($domain_uuid) ? $domain_uuid : $_SESSION['domain_uuid']; - $database = new database; - $num_rows = $database->select($sql, $parameters, 'column'); - return $num_rows == 0 ? true : false; - unset($sql, $parameters, $num_rows); - } - //$exampledatareturned = example("apples", 1); - //get the the users array if (permission_exists('group_member_add')) { $sql = "select * from v_users where "; @@ -129,10 +112,21 @@ $sql .= "order by d.domain_name asc, u.username asc "; $parameters['group_uuid'] = $group_uuid; $database = new database; - $result = $database->select($sql, $parameters, 'all'); - $num_rows = is_array($result) && @sizeof($result) != 0 ? sizeof($result) : 0; + $user_groups = $database->select($sql, $parameters, 'all'); + $num_rows = is_array($user_groups) && @sizeof($user_groups) != 0 ? sizeof($user_groups) : 0; unset($sql, $parameters); +//add group_member to the users array + foreach ($users as &$field) { + $field['group_member'] = 'false'; + foreach($user_groups as $row) { + if ($row['user_uuid'] == $field['user_uuid']) { + $field['group_member'] = 'true'; + break; + } + } + } + //create token $object = new token; $token = $object->create($_SERVER['PHP_SELF']); @@ -149,32 +143,32 @@ if (permission_exists('group_permission_view')) { echo button::create(['type'=>'button','label'=>$text['button-permissions'],'icon'=>'key','style'=>'margin-right: 15px;','link'=>'group_permissions.php?group_uuid='.urlencode($group_uuid)]); } + if (permission_exists('group_member_add')) { - echo "
\n"; + echo "\n"; echo " "; - echo ""; - echo ""; - echo ""; - echo ""; + echo " \n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo button::create(['type'=>'submit','label'=>$text['button-add_member'],'icon'=>$_SESSION['theme']['button_icon_add'],'collapse'=>'hide-xs']); - echo " "; + echo " \n"; } - if (permission_exists('group_member_delete') && $result) { + if (permission_exists('group_member_delete') && $user_groups) { echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','collapse'=>'hide-xs','onclick'=>"modal_open('modal-delete','btn_delete');"]); } echo " \n"; echo "
\n"; echo "\n"; - if (permission_exists('group_member_delete') && $result) { + if (permission_exists('group_member_delete') && $user_groups) { echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]); } @@ -186,7 +180,7 @@ echo "
\n"; if (permission_exists('group_member_delete')) { echo " \n"; } if (permission_exists('user_all')) { @@ -195,9 +189,9 @@ echo " \n"; echo "\n"; - if (is_array($result) && @sizeof($result) != 0) { + if (is_array($user_groups) && @sizeof($user_groups) != 0) { $x = 0; - foreach ($result as &$row) { + foreach ($user_groups as &$row) { echo ""; if (permission_exists('group_member_delete')) { echo " \n"; echo "\n"; $x++; - - $user_groups[] = $row["user_uuid"]; } } From d48f6d1eb003b252cde6eb8f364b57eb74c77821 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 8 May 2020 19:15:48 -0600 Subject: [PATCH 034/621] Update groups.php --- core/groups/groups.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/groups/groups.php b/core/groups/groups.php index 7a377a0a35..ef95ed8770 100644 --- a/core/groups/groups.php +++ b/core/groups/groups.php @@ -233,7 +233,7 @@ } echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; if (permission_exists('group_edit')) { echo " \n"; if (permission_exists('conference_session_play')) { echo "\n"; - if (is_array($device_lines) && @sizeof($device_lines) != 0) { break; } //show one row when editing extension and no device assigned + break; //show one empty row whether adding or editing } echo "
\n"; + echo "
".$step++."B
"; echo " ".$text['label-upgrade_data_types']; echo "
\n"; From 71e861a68c1853310fba53341883ccfd542faee6 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 6 May 2020 14:19:28 -0600 Subject: [PATCH 026/621] Update v_xml_cdr_import.php --- app/xml_cdr/v_xml_cdr_import.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/xml_cdr/v_xml_cdr_import.php b/app/xml_cdr/v_xml_cdr_import.php index 086fcfee33..2485a7e7f3 100644 --- a/app/xml_cdr/v_xml_cdr_import.php +++ b/app/xml_cdr/v_xml_cdr_import.php @@ -278,6 +278,11 @@ $domain_name = urldecode($xml->variables->domain_name); $domain_uuid = urldecode($xml->variables->domain_uuid); + //get the domain name from dialed_domain + if (strlen($domain_name) == 0) { + $domain_name = urldecode($xml->variables->dialed_domain); + } + //get the domain name from sip_req_host if (strlen($domain_name) == 0) { $domain_name = urldecode($xml->variables->sip_req_host); From 8aa4277449075b2938ed080761b49555f9040fc3 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 6 May 2020 14:23:17 -0600 Subject: [PATCH 027/621] Update v_xml_cdr_import.php --- app/xml_cdr/v_xml_cdr_import.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/xml_cdr/v_xml_cdr_import.php b/app/xml_cdr/v_xml_cdr_import.php index 2485a7e7f3..3151d89ffe 100644 --- a/app/xml_cdr/v_xml_cdr_import.php +++ b/app/xml_cdr/v_xml_cdr_import.php @@ -278,15 +278,23 @@ $domain_name = urldecode($xml->variables->domain_name); $domain_uuid = urldecode($xml->variables->domain_uuid); - //get the domain name from dialed_domain + //get the domain name if (strlen($domain_name) == 0) { $domain_name = urldecode($xml->variables->dialed_domain); } - - //get the domain name from sip_req_host + if (strlen($domain_name) == 0) { + $domain_name = urldecode($xml->variables->sip_invite_domain); + } if (strlen($domain_name) == 0) { $domain_name = urldecode($xml->variables->sip_req_host); } + if (strlen($domain_name) == 0) { + $presence_id = urldecode($xml->variables->presence_id); + if (strlen($presence_id) > 0) { + $presence_array = explode($presence_id); + $domain_name = $presence_array[1]; + } + } //send the domain name to the cdr log xml_cdr_log("\ndomain_name is `$domain_name`; domain_uuid is '$domain_uuid'\n"); From 99ac39d3e9f2f1ae30399b6d6aaff8eee99ae547 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 6 May 2020 20:35:34 -0600 Subject: [PATCH 028/621] Update app_config.php --- app/xml_cdr/app_config.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/xml_cdr/app_config.php b/app/xml_cdr/app_config.php index 4a35ad3798..a239f22936 100644 --- a/app/xml_cdr/app_config.php +++ b/app/xml_cdr/app_config.php @@ -360,9 +360,9 @@ $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']['mysql'] = "char(36)"; - $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign"; - $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_extensions"; - $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "extension_uuid"; + //$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign"; + //$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_extensions"; + //$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "extension_uuid"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id"; From e1f4f974854a70e79f8ead4160ae011a9b202b1c Mon Sep 17 00:00:00 2001 From: konradSC Date: Thu, 7 May 2020 16:01:38 -0400 Subject: [PATCH 029/621] Remove hard coded setting for moderator conf ctls (#5221) Conference Controls for moderators are hard coded. Because of this you cannot use the Conference Controls app in the web interface to create a new set of moderator controls and set them in the Conference Profile. --- app/scripts/resources/scripts/app/conference_center/index.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/resources/scripts/app/conference_center/index.lua b/app/scripts/resources/scripts/app/conference_center/index.lua index aa9290cd0d..6901603c19 100644 --- a/app/scripts/resources/scripts/app/conference_center/index.lua +++ b/app/scripts/resources/scripts/app/conference_center/index.lua @@ -700,7 +700,7 @@ flags = flags .. "|endconf"; end --set the moderator controls - session:execute("set","conference_controls=moderator"); + --session:execute("set","conference_controls=moderator"); end --get the conference xml_list From 85052f08e48cbac1c6cbe2424dca22cffcd2d24b Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 7 May 2020 14:03:31 -0600 Subject: [PATCH 030/621] Update index.lua --- app/scripts/resources/scripts/app/conference_center/index.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/scripts/resources/scripts/app/conference_center/index.lua b/app/scripts/resources/scripts/app/conference_center/index.lua index 6901603c19..3c4b980904 100644 --- a/app/scripts/resources/scripts/app/conference_center/index.lua +++ b/app/scripts/resources/scripts/app/conference_center/index.lua @@ -699,8 +699,6 @@ if (moderator_endconf == "true") then flags = flags .. "|endconf"; end - --set the moderator controls - --session:execute("set","conference_controls=moderator"); end --get the conference xml_list From 8a0e16d9b681ddd05cfbfdcb52e141d305e7165f Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 7 May 2020 19:11:26 -0600 Subject: [PATCH 031/621] Update groups.php --- core/groups/groups.php | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/core/groups/groups.php b/core/groups/groups.php index 33cf8487ae..7a377a0a35 100644 --- a/core/groups/groups.php +++ b/core/groups/groups.php @@ -125,19 +125,6 @@ $groups = $database->select($sql, $parameters, 'all'); unset($sql, $parameters); -//get permission counts for each group - if (is_array($groups) && @sizeof($groups) != 0) { - $sql = "select group_uuid, count(group_permission_uuid) as permission_count from v_group_permissions group by group_uuid"; - $database = new database; - $result = $database->select($sql, null, 'all'); - if (is_array($result) && @sizeof($result) != 0) { - foreach ($result as $row) { - $group_permissions[$row['group_uuid']] = $row['permission_count']; - } - } - unset($sql); - } - //create token $object = new token; $token = $object->create($_SERVER['PHP_SELF']); @@ -245,7 +232,7 @@ echo " ".escape($row['group_name']); } echo " ".escape($row['group_level'])."
\n"; - echo " \n"; + echo " \n"; echo " ".$text['label-username']."
\n"; @@ -211,8 +205,6 @@ echo "".$row["username"]."
".escape($row['group_level'])."\n"; - echo "
\n"; echo "
\n"; From 7621553115ce29d183e1a4d56f11c5a9f70cc4e2 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 12 May 2020 12:35:04 -0600 Subject: [PATCH 048/621] Rename {$mac}.boot to y000000000000.boot --- .../provision/yealink/t57w/{{$mac}.boot => y000000000000.boot} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename resources/templates/provision/yealink/t57w/{{$mac}.boot => y000000000000.boot} (100%) diff --git a/resources/templates/provision/yealink/t57w/{$mac}.boot b/resources/templates/provision/yealink/t57w/y000000000000.boot similarity index 100% rename from resources/templates/provision/yealink/t57w/{$mac}.boot rename to resources/templates/provision/yealink/t57w/y000000000000.boot From 7b012c01f436056d4b4fd5d48a3b2e4207e88e53 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 12 May 2020 12:35:21 -0600 Subject: [PATCH 049/621] Rename {$mac}.boot to y000000000000.boot --- .../provision/yealink/t54w/{{$mac}.boot => y000000000000.boot} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename resources/templates/provision/yealink/t54w/{{$mac}.boot => y000000000000.boot} (100%) diff --git a/resources/templates/provision/yealink/t54w/{$mac}.boot b/resources/templates/provision/yealink/t54w/y000000000000.boot similarity index 100% rename from resources/templates/provision/yealink/t54w/{$mac}.boot rename to resources/templates/provision/yealink/t54w/y000000000000.boot From 7cc386171225c191b1b6371b5b0e84e5dc5c50b3 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 12 May 2020 12:36:22 -0600 Subject: [PATCH 050/621] Delete {$mac}.boot --- resources/templates/provision/yealink/t54s/{$mac}.boot | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 resources/templates/provision/yealink/t54s/{$mac}.boot diff --git a/resources/templates/provision/yealink/t54s/{$mac}.boot b/resources/templates/provision/yealink/t54s/{$mac}.boot deleted file mode 100644 index a05b98c981..0000000000 --- a/resources/templates/provision/yealink/t54s/{$mac}.boot +++ /dev/null @@ -1,7 +0,0 @@ -#!version:1.0.0.1 -## The header above must appear as-is in the first line - -include:config "y000000000070.cfg" -include:config "{$mac}.cfg" - -overwrite_mode = {$yealink_overwrite_mode} From 155252d570def55a8762117eb0acf124474b609d Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 12 May 2020 12:36:42 -0600 Subject: [PATCH 051/621] Rename {$mac}.boot to y000000000000.boot --- .../provision/yealink/t53w/{{$mac}.boot => y000000000000.boot} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename resources/templates/provision/yealink/t53w/{{$mac}.boot => y000000000000.boot} (100%) diff --git a/resources/templates/provision/yealink/t53w/{$mac}.boot b/resources/templates/provision/yealink/t53w/y000000000000.boot similarity index 100% rename from resources/templates/provision/yealink/t53w/{$mac}.boot rename to resources/templates/provision/yealink/t53w/y000000000000.boot From 3883814c08f41d881ab04a53e38a3a2be5a08d05 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Tue, 12 May 2020 14:40:38 -0400 Subject: [PATCH 052/621] Update index.lua (#5268) --- app/scripts/resources/scripts/app/is_local/index.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/resources/scripts/app/is_local/index.lua b/app/scripts/resources/scripts/app/is_local/index.lua index d4b4b85db5..2189236bfe 100644 --- a/app/scripts/resources/scripts/app/is_local/index.lua +++ b/app/scripts/resources/scripts/app/is_local/index.lua @@ -108,7 +108,7 @@ --define the array/table and variables local var = {} local key = ""; - local value = ""; + local value = value; --parse the cache key_pairs = explode("&", value); From 20d63496016cb31d3fdd27a207f98ac4491d5070 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 12 May 2020 12:44:40 -0600 Subject: [PATCH 053/621] Update index.lua Remove code that is not needed. --- app/scripts/resources/scripts/app/is_local/index.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/scripts/resources/scripts/app/is_local/index.lua b/app/scripts/resources/scripts/app/is_local/index.lua index 2189236bfe..dcd16942d7 100644 --- a/app/scripts/resources/scripts/app/is_local/index.lua +++ b/app/scripts/resources/scripts/app/is_local/index.lua @@ -105,10 +105,8 @@ --add the function require "resources.functions.explode"; - --define the array/table and variables + --define the array/table local var = {} - local key = ""; - local value = value; --parse the cache key_pairs = explode("&", value); From b0c19d8cc476b4660805d0a51136afc8e435d856 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 12 May 2020 15:50:34 -0600 Subject: [PATCH 054/621] Add yealink_dnd_allow to t40g common file. --- resources/templates/provision/yealink/t40g/y000000000076.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/templates/provision/yealink/t40g/y000000000076.cfg b/resources/templates/provision/yealink/t40g/y000000000076.cfg index 5458d9d639..2662f6f3cb 100644 --- a/resources/templates/provision/yealink/t40g/y000000000076.cfg +++ b/resources/templates/provision/yealink/t40g/y000000000076.cfg @@ -733,6 +733,7 @@ features.fwd_diversion_enable = ####################################################################################### #Configure the DND key mode; 0-Phone mode (default), 1-Custom mode. features.dnd_mode = +features.dnd.allow = {$yealink_dnd_allow} features.dnd.on_code = *78 features.dnd.off_code = *79 features.dnd.emergency_enable = 1 From ed33c7d62ede8f6d1591ba4078eba6b14791c18b Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 12 May 2020 15:53:00 -0600 Subject: [PATCH 055/621] Add yealink_dnd_allow with default to 1. --- app/yealink/app_config.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/yealink/app_config.php b/app/yealink/app_config.php index 233e2f1617..1708fa8147 100644 --- a/app/yealink/app_config.php +++ b/app/yealink/app_config.php @@ -1087,5 +1087,13 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "#Configure the time (in seconds) the phone automatically dials out the dialed digits. It ranges from 1 to 14, the default value is 4."; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c02d516f-c5db-4dd6-a756-083fa690a204"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_dnd_allow"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "1"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set 1 = ON 0 = OFF."; + $y++; ?> From 03cd094bf50452cb9b63ac5a93ee1ddb460ff256 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 12 May 2020 15:56:24 -0600 Subject: [PATCH 056/621] Update y000000000066.cfg --- resources/templates/provision/yealink/t46s/y000000000066.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/templates/provision/yealink/t46s/y000000000066.cfg b/resources/templates/provision/yealink/t46s/y000000000066.cfg index 9c4974b97e..56550b25a7 100644 --- a/resources/templates/provision/yealink/t46s/y000000000066.cfg +++ b/resources/templates/provision/yealink/t46s/y000000000066.cfg @@ -1002,6 +1002,7 @@ features.forward_call_popup.enable= ####################################################################################### features.dnd.allow= features.dnd_mode= +features.dnd.allow = {$yealink_dnd_allow} features.dnd.enable= features.dnd.off_code = *79 From 8ef66fca34eb980c5c3e1ae1f695957956c85f82 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 12 May 2020 15:57:24 -0600 Subject: [PATCH 057/621] Add yealink_dnd_allow to t46g --- resources/templates/provision/yealink/t46g/y000000000028.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/templates/provision/yealink/t46g/y000000000028.cfg b/resources/templates/provision/yealink/t46g/y000000000028.cfg index 7b9bb75d18..d5a98869c8 100644 --- a/resources/templates/provision/yealink/t46g/y000000000028.cfg +++ b/resources/templates/provision/yealink/t46g/y000000000028.cfg @@ -732,6 +732,7 @@ features.fwd_diversion_enable = ####################################################################################### #Configure the DND key mode; 0-Phone mode (default), 1-Custom mode. features.dnd_mode = +features.dnd.allow = {$yealink_dnd_allow} features.dnd.on_code = *78 features.dnd.off_code = *79 features.dnd.emergency_enable = 1 From fecb64b3e8baa9950a0161636090df71bc41fefd Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 13 May 2020 12:03:54 -0600 Subject: [PATCH 058/621] Update 900_voicemail.xml --- .../resources/switch/conf/dialplan/900_voicemail.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/dialplans/resources/switch/conf/dialplan/900_voicemail.xml b/app/dialplans/resources/switch/conf/dialplan/900_voicemail.xml index 875d2cb270..55e06f5104 100644 --- a/app/dialplans/resources/switch/conf/dialplan/900_voicemail.xml +++ b/app/dialplans/resources/switch/conf/dialplan/900_voicemail.xml @@ -2,10 +2,10 @@ - - - - + + + + From a24d77f4278fb600ed1913a8b57bd09b16003473 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 13 May 2020 21:06:10 -0600 Subject: [PATCH 059/621] Registrations - More work to remove invalid characters that break XML. --- app/registrations/resources/classes/registrations.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/registrations/resources/classes/registrations.php b/app/registrations/resources/classes/registrations.php index c97be762b2..aa3fde0656 100644 --- a/app/registrations/resources/classes/registrations.php +++ b/app/registrations/resources/classes/registrations.php @@ -89,6 +89,7 @@ if (!class_exists('registrations')) { $cmd = "api sofia xmlstatus profile ".$field['sip_profile_name']." reg"; $xml_response = trim(event_socket_request($fp, $cmd)); $xml_response = iconv("utf-8", "utf-8//ignore", $xml_response); + $xml_response = preg_replace('/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/u', '', $xml_response); if ($xml_response == "Invalid Profile!") { $xml_response = "".$text['label-message'].""; } $xml_response = str_replace("", "", $xml_response); $xml_response = str_replace("", "", $xml_response); @@ -99,9 +100,10 @@ if (!class_exists('registrations')) { $xml = new SimpleXMLElement($xml_response); } catch(Exception $e) { - echo basename(__FILE__).'
'; - echo 'line: '.__line__.'
'; - echo 'error: '.$e->getMessage(); + echo basename(__FILE__)."
\n"; + echo "line: ".__line__."
\n"; + echo "error: ".$e->getMessage()."
\n"; + //echo $xml_response; exit; } $array = json_decode(json_encode($xml), true); From d53bf56ee6550b7c7e765fd07860f39605ff6c5e Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 14 May 2020 20:48:57 -0600 Subject: [PATCH 060/621] Remove is_array on extension_uuids --- app/xml_cdr/xml_cdr_inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/xml_cdr/xml_cdr_inc.php b/app/xml_cdr/xml_cdr_inc.php index 1a444ebcba..510318d1fa 100644 --- a/app/xml_cdr/xml_cdr_inc.php +++ b/app/xml_cdr/xml_cdr_inc.php @@ -279,7 +279,7 @@ $sql .= "where c.domain_uuid = :domain_uuid \n"; $parameters['domain_uuid'] = $domain_uuid; } - if (!permission_exists('xml_cdr_domain') && is_array($extension_uuids)) { //only show the user their calls + if (!permission_exists('xml_cdr_domain')) { //only show the user their calls $sql .= "and (c.extension_uuid = '".implode("' or c.extension_uuid = '", $extension_uuids)."') "; } if ($missed == true) { From 3d7286b7b3e7e63776cb09eb2486d8dafd472a14 Mon Sep 17 00:00:00 2001 From: Len Date: Fri, 15 May 2020 00:15:48 -0400 Subject: [PATCH 061/621] Patch 107 (#5274) * Update app_config.php * Update app_config.php --- app/yealink/app_config.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/app/yealink/app_config.php b/app/yealink/app_config.php index 1708fa8147..b0601d1044 100644 --- a/app/yealink/app_config.php +++ b/app/yealink/app_config.php @@ -1095,5 +1095,23 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set 1 = ON 0 = OFF."; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "768c0f46-c9cf-44e2-87fc-4279f956d368"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_security_default_ssl_method"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "3"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Configures the TLS version to use. 0-TLS 1.0 only, 3-SSL V23 automatic negotiation with the server, 4-TLS 1.1 only, 5-TLS 1.2 only, Default 3"; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "dc570a6d-daa5-49e5-aacb-db51478883b8"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_security_tls_cipher_list"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "AES:!ADH:!LOW:!EXPORT:!NULL"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "TLS cipher list Default"; + $y++; + + ?> From ca07ef723ec20679fc07b090956f4078d8afa73f Mon Sep 17 00:00:00 2001 From: Len Date: Fri, 15 May 2020 00:16:44 -0400 Subject: [PATCH 062/621] Update y000000000074.cfg (#5273) * Update y000000000074.cfg * Update y000000000074.cfg --- .../templates/provision/yealink/t52s/y000000000074.cfg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/templates/provision/yealink/t52s/y000000000074.cfg b/resources/templates/provision/yealink/t52s/y000000000074.cfg index 052de170ff..7267c8a21a 100644 --- a/resources/templates/provision/yealink/t52s/y000000000074.cfg +++ b/resources/templates/provision/yealink/t52s/y000000000074.cfg @@ -335,12 +335,14 @@ wui.quick_login = ####################################################################################### static.phone_setting.reserve_certs_enable = features.relog_offtime = -static.security.default_ssl_method = +static.security.default_ssl_method = {$yealink_security_default_ssl_method} static.security.cn_validation = static.security.dev_cert = static.security.ca_cert = static.security.trust_certificates = {if $yealink_trust_certificates == "false"}0{elseif $yealink_trust_certificates == "true"}1{/if} -security.tls_cipher_list = + +security.tls_cipher_list = {$yealink_security_tls_cipher_list} + {if isset($user_name) } static.security.user_name.user = {$user_name} static.security.user_password = {$user_name}:{$user_password} From d03e33f046e24f7c198c0fb680ff59a22fdb9668 Mon Sep 17 00:00:00 2001 From: Len Date: Fri, 15 May 2020 00:17:19 -0400 Subject: [PATCH 063/621] Update y000000000065.cfg (#5272) * Update y000000000065.cfg * Update y000000000065.cfg --- resources/templates/provision/yealink/t48s/y000000000065.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/templates/provision/yealink/t48s/y000000000065.cfg b/resources/templates/provision/yealink/t48s/y000000000065.cfg index 94ff2c00f4..f851095a8c 100644 --- a/resources/templates/provision/yealink/t48s/y000000000065.cfg +++ b/resources/templates/provision/yealink/t48s/y000000000065.cfg @@ -377,7 +377,7 @@ wui.quick_login = ####################################################################################### static.phone_setting.reserve_certs_enable = features.relog_offtime = -static.security.default_ssl_method = +static.security.default_ssl_method = {$yealink_security_default_ssl_method} static.security.cn_validation = static.security.dev_cert = static.security.ca_cert = @@ -388,7 +388,7 @@ static.security.user_password = {$user_name}:{$user_password} static.security.user_name.var = {$var_name} static.security.user_name.admin = {$admin_name} static.security.user_name.user = {$user_name} -security.tls_cipher_list = +security.tls_cipher_list = {$yealink_security_tls_cipher_list} ####################################################################################### From d359f9914f798761c7e0f19f1e09f34583ad651c Mon Sep 17 00:00:00 2001 From: Len Date: Fri, 15 May 2020 00:18:06 -0400 Subject: [PATCH 064/621] Update y000000000066.cfg (#5271) * Update y000000000066.cfg * Update y000000000066.cfg --- resources/templates/provision/yealink/t46s/y000000000066.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/templates/provision/yealink/t46s/y000000000066.cfg b/resources/templates/provision/yealink/t46s/y000000000066.cfg index 56550b25a7..ace9e0a068 100644 --- a/resources/templates/provision/yealink/t46s/y000000000066.cfg +++ b/resources/templates/provision/yealink/t46s/y000000000066.cfg @@ -336,7 +336,7 @@ wui.quick_login = ####################################################################################### static.phone_setting.reserve_certs_enable = features.relog_offtime = -static.security.default_ssl_method = +static.security.default_ssl_method = {$yealink_security_default_ssl_method} static.security.cn_validation = static.security.dev_cert = static.security.ca_cert = @@ -347,7 +347,7 @@ static.security.user_password = {$user_name}:{$user_password} static.security.user_name.var = {$var_name} static.security.user_name.admin = {$admin_name} static.security.user_name.user = {$user_name} -security.tls_cipher_list = +security.tls_cipher_list = {$yealink_security_tls_cipher_list} ####################################################################################### From 54a804c9f058612719145dafa47c494591f33455 Mon Sep 17 00:00:00 2001 From: Len Date: Fri, 15 May 2020 00:18:51 -0400 Subject: [PATCH 065/621] Update y000000000067.cfg (#5270) * Update y000000000067.cfg * Update y000000000067.cfg --- resources/templates/provision/yealink/t42s/y000000000067.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/templates/provision/yealink/t42s/y000000000067.cfg b/resources/templates/provision/yealink/t42s/y000000000067.cfg index 2834b6b2de..ce865f153c 100644 --- a/resources/templates/provision/yealink/t42s/y000000000067.cfg +++ b/resources/templates/provision/yealink/t42s/y000000000067.cfg @@ -336,7 +336,7 @@ wui.quick_login = ####################################################################################### static.phone_setting.reserve_certs_enable = features.relog_offtime = -static.security.default_ssl_method = +static.security.default_ssl_method = {$yealink_security_default_ssl_method} static.security.cn_validation = static.security.dev_cert = static.security.ca_cert = @@ -347,7 +347,7 @@ static.security.user_password = {$user_name}:{$user_password} static.security.user_name.var = {$var_name} static.security.user_name.admin = {$admin_name} static.security.user_name.user = {$user_name} -security.tls_cipher_list = +security.tls_cipher_list = {$yealink_security_tls_cipher_list} ####################################################################################### From 329fc04f6cd6f6ae35fef1d79d5c97b858ca720f Mon Sep 17 00:00:00 2001 From: chansizzle <14916599+chansizzle@users.noreply.github.com> Date: Fri, 15 May 2020 16:24:00 -0600 Subject: [PATCH 066/621] Update paging.php (#5279) fix Notice: Undefined variable: max_page --- resources/paging.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/paging.php b/resources/paging.php index 14cbdf871b..81a74ee4f2 100644 --- a/resources/paging.php +++ b/resources/paging.php @@ -77,7 +77,10 @@ function paging($num_rows, $param, $rows_per_page, $mini = false, $result_count if ($num_rows > 0) { $max_page = ceil($num_rows/$rows_per_page); } - + else { + $max_page = 1; + } + //add multi-lingual support $language = new text; $text = $language->get(); @@ -188,4 +191,4 @@ function paging($num_rows, $param, $rows_per_page, $mini = false, $result_count } -?> \ No newline at end of file +?> From 17309eefff63399f2ac9ab31f76ac4d7dc92ed81 Mon Sep 17 00:00:00 2001 From: chansizzle <14916599+chansizzle@users.noreply.github.com> Date: Fri, 15 May 2020 16:24:23 -0600 Subject: [PATCH 067/621] Update menu.php (#5278) fix Notice: Undefined variable: menu_sub_icon in /var/www/fusionpbx/resources/classes/menu.php on line 1034 --- resources/classes/menu.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/classes/menu.php b/resources/classes/menu.php index f7411efcff..3234d37ba3 100644 --- a/resources/classes/menu.php +++ b/resources/classes/menu.php @@ -1023,6 +1023,7 @@ if (!class_exists('menu')) { $mod_a_2 = '#'; } $mod_a_3 = ($menu_sub['menu_item_category'] == 'external') ? "target='_blank' " : null; + $menu_sub_icon = null; if ($_SESSION['theme']['menu_sub_icons']['boolean'] != 'false') { if ($menu_sub['menu_item_icon'] != '' && substr_count($menu_sub['menu_item_icon'], 'fa-') > 0) { $menu_sub_icon = ""; From f7fb173a46c1f189d8d60cbbe11fb21477c63873 Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 16 May 2020 12:28:41 -0600 Subject: [PATCH 068/621] Voicemail Greetings: Revert to default message if greeting deleted. --- .../resources/classes/voicemail_greetings.php | 29 +++++++++++++++---- app/voicemails/voicemail_edit.php | 2 +- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/app/voicemail_greetings/resources/classes/voicemail_greetings.php b/app/voicemail_greetings/resources/classes/voicemail_greetings.php index 7b8d94806e..575fe6dfde 100644 --- a/app/voicemail_greetings/resources/classes/voicemail_greetings.php +++ b/app/voicemail_greetings/resources/classes/voicemail_greetings.php @@ -109,13 +109,14 @@ if (!class_exists('voicemail_greetings')) { //get necessary greeting details if (is_array($uuids) && @sizeof($uuids) != 0) { - $sql = "select ".$this->uuid_prefix."uuid as uuid, greeting_filename from v_".$this->table." "; + $sql = "select ".$this->uuid_prefix."uuid as uuid, greeting_filename, greeting_id from v_".$this->table." "; $sql .= "where ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") "; $database = new database; $rows = $database->select($sql, $parameters, 'all'); if (is_array($rows) && @sizeof($rows) != 0) { foreach ($rows as $row) { $greeting_filenames[$row['uuid']] = $row['greeting_filename']; + $greeting_ids[$this->voicemail_id] = $row['greeting_id']; } } unset($sql, $parameters, $rows, $row); @@ -128,11 +129,8 @@ if (!class_exists('voicemail_greetings')) { if (is_array($greeting_filenames) && @sizeof($greeting_filenames) != 0) { $x = 0; foreach ($greeting_filenames as $voicemail_greeting_uuid => $greeting_filename) { - //delete the recording file @unlink($greeting_directory.'/'.$greeting_filename); - - //build the delete array $array[$this->table][$x][$this->uuid_prefix.'uuid'] = $voicemail_greeting_uuid; $array[$this->table][$x]['domain_uuid'] = $_SESSION['domain_uuid']; @@ -140,20 +138,39 @@ if (!class_exists('voicemail_greetings')) { } } + //reset voicemail box(es) to default (null) if deleted greeting(s) were assigned + if (is_array($array) && @sizeof($array) != 0 && is_array($greeting_ids) && @sizeof($greeting_ids)) { + foreach ($greeting_ids as $voicemail_id => $greeting_id) { + if (is_numeric($voicemail_id) && is_numeric($greeting_id)) { + $sql = "update v_voicemails set greeting_id = null "; + $sql .= "where domain_uuid = :domain_uuid "; + $sql .= "and voicemail_id = :voicemail_id "; + $sql .= "and greeting_id = :greeting_id "; + $parameters['domain_uuid'] = $_SESSION['domain_uuid']; + $parameters['voicemail_id'] = $voicemail_id; + $parameters['greeting_id'] = $greeting_id; + $database = new database; + $database->app_name = $this->app_name; + $database->app_uuid = $this->app_uuid; + $database->execute($sql, $parameters); + unset($sql, $parameters); + } + } + } + //delete the checked rows if (is_array($array) && @sizeof($array) != 0) { - //execute delete $database = new database; $database->app_name = $this->app_name; $database->app_uuid = $this->app_uuid; $database->delete($array); unset($array); - //set message message::add($text['message-delete']); } unset($records); + } } } //method diff --git a/app/voicemails/voicemail_edit.php b/app/voicemails/voicemail_edit.php index 0c6592e88e..1dc90c7e5b 100644 --- a/app/voicemails/voicemail_edit.php +++ b/app/voicemails/voicemail_edit.php @@ -504,7 +504,7 @@ echo "
\n"; echo "
\n"; @@ -262,6 +266,7 @@ ) { echo "

"; } + echo "\n"; echo ""; echo ""; echo ""; From f267fa1362cf0b467c38a353c4fd02b7efee0581 Mon Sep 17 00:00:00 2001 From: Mark J Crane Date: Tue, 19 May 2020 17:27:36 -0600 Subject: [PATCH 085/621] Add fanvil settings and correct some mistakes --- .../templates/provision/fanvil/x3u/{$mac}.cfg | 368 +++++++++--------- .../templates/provision/fanvil/x4u/{$mac}.cfg | 368 +++++++++--------- .../templates/provision/fanvil/x5s/{$mac}.cfg | 2 +- .../templates/provision/fanvil/x5u/{$mac}.cfg | 366 ++++++++--------- .../templates/provision/fanvil/x6/{$mac}.cfg | 2 +- .../templates/provision/fanvil/x6u/{$mac}.cfg | 366 ++++++++--------- .../templates/provision/fanvil/x7/{$mac}.cfg | 6 +- 7 files changed, 763 insertions(+), 715 deletions(-) diff --git a/resources/templates/provision/fanvil/x3u/{$mac}.cfg b/resources/templates/provision/fanvil/x3u/{$mac}.cfg index 701b396e55..e420591dd0 100644 --- a/resources/templates/provision/fanvil/x3u/{$mac}.cfg +++ b/resources/templates/provision/fanvil/x3u/{$mac}.cfg @@ -7,11 +7,11 @@ - {if isset($dns_server_primary)}{$dns_server_primary}{else}8.8.8.8{/if} - {if isset($dns_server_secondary)}{$dns_server_secondary}{else}202.96.134.133{/if} + {if isset($dns_server_primary)}{$dns_server_primary}{else}9.9.9.9{/if} + {if isset($dns_server_secondary)}{$dns_server_secondary}{else}208.67.222.222{/if} 1 1 - 0 + 1 1 0 Fanvil X3U @@ -74,9 +74,9 @@ - 5060 - - 3478 + {$sip_port} + {$fanvil_stun_server} + {$fanvil_stun_port} 50 800 @@ -88,28 +88,28 @@ 1 1 0 - 0 + 1 - - + {$account.1.user_id} + {$account.1.display_name} - - 5060 - - - 3600 + {$account.1.server_address} + {$account.1.sip_port} + {$account.1.auth_id} + {$account.1.password} + {$account.1.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.1.password)}1{else}0{/if} + {$account.1.outbound_proxy_primary} + {$account.1.sip_port} + {$account.1.auth_id} + {$account.1.password} + {$account.1.outbound_proxy_secondary} + {$account.1.sip_port} + {if isset($account.1.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -133,7 +133,7 @@ - default + {if isset($fanvil_ringtone_line1)}{$fanvil_ringtone_line1}{else}default{/if} 2 30 0 @@ -148,14 +148,14 @@ 0 1 0 - 3600 + {$account.1.register_expires} 0 0 1 0 0 - 0 - 0 + {if $account.1.sip_transport == 'dns srv'}1{/if} + {if $account.1.sip_transport == 'dns srv'}1{/if} 0 0 0 @@ -164,15 +164,17 @@ 1 0 5060 - 0 + {if $account.1.sip_transport == 'udp'}0{/if} + {if $account.1.sip_transport == 'tcp'}1{/if} + {if $account.1.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -183,23 +185,23 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 - - + *67 + *67 - PCMU,PCMA,G726-32,G729,iLBC,G722 - + OPUS,PCMU,PCMA,G726-32,G729,iLBC,G722 + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -245,26 +247,26 @@ 5000 - - + {$account.2.user_id} + {$account.2.display_name} - - 5060 - - - 3600 + {$account.2.server_address} + {$account.2.sip_port} + {$account.2.auth_id} + {$account.2.password} + {$account.2.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.2.password)}1{else}0{/if} + {$account.2.outbound_proxy_primary} + {$account.2.sip_port} + {$account.2.auth_id} + {$account.2.password} + {$account.2.outbound_proxy_secondary} + {$account.2.sip_port} + {if isset($account.2.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -288,7 +290,7 @@ - default + {if isset($fanvil_ringtone_line2)}{$fanvil_ringtone_line2}{else}default{/if} 2 30 0 @@ -303,14 +305,14 @@ 0 1 0 - 3600 + {$account.2.register_expires} 0 0 1 0 0 - 0 - 0 + {if $account.2.sip_transport == 'dns srv'}1{/if} + {if $account.2.sip_transport == 'dns srv'}1{/if} 0 0 0 @@ -319,15 +321,17 @@ 1 0 5060 - 0 + {if $account.2.sip_transport == 'udp'}0{/if} + {if $account.2.sip_transport == 'tcp'}1{/if} + {if $account.2.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -338,23 +342,23 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 - - + *67 + *67 - PCMU,PCMA,G726-32,G729,iLBC,G722 - + OPUS,PCMU,PCMA,G726-32,G729,iLBC,G722 + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -400,26 +404,26 @@ 5000 - - + {$account.3.user_id} + {$account.3.display_name} - - 5060 - - - 3600 + {$account.3.server_address} + {$account.3.sip_port} + {$account.3.auth_id} + {$account.3.password} + {$account.3.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.3.password)}1{else}0{/if} + {$account.3.outbound_proxy_primary} + {$account.3.sip_port} + {$account.3.auth_id} + {$account.3.password} + {$account.3.outbound_proxy_secondary} + {$account.3.sip_port} + {if isset($account.3.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -443,7 +447,7 @@ - default + {if isset($fanvil_ringtone_line3)}{$fanvil_ringtone_line3}{else}default{/if} 2 30 0 @@ -458,14 +462,14 @@ 0 1 0 - 3600 + {$account.3.register_expires} 0 0 1 0 0 - 0 - 0 + {if $account.3.sip_transport == 'dns srv'}1{/if} + {if $account.3.sip_transport == 'dns srv'}1{/if} 0 0 0 @@ -474,15 +478,17 @@ 1 0 5060 - 0 + {if $account.3.sip_transport == 'udp'}0{/if} + {if $account.3.sip_transport == 'tcp'}1{/if} + {if $account.3.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -493,23 +499,25 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 + *67 + *67 - PCMU,PCMA,G726-32,G729,iLBC,G722 - + OPUS,PCMU,PCMA,G726-32,G729,iLBC,G722 + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -555,26 +563,26 @@ 5000 - - + {$account.4.user_id} + {$account.4.display_name} - - 5060 - - - 3600 + {$account.4.server_address} + {$account.4.sip_port} + {$account.4.auth_id} + {$account.4.password} + {$account.4.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.4.password)}1{else}0{/if} + {$account.4.outbound_proxy_primary} + {$account.4.sip_port} + {$account.4.auth_id} + {$account.4.password} + {$account.4.outbound_proxy_secondary} + {$account.4.sip_port} + {if isset($account.4.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -598,7 +606,7 @@ - default + {if isset($fanvil_ringtone_line4)}{$fanvil_ringtone_line4}{else}default{/if} 2 30 0 @@ -613,14 +621,14 @@ 0 1 0 - 3600 + {$account.4.register_expires} 0 0 1 0 0 - 0 - 0 + {if $account.4.sip_transport == 'dns srv'}1{/if} + {if $account.4.sip_transport == 'dns srv'}1{/if} 0 0 0 @@ -629,15 +637,17 @@ 1 0 5060 - 0 + {if $account.4.sip_transport == 'udp'}0{/if} + {if $account.4.sip_transport == 'tcp'}1{/if} + {if $account.4.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -648,23 +658,23 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 - - + *67 + *67 - PCMU,PCMA,G726-32,G729,iLBC,G722 - + OPUS,PCMU,PCMA,G726-32,G729,iLBC,G722 + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -710,26 +720,26 @@ 5000 - - + {$account.5.user_id} + {$account.5.display_name} - - 5060 - - - 3600 + {$account.5.server_address} + {$account.5.sip_port} + {$account.5.auth_id} + {$account.5.password} + {$account.5.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.5.password)}1{else}0{/if} + {$account.5.outbound_proxy_primary} + {$account.5.sip_port} + {$account.5.auth_id} + {$account.5.password} + {$account.5.outbound_proxy_secondary} + {$account.5.sip_port} + {if isset($account.5.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -753,7 +763,7 @@ - default + {if isset($fanvil_ringtone_line5)}{$fanvil_ringtone_line5}{else}default{/if} 2 30 0 @@ -768,7 +778,7 @@ 0 1 0 - 3600 + {$account.5.register_expires} 0 0 1 @@ -784,15 +794,17 @@ 1 0 5060 - 0 + {if $account.5.sip_transport == 'udp'}0{/if} + {if $account.5.sip_transport == 'tcp'}1{/if} + {if $account.5.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -803,23 +815,23 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 - - + *67 + *67 - PCMU,PCMA,G726-32,G729,iLBC,G722 - + OPUS,PCMU,PCMA,G726-32,G729,iLBC,G722 + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 diff --git a/resources/templates/provision/fanvil/x4u/{$mac}.cfg b/resources/templates/provision/fanvil/x4u/{$mac}.cfg index cddb247dce..46d3443d92 100644 --- a/resources/templates/provision/fanvil/x4u/{$mac}.cfg +++ b/resources/templates/provision/fanvil/x4u/{$mac}.cfg @@ -7,11 +7,11 @@ - {if isset($dns_server_primary)}{$dns_server_primary}{else}8.8.8.8{/if} - {if isset($dns_server_secondary)}{$dns_server_secondary}{else}202.96.134.133{/if} + {if isset($dns_server_primary)}{$dns_server_primary}{else}9.9.9.9{/if} + {if isset($dns_server_secondary)}{$dns_server_secondary}{else}208.67.222.222{/if} 1 1 - 0 + 1 1 0 Fanvil X4U @@ -80,9 +80,9 @@ - 5060 - - 3478 + {$sip_port} + {$fanvil_stun_server} + {$fanvil_stun_port} 50 800 @@ -94,28 +94,28 @@ 1 1 0 - 0 + 1 - - + {$account.1.user_id} + {$account.1.display_name} - - 5060 - - - 3600 + {$account.1.server_address} + {$account.1.sip_port} + {$account.1.auth_id} + {$account.1.password} + {$account.1.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.1.password)}1{else}0{/if} + {$account.1.outbound_proxy_primary} + {$account.1.sip_port} + {$account.1.auth_id} + {$account.1.password} + {$account.1.outbound_proxy_secondary} + {$account.1.sip_port} + {if isset($account.1.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -139,7 +139,7 @@ - default + {if isset($fanvil_ringtone_line1)}{$fanvil_ringtone_line1}{else}default{/if} 2 30 0 @@ -154,14 +154,14 @@ 0 1 0 - 3600 + {$account.1.register_expires} 0 0 1 0 0 - 0 - 0 + {if $account.1.sip_transport == 'dns srv'}1{/if} + {if $account.1.sip_transport == 'dns srv'}1{/if} 0 0 0 @@ -170,15 +170,17 @@ 1 0 5060 - 0 + {if $account.1.sip_transport == 'udp'}0{/if} + {if $account.1.sip_transport == 'tcp'}1{/if} + {if $account.1.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -189,23 +191,23 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 - - + *67 + *67 PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -251,26 +253,26 @@ 5000 - - + {$account.2.user_id} + {$account.2.display_name} - - 5060 - - - 3600 + {$account.2.server_address} + {$account.2.sip_port} + {$account.2.auth_id} + {$account.2.password} + {$account.2.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.2.password)}1{else}0{/if} + {$account.2.outbound_proxy_primary} + {$account.2.sip_port} + {$account.2.auth_id} + {$account.2.password} + {$account.2.outbound_proxy_secondary} + {$account.2.sip_port} + {if isset($account.2.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -294,7 +296,7 @@ - default + {if isset($fanvil_ringtone_line2)}{$fanvil_ringtone_line2}{else}default{/if} 2 30 0 @@ -309,14 +311,14 @@ 0 1 0 - 3600 + {$account.2.register_expires} 0 0 1 0 0 - 0 - 0 + {if $account.2.sip_transport == 'dns srv'}1{/if} + {if $account.2.sip_transport == 'dns srv'}1{/if} 0 0 0 @@ -325,15 +327,17 @@ 1 0 5060 - 0 + {if $account.2.sip_transport == 'udp'}0{/if} + {if $account.2.sip_transport == 'tcp'}1{/if} + {if $account.2.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -344,23 +348,23 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 - - + *67 + *67 - PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + OPUS,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -406,26 +410,26 @@ 5000 - - + {$account.3.user_id} + {$account.3.display_name} - - 5060 - - - 3600 + {$account.3.server_address} + {$account.3.sip_port} + {$account.3.auth_id} + {$account.3.password} + {$account.3.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.3.password)}1{else}0{/if} + {$account.3.outbound_proxy_primary} + {$account.3.sip_port} + {$account.3.auth_id} + {$account.3.password} + {$account.3.outbound_proxy_secondary} + {$account.3.sip_port} + {if isset($account.3.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -449,7 +453,7 @@ - default + {if isset($fanvil_ringtone_line3)}{$fanvil_ringtone_line3}{else}default{/if} 2 30 0 @@ -464,14 +468,14 @@ 0 1 0 - 3600 + {$account.3.register_expires} 0 0 1 0 0 - 0 - 0 + {if $account.3.sip_transport == 'dns srv'}1{/if} + {if $account.3.sip_transport == 'dns srv'}1{/if} 0 0 0 @@ -480,15 +484,17 @@ 1 0 5060 - 0 + {if $account.3.sip_transport == 'udp'}0{/if} + {if $account.3.sip_transport == 'tcp'}1{/if} + {if $account.3.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -499,23 +505,25 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 + *67 + *67 - PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + OPUS,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -561,26 +569,26 @@ 5000 - - + {$account.4.user_id} + {$account.4.display_name} - - 5060 - - - 3600 + {$account.4.server_address} + {$account.4.sip_port} + {$account.4.auth_id} + {$account.4.password} + {$account.4.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.4.password)}1{else}0{/if} + {$account.4.outbound_proxy_primary} + {$account.4.sip_port} + {$account.4.auth_id} + {$account.4.password} + {$account.4.outbound_proxy_secondary} + {$account.4.sip_port} + {if isset($account.4.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -604,7 +612,7 @@ - default + {if isset($fanvil_ringtone_line4)}{$fanvil_ringtone_line4}{else}default{/if} 2 30 0 @@ -619,14 +627,14 @@ 0 1 0 - 3600 + {$account.4.register_expires} 0 0 1 0 0 - 0 - 0 + {if $account.4.sip_transport == 'dns srv'}1{/if} + {if $account.4.sip_transport == 'dns srv'}1{/if} 0 0 0 @@ -635,15 +643,17 @@ 1 0 5060 - 0 + {if $account.4.sip_transport == 'udp'}0{/if} + {if $account.4.sip_transport == 'tcp'}1{/if} + {if $account.4.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -654,23 +664,23 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 - - + *67 + *67 - PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + OPUS,PCMU,PCMA,G726-32,G729,iLBC,G722 + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -716,26 +726,26 @@ 5000 - - + {$account.5.user_id} + {$account.5.display_name} - - 5060 - - - 3600 + {$account.5.server_address} + {$account.5.sip_port} + {$account.5.auth_id} + {$account.5.password} + {$account.5.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.5.password)}1{else}0{/if} + {$account.5.outbound_proxy_primary} + {$account.5.sip_port} + {$account.5.auth_id} + {$account.5.password} + {$account.5.outbound_proxy_secondary} + {$account.5.sip_port} + {if isset($account.5.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -759,7 +769,7 @@ - default + {if isset($fanvil_ringtone_line5)}{$fanvil_ringtone_line5}{else}default{/if} 2 30 0 @@ -774,7 +784,7 @@ 0 1 0 - 3600 + {$account.5.register_expires} 0 0 1 @@ -790,15 +800,17 @@ 1 0 5060 - 0 + {if $account.5.sip_transport == 'udp'}0{/if} + {if $account.5.sip_transport == 'tcp'}1{/if} + {if $account.5.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -809,23 +821,23 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 - - + *67 + *67 - PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + OPUS,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -2124,7 +2136,7 @@ VOIP PHONE 5 4 - 15 + 12 45 0 diff --git a/resources/templates/provision/fanvil/x5s/{$mac}.cfg b/resources/templates/provision/fanvil/x5s/{$mac}.cfg index 9875636784..c01ac3ac6b 100644 --- a/resources/templates/provision/fanvil/x5s/{$mac}.cfg +++ b/resources/templates/provision/fanvil/x5s/{$mac}.cfg @@ -540,7 +540,7 @@ {$account.4.sip_port} {$account.4.auth_id} {$account.4.password} - {$account.1.register_expires} + {$account.4.register_expires} 5060 0 diff --git a/resources/templates/provision/fanvil/x5u/{$mac}.cfg b/resources/templates/provision/fanvil/x5u/{$mac}.cfg index f514b677da..0ac0ea0752 100644 --- a/resources/templates/provision/fanvil/x5u/{$mac}.cfg +++ b/resources/templates/provision/fanvil/x5u/{$mac}.cfg @@ -7,11 +7,11 @@ - {if isset($dns_server_primary)}{$dns_server_primary}{else}8.8.8.8{/if} - {if isset($dns_server_secondary)}{$dns_server_secondary}{else}202.96.134.133{/if} + {if isset($dns_server_primary)}{$dns_server_primary}{else}9.9.9.9{/if} + {if isset($dns_server_secondary)}{$dns_server_secondary}{else}208.67.222.222{/if} 1 1 - 0 + 1 1 0 Fanvil X5U @@ -80,9 +80,9 @@ - 5060 - - 3478 + {$sip_port} + {$fanvil_stun_server} + {$fanvil_stun_port} 50 800 @@ -94,28 +94,28 @@ 1 1 0 - 0 + 1 - - + {$account.1.user_id} + {$account.1.display_name} - - 5060 - - - 3600 + {$account.1.server_address} + {$account.1.sip_port} + {$account.1.auth_id} + {$account.1.password} + {$account.1.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.1.password)}1{else}0{/if} + {$account.1.outbound_proxy_primary} + {$account.1.sip_port} + {$account.1.auth_id} + {$account.1.password} + {$account.1.outbound_proxy_secondary} + {$account.1.sip_port} + {if isset($account.1.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -139,7 +139,7 @@ - default + {if isset($fanvil_ringtone_line1)}{$fanvil_ringtone_line1}{else}default{/if} 2 30 0 @@ -154,14 +154,14 @@ 0 1 0 - 3600 + {$account.1.register_expires} 0 0 1 0 0 - 0 - 0 + {if $account.1.sip_transport == 'dns srv'}1{/if} + {if $account.1.sip_transport == 'dns srv'}1{/if} 0 0 0 @@ -170,15 +170,17 @@ 1 0 5060 - 0 + {if $account.1.sip_transport == 'udp'}0{/if} + {if $account.1.sip_transport == 'tcp'}1{/if} + {if $account.1.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -189,23 +191,23 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 - - + *67 + *67 PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -251,26 +253,26 @@ 5000 - - + {$account.2.user_id} + {$account.2.display_name} - - 5060 - - - 3600 + {$account.2.server_address} + {$account.2.sip_port} + {$account.2.auth_id} + {$account.2.password} + {$account.2.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.2.password)}1{else}0{/if} + {$account.2.outbound_proxy_primary} + {$account.2.sip_port} + {$account.2.auth_id} + {$account.2.password} + {$account.2.outbound_proxy_secondary} + {$account.2.sip_port} + {if isset($account.2.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -294,7 +296,7 @@ - default + {if isset($fanvil_ringtone_line2)}{$fanvil_ringtone_line2}{else}default{/if} 2 30 0 @@ -309,14 +311,14 @@ 0 1 0 - 3600 + {$account.2.register_expires} 0 0 1 0 0 - 0 - 0 + {if $account.2.sip_transport == 'dns srv'}1{/if} + {if $account.2.sip_transport == 'dns srv'}1{/if} 0 0 0 @@ -325,15 +327,17 @@ 1 0 5060 - 0 + {if $account.2.sip_transport == 'udp'}0{/if} + {if $account.2.sip_transport == 'tcp'}1{/if} + {if $account.2.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -344,23 +348,23 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 - - + *67 + *67 - PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + OPUS,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -406,26 +410,26 @@ 5000 - - + {$account.3.user_id} + {$account.3.display_name} - - 5060 - - - 3600 + {$account.3.server_address} + {$account.3.sip_port} + {$account.3.auth_id} + {$account.3.password} + {$account.3.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.3.password)}1{else}0{/if} + {$account.3.outbound_proxy_primary} + {$account.3.sip_port} + {$account.3.auth_id} + {$account.3.password} + {$account.3.outbound_proxy_secondary} + {$account.3.sip_port} + {if isset($account.3.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -449,7 +453,7 @@ - default + {if isset($fanvil_ringtone_line3)}{$fanvil_ringtone_line3}{else}default{/if} 2 30 0 @@ -464,14 +468,14 @@ 0 1 0 - 3600 + {$account.3.register_expires} 0 0 1 0 0 - 0 - 0 + {if $account.3.sip_transport == 'dns srv'}1{/if} + {if $account.3.sip_transport == 'dns srv'}1{/if} 0 0 0 @@ -480,15 +484,17 @@ 1 0 5060 - 0 + {if $account.3.sip_transport == 'udp'}0{/if} + {if $account.3.sip_transport == 'tcp'}1{/if} + {if $account.3.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -499,23 +505,25 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 + *67 + *67 - PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + OPUS,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -561,26 +569,26 @@ 5000 - - + {$account.4.user_id} + {$account.4.display_name} - - 5060 - - - 3600 + {$account.4.server_address} + {$account.4.sip_port} + {$account.4.auth_id} + {$account.4.password} + {$account.4.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.4.password)}1{else}0{/if} + {$account.4.outbound_proxy_primary} + {$account.4.sip_port} + {$account.4.auth_id} + {$account.4.password} + {$account.4.outbound_proxy_secondary} + {$account.4.sip_port} + {if isset($account.4.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -604,7 +612,7 @@ - default + {if isset($fanvil_ringtone_line4)}{$fanvil_ringtone_line4}{else}default{/if} 2 30 0 @@ -619,14 +627,14 @@ 0 1 0 - 3600 + {$account.4.register_expires} 0 0 1 0 0 - 0 - 0 + {if $account.4.sip_transport == 'dns srv'}1{/if} + {if $account.4.sip_transport == 'dns srv'}1{/if} 0 0 0 @@ -635,15 +643,17 @@ 1 0 5060 - 0 + {if $account.4.sip_transport == 'udp'}0{/if} + {if $account.4.sip_transport == 'tcp'}1{/if} + {if $account.4.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -654,23 +664,23 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 - - + *67 + *67 - PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + OPUS,PCMU,PCMA,G726-32,G729,iLBC,G722 + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -716,26 +726,26 @@ 5000 - - + {$account.5.user_id} + {$account.5.display_name} - - 5060 - - - 3600 + {$account.5.server_address} + {$account.5.sip_port} + {$account.5.auth_id} + {$account.5.password} + {$account.5.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.5.password)}1{else}0{/if} + {$account.5.outbound_proxy_primary} + {$account.5.sip_port} + {$account.5.auth_id} + {$account.5.password} + {$account.5.outbound_proxy_secondary} + {$account.5.sip_port} + {if isset($account.5.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -759,7 +769,7 @@ - default + {if isset($fanvil_ringtone_line5)}{$fanvil_ringtone_line5}{else}default{/if} 2 30 0 @@ -774,7 +784,7 @@ 0 1 0 - 3600 + {$account.5.register_expires} 0 0 1 @@ -790,15 +800,17 @@ 1 0 5060 - 0 + {if $account.5.sip_transport == 'udp'}0{/if} + {if $account.5.sip_transport == 'tcp'}1{/if} + {if $account.5.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -809,23 +821,23 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 - - + *67 + *67 - PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + OPUS,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 diff --git a/resources/templates/provision/fanvil/x6/{$mac}.cfg b/resources/templates/provision/fanvil/x6/{$mac}.cfg index 0e9ad7b868..f2d03f5cf3 100644 --- a/resources/templates/provision/fanvil/x6/{$mac}.cfg +++ b/resources/templates/provision/fanvil/x6/{$mac}.cfg @@ -537,7 +537,7 @@ {$account.4.sip_port} {$account.4.auth_id} {$account.4.password} - {$account.1.register_expires} + {$account.4.register_expires} 5060 0 diff --git a/resources/templates/provision/fanvil/x6u/{$mac}.cfg b/resources/templates/provision/fanvil/x6u/{$mac}.cfg index fc2212e9cb..eef3394fc3 100644 --- a/resources/templates/provision/fanvil/x6u/{$mac}.cfg +++ b/resources/templates/provision/fanvil/x6u/{$mac}.cfg @@ -7,11 +7,11 @@ - {if isset($dns_server_primary)}{$dns_server_primary}{else}8.8.8.8{/if} - {if isset($dns_server_secondary)}{$dns_server_secondary}{else}202.96.134.133{/if} + {if isset($dns_server_primary)}{$dns_server_primary}{else}9.9.9.9{/if} + {if isset($dns_server_secondary)}{$dns_server_secondary}{else}208.67.222.222{/if} 1 1 - 0 + 1 1 0 Fanvil X6U @@ -85,9 +85,9 @@ - 5060 - - 3478 + {$sip_port} + {$fanvil_stun_server} + {$fanvil_stun_port} 50 800 @@ -99,28 +99,28 @@ 1 1 0 - 0 + 1 - - + {$account.1.user_id} + {$account.1.display_name} - - 5060 - - - 3600 + {$account.1.server_address} + {$account.1.sip_port} + {$account.1.auth_id} + {$account.1.password} + {$account.1.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.1.password)}1{else}0{/if} + {$account.1.outbound_proxy_primary} + {$account.1.sip_port} + {$account.1.auth_id} + {$account.1.password} + {$account.1.outbound_proxy_secondary} + {$account.1.sip_port} + {if isset($account.1.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -144,7 +144,7 @@ - default + {if isset($fanvil_ringtone_line1)}{$fanvil_ringtone_line1}{else}default{/if} 2 30 0 @@ -159,14 +159,14 @@ 0 1 0 - 3600 + {$account.1.register_expires} 0 0 1 0 0 - 0 - 0 + {if $account.1.sip_transport == 'dns srv'}1{/if} + {if $account.1.sip_transport == 'dns srv'}1{/if} 0 0 0 @@ -175,15 +175,17 @@ 1 0 5060 - 0 + {if $account.1.sip_transport == 'udp'}0{/if} + {if $account.1.sip_transport == 'tcp'}1{/if} + {if $account.1.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -194,23 +196,23 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 - - + *67 + *67 PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -256,26 +258,26 @@ 5000 - - + {$account.2.user_id} + {$account.2.display_name} - - 5060 - - - 3600 + {$account.2.server_address} + {$account.2.sip_port} + {$account.2.auth_id} + {$account.2.password} + {$account.2.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.2.password)}1{else}0{/if} + {$account.2.outbound_proxy_primary} + {$account.2.sip_port} + {$account.2.auth_id} + {$account.2.password} + {$account.2.outbound_proxy_secondary} + {$account.2.sip_port} + {if isset($account.2.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -299,7 +301,7 @@ - default + {if isset($fanvil_ringtone_line2)}{$fanvil_ringtone_line2}{else}default{/if} 2 30 0 @@ -314,14 +316,14 @@ 0 1 0 - 3600 + {$account.2.register_expires} 0 0 1 0 0 - 0 - 0 + {if $account.2.sip_transport == 'dns srv'}1{/if} + {if $account.2.sip_transport == 'dns srv'}1{/if} 0 0 0 @@ -330,15 +332,17 @@ 1 0 5060 - 0 + {if $account.2.sip_transport == 'udp'}0{/if} + {if $account.2.sip_transport == 'tcp'}1{/if} + {if $account.2.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -349,23 +353,23 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 - - + *67 + *67 - PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + OPUS,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -411,26 +415,26 @@ 5000 - - + {$account.3.user_id} + {$account.3.display_name} - - 5060 - - - 3600 + {$account.3.server_address} + {$account.3.sip_port} + {$account.3.auth_id} + {$account.3.password} + {$account.3.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.3.password)}1{else}0{/if} + {$account.3.outbound_proxy_primary} + {$account.3.sip_port} + {$account.3.auth_id} + {$account.3.password} + {$account.3.outbound_proxy_secondary} + {$account.3.sip_port} + {if isset($account.3.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -454,7 +458,7 @@ - default + {if isset($fanvil_ringtone_line3)}{$fanvil_ringtone_line3}{else}default{/if} 2 30 0 @@ -469,14 +473,14 @@ 0 1 0 - 3600 + {$account.3.register_expires} 0 0 1 0 0 - 0 - 0 + {if $account.3.sip_transport == 'dns srv'}1{/if} + {if $account.3.sip_transport == 'dns srv'}1{/if} 0 0 0 @@ -485,15 +489,17 @@ 1 0 5060 - 0 + {if $account.3.sip_transport == 'udp'}0{/if} + {if $account.3.sip_transport == 'tcp'}1{/if} + {if $account.3.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -504,23 +510,25 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 + *67 + *67 - PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + OPUS,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -566,26 +574,26 @@ 5000 - - + {$account.4.user_id} + {$account.4.display_name} - - 5060 - - - 3600 + {$account.4.server_address} + {$account.4.sip_port} + {$account.4.auth_id} + {$account.4.password} + {$account.4.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.4.password)}1{else}0{/if} + {$account.4.outbound_proxy_primary} + {$account.4.sip_port} + {$account.4.auth_id} + {$account.4.password} + {$account.4.outbound_proxy_secondary} + {$account.4.sip_port} + {if isset($account.4.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -609,7 +617,7 @@ - default + {if isset($fanvil_ringtone_line4)}{$fanvil_ringtone_line4}{else}default{/if} 2 30 0 @@ -624,14 +632,14 @@ 0 1 0 - 3600 + {$account.4.register_expires} 0 0 1 0 0 - 0 - 0 + {if $account.4.sip_transport == 'dns srv'}1{/if} + {if $account.4.sip_transport == 'dns srv'}1{/if} 0 0 0 @@ -640,15 +648,17 @@ 1 0 5060 - 0 + {if $account.4.sip_transport == 'udp'}0{/if} + {if $account.4.sip_transport == 'tcp'}1{/if} + {if $account.4.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -659,23 +669,23 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 - - + *67 + *67 - PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + OPUS,PCMU,PCMA,G726-32,G729,iLBC,G722 + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -721,26 +731,26 @@ 5000 - - + {$account.5.user_id} + {$account.5.display_name} - - 5060 - - - 3600 + {$account.5.server_address} + {$account.5.sip_port} + {$account.5.auth_id} + {$account.5.password} + {$account.5.register_expires} 5060 0 3600 - 0 - - 5060 - - - - 5060 - 1 + {if isset($account.5.password)}1{else}0{/if} + {$account.5.outbound_proxy_primary} + {$account.5.sip_port} + {$account.5.auth_id} + {$account.5.password} + {$account.5.outbound_proxy_secondary} + {$account.5.sip_port} + {if isset($account.5.outbound_proxy_secondary)}1{else}0{/if} 1800 0 3 @@ -764,7 +774,7 @@ - default + {if isset($fanvil_ringtone_line5)}{$fanvil_ringtone_line5}{else}default{/if} 2 30 0 @@ -779,7 +789,7 @@ 0 1 0 - 3600 + {$account.5.register_expires} 0 0 1 @@ -795,15 +805,17 @@ 1 0 5060 - 0 + {if $account.5.sip_transport == 'udp'}0{/if} + {if $account.5.sip_transport == 'tcp'}1{/if} + {if $account.5.sip_transport == 'tls'}2{/if} 0 0 - 0 + 1 1 0 - + *97 @@ -814,23 +826,23 @@ 5 1 - 0 - - - - - - - - + 1 + *78 + *79 + *72 + *73 + *72 + *73 + *72 + *73 - - + *67 + *67 - PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + OPUS,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 diff --git a/resources/templates/provision/fanvil/x7/{$mac}.cfg b/resources/templates/provision/fanvil/x7/{$mac}.cfg index 151dab5bb9..a3b3f5f6ff 100644 --- a/resources/templates/provision/fanvil/x7/{$mac}.cfg +++ b/resources/templates/provision/fanvil/x7/{$mac}.cfg @@ -4,7 +4,7 @@ 0 - 255.255.255.0 + {if isset($dns_server_primary)}{$dns_server_primary}{else}9.9.9.9{/if} @@ -568,7 +568,7 @@ {$account.4.sip_port} {$account.4.auth_id} {$account.4.password} - {$account.1.register_expires} + {$account.4.register_expires} 5060 0 @@ -3647,7 +3647,7 @@ - + From be39ad99eb27242ba3a005a82e158312014418b7 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 19 May 2020 17:36:11 -0600 Subject: [PATCH 086/621] Update call_flow add sleep before uuid_display. --- app/scripts/resources/scripts/call_flow.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/app/scripts/resources/scripts/call_flow.lua b/app/scripts/resources/scripts/call_flow.lua index 8f59a37948..ab6750b0af 100644 --- a/app/scripts/resources/scripts/call_flow.lua +++ b/app/scripts/resources/scripts/call_flow.lua @@ -144,6 +144,7 @@ --display label on Phone (if support) if (session:ready()) then if #active_flow_label > 0 then + session:sleep(1000); local api = freeswitch.API(); local reply = api:executeString("uuid_display "..session:get_uuid().." "..active_flow_label); end From d86dff07d7a4c125cdfb77cb7eeef0130f6342fe Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 19 May 2020 21:34:23 -0600 Subject: [PATCH 087/621] Update call_recordings.php --- app/call_recordings/call_recordings.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/call_recordings/call_recordings.php b/app/call_recordings/call_recordings.php index 05ad873fa5..5e68cb0eb1 100644 --- a/app/call_recordings/call_recordings.php +++ b/app/call_recordings/call_recordings.php @@ -89,7 +89,7 @@ $parameters['domain_uuid'] = $_SESSION['domain_uuid']; $database = new database; $num_rows = $database->select($sql, $parameters, 'column'); - + //prepare to page the results $rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; $param = "&search=".$search; @@ -174,10 +174,10 @@ $x = 0; foreach ($call_recordings as $row) { //playback progress bar - if (permission_exists('call_recording_play')) { - echo "
\n"; - if (is_array($group_permissions) && @sizeof($group_permissions) != 0) { - $x = 0; - foreach ($group_permissions as $row) { - $checked = ($row['permission_assigned'] === true) ? " checked=\"checked\"" : $checked = ''; - $application_name = strtolower($row['application_name']); - $label_application_name = ucwords(str_replace(['_','-'], " ", $row['application_name'])); - - $label_application_name = ucwords($label_application_name); - - if ($previous_application_name !== $row['application_name']) { - echo " "; - echo " \n"; - echo " "; - echo " "; - echo " \n"; - echo " "; - echo "\n"; - if (permission_exists('group_permission_add') || permission_exists('group_permission_edit') || permission_exists('group_permission_delete')) { - echo " \n"; - } - echo th_order_by('group_name', $text['label-group_name'], $order_by, $order); - if (permission_exists('group_permission_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { - echo " \n"; - } - echo "\n"; - - } - echo "\n"; - if (permission_exists('group_permission_add') || permission_exists('group_permission_edit') || permission_exists('group_permission_delete')) { - echo " \n"; - } - echo " \n"; - echo "\n"; - - //set the previous category - $previous_application_name = $row['application_name']; - $x++; - } - unset($group_permissions); - } - - echo "
 
".escape($label_application_name)."
\n"; - echo " \n"; - echo "  
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " ".escape($row['permission_name'])."
\n"; - echo "\n"; - -//include the footer - require_once "resources/footer.php"; - -?> + + Portions created by the Initial Developer are Copyright (C) 2018-2020 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('group_permission_view')) { + //access granted + } + else { + echo "access denied"; + exit; + } + +//action add or update + if (is_uuid($_REQUEST["group_uuid"])) { + $group_uuid = $_REQUEST["group_uuid"]; + } + +//get the group_name + if (is_uuid($group_uuid)) { + $sql = "select group_name from v_groups "; + $sql .= "where group_uuid = :group_uuid "; + $parameters['group_uuid'] = $group_uuid; + $database = new database; + $group_name = $database->select($sql, $parameters, 'column'); + unset($sql, $parameters); + } + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//process permission reload + if ($_GET['action'] == 'reload' && is_uuid($_GET['group_uuid'])) { + if (is_array($_SESSION["groups"]) && @sizeof($_SESSION["groups"]) != 0) { + //clear current permissions + unset($_SESSION['permissions'], $_SESSION['user']['permissions']); + //get the permissions assigned to the groups that the current user is a member of, set the permissions in session variables + $x = 0; + $sql = "select distinct(permission_name) from v_group_permissions "; + $sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) "; + foreach ($_SESSION["groups"] as $field) { + if (strlen($field['group_name']) > 0) { + $sql_where_or[] = "group_name = :group_name_".$x; + $parameters['group_name_'.$x] = $field['group_name']; + $x++; + } + } + if (is_array($sql_where_or) && @sizeof($sql_where_or) != 0) { + $sql .= "and (".implode(' or ', $sql_where_or).") "; + } + $parameters['domain_uuid'] = $_SESSION["domain_uuid"]; + $database = new database; + $result = $database->select($sql, $parameters, 'all'); + if (is_array($result) && @sizeof($result) != 0) { + foreach ($result as $row) { + $_SESSION['permissions'][$row["permission_name"]] = true; + $_SESSION["user"]["permissions"][$row["permission_name"]] = true; + } + } + unset($sql, $parameters, $result, $row); + //set message and redirect + message::add($text['message-permissions_reloaded'],'positive'); + header('Location: group_permissions.php?group_uuid='.urlencode($_GET['group_uuid'])); + exit; + } + } + +//get the http post data + if (is_array($_POST['group_permissions'])) { + $action = $_POST['action']; + $search = $_POST['search']; + $group_permissions = $_POST['group_permissions']; + } + +//process the user data and save it to the database + if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { + //get the list + $sql = "select p.*, "; + $sql .= "exists(select from v_group_permissions where permission_name = p.permission_name and group_name = :group_name) as permission_assigned "; + $sql .= "from v_permissions as p "; + $parameters['group_name'] = $group_name; + //$sql = "select * from v_group_permissions "; + //$sql .= "where group_uuid = :group_uuid "; + //$parameters['group_uuid'] = $group_uuid; + $database = new database; + $group_permissions = $database->select($sql, $parameters, 'all'); + + //add or remove permissions from the group + $x = 0; + if (is_array($_POST['group_permissions'])) { + foreach($_POST['group_permissions'] as $row) { + //check to see if the group has been assigned the permission + $in_database = false; + foreach($group_permissions as $field) { + if ($field['permission_name'] === $row['permission_name'] && $field['permission_assigned'] === true) { + $in_database = true; + break; + } + } + + //add - checked on html form and not in the database + if ($row['checked'] === 'true') { + if (!$in_database) { + if (isset($row['permission_name']) && strlen($row['permission_name']) > 0) { + $array['add']['group_permissions'][$x]['group_permission_uuid'] = uuid(); + $array['add']['group_permissions'][$x]['permission_name'] = $row['permission_name']; + $array['add']['group_permissions'][$x]['group_uuid'] = $group_uuid; + $array['add']['group_permissions'][$x]['group_name'] = $group_name; + //$array['add']['group_permissions'][$x]['permission_uuid'] = $row['uuid']; + $x++; + } + } + } + + //delete - unchecked on the form and in the database + if ($row['checked'] !== 'true') { + if ($in_database) { + if (isset($row['permission_name']) && strlen($row['permission_name']) > 0) { + $array['delete']['group_permissions'][$x]['permission_name'] = $row['permission_name']; + $array['delete']['group_permissions'][$x]['group_uuid'] = $group_uuid; + $array['delete']['group_permissions'][$x]['group_name'] = $group_name; + //$array['delete'][$x]['permission_uuid'] = $row['uuid']; + } + $x++; + } + } + } + } + + //validate the token + $token = new token; + if (!$token->validate($_SERVER['PHP_SELF'])) { + message::add($text['message-invalid_token'],'negative'); + header('Location: group_permissions.php?group_uuid='.urlencode($group_uuid).'&search='.urlencode($search)); + exit; + } + + //save to the data + if (is_array($array['add']) && @sizeof($array['add']) != 0) { + $database = new database; + $database->app_name = 'groups'; + $database->app_uuid = '2caf27b0-540a-43d5-bb9b-c9871a1e4f84'; + $database->save($array['add']); + $message = $database->message; + } + + //delete the permissions + if (is_array($array['delete']) && @sizeof($array['delete']) != 0) { + if (permission_exists('group_permission_delete')) { + $database = new database; + $database->app_name = 'groups'; + $database->app_uuid = '2caf27b0-540a-43d5-bb9b-c9871a1e4f84'; + $database->delete($array['delete']); + } + } + + //set the message + message::add($text['message-update']); + + //redirect + header('Location: group_permissions.php?group_uuid='.urlencode($group_uuid)); + exit; + } + +//get order and order by + //$order_by = $_GET["order_by"]; + //$order = $_GET["order"]; + +//add the search string + if (isset($_REQUEST["search"])) { + $search = strtolower($_REQUEST["search"]); + $sql_search = " ("; + $sql_search .= " lower(p.permission_name) like :search "; + //$sql_search .= " or lower(p.group_name) like :search "; + $sql_search .= ") "; + $parameters['search'] = '%'.$search.'%'; + } + +//get the count + /* + $sql = "select count(group_permission_uuid) from v_group_permissions "; + $sql .= "where group_uuid = :group_uuid "; + $parameters['group_uuid'] = $group_uuid; + if (isset($sql_search)) { + $sql .= "where ".$sql_search; + } + $database = new database; + $num_rows = $database->select($sql, $parameters, 'column'); + */ + +//get the list + $sql = "select p.*, "; + $sql .= "exists(select from v_group_permissions where permission_name = p.permission_name and group_name = :group_name) as permission_assigned "; + $sql .= "from v_permissions as p "; + $parameters['group_name'] = $group_name; + if (isset($sql_search)) { + $sql .= "where ".$sql_search; + } + $sql .= "order by application_name asc, permission_name asc "; + $database = new database; + $group_permissions = $database->select($sql, $parameters, 'all'); + unset($sql, $parameters); + +//create token + $object = new token; + $token = $object->create($_SERVER['PHP_SELF']); + +//include the header + $document['title'] = $text['title-group_permissions']; + require_once "resources/header.php"; + +//show the content + echo "
\n"; + echo "
".$text['title-group_permissions']." (".escape($group_name).")
\n"; + echo "
\n"; + echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','collapse'=>'hide-sm-dn','link'=>'groups.php']); + echo button::create(['type'=>'button','label'=>$text['button-reload'],'icon'=>$_SESSION['theme']['button_icon_reload'],'link'=>'?group_uuid='.urlencode($group_uuid).'&action=reload']); + if (permission_exists('group_member_view')) { + echo button::create(['type'=>'button','label'=>$text['button-members'],'icon'=>'users','link'=>'group_members.php?group_uuid='.urlencode($group_uuid)]); + } + echo "\n"; + echo "
\n"; + echo "
\n"; + echo "
\n"; + + echo $text['description-group_permissions']."\n"; + echo "

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + if (is_array($group_permissions) && @sizeof($group_permissions) != 0) { + $x = 0; + foreach ($group_permissions as $row) { + $checked = ($row['permission_assigned'] === true) ? " checked=\"checked\"" : $checked = ''; + $application_name = strtolower($row['application_name']); + $label_application_name = ucwords(str_replace(['_','-'], " ", $row['application_name'])); + + $label_application_name = ucwords($label_application_name); + + if ($previous_application_name !== $row['application_name']) { + echo " "; + echo " \n"; + echo " "; + echo " "; + echo " \n"; + echo " "; + echo "\n"; + if (permission_exists('group_permission_add') || permission_exists('group_permission_edit') || permission_exists('group_permission_delete')) { + echo " \n"; + } + echo th_order_by('group_name', $text['label-group_name'], $order_by, $order); + if (permission_exists('group_permission_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { + echo " \n"; + } + echo "\n"; + + } + echo "\n"; + if (permission_exists('group_permission_add') || permission_exists('group_permission_edit') || permission_exists('group_permission_delete')) { + echo " \n"; + } + echo " \n"; + echo "\n"; + + //set the previous category + $previous_application_name = $row['application_name']; + $x++; + } + unset($group_permissions); + } + + echo "
 
".escape($label_application_name)."
\n"; + echo " \n"; + echo "  
\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " ".escape($row['permission_name'])."
\n"; + echo "
\n"; + +//include the footer + require_once "resources/footer.php"; + +?> From 015b56408b874ce6af7640c151b3498cd4c5a58e Mon Sep 17 00:00:00 2001 From: Mark J Crane Date: Sat, 30 May 2020 09:06:28 -0600 Subject: [PATCH 129/621] Add a reload button to menu edit --- core/menu/menu_edit.php | 459 +++++++++++++++++++------------------- core/menu/menu_reload.php | 62 +++++ 2 files changed, 292 insertions(+), 229 deletions(-) create mode 100644 core/menu/menu_reload.php diff --git a/core/menu/menu_edit.php b/core/menu/menu_edit.php index 1a1d1e394e..0ac637eead 100644 --- a/core/menu/menu_edit.php +++ b/core/menu/menu_edit.php @@ -1,230 +1,231 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2020 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -//includes - require_once "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('menu_add') || permission_exists('menu_edit')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//action add or update - if (is_uuid($_REQUEST["id"])) { - $action = "update"; - $menu_uuid = $_REQUEST["id"]; - } - else { - $action = "add"; - } - -//get http post variables and set them to php variables - if (count($_POST) > 0) { - $menu_uuid = $_POST["menu_uuid"]; - $menu_name = $_POST["menu_name"]; - $menu_language = $_POST["menu_language"]; - $menu_description = $_POST["menu_description"]; - } - -//process the http post - if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { - - //validate the token - $token = new token; - if (!$token->validate($_SERVER['PHP_SELF'])) { - message::add($text['message-invalid_token'],'negative'); - header('Location: menu.php'); - exit; - } - - //check for all required data - $msg = ''; - //if (strlen($menu_name) == 0) { $msg .= $text['message-required'].$text['label-name']."
\n"; } - //if (strlen($menu_language) == 0) { $msg .= $text['message-required'].$text['label-language']."
\n"; } - //if (strlen($menu_description) == 0) { $msg .= $text['message-required'].$text['label-description']."
\n"; } - if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { - require_once "resources/header.php"; - require_once "resources/persist_form_var.php"; - echo "
\n"; - echo "
\n"; - echo $msg."
"; - echo "
\n"; - persistformvar($_POST); - echo "
\n"; - require_once "resources/footer.php"; - return; - } - - //add or update the database - if ($_POST["persistformvar"] != "true") { - if ($action == "add") { - //create a new unique id - $menu_uuid = uuid(); - - //start a new menu - $array['menus'][0]['menu_uuid'] = $menu_uuid; - $array['menus'][0]['menu_name'] = $menu_name; - $array['menus'][0]['menu_language'] = $menu_language; - $array['menus'][0]['menu_description'] = $menu_description; - $database = new database; - $database->app_name = 'menu'; - $database->app_uuid = 'f4b3b3d2-6287-489c-2a00-64529e46f2d7'; - $database->save($array); - unset($array); - - //redirect the user back to the main menu - message::add($text['message-add']); - header("Location: menu.php"); - return; - } //if ($action == "add") - - if ($action == "update") { - //update the menu - $array['menus'][0]['menu_uuid'] = $menu_uuid; - $array['menus'][0]['menu_name'] = $menu_name; - $array['menus'][0]['menu_language'] = $menu_language; - $array['menus'][0]['menu_description'] = $menu_description; - $database = new database; - $database->app_name = 'menu'; - $database->app_uuid = 'f4b3b3d2-6287-489c-2a00-64529e46f2d7'; - $database->save($array); - unset($array); - - //redirect the user back to the main menu - message::add($text['message-update']); - header("Location: menu.php"); - return; - } - } - } - -//pre-populate the form - if (count($_GET) > 0 && is_uuid($_GET["id"]) && $_POST["persistformvar"] != "true") { - $menu_uuid = $_GET["id"]; - $sql = "select * from v_menus "; - $sql .= "where menu_uuid = :menu_uuid "; - $parameters['menu_uuid'] = $menu_uuid; - $database = new database; - $row = $database->select($sql, $parameters, 'row'); - if (is_array($row) && sizeof($row) != 0) { - $menu_uuid = $row["menu_uuid"]; - $menu_name = $row["menu_name"]; - $menu_language = $row["menu_language"]; - $menu_description = $row["menu_description"]; - } - unset($sql, $parameters, $row); - } - -//create token - $object = new token; - $token = $object->create($_SERVER['PHP_SELF']); - -//show the header - $document['title'] = $text['title-menu']; - require_once "resources/header.php"; - -//show the content - echo "
\n"; - - echo "
\n"; - echo "
".$text['header-menu']."
\n"; - echo "
\n"; - echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','collapse'=>'hide-xs','link'=>'menu.php']); - if (permission_exists('menu_restore') && $action == "update") { - echo button::create(['type'=>'button','label'=>$text['button-restore_default'],'icon'=>$_SESSION['theme']['button_icon_reload'],'collapse'=>'hide-xs','style'=>'margin-left: 15px;','link'=>'menu_restore_default.php?menu_uuid='.urlencode($menu_uuid).'&menu_language='.urlencode($menu_language)]); - } - echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','collapse'=>'hide-xs','style'=>'margin-left: 15px;']); - echo "
\n"; - echo "
\n"; - echo "
\n"; - - echo $text['description-menu']."\n"; - echo "

\n"; - - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "
\n"; - echo " ".$text['label-name']."\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "\n"; - echo $text['description-name']."
\n"; - echo " ".$text['label-language']."\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-language']."\n"; - echo "
\n"; - echo " ".$text['label-description']."\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-description']."\n"; - echo "
"; - echo "

"; - - if ($action == "update") { - echo "\n"; - } - echo "\n"; - - echo "
"; - -//show the menu items - if ($action == "update") { - require_once "core/menu/menu_item_list.php"; - } - -//include the footer - require_once "resources/footer.php"; - + + Portions created by the Initial Developer are Copyright (C) 2008-2020 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('menu_add') || permission_exists('menu_edit')) { + //access granted + } + else { + echo "access denied"; + exit; + } + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//action add or update + if (is_uuid($_REQUEST["id"])) { + $action = "update"; + $menu_uuid = $_REQUEST["id"]; + } + else { + $action = "add"; + } + +//get http post variables and set them to php variables + if (count($_POST) > 0) { + $menu_uuid = $_POST["menu_uuid"]; + $menu_name = $_POST["menu_name"]; + $menu_language = $_POST["menu_language"]; + $menu_description = $_POST["menu_description"]; + } + +//process the http post + if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { + + //validate the token + $token = new token; + if (!$token->validate($_SERVER['PHP_SELF'])) { + message::add($text['message-invalid_token'],'negative'); + header('Location: menu.php'); + exit; + } + + //check for all required data + $msg = ''; + //if (strlen($menu_name) == 0) { $msg .= $text['message-required'].$text['label-name']."
\n"; } + //if (strlen($menu_language) == 0) { $msg .= $text['message-required'].$text['label-language']."
\n"; } + //if (strlen($menu_description) == 0) { $msg .= $text['message-required'].$text['label-description']."
\n"; } + if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { + require_once "resources/header.php"; + require_once "resources/persist_form_var.php"; + echo "
\n"; + echo "
\n"; + echo $msg."
"; + echo "
\n"; + persistformvar($_POST); + echo "
\n"; + require_once "resources/footer.php"; + return; + } + + //add or update the database + if ($_POST["persistformvar"] != "true") { + if ($action == "add") { + //create a new unique id + $menu_uuid = uuid(); + + //start a new menu + $array['menus'][0]['menu_uuid'] = $menu_uuid; + $array['menus'][0]['menu_name'] = $menu_name; + $array['menus'][0]['menu_language'] = $menu_language; + $array['menus'][0]['menu_description'] = $menu_description; + $database = new database; + $database->app_name = 'menu'; + $database->app_uuid = 'f4b3b3d2-6287-489c-2a00-64529e46f2d7'; + $database->save($array); + unset($array); + + //redirect the user back to the main menu + message::add($text['message-add']); + header("Location: menu.php"); + return; + } //if ($action == "add") + + if ($action == "update") { + //update the menu + $array['menus'][0]['menu_uuid'] = $menu_uuid; + $array['menus'][0]['menu_name'] = $menu_name; + $array['menus'][0]['menu_language'] = $menu_language; + $array['menus'][0]['menu_description'] = $menu_description; + $database = new database; + $database->app_name = 'menu'; + $database->app_uuid = 'f4b3b3d2-6287-489c-2a00-64529e46f2d7'; + $database->save($array); + unset($array); + + //redirect the user back to the main menu + message::add($text['message-update']); + header("Location: menu.php"); + return; + } + } + } + +//pre-populate the form + if (count($_GET) > 0 && is_uuid($_GET["id"]) && $_POST["persistformvar"] != "true") { + $menu_uuid = $_GET["id"]; + $sql = "select * from v_menus "; + $sql .= "where menu_uuid = :menu_uuid "; + $parameters['menu_uuid'] = $menu_uuid; + $database = new database; + $row = $database->select($sql, $parameters, 'row'); + if (is_array($row) && sizeof($row) != 0) { + $menu_uuid = $row["menu_uuid"]; + $menu_name = $row["menu_name"]; + $menu_language = $row["menu_language"]; + $menu_description = $row["menu_description"]; + } + unset($sql, $parameters, $row); + } + +//create token + $object = new token; + $token = $object->create($_SERVER['PHP_SELF']); + +//show the header + $document['title'] = $text['title-menu']; + require_once "resources/header.php"; + +//show the content + echo "
\n"; + + echo "
\n"; + echo "
".$text['header-menu']."
\n"; + echo "
\n"; + echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','collapse'=>'hide-xs','link'=>'menu.php']); + echo button::create(['type'=>'button','label'=>$text['button-reload'],'icon'=>$_SESSION['theme']['button_icon_reload'],'collapse'=>'hide-xs','style'=>'margin-left: 15px;','link'=>'menu_reload.php?menu_uuid='.urlencode($menu_uuid).'&menu_language='.urlencode($menu_language)]); + if (permission_exists('menu_restore') && $action == "update") { + echo button::create(['type'=>'button','label'=>$text['button-restore_default'],'icon'=>'key','collapse'=>'hide-xs','link'=>'menu_restore_default.php?menu_uuid='.urlencode($menu_uuid).'&menu_language='.urlencode($menu_language)]); + } + echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','collapse'=>'hide-xs']); + echo "
\n"; + echo "
\n"; + echo "
\n"; + + echo $text['description-menu']."\n"; + echo "

\n"; + + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "
\n"; + echo " ".$text['label-name']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo "\n"; + echo $text['description-name']."
\n"; + echo " ".$text['label-language']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-language']."\n"; + echo "
\n"; + echo " ".$text['label-description']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-description']."\n"; + echo "
"; + echo "

"; + + if ($action == "update") { + echo "\n"; + } + echo "\n"; + + echo "
"; + +//show the menu items + if ($action == "update") { + require_once "core/menu/menu_item_list.php"; + } + +//include the footer + require_once "resources/footer.php"; + ?> \ No newline at end of file diff --git a/core/menu/menu_reload.php b/core/menu/menu_reload.php new file mode 100644 index 0000000000..62efbbd0ca --- /dev/null +++ b/core/menu/menu_reload.php @@ -0,0 +1,62 @@ + + Portions created by the Initial Developer are Copyright (C) 2020 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + include "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('menu_add') || permission_exists('menu_edit')) { + //access granted + } + else { + echo "access denied"; + return; + } + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//get the http value and set as a php variable + $menu_uuid = $_REQUEST["menu_uuid"]; + +//unset the sesssion menu array + unset($_SESSION['menu']['array']); + +//get the menu array and save it to the session + $menu = new menu; + $menu->menu_uuid = $_SESSION['domain']['menu']['uuid']; + $_SESSION['menu']['array'] = $menu->menu_array(); + unset($menu); + +//redirect the user + message::add($text['message-reload']); + header("Location: ".PROJECT_PATH."/core/menu/menu_edit.php?id=".urlencode($menu_uuid)); + return; + +?> \ No newline at end of file From 75b46b3298927b0969327277cd68a9cd4ed20ec2 Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 30 May 2020 20:27:26 -0600 Subject: [PATCH 130/621] Fax - Preview/Send: Better cover_logo handling. --- app/fax/fax_send.php | 56 ++++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/app/fax/fax_send.php b/app/fax/fax_send.php index acad795a31..867d24e57f 100644 --- a/app/fax/fax_send.php +++ b/app/fax/fax_send.php @@ -267,7 +267,7 @@ if (!function_exists('fax_split_dtmf')) { $token = new token; if (!$token->validate($_SERVER['PHP_SELF'])) { message::add($text['message-invalid_token'],'negative'); - header('Location: fax_send.php'); + header('Location: fax_send.php'.(is_uuid($fax_uuid) ? '?id='.$fax_uuid : null)); exit; } @@ -456,38 +456,48 @@ if (!function_exists('fax_split_dtmf')) { //logo $display_logo = false; - if (!isset($_SESSION['fax']['cover_logo']['text']) && $_SESSION['fax']['cover_logo']['text'] == '') { - $logo = PROJECT_PATH."/app/fax/resources/images/logo.jpg"; + if (!is_array($_SESSION['fax']['cover_logo'])) { + $logo = $_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/fax/resources/images/logo.jpg"; $display_logo = true; } - if (!isset($_SESSION['fax']['cover_logo']['text']) && $_SESSION['fax']['cover_logo']['text'] != '') { - $logo = ''; - $display_logo = false; + else if (is_null($_SESSION['fax']['cover_logo']['text'])) { + $logo = ''; //explicitly empty } - else if (isset($_SESSION['fax']['cover_logo']['text']) && $_SESSION['fax']['cover_logo']['text'] != '') { - $logo = $_SESSION['fax']['cover_logo']['text']; - if (substr($logo, 0, 4) == 'http') { - $remote_filename = strtolower(pathinfo($logo, PATHINFO_BASENAME)); - $remote_fileext = pathinfo($remote_filename, PATHINFO_EXTENSION); - if ($remote_fileext == 'gif' || $remote_fileext == 'jpg' || $remote_fileext == 'jpeg' || $remote_fileext == 'png' || $remote_fileext == 'bmp') { - if (!file_exists($dir_fax_temp.'/'.$remote_filename)) { - $raw = file_get_contents($logo); - if (file_put_contents($dir_fax_temp.'/'.$remote_filename, $raw)) { - $logo = $dir_fax_temp.'/'.$remote_filename; - } - else { - unset($logo); - } + else if ($_SESSION['fax']['cover_logo']['text'] != '') { + if (substr($_SESSION['fax']['cover_logo']['text'], 0, 4) == 'http') { + $logo = $_SESSION['fax']['cover_logo']['text']; + } + else if (substr($_SESSION['fax']['cover_logo']['text'], 0, 1) == '/') { + if (substr($_SESSION['fax']['cover_logo']['text'], 0, strlen($_SERVER['DOCUMENT_ROOT'])) != $_SERVER['DOCUMENT_ROOT']) { + $logo = $_SERVER['DOCUMENT_ROOT'].$_SESSION['fax']['cover_logo']['text']; + } + else { + $logo = $_SESSION['fax']['cover_logo']['text']; + } + } + } + if (isset($logo) && $logo) { + $logo_filename = strtolower(pathinfo($logo, PATHINFO_BASENAME)); + $logo_fileext = pathinfo($logo_filename, PATHINFO_EXTENSION); + if (in_array($logo_fileext, ['gif','jpg','jpeg','png','bmp'])) { + if (!file_exists($dir_fax_temp.'/'.$logo_filename)) { + $raw = file_get_contents($logo); + if (file_put_contents($dir_fax_temp.'/'.$logo_filename, $raw)) { + $logo = $dir_fax_temp.'/'.$logo_filename; + $display_logo = true; } else { - $logo = $dir_fax_temp.'/'.$remote_filename; + unset($logo); } } else { - unset($logo); + $logo = $dir_fax_temp.'/'.$logo_filename; + $display_logo = true; } } - $display_logo = true; + else { + unset($logo); + } } if ($display_logo) { From 11178787a63216c1ee3e7e20ce8c230f66d60598 Mon Sep 17 00:00:00 2001 From: StratoSwitch <44079107+StratoSwitch@users.noreply.github.com> Date: Mon, 1 Jun 2020 16:30:38 -0500 Subject: [PATCH 131/621] correct account 8 settings (#5291) Codes for account 8 were using account 4 array. also reworded note about profile 2 settings --- .../templates/provision/grandstream/ht818/{$mac}.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/templates/provision/grandstream/ht818/{$mac}.xml b/resources/templates/provision/grandstream/ht818/{$mac}.xml index 071d038cdf..aef0fff087 100644 --- a/resources/templates/provision/grandstream/ht818/{$mac}.xml +++ b/resources/templates/provision/grandstream/ht818/{$mac}.xml @@ -1378,7 +1378,7 @@ 0 - + @@ -1663,16 +1663,16 @@ - {$account.4.user_id} + {$account.8.user_id} - {$account.4.user_id} + {$account.8.user_id} - {$account.4.password} + {$account.8.password} - {$account.4.display_name} + {$account.8.display_name} From 87a707388956f79fa96f44147eb8438f1adafd32 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 1 Jun 2020 16:13:40 -0600 Subject: [PATCH 132/621] If you don't have xml_cdr_lose_race permission then hide the call. --- app/xml_cdr/resources/classes/xml_cdr.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index fc2d416f1d..614062045a 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -954,6 +954,9 @@ if (!class_exists('xml_cdr')) { $sql .= "filter ( \n"; $sql .= " where c.extension_uuid = e.extension_uuid \n"; $sql .= " and missed_call = true \n"; + if (!permission_exists('xml_cdr_lose_race')) { + $sql .= " and hangup_cause <> 'LOSE_RACE' \n"; + } if ($this->include_internal) { $sql .= " and (direction = 'inbound' or direction = 'local') "; } else { @@ -1007,6 +1010,9 @@ if (!class_exists('xml_cdr')) { $sql .= "count(*) \n"; $sql .= "filter ( \n"; $sql .= " where c.extension_uuid = e.extension_uuid \n"; + if (!permission_exists('xml_cdr_lose_race')) { + $sql .= " and hangup_cause <> 'LOSE_RACE' \n"; + } if ($this->include_internal) { $sql .= " and (direction = 'inbound' or direction = 'local') \n"; } From 9178fd63a70d8a5dd6290825e2595858a86cea26 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 2 Jun 2020 09:17:23 -0600 Subject: [PATCH 133/621] Theme: Settings to control Domain Selector title colors. --- themes/default/app_config.php | 16 ++++++++++++++++ themes/default/css.php | 12 ++++++++++++ themes/default/template.php | 10 +++++----- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/themes/default/app_config.php b/themes/default/app_config.php index 51447d9e1b..8478b22ade 100644 --- a/themes/default/app_config.php +++ b/themes/default/app_config.php @@ -367,6 +367,22 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set whether to cache the theme in the session."; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a3fcfa28-ca09-4c7a-849c-afdfd9fedc44"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "domain_selector_title_color"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "#000"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the text color of the domain selector title."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "95e581f2-3f4e-4e4b-91e6-879d2beb329e"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "domain_selector_title_color_hover"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "#5082ca"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the text hover color of the domain selector title."; + $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "4e0309da-4adb-4a05-a321-d0ec6546dceb"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "domain_selector_background_color"; diff --git a/themes/default/css.php b/themes/default/css.php index d9ddad58e9..d4a8cff03e 100644 --- a/themes/default/css.php +++ b/themes/default/css.php @@ -1080,6 +1080,18 @@ header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600).' GMT'); text-align: left; } + #domains_header > a#domains_title { + font-weight: 600; + font-size: ; + font-family: ; + color: ; + } + + #domains_header > a#domains_title:hover { + text-decoration: none; + color: ; + } + #domains_list { position: relative; overflow: auto; diff --git a/themes/default/template.php b/themes/default/template.php index 101cafa7ff..baab9d88ea 100644 --- a/themes/default/template.php +++ b/themes/default/template.php @@ -302,7 +302,7 @@ $(document).scrollTop(0); $('#domains_container').show(); $('#domains_block').animate({marginRight: '+=300'}, 400, function() { - $('#domain_filter').trigger('focus'); + $('#domains_filter').trigger('focus'); }); } @@ -310,8 +310,8 @@ $('#domains_visible').val(0); $(document).ready(function() { $('#domains_block').animate({marginRight: '-=300'}, 400, function() { - $('#domain_filter').val(''); - domain_search($('#domain_filter').val()); + $('#domains_filter').val(''); + domain_search($('#domains_filter').val()); $('.navbar').css('margin-right','0'); //restore navbar margin $('#domains_container').css('right','0'); //domain container right position $('#domains_container').hide(); @@ -972,9 +972,9 @@
{foreach $domains as $row} From 485d8681cadfb71e57a9a4e01e6ff5dc161f89a5 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 2 Jun 2020 09:18:11 -0600 Subject: [PATCH 134/621] Settings - Edit: Adjust Description field width. --- core/default_settings/default_setting_edit.php | 2 +- core/domain_settings/domain_setting_edit.php | 2 +- core/user_settings/user_setting_edit.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/default_settings/default_setting_edit.php b/core/default_settings/default_setting_edit.php index 3e9d154d64..de3c8a1a93 100644 --- a/core/default_settings/default_setting_edit.php +++ b/core/default_settings/default_setting_edit.php @@ -728,7 +728,7 @@ echo " ".$text['label-description']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-description']."\n"; echo "\n"; diff --git a/core/domain_settings/domain_setting_edit.php b/core/domain_settings/domain_setting_edit.php index d0e7432835..8ad05d7141 100644 --- a/core/domain_settings/domain_setting_edit.php +++ b/core/domain_settings/domain_setting_edit.php @@ -788,7 +788,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-description']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-description']."\n"; echo "\n"; diff --git a/core/user_settings/user_setting_edit.php b/core/user_settings/user_setting_edit.php index bd1f5e7d3f..af36ed1861 100644 --- a/core/user_settings/user_setting_edit.php +++ b/core/user_settings/user_setting_edit.php @@ -728,7 +728,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-description']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-description']."\n"; echo "\n"; From 2c7753c471ac93ca78ccbaf6acf9960ebf77ab0b Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 2 Jun 2020 14:29:00 -0600 Subject: [PATCH 135/621] Voicemail - Edit: Hide 'SMS To' field if app/sms not present. --- app/voicemails/voicemail_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/voicemails/voicemail_edit.php b/app/voicemails/voicemail_edit.php index 1dc90c7e5b..4316b4af68 100644 --- a/app/voicemails/voicemail_edit.php +++ b/app/voicemails/voicemail_edit.php @@ -620,7 +620,7 @@ echo "\n"; echo "\n"; - if (permission_exists('voicemail_sms_edit')) { + if (permission_exists('voicemail_sms_edit') && file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH.'/app/sms/')) { echo "\n"; echo "\n"; echo " ".$text['label-voicemail_sms_to']."\n"; From 4c1660e694bebd766228e6b44b3e17efd755540a Mon Sep 17 00:00:00 2001 From: Len Date: Sat, 6 Jun 2020 10:01:46 -0400 Subject: [PATCH 136/621] Update {$mac}.xml (#5294) --- .../provision/grandstream/gxw42xx/{$mac}.xml | 46 ++++++++++++------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/resources/templates/provision/grandstream/gxw42xx/{$mac}.xml b/resources/templates/provision/grandstream/gxw42xx/{$mac}.xml index 737a938698..e2b556976a 100644 --- a/resources/templates/provision/grandstream/gxw42xx/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxw42xx/{$mac}.xml @@ -4,19 +4,7 @@ - - - - - - - - - - - - @@ -528,7 +516,7 @@ -{$account.1.server_address} +{$account.1.server_address}:{$account.1.sip_port} @@ -541,7 +529,12 @@ - + +{if isset($account.1.outbound_proxy_primary)} + {$account.1.outbound_proxy_primary}:{$account.1.sip_port} +{else} +{$account.1.outbound_proxy_primary} +{/if} @@ -550,7 +543,12 @@ + +{if isset($grandstream_dns_mode)} +{$grandstream_dns_mode} +{else} 0 +{/if} @@ -567,7 +565,12 @@ + +{if isset($grandstream_nat_traversal)} +{$grandstream_nat_traversal} +{else} 0 +{/if} @@ -586,7 +589,13 @@ -0 + +{$tp=0} +{if $account.1.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.1.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} +{$tp} @@ -596,7 +605,7 @@ -0 +1 @@ -882,7 +891,12 @@ + +{if isset($grandstream_srtp)} +{$grandstream_srtp} +{else} 0 +{/if} From 77ec12138b59c562da033d584f7e8f5240844138 Mon Sep 17 00:00:00 2001 From: StratoSwitch <44079107+StratoSwitch@users.noreply.github.com> Date: Sat, 6 Jun 2020 10:07:17 -0500 Subject: [PATCH 137/621] GRP 26xx series templates (#5287) * GRP 26xx series templates --- .../grandstream/grp2612/phonebook.xml | 151 + .../provision/grandstream/grp2612/{$mac}.xml | 4589 +++++++++ .../grandstream/grp2612w/phonebook.xml | 151 + .../provision/grandstream/grp2612w/{$mac}.xml | 4683 +++++++++ .../grandstream/grp2613/phonebook.xml | 49 + .../provision/grandstream/grp2613/{$mac}.xml | 5454 ++++++++++ .../grandstream/grp2614/phonebook.xml | 49 + .../provision/grandstream/grp2614/{$mac}.xml | 6949 +++++++++++++ .../grandstream/grp2615/phonebook.xml | 49 + .../provision/grandstream/grp2615/{$mac}.xml | 7814 +++++++++++++++ .../grandstream/grp2616/phonebook.xml | 49 + .../provision/grandstream/grp2616/{$mac}.xml | 8889 +++++++++++++++++ 12 files changed, 38876 insertions(+) create mode 100644 resources/templates/provision/grandstream/grp2612/phonebook.xml create mode 100644 resources/templates/provision/grandstream/grp2612/{$mac}.xml create mode 100644 resources/templates/provision/grandstream/grp2612w/phonebook.xml create mode 100644 resources/templates/provision/grandstream/grp2612w/{$mac}.xml create mode 100644 resources/templates/provision/grandstream/grp2613/phonebook.xml create mode 100644 resources/templates/provision/grandstream/grp2613/{$mac}.xml create mode 100644 resources/templates/provision/grandstream/grp2614/phonebook.xml create mode 100644 resources/templates/provision/grandstream/grp2614/{$mac}.xml create mode 100644 resources/templates/provision/grandstream/grp2615/phonebook.xml create mode 100644 resources/templates/provision/grandstream/grp2615/{$mac}.xml create mode 100644 resources/templates/provision/grandstream/grp2616/phonebook.xml create mode 100644 resources/templates/provision/grandstream/grp2616/{$mac}.xml diff --git a/resources/templates/provision/grandstream/grp2612/phonebook.xml b/resources/templates/provision/grandstream/grp2612/phonebook.xml new file mode 100644 index 0000000000..deb211d001 --- /dev/null +++ b/resources/templates/provision/grandstream/grp2612/phonebook.xml @@ -0,0 +1,151 @@ + + + + + + 1 + Users + default ringtone + + + 2 + Groups + default ringtone + + + 3 + Extensions + system + + + {$start_id=0} + {foreach $contacts as $row} + {if $row.category == "users"} + + {$start_id++} + {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_organization} + {else} + {$row.contact_name_given} + {$row.contact_name_family} + {/if} + {else} + {$row.effective_caller_id_name} + {/if} + + 0 + {foreach $row.numbers as $number} + {if $number.phone_number != ""} + {if $number.phone_label == "work"} + + {$number.phone_number} + 0 + + {/if} + {if $number.phone_label == "home"} + + {$number.phone_number} + 0 + + {/if} + {if $number.phone_label == "mobile"} + + {$number.phone_number} + 0 + + {/if} + {/if} + {/foreach} + 1 + 0 + + + + + {elseif $row.category == "groups"} + + {$start_id++} + {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_organization} + {else} + {$row.contact_name_given} + {$row.contact_name_family} + {/if} + {else} + {$row.effective_caller_id_name} + {/if} + + + 0 + {foreach $row.numbers as $number} + {if $number.phone_number != ""} + {if $number.phone_label == "work"} + + {$number.phone_number} + 0 + + {/if} + {if $number.phone_label == "home"} + + {$number.phone_number} + 0 + + {/if} + {if $number.phone_label == "mobile"} + + {$number.phone_number} + 0 + + {/if} + {/if} + {/foreach} + 2 + 0 + + + + + {elseif $row.category == "extensions"} + + {$start_id++} + {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_organization} + {else} + {$row.contact_name_given} + {$row.contact_name_family} + {/if} + {else} + {$row.effective_caller_id_name} + {/if} + + 0 + {if $row.phone_number != ""} + + {$row.phone_number} + 0 + + {else} + + {$row.phone_extension} + 0 + + {/if} + 3 + 0 + + + + + {/if} + {/foreach} + + diff --git a/resources/templates/provision/grandstream/grp2612/{$mac}.xml b/resources/templates/provision/grandstream/grp2612/{$mac}.xml new file mode 100644 index 0000000000..64f1c6b132 --- /dev/null +++ b/resources/templates/provision/grandstream/grp2612/{$mac}.xml @@ -0,0 +1,4589 @@ + + + +{$mac|replace:'-':''} + + + + + + + + + + + + + + + + + + 1 + + + + {$account.1.display_name} + + + + {$account.1.server_address}:{$account.1.sip_port} + + + + +{if isset($account.1.server_address_secondary)} + {$account.1.server_address_secondary}:{$account.1.sip_port} +{else} + {$account.1.server_address_secondary} +{/if} + + + + +{if isset($account.1.outbound_proxy_primary)} + {$account.1.outbound_proxy_primary}:{$account.1.sip_port} +{else} + {$account.1.outbound_proxy_primary} +{/if} + + + + +{if isset($account.1.outbound_proxy_secondary)} + {$account.1.outbound_proxy_secondary}:{$account.1.sip_port} +{else} + {$account.1.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.1.user_id} + + + + {$account.1.auth_id} + + + + {$account.1.password} + + + + {$account.1.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.1.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5060 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + + +{$tp=0} +{if $account.1.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.1.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk,contact,incoming,outgoing + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + +{if isset($grandstream_account_ring_tone_1)} + {$grandstream_account_ring_tone_1} +{/if} + + + + ring1 + + + + + + 5 + + + + ring2 + + + + + + 2 + + + + ring3 + + + + + + 3 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20 + + + + + + + + + + +{if isset($account.2.password)} + 1 +{else} + 0 +{/if} + + + + {$account.2.display_name} + + + + {$account.2.server_address}:{$account.2.sip_port} + + + + +{if isset($account.2.server_address_secondary)} + {$account.2.server_address_secondary}:{$account.2.sip_port} +{else} + {$account.2.server_address_secondary} +{/if} + + + + +{if isset($account.2.outbound_proxy_primary)} + {$account.2.outbound_proxy_primary}:{$account.2.sip_port} +{else} + {$account.2.outbound_proxy_primary} +{/if} + + + + +{if isset($account.2.outbound_proxy_secondary)} + {$account.2.outbound_proxy_secondary}:{$account.2.sip_port} +{else} + {$account.2.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.2.user_id} + + + + {$account.2.auth_id} + + + + {$account.2.password} + + + + {$account.2.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.2.register_expires} + + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 6051 + + + + + 20 + + + + + + 100 + + + + + + 400 + + + + + 0 + + + + +{$tp=0} +{if $account.2.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.2.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.2.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.2.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_2)} + {$grandstream_account_ring_tone_2} +{/if} + + + + ring1 + + + + + + 0 + + + + ring2 + + + + + + 0 + + + + ring3 + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + + + + 0 + + + + + + phone-{$mac|replace:'-':''} + + + + GrandstreamGRP2612 + + + + + + + + + + + + + + + + + + + + + + + 192 + + + 168 + + + 1 + + + 102 + + + + 255 + + + 255 + + + 0 + + + 0 + + + + 192 + + + 168 + + + 2 + + + 1 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 26 + + + + + 46 + + + + + 1 + + + + + 1 + + + + +{if isset($grandstream_lan_port_vlan) } + {$grandstream_lan_port_vlan} +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + +{if isset($grandstream_pc_port_vlan) } + {$grandstream_pc_port_vlan} +{else} + 0 +{/if} + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 30 + + + + + 1500 + + + + + + + + 1 + + + + + 1 + + + + + + + + + 0 + + + + + + + + 0 + + + + + + + + + 1194 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + + 3 + + + + + 161 + + + + + + + + 162 + + + + 5 + + + + 1 + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + {$user_password} + + + +{if isset($admin_password)} + {$admin_password} +{else} + {$mac|replace:'-':''} +{/if} + + + + + + + + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + + + 0 + + + + + 10080 + + + + + 1 + + + + 0 + + + + 2 + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 2 + + + +{if $grandstream_config_server_path=="none"} + +{elseif isset($grandstream_config_server_path)} + {$grandstream_config_server_path} +{else} + {$domain_name}{$project_path}/app/provision +{/if} + + + +{$http_auth_username} + + + +{$http_auth_password} + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 1 + + + +{if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/{$firmware_version} +{elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path} +{else} + {$domain_name}{$project_path}/app/provision/resources/firmware/ +{/if} + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + {$grandstream_syslog_server} + + + + +{if isset($grandstream_syslog_level)} + {$grandstream_syslog_level} +{else} + 0 +{/if} + + + + + + + + +{if isset($grandstream_send_sip_log)} + {$grandstream_send_sip_log} +{else} + 0 +{/if} + + + + + 1 + + + + + 1 + + + + + + + + https://acs.gdms.cloud + + + + + + + + + + + + + + + 0 + + + + 86400 + + + + {$mac|replace:'-':''} + + + + + + + + 7547 + + + + + + + + + + + + + 0 + + + + + + + + 2 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + + 80 + + + + + 443 + + + + 1 + + + + 5 + + + + 20 + + + + 3 + + + + + + + 2 + + + + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + 911,922,611,8328442900 + + + + + + + + + 0 + + + + + + + + + {$grandstream_phonebook_download} + + + + {$http_auth_username} + + + + {$http_auth_password} + + + + + +{if isset($grandstream_phonebook_download)} + {$grandstream_phonebook_xml_server_path}/{$mac}/ +{elseif isset($grandstream_phonebook_xml_server_path)} + {$grandstream_phonebook_xml_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_phonebook_download_interval)} + {$grandstream_phonebook_download_interval} +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + {$grandstream_ldap_server} + + + + 389 + + + + + + {$grandstream_ldap_base_dn} + + + + {$grandstream_ldap_username} + + + + {$grandstream_ldap_password} + + + + + {$grandstream_ldap_number_filter} + + + + + {$grandstream_ldap_name_filter} + + + + + 3 + + + + + {$grandstream_ldap_name_attr} + + + + + {$grandstream_ldap_number_attr} + + + + {$grandstream_ldap_display_name} + + + + + + 50 + + + + + + 30 + + + + + 0 + + + + 0 + + + 0 + + + + givenName sn title + + + + 0 + + + + + + + + 5004 + + + + + 200 + + + + + 1 + + + + + 20 + + + + + + + + + + + + +{if isset($public_mode) } +{if $public_mode|strtolower == 'true'} + 1 +{elseif $public_mode|strtolower == 'yes'} + 1 +{elseif $public_mode == '1'} + 1 +{else} + 0 +{/if} +{else} + 0 +{/if} + + + + + + 1 + + + + + + + + + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + 4320 + + + + 100 + + + + 100 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + + + + + + + 5222 + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + CallHistory,LocalPhonebook,RemotePhonebook,FeatureCode + + + + + 1 + + + + + + + + 0 + + + + + 30 + + + + + 0 + + + + + 5 + + + + + 0 + + + + + 10 + + + + + 20 + + + + + 1 + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "0"} 0{/if} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "0"} 0{/if} +{if $grandstream_call_waiting == "1"} 1{/if} +{if $grandstream_call_waiting == "2"} 0{/if} +{/if} + + + + +{if isset($grandstream_call_waiting_ring)} +{if $grandstream_call_waiting_ring == "0"} 0{/if} +{if $grandstream_call_waiting_ring == "1"} 1{/if} +{else} +1 +{/if} + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 2 + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + +{if isset($grandstream_auto_attended_transfer)} + {$grandstream_auto_attended_transfer} +{else} + 1 +{/if} + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 1 + + + + + 1 + + + + + 10 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 1 + + + + + + + + 0 + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + 0 + + + + {$account.1.display_name} + + + + + + 224.0.1.117:5003 + + + + Page + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + +{if isset($ntp_server_primary)} + {$ntp_server_primary} +{else} + pool.ntp.org +{/if} + + + +{if isset($ntp_server_secondary)} + {$ntp_server_secondary} +{else} + 2.us.pool.ntp.org +{/if} + + + + + 1440 + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($grandstream_timezone) } + {$grandstream_timezone} +{elseif isset($grandstream_gxp_time_zone) } + {$grandstream_gxp_time_zone} +{else} + auto +{/if} + + + + + + 1 + + + + + MTZ+6MDT+5,M4.1.0,M11.1.0 + + + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + Auto + + + + 0 + + + + + 0 + + + + + + + + + {$grandstream_lcd_brightness} + + + + + {$grandstream_lcd_brightness_idle} + + + + + {$grandstream_active_backlight_timeout} + + + + + 1 + + + + + + + + + +{if isset($grandstream_wallpaper_url)} + 1 + {$grandstream_wallpaper_url} +{else} + 0 + +{/if} + + + + #000000 + + + + +{if isset($grandstream_screensaver)} + {$grandstream_screensaver} +{else} + 2 +{/if} + + + + +{if isset($grandstream_screensaver_source)} + {$grandstream_screensaver_source} +{else} + 0 +{/if} + + + + + +{if isset($grandstream_screensaver_show_date_time)} + {$grandstream_screensaver_show_date_time} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_timeout)} + {$grandstream_screensaver_timeout} +{else} + 3 +{/if} + + + +{if isset($grandstream_screensaver_server_path)} + {$grandstream_screensaver_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_screensaver_xml_download_interval)} + {$grandstream_screensaver_xml_download_interval} +{else} + 0 +{/if} + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + f1=500,f2=540,c=20/20-80/400; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440,c=10/10; + + + + + f1=440,f2=480,c=200/400; + + + + + f1=440,f2=440,c=25/525; + + + + + 0 + + + + + f1=480,f2=620,c=50/50; + + + + + f1=480,f2=620,c=25/25; + + + + + 5 + + + + + 5 + + + + + 0 + + + + +{if isset($grandstream_default_ringtone)} + {$grandstream_default_ringtone} +{/if} + + + + + + + + + + + 1 + + + + + + + + + + + XMLApp + + + + + + + + + 0 + + + + + + + + + + + 0 + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {$fixed_keys=4} + + +{$start_id=1363} +{assign var=key_types value=["none"=>-1,"line"=>31,"shared line"=>32,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} + +{for $line=1 to 6} +{$pid=$line*2-2} +{if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} +{if $line <= $fixed_keys} +{$key_types[$keys.line.$line.device_key_type]} +{else} +{$key_types[$keys.line.$line.device_key_type]} +{/if} +{$keys.line.$line.device_key_line} +{$keys.line.$line.device_key_label} +{$keys.line.$line.device_key_value} +{else} +{if $line <= $fixed_keys} +0 +{$line-1} + + +{else} +-1 +{/if} +{/if} + +{/for} + + +{$start_id=23800} +{for $line=7 to 40} +{$pid=($line-6)*4-4} +{if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} +{if $line <= $fixed_keys} +{$key_types[$keys.line.$line.device_key_type]} +{else} +{$key_types[$keys.line.$line.device_key_type]} +{/if} +{$keys.line.$line.device_key_line} +{$keys.line.$line.device_key_label} +{$keys.line.$line.device_key_value} +{else} +{if $line <= $fixed_keys} +-1 +0 + + +{else} +-1 +{/if} +{/if} + +{/for} + + + + + + + + + 0 + + + + + + 1 + + + + + + 0 + + + + + 0 + + + + + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,Redial,Dial,Backspace,PickUp,Target + + + + BTPhonebook,DirectIP,Onhook,Cancel,Dial,Backspace,Target + + + + Answer,Reject,Forward,ReConf + + + + BTOnOff,EndCall,ReConf,ConfRoom,ConfCall + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,ConfCall,Cancel,NewCall,Swap,Transfer,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,UCallPark,PrivateHold,CallPark + + + + BTOnOff,EndCall,Kick,NewCall,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,ConfRoom,Add + + + + ReConf,Resume,HoldTrnf,ConfCall,Add + + + + EndCall,ReConf,ConfRoom + + + + BTOnOff,Cancel,BlindTrnf,AttTrnf,Backspace,Target + + + + BTOnOff,Cancel,Dial,Backspace,Target + + + + + + + + + + + +{assign var=key_types value=["speed dial"=>10, "speed dial active"=>14,"voicemail"=>16,"call return"=>17,"intercom"=>20,"ldap search"=>21,"menu"=>27]} +{$start_id=2987} +{for $prog=1 to 3} +{$pid=$prog*4-4} +{if isset($keys.programmable.$prog.device_key_category) && isset($keys.programmable.$prog.device_key_type) && $keys.programmable.$prog.device_key_type|in_array:$key_types} +{$key_types[$keys.programmable.$prog.device_key_type]} +{$keys.programmable.$prog.device_key_line} +{$keys.programmable.$prog.device_key_label} +{$keys.programmable.$prog.device_key_value} +{else} +0 +0 + + +{/if} + +{/for} + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + diff --git a/resources/templates/provision/grandstream/grp2612w/phonebook.xml b/resources/templates/provision/grandstream/grp2612w/phonebook.xml new file mode 100644 index 0000000000..a99be683a3 --- /dev/null +++ b/resources/templates/provision/grandstream/grp2612w/phonebook.xml @@ -0,0 +1,151 @@ + + + + + + 1 + Users + default ringtone + + + 2 + Groups + default ringtone + + + 3 + Extensions + system + + + {$start_id=0} + {foreach $contacts as $row} + {if $row.category == "users"} + + {$start_id++} + {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_organization} + {else} + {$row.contact_name_given} + {$row.contact_name_family} + {/if} + {else} + {$row.effective_caller_id_name} + {/if} + + 0 + {foreach $row.numbers as $number} + {if $number.phone_number != ""} + {if $number.phone_label == "work"} + + {$number.phone_number} + 0 + + {/if} + {if $number.phone_label == "home"} + + {$number.phone_number} + 0 + + {/if} + {if $number.phone_label == "mobile"} + + {$number.phone_number} + 0 + + {/if} + {/if} + {/foreach} + 1 + 0 + + + + + {elseif $row.category == "groups"} + + {$start_id++} + {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_organization} + {else} + {$row.contact_name_given} + {$row.contact_name_family} + {/if} + {else} + {$row.effective_caller_id_name} + {/if} + + + 0 + {foreach $row.numbers as $number} + {if $number.phone_number != ""} + {if $number.phone_label == "work"} + + {$number.phone_number} + 0 + + {/if} + {if $number.phone_label == "home"} + + {$number.phone_number} + 0 + + {/if} + {if $number.phone_label == "mobile"} + + {$number.phone_number} + 0 + + {/if} + {/if} + {/foreach} + 2 + 0 + + + + + {elseif $row.category == "extensions"} + + {$start_id++} + {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_organization} + {else} + {$row.contact_name_given} + {$row.contact_name_family} + {/if} + {else} + {$row.effective_caller_id_name} + {/if} + + 0 + {if $row.phone_number != ""} + + {$row.phone_number} + 0 + + {else} + + {$row.phone_extension} + 0 + + {/if} + 3 + 0 + + + + + {/if} + {/foreach} + + diff --git a/resources/templates/provision/grandstream/grp2612w/{$mac}.xml b/resources/templates/provision/grandstream/grp2612w/{$mac}.xml new file mode 100644 index 0000000000..d4dd0ea801 --- /dev/null +++ b/resources/templates/provision/grandstream/grp2612w/{$mac}.xml @@ -0,0 +1,4683 @@ + + + +{$mac|replace:'-':''} + + + + + + + + + + + + + + + + + + 1 + + + + {$account.1.display_name} + + + + {$account.1.server_address}:{$account.1.sip_port} + + + + +{if isset($account.1.server_address_secondary)} + {$account.1.server_address_secondary}:{$account.1.sip_port} +{else} + {$account.1.server_address_secondary} +{/if} + + + + +{if isset($account.1.outbound_proxy_primary)} + {$account.1.outbound_proxy_primary}:{$account.1.sip_port} +{else} + {$account.1.outbound_proxy_primary} +{/if} + + + + +{if isset($account.1.outbound_proxy_secondary)} + {$account.1.outbound_proxy_secondary}:{$account.1.sip_port} +{else} + {$account.1.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.1.user_id} + + + + {$account.1.auth_id} + + + + {$account.1.password} + + + + {$account.1.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.1.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5060 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + + +{$tp=0} +{if $account.1.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.1.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk,contact,incoming,outgoing + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + +{if isset($grandstream_account_ring_tone_1)} + {$grandstream_account_ring_tone_1} +{/if} + + + + ring1 + + + + + + 5 + + + + ring2 + + + + + + 2 + + + + ring3 + + + + + + 3 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20 + + + + + + + + + + +{if isset($account.2.password)} + 1 +{else} + 0 +{/if} + + + + {$account.2.display_name} + + + + {$account.2.server_address}:{$account.2.sip_port} + + + + +{if isset($account.2.server_address_secondary)} + {$account.2.server_address_secondary}:{$account.2.sip_port} +{else} + {$account.2.server_address_secondary} +{/if} + + + + +{if isset($account.2.outbound_proxy_primary)} + {$account.2.outbound_proxy_primary}:{$account.2.sip_port} +{else} + {$account.2.outbound_proxy_primary} +{/if} + + + + +{if isset($account.2.outbound_proxy_secondary)} + {$account.2.outbound_proxy_secondary}:{$account.2.sip_port} +{else} + {$account.2.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.2.user_id} + + + + {$account.2.auth_id} + + + + {$account.2.password} + + + + {$account.2.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.2.register_expires} + + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 6051 + + + + + 20 + + + + + + 100 + + + + + + 400 + + + + + 0 + + + + +{$tp=0} +{if $account.2.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.2.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.2.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.2.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_2)} + {$grandstream_account_ring_tone_2} +{/if} + + + + ring1 + + + + + + 0 + + + + ring2 + + + + + + 0 + + + + ring3 + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + + + + 0 + + + + + + phone-{$mac|replace:'-':''} + + + + GrandstreamGRP2612 + + + + + + + + + + + + + + + + + + + + + + + 192 + + + 168 + + + 1 + + + 102 + + + + 255 + + + 255 + + + 0 + + + 0 + + + + 192 + + + 168 + + + 2 + + + 1 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 26 + + + + + 46 + + + + + 1 + + + + + 1 + + + + +{if isset($grandstream_lan_port_vlan) } + {$grandstream_lan_port_vlan} +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + +{if isset($grandstream_pc_port_vlan) } + {$grandstream_pc_port_vlan} +{else} + 0 +{/if} + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 30 + + + + + 1500 + + + + + + + + 1 + + + + + 1 + + + + + + + + + 0 + + + + + + + + 0 + + + + + + + + + 1194 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + + 3 + + + + + 161 + + + + + + + + 162 + + + + 5 + + + + 1 + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + {if isset($grandstream_wifi_enable) + {$grandstream_wifi_enable} + {/if} + + + + + {if isset($grandstream_wifi_ssid_1)} + {$grandstream_wifi_ssid_1} + {/if} + + + + + {if isset($grandstream_wifi_password_1)} + {$grandstream_wifi_password_1} + {/if} + + + + + {if isset($grandstream_wifi_security_1)} + {$grandstream_wifi_security_1} + {/if} + + + + + {if isset($grandstream_wifi_eap_method_1)} + {$grandstream_wifi_eap_method_1} + {/if} + + + + + {if isset($grandstream_wifi_eap_identity_1)} + {$grandstream_wifi_eap_identity_1} + {/if} + + + + + {if isset($grandstream_wifi_eap_password_1)} + {$grandstream_wifi_eap_password_1} + {/if} + + + + + {if isset($grandstream_wifi_ssid_10)} + {$grandstream_wifi_ssid_10} + {/if} + + + + + {if isset($grandstream_wifi_password_10)} + {$grandstream_wifi_password_10} + {/if} + + + + + {if isset($grandstream_wifi_security_10)} + {$grandstream_wifi_security_10} + {/if} + + + + + {if isset($grandstream_wifi_eap_method_10)} + {$grandstream_wifi_eap_method_10} + {/if} + + + + + {if isset($grandstream_wifi_eap_identity_10)} + {$grandstream_wifi_eap_identity_10} + {/if} + + + + + {if isset($grandstream_wifi_eap_password_10)} + {$grandstream_wifi_eap_password_10} + {/if} + + + + + + + + + {$user_password} + + + +{if isset($admin_password)} + {$admin_password} +{else} + {$mac|replace:'-':''} +{/if} + + + + + + + + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + + + 0 + + + + + 10080 + + + + + 1 + + + + 0 + + + + 2 + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 2 + + + +{if $grandstream_config_server_path=="none"} + +{elseif isset($grandstream_config_server_path)} + {$grandstream_config_server_path} +{else} + {$domain_name}{$project_path}/app/provision +{/if} + + + +{$http_auth_username} + + + +{$http_auth_password} + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 1 + + + +{if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/{$firmware_version} +{elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path} +{else} + {$domain_name}{$project_path}/app/provision/resources/firmware/ +{/if} + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + {$grandstream_syslog_server} + + + + +{if isset($grandstream_syslog_level)} + {$grandstream_syslog_level} +{else} + 0 +{/if} + + + + + + + + +{if isset($grandstream_send_sip_log)} + {$grandstream_send_sip_log} +{else} + 0 +{/if} + + + + + 1 + + + + + 1 + + + + + + + + https://acs.gdms.cloud + + + + + + + + + + + + + + + 0 + + + + 86400 + + + + {$mac|replace:'-':''} + + + + + + + + 7547 + + + + + + + + + + + + + 0 + + + + + + + + 2 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + + 80 + + + + + 443 + + + + 1 + + + + 5 + + + + 20 + + + + 3 + + + + + + + 2 + + + + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + 911,922,611,8328442900 + + + + + + + + + 0 + + + + + + + + + {$grandstream_phonebook_download} + + + + {$http_auth_username} + + + + {$http_auth_password} + + + + + +{if isset($grandstream_phonebook_download)} + {$grandstream_phonebook_xml_server_path}/{$mac}/ +{elseif isset($grandstream_phonebook_xml_server_path)} + {$grandstream_phonebook_xml_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_phonebook_download_interval)} + {$grandstream_phonebook_download_interval} +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + {$grandstream_ldap_server} + + + + 389 + + + + + + {$grandstream_ldap_base_dn} + + + + {$grandstream_ldap_username} + + + + {$grandstream_ldap_password} + + + + + {$grandstream_ldap_number_filter} + + + + + {$grandstream_ldap_name_filter} + + + + + 3 + + + + + {$grandstream_ldap_name_attr} + + + + + {$grandstream_ldap_number_attr} + + + + {$grandstream_ldap_display_name} + + + + + + 50 + + + + + + 30 + + + + + 0 + + + + 0 + + + 0 + + + + givenName sn title + + + + 0 + + + + + + + + 5004 + + + + + 200 + + + + + 1 + + + + + 20 + + + + + + + + + + + + +{if isset($public_mode) } +{if $public_mode|strtolower == 'true'} + 1 +{elseif $public_mode|strtolower == 'yes'} + 1 +{elseif $public_mode == '1'} + 1 +{else} + 0 +{/if} +{else} + 0 +{/if} + + + + + + 1 + + + + + + + + + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + 4320 + + + + 100 + + + + 100 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + + + + + + + 5222 + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + CallHistory,LocalPhonebook,RemotePhonebook,FeatureCode + + + + + 1 + + + + + + + + 0 + + + + + 30 + + + + + 0 + + + + + 5 + + + + + 0 + + + + + 10 + + + + + 20 + + + + + 1 + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "0"} 0{/if} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "0"} 0{/if} +{if $grandstream_call_waiting == "1"} 1{/if} +{if $grandstream_call_waiting == "2"} 0{/if} +{/if} + + + + +{if isset($grandstream_call_waiting_ring)} +{if $grandstream_call_waiting_ring == "0"} 0{/if} +{if $grandstream_call_waiting_ring == "1"} 1{/if} +{else} +1 +{/if} + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 2 + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + +{if isset($grandstream_auto_attended_transfer)} + {$grandstream_auto_attended_transfer} +{else} + 1 +{/if} + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 1 + + + + + 1 + + + + + 10 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 1 + + + + + + + + 0 + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + 0 + + + + {$account.1.display_name} + + + + + + 224.0.1.117:5003 + + + + Page + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + +{if isset($ntp_server_primary)} + {$ntp_server_primary} +{else} + pool.ntp.org +{/if} + + + +{if isset($ntp_server_secondary)} + {$ntp_server_secondary} +{else} + 2.us.pool.ntp.org +{/if} + + + + + 1440 + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($grandstream_timezone) } + {$grandstream_timezone} +{elseif isset($grandstream_gxp_time_zone) } + {$grandstream_gxp_time_zone} +{else} + auto +{/if} + + + + + + 1 + + + + + MTZ+6MDT+5,M4.1.0,M11.1.0 + + + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + Auto + + + + 0 + + + + + 0 + + + + + + + + + {$grandstream_lcd_brightness} + + + + + {$grandstream_lcd_brightness_idle} + + + + + {$grandstream_active_backlight_timeout} + + + + + 1 + + + + + + + + + +{if isset($grandstream_wallpaper_url)} + 1 + {$grandstream_wallpaper_url} +{else} + 0 + +{/if} + + + + #000000 + + + + +{if isset($grandstream_screensaver)} + {$grandstream_screensaver} +{else} + 2 +{/if} + + + + +{if isset($grandstream_screensaver_source)} + {$grandstream_screensaver_source} +{else} + 0 +{/if} + + + + + +{if isset($grandstream_screensaver_show_date_time)} + {$grandstream_screensaver_show_date_time} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_timeout)} + {$grandstream_screensaver_timeout} +{else} + 3 +{/if} + + + +{if isset($grandstream_screensaver_server_path)} + {$grandstream_screensaver_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_screensaver_xml_download_interval)} + {$grandstream_screensaver_xml_download_interval} +{else} + 0 +{/if} + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + f1=500,f2=540,c=20/20-80/400; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440,c=10/10; + + + + + f1=440,f2=480,c=200/400; + + + + + f1=440,f2=440,c=25/525; + + + + + 0 + + + + + f1=480,f2=620,c=50/50; + + + + + f1=480,f2=620,c=25/25; + + + + + 5 + + + + + 5 + + + + + 0 + + + + +{if isset($grandstream_default_ringtone)} + {$grandstream_default_ringtone} +{/if} + + + + + + + + + + + 1 + + + + + + + + + + + XMLApp + + + + + + + + + 0 + + + + + + + + + + + 0 + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {$fixed_keys=4} + + +{$start_id=1363} +{assign var=key_types value=["none"=>-1,"line"=>31,"shared line"=>32,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} + +{for $line=1 to 6} +{$pid=$line*2-2} +{if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} +{if $line <= $fixed_keys} +{$key_types[$keys.line.$line.device_key_type]} +{else} +{$key_types[$keys.line.$line.device_key_type]} +{/if} +{$keys.line.$line.device_key_line} +{$keys.line.$line.device_key_label} +{$keys.line.$line.device_key_value} +{else} +{if $line <= $fixed_keys} +0 +{$line-1} + + +{else} +-1 +{/if} +{/if} + +{/for} + + +{$start_id=23800} +{for $line=7 to 40} +{$pid=($line-6)*4-4} +{if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} +{if $line <= $fixed_keys} +{$key_types[$keys.line.$line.device_key_type]} +{else} +{$key_types[$keys.line.$line.device_key_type]} +{/if} +{$keys.line.$line.device_key_line} +{$keys.line.$line.device_key_label} +{$keys.line.$line.device_key_value} +{else} +{if $line <= $fixed_keys} +-1 +0 + + +{else} +-1 +{/if} +{/if} + +{/for} + + + + + + + + + 0 + + + + + + 1 + + + + + + 0 + + + + + 0 + + + + + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,Redial,Dial,Backspace,PickUp,Target + + + + BTPhonebook,DirectIP,Onhook,Cancel,Dial,Backspace,Target + + + + Answer,Reject,Forward,ReConf + + + + BTOnOff,EndCall,ReConf,ConfRoom,ConfCall + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,ConfCall,Cancel,NewCall,Swap,Transfer,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,UCallPark,PrivateHold,CallPark + + + + BTOnOff,EndCall,Kick,NewCall,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,ConfRoom,Add + + + + ReConf,Resume,HoldTrnf,ConfCall,Add + + + + EndCall,ReConf,ConfRoom + + + + BTOnOff,Cancel,BlindTrnf,AttTrnf,Backspace,Target + + + + BTOnOff,Cancel,Dial,Backspace,Target + + + + + + + + + + + +{assign var=key_types value=["speed dial"=>10, "speed dial active"=>14,"voicemail"=>16,"call return"=>17,"intercom"=>20,"ldap search"=>21,"menu"=>27]} +{$start_id=2987} +{for $prog=1 to 3} +{$pid=$prog*4-4} +{if isset($keys.programmable.$prog.device_key_category) && isset($keys.programmable.$prog.device_key_type) && $keys.programmable.$prog.device_key_type|in_array:$key_types} +{$key_types[$keys.programmable.$prog.device_key_type]} +{$keys.programmable.$prog.device_key_line} +{$keys.programmable.$prog.device_key_label} +{$keys.programmable.$prog.device_key_value} +{else} +0 +0 + + +{/if} + +{/for} + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + diff --git a/resources/templates/provision/grandstream/grp2613/phonebook.xml b/resources/templates/provision/grandstream/grp2613/phonebook.xml new file mode 100644 index 0000000000..62c745db9f --- /dev/null +++ b/resources/templates/provision/grandstream/grp2613/phonebook.xml @@ -0,0 +1,49 @@ + + +1 +{foreach $contacts as $contact} +{if $contact.contact_type == "group"} + +{$contact.id} +{$contact.group_description|truncate:10} + +{/if} +{/foreach} +{$i=0} +{foreach $contacts as $contact} +{if $contact.contact_name_given != "" && $contact.contact_type == "contact"} + +{$contact.contact_name_given} +{$contact.contact_name_family} +{if $contact.contact_role != "" } +{$contact.contact_role} +{/if} +{if $contact.contact_category != "" } +{$contact.contact_category} +{/if} + +{$contact.contact_work} +1 + +{if $contact.contact_home != "" } + +{$contact.contact_home} +1 + +{/if} +{if $contact.contact_cell != "" } + +{$contact.contact_cell} +1 + +{/if} +{if $contact.contact_organization != "" } +{$contact.contact_organization} +{/if} +{foreach $contact.groups as $group} +{$group} +{/foreach} + +{/if} +{/foreach} + diff --git a/resources/templates/provision/grandstream/grp2613/{$mac}.xml b/resources/templates/provision/grandstream/grp2613/{$mac}.xml new file mode 100644 index 0000000000..6e6ea052bc --- /dev/null +++ b/resources/templates/provision/grandstream/grp2613/{$mac}.xml @@ -0,0 +1,5454 @@ + + + +{$mac|replace:'-':''} + + + + + + + + + + + + + + + + + + 1 + + + + {$account.1.display_name} + + + + {$account.1.server_address}:{$account.1.sip_port} + + + + +{if isset($account.1.server_address_secondary)} + {$account.1.server_address_secondary}:{$account.1.sip_port} +{else} + {$account.1.server_address_secondary} +{/if} + + + + +{if isset($account.1.outbound_proxy_primary)} + {$account.1.outbound_proxy_primary}:{$account.1.sip_port} +{else} + {$account.1.outbound_proxy_primary} +{/if} + + + + +{if isset($account.1.outbound_proxy_secondary)} + {$account.1.outbound_proxy_secondary}:{$account.1.sip_port} +{else} + {$account.1.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.1.user_id} + + + + {$account.1.auth_id} + + + + {$account.1.password} + + + + {$account.1.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.1.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5060 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + + +{$tp=0} +{if $account.1.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.1.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk,incoming,outgoing,contact + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + +{if isset($grandstream_account_ring_tone_1)} + {$grandstream_account_ring_tone_1} +{/if} + + + + ring1 + + + + + + 5 + + + + ring2 + + + + + + 2 + + + + ring3 + + + + + + 3 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20 + + + + + + + + + + +{if isset($account.2.password)} + 1 +{else} + 0 +{/if} + + + + {$account.2.display_name} + + + + {$account.2.server_address}:{$account.2.sip_port} + + + + +{if isset($account.2.server_address_secondary)} + {$account.2.server_address_secondary}:{$account.2.sip_port} +{else} + {$account.2.server_address_secondary} +{/if} + + + + +{if isset($account.2.outbound_proxy_primary)} + {$account.2.outbound_proxy_primary}:{$account.2.sip_port} +{else} + {$account.2.outbound_proxy_primary} +{/if} + + + + +{if isset($account.2.outbound_proxy_secondary)} + {$account.2.outbound_proxy_secondary}:{$account.2.sip_port} +{else} + {$account.2.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.2.user_id} + + + + {$account.2.auth_id} + + + + {$account.2.password} + + + + {$account.2.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.2.register_expires} + + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 6051 + + + + + 20 + + + + + + 100 + + + + + + 400 + + + + + 0 + + + + +{$tp=0} +{if $account.2.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.2.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.2.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.2.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_2)} + {$grandstream_account_ring_tone_2} +{/if} + + + + ring1 + + + + + + 0 + + + + ring2 + + + + + + 0 + + + + ring3 + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.3.password)} + 1 +{else} + 0 +{/if} + + + + {$account.3.display_name} + + + + {$account.3.server_address}:{$account.3.sip_port} + + + + +{if isset($account.3.server_address_secondary)} + {$account.3.server_address_secondary}:{$account.3.sip_port} +{else} + {$account.3.server_address_secondary} +{/if} + + + + +{if isset($account.3.outbound_proxy_primary)} + {$account.3.outbound_proxy_primary}:{$account.3.sip_port} +{else} + {$account.3.outbound_proxy_primary} +{/if} + + + + +{if isset($account.3.outbound_proxy_secondary)} + {$account.3.outbound_proxy_secondary}:{$account.3.sip_port} +{else} + {$account.3.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.3.user_id} + + + + {$account.3.auth_id} + + + + {$account.3.password} + + + + {$account.3.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.3.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5064 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + +{$tp=0} +{if $account.3.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.3.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.3.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.3.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + 2 + + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_3)} + {$grandstream_account_ring_tone_3} +{/if} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + phone-{$mac|replace:'-':''} + + + + GrandstreamGRP2613 + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 26 + + + + + 46 + + + + + 1 + + + + + 1 + + + + +{if isset($grandstream_lan_port_vlan) } + {$grandstream_lan_port_vlan} +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + +{if isset($grandstream_pc_port_vlan) } + {$grandstream_pc_port_vlan} +{else} + 0 +{/if} + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 30 + + + + + 1500 + + + + + 0 + + + + + + + + 1 + + + + + 1 + + + + + + + + + 0 + + + + + + + + 0 + + + + + + + + + 1194 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + + 3 + + + + + 161 + + + + + + + + 162 + + + + 5 + + + + 1 + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + {$user_password} + + + +{if isset($admin_password)} + {$admin_password} +{else} + {$mac|replace:'-':''} +{/if} + + + + + + + + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + + + 0 + + + + + 10080 + + + + + 1 + + + + 0 + + + + 0 + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 2 + + + +{if $grandstream_config_server_path=="none"} + +{elseif isset($grandstream_config_server_path)} + {$grandstream_config_server_path} +{else} + {$domain_name}{$project_path}/app/provision +{/if} + + + +{$http_auth_username} + + + +{$http_auth_password} + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 1 + + + +{if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/{$firmware_version} +{elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path} +{else} + {$domain_name}{$project_path}/app/provision/resources/firmware/ +{/if} + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + {$grandstream_syslog_server} + + + + +{if isset($grandstream_syslog_level)} + {$grandstream_syslog_level} +{else} + 0 +{/if} + + + + + + + + +{if isset($grandstream_send_sip_log)} + {$grandstream_send_sip_log} +{else} + 0 +{/if} + + + + + 0 + + + + + 1 + + + + + + + + + + + + + + + + Auto + + + + 0 + + + + + 0 + + + + + + + + https://acs.gdms.cloud + + + + + + + + + + + + + + + 0 + + + + 86400 + + + + {$mac|replace:'-':''} + + + + + + + + 7547 + + + + + + + + + + + + + 0 + + + + + + + + 2 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + + 80 + + + + + 443 + + + + 1 + + + + 5 + + + + 20 + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + {$grandstream_phonebook_download} + + + + {$http_auth_username} + + + + {$http_auth_password} + + + + + +{if isset($grandstream_phonebook_download)} + {$grandstream_phonebook_xml_server_path}{$mac}/ +{elseif isset($grandstream_phonebook_xml_server_path)} + {$grandstream_phonebook_xml_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_phonebook_download_interval)} + {$grandstream_phonebook_download_interval} +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + {$grandstream_ldap_server} + + + + 389 + + + + + + {$grandstream_ldap_base_dn} + + + + {$grandstream_ldap_username} + + + + {$grandstream_ldap_password} + + + + + {$grandstream_ldap_number_filter} + + + + + {$grandstream_ldap_name_filter} + + + + + 3 + + + + + {$grandstream_ldap_name_attr} + + + + + {$grandstream_ldap_number_attr} + + + + {$grandstream_ldap_display_name} + + + + + + 50 + + + + + + 30 + + + + + 0 + + + + 0 + + + 0 + + + + givenName sn title + + + + 0 + + + + + + + + 5004 + + + + + 200 + + + + + 1 + + + + + 20 + + + + + + + + + + + + +{if isset($public_mode) } +{if $public_mode|strtolower == 'true'} + 1 +{elseif $public_mode|strtolower == 'yes'} + 1 +{elseif $public_mode == '1'} + 1 +{else} + 0 +{/if} +{else} + 0 +{/if} + + + + + + 0 + + + + + + + + + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + 4320 + + + + 100 + + + + 100 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + CallHistory,LocalPhonebook,RemotePhonebook,FeatureCode + + + + + 1 + + + + + + + + 0 + + + + + 30 + + + + + 0 + + + + + 5 + + + + + 0 + + + + + 10 + + + + + 20 + + + + + 0 + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 2 + + + + + 0 + + + + + 0 + + + + + + + + +{if isset($grandstream_auto_attended_transfer)} + {$grandstream_auto_attended_transfer} +{else} + 1 +{/if} + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + 1 + + + + + 10 + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + + + + 0 + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + 0 + + + + {$account.1.display_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + {if isset ($grandstream_EHS)} + {$grandstream_EHS} + {$grandstream_EHS} + {else} + + + + 0 + + + + + 0 + {/if} + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + +{if isset($ntp_server_primary)} + {$ntp_server_primary} +{else} + pool.ntp.org +{/if} + + + +{if isset($ntp_server_secondary)} + {$ntp_server_secondary} +{else} + 2.us.pool.ntp.org +{/if} + + + + + 1440 + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($grandstream_timezone) } + {$grandstream_timezone} +{elseif isset($grandstream_gxp_time_zone) } + {$grandstream_gxp_time_zone} +{else} + auto +{/if} + + + + + + 1 + + + + + MTZ+6MDT+5,M4.1.0,M11.1.0 + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + {$grandstream_lcd_brightness} + + + + + {$grandstream_lcd_brightness_idle} + + + + + {$grandstream_active_backlight_timeout} + + + + + 1 + + + + + + + + + +{if isset($grandstream2135_wallpaper_url)} + 1 + {$grandstream2135_wallpaper_url} +{else} + 0 + +{/if} + + + + #000000 + + + + +{if isset($grandstream_screensaver)} + {$grandstream_screensaver} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_source)} + {$grandstream_screensaver_source} +{else} + 0 +{/if} + + + + + +{if isset($grandstream_screensaver_show_date_time)} + {$grandstream_screensaver_show_date_time} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_timeout)} + {$grandstream_screensaver_timeout} +{else} + 3 +{/if} + + + +{if isset($grandstream_screensaver_server_path)} + {$grandstream_screensaver_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_screensaver_xml_download_interval)} + {$grandstream_screensaver_xml_download_interval} +{else} + 0 +{/if} + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + f1=500,f2=540,c=20/20-80/400; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440,c=10/10; + + + + + f1=440,f2=480,c=200/400; + + + + + f1=440,f2=440,c=25/525; + + + + + 0 + + + + + f1=480,f2=620,c=50/50; + + + + + f1=480,f2=620,c=25/25; + + + + + 5 + + + + + 5 + + + + + 0 + + + + +{if isset($grandstream_default_ringtone)} + {$grandstream_default_ringtone} +{/if} + + + + + + + + + + 1 + + + + + + + + + + + XMLApp + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{$fixed_keys=3} + + + +{$start_id=1363} +{assign var=key_types value=["none"=>-1,"line"=>31,"shared line"=>32,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} + +{for $line=1 to 6} +{$pid=$line*2-2} +{if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} +{if $line <= $fixed_keys} +{$key_types[$keys.line.$line.device_key_type]} +{else} +{$key_types[$keys.line.$line.device_key_type]} +{/if} +{$keys.line.$line.device_key_line} +{$keys.line.$line.device_key_label} +{$keys.line.$line.device_key_value} +{else} +{if $line <= $fixed_keys} +0 +{$line-1} + + +{else} +-1 +{/if} +{/if} + +{/for} + + +{$start_id=23800} +{for $line=7 to 16} +{$pid=($line-6)*4-4} +{if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} +{if $line <= $fixed_keys} +{$key_types[$keys.line.$line.device_key_type]} +{else} +{$key_types[$keys.line.$line.device_key_type]} +{/if} +{$keys.line.$line.device_key_line} +{$keys.line.$line.device_key_label} +{$keys.line.$line.device_key_value} +{else} +{if $line <= $fixed_keys} +-1 +0 + + +{else} +-1 +{/if} +{/if} + +{/for} + + + + + + + + + 0 + + + + + + 1 + + + + + + 0 + + + + + 0 + + + + + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,Redial,Dial,Backspace,PickUp,Target + + + + BTPhonebook,DirectIP,Onhook,Cancel,Dial,Backspace,Target + + + + Answer,Reject,Forward,ReConf + + + + BTOnOff,EndCall,ReConf,ConfRoom,ConfCall + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,ConfCall,Cancel,NewCall,Swap,Transfer,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,UCallPark,PrivateHold,CallPark + + + + BTOnOff,EndCall,Kick,NewCall,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,ConfRoom,Add + + + + ReConf,Resume,HoldTrnf,ConfCall,Add + + + + EndCall,ReConf,ConfRoom + + + + BTOnOff,Cancel,BlindTrnf,AttTrnf,Backspace,Target + + + + BTOnOff,Cancel,Dial,Backspace,Target + + + + + + + + + + + +{assign var=key_types value=["speed dial"=>10, "speed dial active"=>14,"voicemail"=>16,"call return"=>17,"intercom"=>20,"ldap search"=>21,"menu"=>27]} +{$start_id=2987} +{for $prog=1 to 3} +{$pid=$prog*4-4} +{if isset($keys.programmable.$prog.device_key_category) && isset($keys.programmable.$prog.device_key_type) && $keys.programmable.$prog.device_key_type|in_array:$key_types} +{$key_types[$keys.programmable.$prog.device_key_type]} +{$keys.programmable.$prog.device_key_line} +{$keys.programmable.$prog.device_key_label} +{$keys.programmable.$prog.device_key_value} +{else} +0 +0 + + +{/if} + +{/for} + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + diff --git a/resources/templates/provision/grandstream/grp2614/phonebook.xml b/resources/templates/provision/grandstream/grp2614/phonebook.xml new file mode 100644 index 0000000000..62c745db9f --- /dev/null +++ b/resources/templates/provision/grandstream/grp2614/phonebook.xml @@ -0,0 +1,49 @@ + + +1 +{foreach $contacts as $contact} +{if $contact.contact_type == "group"} + +{$contact.id} +{$contact.group_description|truncate:10} + +{/if} +{/foreach} +{$i=0} +{foreach $contacts as $contact} +{if $contact.contact_name_given != "" && $contact.contact_type == "contact"} + +{$contact.contact_name_given} +{$contact.contact_name_family} +{if $contact.contact_role != "" } +{$contact.contact_role} +{/if} +{if $contact.contact_category != "" } +{$contact.contact_category} +{/if} + +{$contact.contact_work} +1 + +{if $contact.contact_home != "" } + +{$contact.contact_home} +1 + +{/if} +{if $contact.contact_cell != "" } + +{$contact.contact_cell} +1 + +{/if} +{if $contact.contact_organization != "" } +{$contact.contact_organization} +{/if} +{foreach $contact.groups as $group} +{$group} +{/foreach} + +{/if} +{/foreach} + diff --git a/resources/templates/provision/grandstream/grp2614/{$mac}.xml b/resources/templates/provision/grandstream/grp2614/{$mac}.xml new file mode 100644 index 0000000000..acd47f4145 --- /dev/null +++ b/resources/templates/provision/grandstream/grp2614/{$mac}.xml @@ -0,0 +1,6949 @@ + + + +{$mac|replace:'-':''} + + + + + + + + + + + + + + + + + + 1 + + + + {$account.1.display_name} + + + + {$account.1.server_address}:{$account.1.sip_port} + + + + +{if isset($account.1.server_address_secondary)} + {$account.1.server_address_secondary}:{$account.1.sip_port} +{else} + {$account.1.server_address_secondary} +{/if} + + + + +{if isset($account.1.outbound_proxy_primary)} + {$account.1.outbound_proxy_primary}:{$account.1.sip_port} +{else} + {$account.1.outbound_proxy_primary} +{/if} + + + + +{if isset($account.1.outbound_proxy_secondary)} + {$account.1.outbound_proxy_secondary}:{$account.1.sip_port} +{else} + {$account.1.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.1.user_id} + + + + {$account.1.auth_id} + + + + {$account.1.password} + + + + {$account.1.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.1.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5060 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + + +{$tp=0} +{if $account.1.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.1.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk,contact,incoming,outgoing + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + +{if isset($grandstream_account_ring_tone_1)} + {$grandstream_account_ring_tone_1} +{/if} + + + + ring1 + + + + + + 5 + + + + ring2 + + + + + + 2 + + + + ring3 + + + + + + 3 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20 + + + + + + + + + + +{if isset($account.2.password)} + 1 +{else} + 0 +{/if} + + + + {$account.2.display_name} + + + + {$account.2.server_address}:{$account.2.sip_port} + + + + +{if isset($account.2.server_address_secondary)} + {$account.2.server_address_secondary}:{$account.2.sip_port} +{else} + {$account.2.server_address_secondary} +{/if} + + + + +{if isset($account.2.outbound_proxy_primary)} + {$account.2.outbound_proxy_primary}:{$account.2.sip_port} +{else} + {$account.2.outbound_proxy_primary} +{/if} + + + + +{if isset($account.2.outbound_proxy_secondary)} + {$account.2.outbound_proxy_secondary}:{$account.2.sip_port} +{else} + {$account.2.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.2.user_id} + + + + {$account.2.auth_id} + + + + {$account.2.password} + + + + {$account.2.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.2.register_expires} + + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 6051 + + + + + 20 + + + + + + 100 + + + + + + 400 + + + + + 0 + + + + +{$tp=0} +{if $account.2.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.2.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.2.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.2.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_2)} + {$grandstream_account_ring_tone_2} +{/if} + + + + ring1 + + + + + + 0 + + + + ring2 + + + + + + 0 + + + + ring3 + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.3.password)} + 1 +{else} + 0 +{/if} + + + + {$account.3.display_name} + + + + {$account.3.server_address}:{$account.3.sip_port} + + + + +{if isset($account.3.server_address_secondary)} + {$account.3.server_address_secondary}:{$account.3.sip_port} +{else} + {$account.3.server_address_secondary} +{/if} + + + + +{if isset($account.3.outbound_proxy_primary)} + {$account.3.outbound_proxy_primary}:{$account.3.sip_port} +{else} + {$account.3.outbound_proxy_primary} +{/if} + + + + +{if isset($account.3.outbound_proxy_secondary)} + {$account.3.outbound_proxy_secondary}:{$account.3.sip_port} +{else} + {$account.3.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.3.user_id} + + + + {$account.3.auth_id} + + + + {$account.3.password} + + + + {$account.3.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.3.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5064 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + +{$tp=0} +{if $account.3.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.3.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.3.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.3.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + 2 + + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_3)} + {$grandstream_account_ring_tone_3} +{/if} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.4.password)} + 1 +{else} + 0 +{/if} + + + + {$account.4.display_name} + + + + {$account.4.server_address}:{$account.4.sip_port} + + + + +{if isset($account.4.server_address_secondary)} + {$account.4.server_address_secondary}:{$account.4.sip_port} +{else} + {$account.4.server_address_secondary} +{/if} + + + + +{if isset($account.4.outbound_proxy_primary)} + {$account.4.outbound_proxy_primary}:{$account.4.sip_port} +{else} + {$account.4.outbound_proxy_primary} +{/if} + + + + +{if isset($account.4.outbound_proxy_secondary)} + {$account.4.outbound_proxy_secondary}:{$account.4.sip_port} +{else} + {$account.4.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.4.user_id} + + + + {$account.4.auth_id} + + + + {$account.4.password} + + + + {$account.4.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.4.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5066 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + + 0 + + + + +{$tp=0} +{if $account.4.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.4.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.4.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.4.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + + 2 + + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_4)} + {$grandstream_account_ring_tone_4} +{/if} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + phone-{$mac|replace:'-':''} + + + + GrandstreamGRP2614 + + + + + + + + + + + + + + + + + + + + + + + 192 + + + 168 + + + 1 + + + 102 + + + + 255 + + + 255 + + + 0 + + + 0 + + + + 192 + + + 168 + + + 2 + + + 1 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 26 + + + + + 46 + + + + + 1 + + + + + 1 + + + + +{if isset($grandstream_lan_port_vlan) } + {$grandstream_lan_port_vlan} +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + +{if isset($grandstream_pc_port_vlan) } + {$grandstream_pc_port_vlan} +{else} + 0 +{/if} + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 30 + + + + + 1500 + + + + + 0 + + + + + + + + 1 + + + + + 1 + + + + + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + + + + +{if isset($grandstream_bluetooth_power)} + {$grandstream_bluetooth_power} +{/if} + + + + +{if isset($grandstream_bluetooth_handsfree)} + {$grandstream_bluetooth_handsfree} +{/if} + + + + + + + + + + + + 0 + + + + + + + + + 1194 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + + 3 + + + + + 161 + + + + + + + + 162 + + + + 5 + + + + 1 + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + {if isset($grandstream_wifi_enable) + {$grandstream_wifi_enable} + {/if} + + + + + {if isset($grandstream_wifi_ssid_1)} + {$grandstream_wifi_ssid_1} + {/if} + + + + + {if isset($grandstream_wifi_password_1)} + {$grandstream_wifi_password_1} + {/if} + + + + + {if isset($grandstream_wifi_security_1)} + {$grandstream_wifi_security_1} + {/if} + + + + + {if isset($grandstream_wifi_eap_method_1)} + {$grandstream_wifi_eap_method_1} + {/if} + + + + + {if isset($grandstream_wifi_eap_identity_1)} + {$grandstream_wifi_eap_identity_1} + {/if} + + + + + {if isset($grandstream_wifi_eap_password_1)} + {$grandstream_wifi_eap_password_1} + {/if} + + + + + {if isset($grandstream_wifi_ssid_10)} + {$grandstream_wifi_ssid_10} + {/if} + + + + + {if isset($grandstream_wifi_password_10)} + {$grandstream_wifi_password_10} + {/if} + + + + + {if isset($grandstream_wifi_security_10)} + {$grandstream_wifi_security_10} + {/if} + + + + + {if isset($grandstream_wifi_eap_method_10)} + {$grandstream_wifi_eap_method_10} + {/if} + + + + + {if isset($grandstream_wifi_eap_identity_10)} + {$grandstream_wifi_eap_identity_10} + {/if} + + + + + {if isset($grandstream_wifi_eap_password_10)} + {$grandstream_wifi_eap_password_10} + {/if} + + + + + + + + + {$user_password} + + + +{if isset($admin_password)} + {$admin_password} +{else} + {$mac|replace:'-':''} +{/if} + + + + + + + + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + + + 0 + + + + + 10080 + + + + + 1 + + + + 0 + + + + 0 + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 2 + + + +{if $grandstream_config_server_path=="none"} + +{elseif isset($grandstream_config_server_path)} + {$grandstream_config_server_path} +{else} + {$domain_name}{$project_path}/app/provision +{/if} + + + +{$http_auth_username} + + + +{$http_auth_password} + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 1 + + + +{if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/{$firmware_version} +{elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path} +{else} + {$domain_name}{$project_path}/app/provision/resources/firmware/ +{/if} + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + {$grandstream_syslog_server} + + + + +{if isset($grandstream_syslog_level)} + {$grandstream_syslog_level} +{else} + 0 +{/if} + + + + + + + + +{if isset($grandstream_send_sip_log)} + {$grandstream_send_sip_log} +{else} + 0 +{/if} + + + + + 0 + + + + + 1 + + + + + + + + + + + + + + + + Auto + + + + 0 + + + + + 0 + + + + + + + + https://acs.gdms.cloud + + + + + + + + + + + + + + + 0 + + + + 86400 + + + + {$mac|replace:'-':''} + + + + + + + + 7547 + + + + + + + + + + + + + 0 + + + + + + + + 2 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + + 80 + + + + + 443 + + + + 1 + + + + 5 + + + + 20 + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + {$grandstream_phonebook_download} + + + + {$http_auth_username} + + + + {$http_auth_password} + + + + + +{if isset($grandstream_phonebook_download)} + {$grandstream_phonebook_xml_server_path}{$mac}/ +{elseif isset($grandstream_phonebook_xml_server_path)} + {$grandstream_phonebook_xml_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_phonebook_download_interval)} + {$grandstream_phonebook_download_interval} +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + +{if isset($contact_groups) || isset($contact_users) || isset($contact_extensions)} + 2 +{else} + 0 +{/if} + + + + 0 + + + + + + + + 0 + + + + {$grandstream_ldap_server} + + + + 389 + + + + + + {$grandstream_ldap_base_dn} + + + + {$grandstream_ldap_username} + + + + {$grandstream_ldap_password} + + + + + {$grandstream_ldap_number_filter} + + + + + {$grandstream_ldap_name_filter} + + + + + 3 + + + + + {$grandstream_ldap_name_attr} + + + + + {$grandstream_ldap_number_attr} + + + + {$grandstream_ldap_display_name} + + + + + + 50 + + + + + + 30 + + + + + 0 + + + + 0 + + + 0 + + + + givenName sn title + + + + 0 + + + + + + + + 5004 + + + + + 200 + + + + + 1 + + + + + 20 + + + + + + + + + + + + +{if isset($public_mode) } +{if $public_mode|strtolower == 'true'} + 1 +{elseif $public_mode|strtolower == 'yes'} + 1 +{elseif $public_mode == '1'} + 1 +{else} + 0 +{/if} +{else} + 0 +{/if} + + + + + + 0 + + + + + + + + + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + 4320 + + + + 100 + + + + 100 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + + + + + + + 5222 + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + CallHistory,LocalPhonebook,RemotePhonebook,FeatureCode + + + + + 1 + + + + + + + + 0 + + + + + 30 + + + + + 0 + + + + + 5 + + + + + 0 + + + + + 10 + + + + + 20 + + + + + 0 + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "0"} 0{/if} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "0"} 0{/if} +{if $grandstream_call_waiting == "1"} 1{/if} +{if $grandstream_call_waiting == "2"} 0{/if} +{/if} + + + + +{if isset($grandstream_call_waiting_ring)} +{if $grandstream_call_waiting_ring == "0"} 0{/if} +{if $grandstream_call_waiting_ring == "1"} 1{/if} +{else} +1 +{/if} + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 2 + + + + + 0 + + + + + 0 + + + + + + + + +{if isset($grandstream_auto_attended_transfer)} + {$grandstream_auto_attended_transfer} +{else} + 1 +{/if} + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 1 + + + + + 1 + + + + + 10 + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + + + + + + + + 0 + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + 0 + + + + {$account.1.display_name} + + + + + + 224.0.1.117:5003 + + + + Page + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + +{if isset($ntp_server_primary)} + {$ntp_server_primary} +{else} + pool.ntp.org +{/if} + + + +{if isset($ntp_server_secondary)} + {$ntp_server_secondary} +{else} + 2.us.pool.ntp.org +{/if} + + + + + 1440 + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($grandstream_timezone) } + {$grandstream_timezone} +{elseif isset($grandstream_gxp_time_zone) } + {$grandstream_gxp_time_zone} +{else} + auto +{/if} + + + + + + 1 + + + + + MTZ+6MDT+5,M4.1.0,M11.1.0 + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + {$grandstream_lcd_brightness} + + + + + {$grandstream_lcd_brightness_idle} + + + + + {$grandstream_active_backlight_timeout} + + + + + 1 + + + + + + + + + +{if isset($grandstream_wallpaper_url)} + 1 + {$grandstream_wallpaper_url} +{else} + 0 + +{/if} + + + + #000000 + + + + +{if isset($grandstream_screensaver)} + {$grandstream_screensaver} +{else} + 2 +{/if} + + + + +{if isset($grandstream_screensaver_source)} + {$grandstream_screensaver_source} +{else} + 0 +{/if} + + + + + +{if isset($grandstream_screensaver_show_date_time)} + {$grandstream_screensaver_show_date_time} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_timeout)} + {$grandstream_screensaver_timeout} +{else} + 3 +{/if} + + + +{if isset($grandstream_screensaver_server_path)} + {$grandstream_screensaver_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_screensaver_xml_download_interval)} + {$grandstream_screensaver_xml_download_interval} +{else} + 0 +{/if} + + + + + + 0 + + + + 0 + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + f1=500,f2=540,c=20/20-80/400; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440,c=10/10; + + + + + f1=440,f2=480,c=200/400; + + + + + f1=440,f2=440,c=25/525; + + + + + 0 + + + + + f1=480,f2=620,c=50/50; + + + + + f1=480,f2=620,c=25/25; + + + + + 5 + + + + + 5 + + + + + 0 + + + + +{if isset($grandstream_default_ringtone)} + {$grandstream_default_ringtone} +{/if} + + + + + + + + + + + 1 + + + + + + + + + + + XMLApp + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + 1 + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{$fixed_keys=6} + + +{$start_id=1363} +{assign var=key_types value=["none"=>-1,"line"=>31,"shared line"=>32,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} + +{for $line=1 to 6} +{$pid=$line*2-2} +{if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} +{if $line <= $fixed_keys} +{$key_types[$keys.line.$line.device_key_type]} +{else} +{$key_types[$keys.line.$line.device_key_type]} +{/if} +{$keys.line.$line.device_key_line} +{$keys.line.$line.device_key_label} +{$keys.line.$line.device_key_value} +{else} +{if $line <= $fixed_keys} +0 +{$line-1} + + +{else} +-1 +{/if} +{/if} + +{/for} + + +{$start_id=23800} +{for $line=7 to 40} +{$pid=($line-6)*4-4} +{if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} +{if $line <= $fixed_keys} +{$key_types[$keys.line.$line.device_key_type]} +{else} +{$key_types[$keys.line.$line.device_key_type]} +{/if} +{$keys.line.$line.device_key_line} +{$keys.line.$line.device_key_label} +{$keys.line.$line.device_key_value} +{else} +{if $line <= $fixed_keys} +-1 +0 + + +{else} +-1 +{/if} +{/if} + +{/for} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"conference"=>12,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} +{$start_id=323} +{for $mem=1 to 7} +{$pid=$mem*3-3} +{if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.memory.$mem.device_key_type|in_array:$key_types} + + + + + + + +{$key_types[$keys.memory.$mem.device_key_type]} + + +{$keys.memory.$mem.device_key_line} + + +{$keys.memory.$mem.device_key_label} + + +{$keys.memory.$mem.device_key_value} +{else} +-1 +0 + + +{/if} + +{/for} + +{$start_id=353} +{for $mem=8 to 18} +{$pid=($mem-7)*4-4} +{if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.line.$line.device_key_type|in_array:$key_types} +{$key_types[$keys.memory.$mem.device_key_type]} +{$keys.memory.$mem.device_key_line} +{$keys.memory.$mem.device_key_label} +{$keys.memory.$mem.device_key_value} +{else} +-1 +0 + + +{/if} + +{/for} + + +{$start_id=1440} +{for $mem=19 to 24} +{$pid=($mem-18)*4-4} +{if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.line.$line.device_key_type|in_array:$key_types} +{$key_types[$keys.memory.$mem.device_key_type]} +{$keys.memory.$mem.device_key_line} +{$keys.memory.$mem.device_key_label} +{$keys.memory.$mem.device_key_value} +{else} +-1 +0 + + +{/if} + +{/for} + + + + + + + + + 0 + + + + + + 1 + + + + + + 0 + + + + + 0 + + + + + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,Redial,Dial,Backspace,PickUp,Target + + + + BTPhonebook,DirectIP,Onhook,Cancel,Dial,Backspace,Target + + + + Answer,Reject,Forward,ReConf + + + + BTOnOff,EndCall,ReConf,ConfRoom,ConfCall + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,ConfCall,Cancel,NewCall,Swap,Transfer,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,UCallPark,PrivateHold,CallPark + + + + BTOnOff,EndCall,Kick,NewCall,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,ConfRoom,Add + + + + ReConf,Resume,HoldTrnf,ConfCall,Add + + + + EndCall,ReConf,ConfRoom + + + + BTOnOff,Cancel,BlindTrnf,AttTrnf,Backspace,Target + + + + BTOnOff,Cancel,Dial,Backspace,Target + + + + + + + + + + + +{assign var=key_types value=["speed dial"=>10, "speed dial active"=>14,"voicemail"=>16,"call return"=>17,"intercom"=>20,"ldap search"=>21,"menu"=>27]} +{$start_id=2987} +{for $prog=1 to 3} +{$pid=$prog*4-4} +{if isset($keys.programmable.$prog.device_key_category) && isset($keys.programmable.$prog.device_key_type) && $keys.programmable.$prog.device_key_type|in_array:$key_types} +{$key_types[$keys.programmable.$prog.device_key_type]} +{$keys.programmable.$prog.device_key_line} +{$keys.programmable.$prog.device_key_label} +{$keys.programmable.$prog.device_key_value} +{else} +0 +0 + + +{/if} + +{/for} + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + +{if isset($grandstream_ext_1page)} + {$grandstream_ext_1page} +{else} + 1 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} +{$start_id=23000} +{for $exp=1 to 160} +{$pid=$exp*5-5} +{if isset($keys.expansion.$exp.device_key_category) && isset($keys.expansion.$exp.device_key_type) && $keys.expansion.$exp.device_key_type|in_array:$key_types} +{$key_types[$keys.expansion.$exp.device_key_type]} +{$keys.expansion.$exp.device_key_line} +{$keys.expansion.$exp.device_key_label} +{$keys.expansion.$exp.device_key_value} +{else} +-1 +0 + + +{/if} + +{/for} +{ + + + diff --git a/resources/templates/provision/grandstream/grp2615/phonebook.xml b/resources/templates/provision/grandstream/grp2615/phonebook.xml new file mode 100644 index 0000000000..62c745db9f --- /dev/null +++ b/resources/templates/provision/grandstream/grp2615/phonebook.xml @@ -0,0 +1,49 @@ + + +1 +{foreach $contacts as $contact} +{if $contact.contact_type == "group"} + +{$contact.id} +{$contact.group_description|truncate:10} + +{/if} +{/foreach} +{$i=0} +{foreach $contacts as $contact} +{if $contact.contact_name_given != "" && $contact.contact_type == "contact"} + +{$contact.contact_name_given} +{$contact.contact_name_family} +{if $contact.contact_role != "" } +{$contact.contact_role} +{/if} +{if $contact.contact_category != "" } +{$contact.contact_category} +{/if} + +{$contact.contact_work} +1 + +{if $contact.contact_home != "" } + +{$contact.contact_home} +1 + +{/if} +{if $contact.contact_cell != "" } + +{$contact.contact_cell} +1 + +{/if} +{if $contact.contact_organization != "" } +{$contact.contact_organization} +{/if} +{foreach $contact.groups as $group} +{$group} +{/foreach} + +{/if} +{/foreach} + diff --git a/resources/templates/provision/grandstream/grp2615/{$mac}.xml b/resources/templates/provision/grandstream/grp2615/{$mac}.xml new file mode 100644 index 0000000000..f9d8401fab --- /dev/null +++ b/resources/templates/provision/grandstream/grp2615/{$mac}.xml @@ -0,0 +1,7814 @@ + + + +{$mac|replace:'-':''} + + + + + + + + + + + + + + + + + + 1 + + + + {$account.1.display_name} + + + + {$account.1.server_address}:{$account.1.sip_port} + + + + +{if isset($account.1.server_address_secondary)} + {$account.1.server_address_secondary}:{$account.1.sip_port} +{else} + {$account.1.server_address_secondary} +{/if} + + + + +{if isset($account.1.outbound_proxy_primary)} + {$account.1.outbound_proxy_primary}:{$account.1.sip_port} +{else} + {$account.1.outbound_proxy_primary} +{/if} + + + + +{if isset($account.1.outbound_proxy_secondary)} + {$account.1.outbound_proxy_secondary}:{$account.1.sip_port} +{else} + {$account.1.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.1.user_id} + + + + {$account.1.auth_id} + + + + {$account.1.password} + + + + {$account.1.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.1.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5060 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + + +{$tp=0} +{if $account.1.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.1.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk,contact,incoming,outgoing + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + +{if isset($grandstream_account_ring_tone_1)} + {$grandstream_account_ring_tone_1} +{/if} + + + + ring1 + + + + + + 5 + + + + ring2 + + + + + + 2 + + + + ring3 + + + + + + 3 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20 + + + + + + + + + + +{if isset($account.2.password)} + 1 +{else} + 0 +{/if} + + + + {$account.2.display_name} + + + + {$account.2.server_address}:{$account.2.sip_port} + + + + +{if isset($account.2.server_address_secondary)} + {$account.2.server_address_secondary}:{$account.2.sip_port} +{else} + {$account.2.server_address_secondary} +{/if} + + + + +{if isset($account.2.outbound_proxy_primary)} + {$account.2.outbound_proxy_primary}:{$account.2.sip_port} +{else} + {$account.2.outbound_proxy_primary} +{/if} + + + + +{if isset($account.2.outbound_proxy_secondary)} + {$account.2.outbound_proxy_secondary}:{$account.2.sip_port} +{else} + {$account.2.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.2.user_id} + + + + {$account.2.auth_id} + + + + {$account.2.password} + + + + {$account.2.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.2.register_expires} + + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 6051 + + + + + 20 + + + + + + 100 + + + + + + 400 + + + + + 0 + + + + +{$tp=0} +{if $account.2.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.2.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.2.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.2.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_2)} + {$grandstream_account_ring_tone_2} +{/if} + + + + ring1 + + + + + + 0 + + + + ring2 + + + + + + 0 + + + + ring3 + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.3.password)} + 1 +{else} + 0 +{/if} + + + + {$account.3.display_name} + + + + {$account.3.server_address}:{$account.3.sip_port} + + + + +{if isset($account.3.server_address_secondary)} + {$account.3.server_address_secondary}:{$account.3.sip_port} +{else} + {$account.3.server_address_secondary} +{/if} + + + + +{if isset($account.3.outbound_proxy_primary)} + {$account.3.outbound_proxy_primary}:{$account.3.sip_port} +{else} + {$account.3.outbound_proxy_primary} +{/if} + + + + +{if isset($account.3.outbound_proxy_secondary)} + {$account.3.outbound_proxy_secondary}:{$account.3.sip_port} +{else} + {$account.3.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.3.user_id} + + + + {$account.3.auth_id} + + + + {$account.3.password} + + + + {$account.3.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.3.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5064 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + +{$tp=0} +{if $account.3.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.3.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.3.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.3.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + 2 + + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_3)} + {$grandstream_account_ring_tone_3} +{/if} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.4.password)} + 1 +{else} + 0 +{/if} + + + + {$account.4.display_name} + + + + {$account.4.server_address}:{$account.4.sip_port} + + + + +{if isset($account.4.server_address_secondary)} + {$account.4.server_address_secondary}:{$account.4.sip_port} +{else} + {$account.4.server_address_secondary} +{/if} + + + + +{if isset($account.4.outbound_proxy_primary)} + {$account.4.outbound_proxy_primary}:{$account.4.sip_port} +{else} + {$account.4.outbound_proxy_primary} +{/if} + + + + +{if isset($account.4.outbound_proxy_secondary)} + {$account.4.outbound_proxy_secondary}:{$account.4.sip_port} +{else} + {$account.4.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.4.user_id} + + + + {$account.4.auth_id} + + + + {$account.4.password} + + + + {$account.4.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.4.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5066 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + + 0 + + + + +{$tp=0} +{if $account.4.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.4.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.4.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.4.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + + 2 + + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_4)} + {$grandstream_account_ring_tone_4} +{/if} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.5.password)} + 1 +{else} + 0 +{/if} + + + + {$account.5.display_name} + + + + {$account.5.server_address}:{$account.5.sip_port} + + + + +{if isset($account.5.server_address_secondary)} + {$account.5.server_address_secondary}:{$account.5.sip_port} +{else} + {$account.5.server_address_secondary} +{/if} + + + + +{if isset($account.5.outbound_proxy_primary)} + {$account.5.outbound_proxy_primary}:{$account.5.sip_port} +{else} + {$account.5.outbound_proxy_primary} +{/if} + + + + +{if isset($account.5.outbound_proxy_secondary)} + {$account.5.outbound_proxy_secondary}:{$account.5.sip_port} +{else} + {$account.5.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.5.user_id} + + + + {$account.5.auth_id} + + + + {$account.5.password} + + + + {$account.5.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.5.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5068 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + +{$tp=0} +{if $account.5.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.5.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.5.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.5.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + 2 + + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_5)} + {$grandstream_account_ring_tone_5} +{/if} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + phone-{$mac|replace:'-':''} + + + + GrandstreamGRP2615 + + + + + + + + + + + + + + + + + + + + + + 192 + + + 168 + + + 1 + + + 102 + + + + 255 + + + 255 + + + 0 + + + 0 + + + + 192 + + + 168 + + + 2 + + + 1 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 26 + + + + + 46 + + + + + 1 + + + + + 1 + + + + +{if isset($grandstream_lan_port_vlan) } + {$grandstream_lan_port_vlan} +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + +{if isset($grandstream_pc_port_vlan) } + {$grandstream_pc_port_vlan} +{else} + 0 +{/if} + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 30 + + + + + 1500 + + + + + 0 + + + + + + + + 1 + + + + + 1 + + + + + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + + + + +{if isset($grandstream_bluetooth_power)} + {$grandstream_bluetooth_power} +{/if} + + + + +{if isset($grandstream_bluetooth_handsfree)} + {$grandstream_bluetooth_handsfree} +{/if} + + + + + + + + + + + + 0 + + + + + + + + + 1194 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + + 3 + + + + + 161 + + + + + + + + 162 + + + + 5 + + + + 1 + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + {if isset($grandstream_wifi_enable) + {$grandstream_wifi_enable} + {/if} + + + + + {if isset($grandstream_wifi_ssid_1)} + {$grandstream_wifi_ssid_1} + {/if} + + + + + {if isset($grandstream_wifi_password_1)} + {$grandstream_wifi_password_1} + {/if} + + + + + {if isset($grandstream_wifi_security_1)} + {$grandstream_wifi_security_1} + {/if} + + + + + {if isset($grandstream_wifi_eap_method_1)} + {$grandstream_wifi_eap_method_1} + {/if} + + + + + {if isset($grandstream_wifi_eap_identity_1)} + {$grandstream_wifi_eap_identity_1} + {/if} + + + + + {if isset($grandstream_wifi_eap_password_1)} + {$grandstream_wifi_eap_password_1} + {/if} + + + + + {if isset($grandstream_wifi_ssid_10)} + {$grandstream_wifi_ssid_10} + {/if} + + + + + {if isset($grandstream_wifi_password_10)} + {$grandstream_wifi_password_10} + {/if} + + + + + {if isset($grandstream_wifi_security_10)} + {$grandstream_wifi_security_10} + {/if} + + + + + {if isset($grandstream_wifi_eap_method_10)} + {$grandstream_wifi_eap_method_10} + {/if} + + + + + {if isset($grandstream_wifi_eap_identity_10)} + {$grandstream_wifi_eap_identity_10} + {/if} + + + + + {if isset($grandstream_wifi_eap_password_10)} + {$grandstream_wifi_eap_password_10} + {/if} + + + + + + + + {$user_password} + + + +{if isset($admin_password)} + {$admin_password} +{else} + {$mac|replace:'-':''} +{/if} + + + + + + + + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + + + 0 + + + + + 10080 + + + + + 1 + + + + 0 + + + + 0 + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 2 + + + +{if $grandstream_config_server_path=="none"} + +{elseif isset($grandstream_config_server_path)} + {$grandstream_config_server_path} +{else} + {$domain_name}{$project_path}/app/provision +{/if} + + + +{$http_auth_username} + + + +{$http_auth_password} + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 1 + + + +{if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/{$firmware_version} +{elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path} +{else} + {$domain_name}{$project_path}/app/provision/resources/firmware/ +{/if} + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + {$grandstream_syslog_server} + + + + +{if isset($grandstream_syslog_level)} + {$grandstream_syslog_level} +{else} + 0 +{/if} + + + + + + + + +{if isset($grandstream_send_sip_log)} + {$grandstream_send_sip_log} +{else} + 0 +{/if} + + + + + 0 + + + + + 1 + + + + + + + + + + + + + + + + Auto + + + + 0 + + + + + 0 + + + + + + + + https://acs.gdms.cloud + + + + + + + + + + + + + + + 0 + + + + 86400 + + + + {$mac|replace:'-':''} + + + + + + + + 7547 + + + + + + + + + + + + + 0 + + + + + + + + 2 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + + 80 + + + + + 443 + + + + 1 + + + + 5 + + + + 20 + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + {$grandstream_phonebook_download} + + + + {$http_auth_username} + + + + {$http_auth_password} + + + + + +{if isset($grandstream_phonebook_download)} + {$grandstream_phonebook_xml_server_path}{$mac}/ +{elseif isset($grandstream_phonebook_xml_server_path)} + {$grandstream_phonebook_xml_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_phonebook_download_interval)} + {$grandstream_phonebook_download_interval} +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + {$grandstream_ldap_server} + + + + 389 + + + + + + {$grandstream_ldap_base_dn} + + + + {$grandstream_ldap_username} + + + + {$grandstream_ldap_password} + + + + + {$grandstream_ldap_number_filter} + + + + + {$grandstream_ldap_name_filter} + + + + + 3 + + + + + {$grandstream_ldap_name_attr} + + + + + {$grandstream_ldap_number_attr} + + + + {$grandstream_ldap_display_name} + + + + + + 50 + + + + + + 30 + + + + + 0 + + + + 0 + + + 0 + + + + givenName sn title + + + + 0 + + + + + + + + 5004 + + + + + 200 + + + + + 1 + + + + + 20 + + + + + + + + + + + + +{if isset($public_mode) } +{if $public_mode|strtolower == 'true'} + 1 +{elseif $public_mode|strtolower == 'yes'} + 1 +{elseif $public_mode == '1'} + 1 +{else} + 0 +{/if} +{else} + 0 +{/if} + + + + + + 0 + + + + + + + + + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + 4320 + + + + 100 + + + + 100 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + + + + + + + 5222 + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + CallHistory,LocalPhonebook,RemotePhonebook,FeatureCode + + + + + 1 + + + + + + + + 0 + + + + + 30 + + + + + 0 + + + + + 5 + + + + + 0 + + + + + 10 + + + + + 20 + + + + + 0 + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "0"} 0{/if} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "0"} 0{/if} +{if $grandstream_call_waiting == "1"} 1{/if} +{if $grandstream_call_waiting == "2"} 0{/if} +{/if} + + + + +{if isset($grandstream_call_waiting_ring)} +{if $grandstream_call_waiting_ring == "0"} 0{/if} +{if $grandstream_call_waiting_ring == "1"} 1{/if} +{else} +1 +{/if} + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 2 + + + + + 0 + + + + + 0 + + + + + + + + +{if isset($grandstream_auto_attended_transfer)} + {$grandstream_auto_attended_transfer} +{else} + 1 +{/if} + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 1 + + + + + 1 + + + + + 10 + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + + + + + + + + 0 + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + 0 + + + + {$account.1.display_name} + + + + + + 224.0.1.117:5003 + + + + Page + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + +{if isset($ntp_server_primary)} + {$ntp_server_primary} +{else} + pool.ntp.org +{/if} + + + +{if isset($ntp_server_secondary)} + {$ntp_server_secondary} +{else} + 2.us.pool.ntp.org +{/if} + + + + + 1440 + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($grandstream_timezone) } + {$grandstream_timezone} +{elseif isset($grandstream_gxp_time_zone) } + {$grandstream_gxp_time_zone} +{else} + auto +{/if} + + + + + + 1 + + + + + MTZ+6MDT+5,M4.1.0,M11.1.0 + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + {$grandstream_lcd_brightness} + + + + + {$grandstream_lcd_brightness_idle} + + + + + {$grandstream_active_backlight_timeout} + + + + + 1 + + + + + + + + + +{if isset($grandstream_wallpaper_url)} + 1 + {$grandstream_wallpaper_url} +{else} + 0 + +{/if} + + + + #000000 + + + + +{if isset($grandstream_screensaver)} + {$grandstream_screensaver} +{else} + 2 +{/if} + + + + +{if isset($grandstream_screensaver_source)} + {$grandstream_screensaver_source} +{else} + 0 +{/if} + + + + + +{if isset($grandstream_screensaver_show_date_time)} + {$grandstream_screensaver_show_date_time} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_timeout)} + {$grandstream_screensaver_timeout} +{else} + 3 +{/if} + + + +{if isset($grandstream_screensaver_server_path)} + {$grandstream_screensaver_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_screensaver_xml_download_interval)} + {$grandstream_screensaver_xml_download_interval} +{else} + 0 +{/if} + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + f1=500,f2=540,c=20/20-80/400; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440,c=10/10; + + + + + f1=440,f2=480,c=200/400; + + + + + f1=440,f2=440,c=25/525; + + + + + 0 + + + + + f1=480,f2=620,c=50/50; + + + + + f1=480,f2=620,c=25/25; + + + + + 5 + + + + + 5 + + + + + 0 + + + + +{if isset($grandstream_default_ringtone)} + {$grandstream_default_ringtone} +{/if} + + + + + + + + + + + 1 + + + + + + + + + + + XMLApp + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + 1 + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{$fixed_keys=10} + + +{$start_id=1363} +{assign var=key_types value=["none"=>-1,"line"=>31,"shared line"=>32,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} + +{for $line=1 to 6} +{$pid=$line*2-2} +{if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} +{if $line <= $fixed_keys} +{$key_types[$keys.line.$line.device_key_type]} +{else} +{$key_types[$keys.line.$line.device_key_type]} +{/if} +{$keys.line.$line.device_key_line} +{$keys.line.$line.device_key_label} +{$keys.line.$line.device_key_value} +{else} +{if $line <= $fixed_keys} +0 +{$line-1} + + +{else} +-1 +{/if} +{/if} + +{/for} + + +{$start_id=23800} +{for $line=7 to 40} +{$pid=($line-6)*4-4} +{if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} +{if $line <= $fixed_keys} +{$key_types[$keys.line.$line.device_key_type]} +{else} +{$key_types[$keys.line.$line.device_key_type]} +{/if} +{$keys.line.$line.device_key_line} +{$keys.line.$line.device_key_label} +{$keys.line.$line.device_key_value} +{else} +{if $line <= $fixed_keys} +-1 +0 + + +{else} +-1 +{/if} +{/if} + +{/for} + + + + + + + + + 0 + + + + + + 1 + + + + + + 0 + + + + + 0 + + + + + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,Redial,Dial,Backspace,PickUp,Target + + + + BTPhonebook,DirectIP,Onhook,Cancel,Dial,Backspace,Target + + + + Answer,Reject,Forward,ReConf + + + + BTOnOff,EndCall,ReConf,ConfRoom,ConfCall + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,ConfCall,Cancel,NewCall,Swap,Transfer,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,UCallPark,PrivateHold,CallPark + + + + BTOnOff,EndCall,Kick,NewCall,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,ConfRoom,Add + + + + ReConf,Resume,HoldTrnf,ConfCall,Add + + + + EndCall,ReConf,ConfRoom + + + + BTOnOff,Cancel,BlindTrnf,AttTrnf,Backspace,Target + + + + BTOnOff,Cancel,Dial,Backspace,Target + + + + + + + + + + + +{assign var=key_types value=["speed dial"=>10, "speed dial active"=>14,"voicemail"=>16,"call return"=>17,"intercom"=>20,"ldap search"=>21,"menu"=>27]} +{$start_id=2987} +{for $prog=1 to 3} +{$pid=$prog*4-4} +{if isset($keys.programmable.$prog.device_key_category) && isset($keys.programmable.$prog.device_key_type) && $keys.programmable.$prog.device_key_type|in_array:$key_types} +{$key_types[$keys.programmable.$prog.device_key_type]} +{$keys.programmable.$prog.device_key_line} +{$keys.programmable.$prog.device_key_label} +{$keys.programmable.$prog.device_key_value} +{else} +0 +0 + + +{/if} + +{/for} + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + +{if isset($grandstream_ext_1page)} + {$grandstream_ext_1page} +{else} + 1 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + +{assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} +{$start_id=23000} +{for $exp=1 to 160} +{$pid=$exp*5-5} +{if isset($keys.expansion.$exp.device_key_category) && isset($keys.expansion.$exp.device_key_type) && $keys.expansion.$exp.device_key_type|in_array:$key_types} +{$key_types[$keys.expansion.$exp.device_key_type]} +{$keys.expansion.$exp.device_key_line} +{$keys.expansion.$exp.device_key_label} +{$keys.expansion.$exp.device_key_value} +{else} +-1 +0 + + +{/if} + +{/for} + + + diff --git a/resources/templates/provision/grandstream/grp2616/phonebook.xml b/resources/templates/provision/grandstream/grp2616/phonebook.xml new file mode 100644 index 0000000000..62c745db9f --- /dev/null +++ b/resources/templates/provision/grandstream/grp2616/phonebook.xml @@ -0,0 +1,49 @@ + + +1 +{foreach $contacts as $contact} +{if $contact.contact_type == "group"} + +{$contact.id} +{$contact.group_description|truncate:10} + +{/if} +{/foreach} +{$i=0} +{foreach $contacts as $contact} +{if $contact.contact_name_given != "" && $contact.contact_type == "contact"} + +{$contact.contact_name_given} +{$contact.contact_name_family} +{if $contact.contact_role != "" } +{$contact.contact_role} +{/if} +{if $contact.contact_category != "" } +{$contact.contact_category} +{/if} + +{$contact.contact_work} +1 + +{if $contact.contact_home != "" } + +{$contact.contact_home} +1 + +{/if} +{if $contact.contact_cell != "" } + +{$contact.contact_cell} +1 + +{/if} +{if $contact.contact_organization != "" } +{$contact.contact_organization} +{/if} +{foreach $contact.groups as $group} +{$group} +{/foreach} + +{/if} +{/foreach} + diff --git a/resources/templates/provision/grandstream/grp2616/{$mac}.xml b/resources/templates/provision/grandstream/grp2616/{$mac}.xml new file mode 100644 index 0000000000..10cfa77ee5 --- /dev/null +++ b/resources/templates/provision/grandstream/grp2616/{$mac}.xml @@ -0,0 +1,8889 @@ + + + +{$mac|replace:'-':''} + + + + + + + + + + + + + + + + + + 1 + + + + {$account.1.display_name} + + + + {$account.1.server_address}:{$account.1.sip_port} + + + + +{if isset($account.1.server_address_secondary)} + {$account.1.server_address_secondary}:{$account.1.sip_port} +{else} + {$account.1.server_address_secondary} +{/if} + + + + +{if isset($account.1.outbound_proxy_primary)} + {$account.1.outbound_proxy_primary}:{$account.1.sip_port} +{else} + {$account.1.outbound_proxy_primary} +{/if} + + + + +{if isset($account.1.outbound_proxy_secondary)} + {$account.1.outbound_proxy_secondary}:{$account.1.sip_port} +{else} + {$account.1.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.1.user_id} + + + + {$account.1.auth_id} + + + + {$account.1.password} + + + + {$account.1.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.1.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5060 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + + +{$tp=0} +{if $account.1.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.1.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk,contact,incoming,outgoing + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + +{if isset($grandstream_account_ring_tone_1)} + {$grandstream_account_ring_tone_1} +{/if} + + + + ring1 + + + + + + 5 + + + + ring2 + + + + + + 2 + + + + ring3 + + + + + + 3 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20 + + + + + + + + + + +{if isset($account.2.password)} + 1 +{else} + 0 +{/if} + + + + {$account.2.display_name} + + + + {$account.2.server_address}:{$account.2.sip_port} + + + + +{if isset($account.2.server_address_secondary)} + {$account.2.server_address_secondary}:{$account.2.sip_port} +{else} + {$account.2.server_address_secondary} +{/if} + + + + +{if isset($account.2.outbound_proxy_primary)} + {$account.2.outbound_proxy_primary}:{$account.2.sip_port} +{else} + {$account.2.outbound_proxy_primary} +{/if} + + + + +{if isset($account.2.outbound_proxy_secondary)} + {$account.2.outbound_proxy_secondary}:{$account.2.sip_port} +{else} + {$account.2.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.2.user_id} + + + + {$account.2.auth_id} + + + + {$account.2.password} + + + + {$account.2.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.2.register_expires} + + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 6051 + + + + + 20 + + + + + + 100 + + + + + + 400 + + + + + 0 + + + + +{$tp=0} +{if $account.2.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.2.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.2.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.2.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_2)} + {$grandstream_account_ring_tone_2} +{/if} + + + + ring1 + + + + + + 0 + + + + ring2 + + + + + + 0 + + + + ring3 + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.3.password)} + 1 +{else} + 0 +{/if} + + + + {$account.3.display_name} + + + + {$account.3.server_address}:{$account.3.sip_port} + + + + +{if isset($account.3.server_address_secondary)} + {$account.3.server_address_secondary}:{$account.3.sip_port} +{else} + {$account.3.server_address_secondary} +{/if} + + + + +{if isset($account.3.outbound_proxy_primary)} + {$account.3.outbound_proxy_primary}:{$account.3.sip_port} +{else} + {$account.3.outbound_proxy_primary} +{/if} + + + + +{if isset($account.3.outbound_proxy_secondary)} + {$account.3.outbound_proxy_secondary}:{$account.3.sip_port} +{else} + {$account.3.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.3.user_id} + + + + {$account.3.auth_id} + + + + {$account.3.password} + + + + {$account.3.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.3.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5064 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + +{$tp=0} +{if $account.3.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.3.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.3.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.3.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + 2 + + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_3)} + {$grandstream_account_ring_tone_3} +{/if} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.4.password)} + 1 +{else} + 0 +{/if} + + + + {$account.4.display_name} + + + + {$account.4.server_address}:{$account.4.sip_port} + + + + +{if isset($account.4.server_address_secondary)} + {$account.4.server_address_secondary}:{$account.4.sip_port} +{else} + {$account.4.server_address_secondary} +{/if} + + + + +{if isset($account.4.outbound_proxy_primary)} + {$account.4.outbound_proxy_primary}:{$account.4.sip_port} +{else} + {$account.4.outbound_proxy_primary} +{/if} + + + + +{if isset($account.4.outbound_proxy_secondary)} + {$account.4.outbound_proxy_secondary}:{$account.4.sip_port} +{else} + {$account.4.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.4.user_id} + + + + {$account.4.auth_id} + + + + {$account.4.password} + + + + {$account.4.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.4.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5066 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + + 0 + + + + +{$tp=0} +{if $account.4.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.4.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.4.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.4.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + + 2 + + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_4)} + {$grandstream_account_ring_tone_4} +{/if} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.5.password)} + 1 +{else} + 0 +{/if} + + + + {$account.5.display_name} + + + + {$account.5.server_address}:{$account.5.sip_port} + + + + +{if isset($account.5.server_address_secondary)} + {$account.5.server_address_secondary}:{$account.5.sip_port} +{else} + {$account.5.server_address_secondary} +{/if} + + + + +{if isset($account.5.outbound_proxy_primary)} + {$account.5.outbound_proxy_primary}:{$account.5.sip_port} +{else} + {$account.5.outbound_proxy_primary} +{/if} + + + + +{if isset($account.5.outbound_proxy_secondary)} + {$account.5.outbound_proxy_secondary}:{$account.5.sip_port} +{else} + {$account.5.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.5.user_id} + + + + {$account.5.auth_id} + + + + {$account.5.password} + + + + {$account.5.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.5.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5068 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + +{$tp=0} +{if $account.5.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.5.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.5.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.5.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + 2 + + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_5)} + {$grandstream_account_ring_tone_5} +{/if} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.6.password)} + 1 +{else} + 0 +{/if} + + + + {$account.6.display_name} + + + + {$account.6.server_address}:{$account.6.sip_port} + + + + +{if isset($account.6.server_address_secondary)} + {$account.6.server_address_secondary}:{$account.6.sip_port} +{else} + {$account.6.server_address_secondary} +{/if} + + + + +{if isset($account.6.outbound_proxy_primary)} + {$account.6.outbound_proxy_primary}:{$account.6.sip_port} +{else} + {$account.6.outbound_proxy_primary} +{/if} + + + + +{if isset($account.6.outbound_proxy_secondary)} + {$account.5.outbound_proxy_secondary}:{$account.6.sip_port} +{else} + {$account.6.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.6.user_id} + + + + {$account.6.auth_id} + + + + {$account.6.password} + + + + {$account.6.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 2 +{/if} + + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.6.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5070 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + +{$tp=0} +{if $account.6.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.6.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.6.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.6.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + 2 + + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_6)} + {$grandstream_account_ring_tone_6} +{/if} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + phone-{$mac|replace:'-':''} + + + + GrandstreamGRP2616 + + + + + + + + + + + + + + + + + + + + + + + 192 + + + 168 + + + 1 + + + 102 + + + + 255 + + + 255 + + + 0 + + + 0 + + + + 192 + + + 168 + + + 2 + + + 1 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 26 + + + + + 46 + + + + + 1 + + + + + 1 + + + + +{if isset($grandstream_lan_port_vlan) } + {$grandstream_lan_port_vlan} +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + +{if isset($grandstream_pc_port_vlan) } + {$grandstream_pc_port_vlan} +{else} + 0 +{/if} + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 30 + + + + + 1500 + + + + + 0 + + + + + + + + 1 + + + + + 1 + + + + + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + + + + +{if isset($grandstream_bluetooth_power)} + {$grandstream_bluetooth_power} +{/if} + + + + +{if isset($grandstream_bluetooth_handsfree)} + {$grandstream_bluetooth_handsfree} +{/if} + + + + + + + + + + + + 0 + + + + + + + + + 1194 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + + 3 + + + + + 161 + + + + + + + + 162 + + + + 5 + + + + 1 + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + {if isset($grandstream_wifi_enable) + {$grandstream_wifi_enable} + {/if} + + + + + {if isset($grandstream_wifi_ssid_1)} + {$grandstream_wifi_ssid_1} + {/if} + + + + + {if isset($grandstream_wifi_password_1)} + {$grandstream_wifi_password_1} + {/if} + + + + + {if isset($grandstream_wifi_security_1)} + {$grandstream_wifi_security_1} + {/if} + + + + + {if isset($grandstream_wifi_eap_method_1)} + {$grandstream_wifi_eap_method_1} + {/if} + + + + + {if isset($grandstream_wifi_eap_identity_1)} + {$grandstream_wifi_eap_identity_1} + {/if} + + + + + {if isset($grandstream_wifi_eap_password_1)} + {$grandstream_wifi_eap_password_1} + {/if} + + + + + {if isset($grandstream_wifi_ssid_10)} + {$grandstream_wifi_ssid_10} + {/if} + + + + + {if isset($grandstream_wifi_password_10)} + {$grandstream_wifi_password_10} + {/if} + + + + + {if isset($grandstream_wifi_security_10)} + {$grandstream_wifi_security_10} + {/if} + + + + + {if isset($grandstream_wifi_eap_method_10)} + {$grandstream_wifi_eap_method_10} + {/if} + + + + + {if isset($grandstream_wifi_eap_identity_10)} + {$grandstream_wifi_eap_identity_10} + {/if} + + + + + {if isset($grandstream_wifi_eap_password_10)} + {$grandstream_wifi_eap_password_10} + {/if} + + + + + + + + + {$user_password} + + + +{if isset($admin_password)} + {$admin_password} +{else} + {$mac|replace:'-':''} +{/if} + + + + + + + + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + + + 0 + + + + + 10080 + + + + + 1 + + + + 0 + + + + 0 + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 2 + + + +{if $grandstream_config_server_path=="none"} + +{elseif isset($grandstream_config_server_path)} + {$grandstream_config_server_path} +{else} + {$domain_name}{$project_path}/app/provision +{/if} + + + +{$http_auth_username} + + + +{$http_auth_password} + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 1 + + + +{if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/{$firmware_version} +{elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path} +{else} + {$domain_name}{$project_path}/app/provision/resources/firmware/ +{/if} + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + {$grandstream_syslog_server} + + + + +{if isset($grandstream_syslog_level)} + {$grandstream_syslog_level} +{else} + 0 +{/if} + + + + + + + + +{if isset($grandstream_send_sip_log)} + {$grandstream_send_sip_log} +{else} + 0 +{/if} + + + + + 0 + + + + + 1 + + + + + + + + + + + + + + + + Auto + + + + 0 + + + + + 0 + + + + + + + + https://acs.gdms.cloud + + + + + + + + + + + + + + + 0 + + + + 86400 + + + + {$mac|replace:'-':''} + + + + + + + + 7547 + + + + + + + + + + + + + 0 + + + + + + + + 2 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + + 80 + + + + + 443 + + + + 1 + + + + 5 + + + + 20 + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + {$grandstream_phonebook_download} + + + + {$http_auth_username} + + + + {$http_auth_password} + + + + + +{if isset($grandstream_phonebook_download)} + {$grandstream_phonebook_xml_server_path}{$mac}/ +{elseif isset($grandstream_phonebook_xml_server_path)} + {$grandstream_phonebook_xml_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_phonebook_download_interval)} + {$grandstream_phonebook_download_interval} +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + +{if isset($contact_groups) || isset($contact_users) || isset($contact_extensions)} + 2 +{else} + 0 +{/if} + + + + + 0 + + + + + + + + 0 + + + + {$grandstream_ldap_server} + + + + 389 + + + + + + {$grandstream_ldap_base_dn} + + + + {$grandstream_ldap_username} + + + + {$grandstream_ldap_password} + + + + + {$grandstream_ldap_number_filter} + + + + + {$grandstream_ldap_name_filter} + + + + + 3 + + + + + {$grandstream_ldap_name_attr} + + + + + {$grandstream_ldap_number_attr} + + + + {$grandstream_ldap_display_name} + + + + + + 50 + + + + + + 30 + + + + + 0 + + + + 0 + + + 0 + + + + givenName sn title + + + + 0 + + + + + + + + 5004 + + + + + 200 + + + + + 1 + + + + + 20 + + + + + + + + + + + + +{if isset($public_mode) } +{if $public_mode|strtolower == 'true'} + 1 +{elseif $public_mode|strtolower == 'yes'} + 1 +{elseif $public_mode == '1'} + 1 +{else} + 0 +{/if} +{else} + 0 +{/if} + + + + + + 0 + + + + + + + + + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + 4320 + + + + 100 + + + + 100 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + + + + + + + 5222 + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + CallHistory,LocalPhonebook,RemotePhonebook,FeatureCode + + + + + 1 + + + + + + + + 0 + + + + + 30 + + + + + 0 + + + + + 5 + + + + + 0 + + + + + 10 + + + + + 20 + + + + + 0 + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "0"} 0{/if} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "0"} 0{/if} +{if $grandstream_call_waiting == "1"} 1{/if} +{if $grandstream_call_waiting == "2"} 0{/if} +{/if} + + + + +{if isset($grandstream_call_waiting_ring)} +{if $grandstream_call_waiting_ring == "0"} 0{/if} +{if $grandstream_call_waiting_ring == "1"} 1{/if} +{else} +1 +{/if} + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 2 + + + + + 0 + + + + + 0 + + + + + + + + +{if isset($grandstream_auto_attended_transfer)} + {$grandstream_auto_attended_transfer} +{else} + 1 +{/if} + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 1 + + + + + 1 + + + + + 10 + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + + + + + + + + 0 + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + 0 + + + + {$account.1.display_name} + + + + + + 224.0.1.117:5003 + + + + Page + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + +{if isset($ntp_server_primary)} + {$ntp_server_primary} +{else} + pool.ntp.org +{/if} + + + +{if isset($ntp_server_secondary)} + {$ntp_server_secondary} +{else} + 2.us.pool.ntp.org +{/if} + + + + + 1440 + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($grandstream_timezone) } + {$grandstream_timezone} +{elseif isset($grandstream_gxp_time_zone) } + {$grandstream_gxp_time_zone} +{else} + auto +{/if} + + + + + + 1 + + + + + MTZ+6MDT+5,M4.1.0,M11.1.0 + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + {$grandstream_lcd_brightness} + + + + + {$grandstream_lcd_brightness_idle} + + + + + {$grandstream_active_backlight_timeout} + + + + + 1 + + + + + + + + + +{if isset($grandstream_wallpaper_url)} + 1 + {$grandstream_wallpaper_url} +{else} + 0 + +{/if} + + + + #000000 + + + + +{if isset($grandstream_screensaver)} + {$grandstream_screensaver} +{else} + 2 +{/if} + + + + +{if isset($grandstream_screensaver_source)} + {$grandstream_screensaver_source} +{else} + 0 +{/if} + + + + + +{if isset($grandstream_screensaver_show_date_time)} + {$grandstream_screensaver_show_date_time} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_timeout)} + {$grandstream_screensaver_timeout} +{else} + 3 +{/if} + + + +{if isset($grandstream_screensaver_server_path)} + {$grandstream_screensaver_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_screensaver_xml_download_interval)} + {$grandstream_screensaver_xml_download_interval} +{else} + 0 +{/if} + + + + + + 0 + + + + 0 + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + f1=500,f2=540,c=20/20-80/400; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440,c=10/10; + + + + + f1=440,f2=480,c=200/400; + + + + + f1=440,f2=440,c=25/525; + + + + + 0 + + + + + f1=480,f2=620,c=50/50; + + + + + f1=480,f2=620,c=25/25; + + + + + 5 + + + + + 5 + + + + + 0 + + + + +{if isset($grandstream_default_ringtone)} + {$grandstream_default_ringtone} +{/if} + + + + + + + + + + + 1 + + + + + + + + + + + XMLApp + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + 1 + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{$fixed_keys=6} + + +{$start_id=1363} +{assign var=key_types value=["none"=>-1,"line"=>31,"shared line"=>32,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} + +{for $line=1 to 6} +{$pid=$line*2-2} +{if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} +{if $line <= $fixed_keys} +{$key_types[$keys.line.$line.device_key_type]} +{else} +{$key_types[$keys.line.$line.device_key_type]} +{/if} +{$keys.line.$line.device_key_line} +{$keys.line.$line.device_key_label} +{$keys.line.$line.device_key_value} +{else} +{if $line <= $fixed_keys} +0 +{$line-1} + + +{else} +-1 +{/if} +{/if} + +{/for} + + +{$start_id=23800} +{for $line=7 to 40} +{$pid=($line-6)*4-4} +{if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} +{if $line <= $fixed_keys} +{$key_types[$keys.line.$line.device_key_type]} +{else} +{$key_types[$keys.line.$line.device_key_type]} +{/if} +{$keys.line.$line.device_key_line} +{$keys.line.$line.device_key_label} +{$keys.line.$line.device_key_value} +{else} +{if $line <= $fixed_keys} +-1 +0 + + +{else} +-1 +{/if} +{/if} + +{/for} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"conference"=>12,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} +{$start_id=323} +{for $mem=1 to 7} +{$pid=$mem*3-3} +{if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.memory.$mem.device_key_type|in_array:$key_types} + + + + + + + +{$key_types[$keys.memory.$mem.device_key_type]} + + +{$keys.memory.$mem.device_key_line} + + +{$keys.memory.$mem.device_key_label} + + +{$keys.memory.$mem.device_key_value} +{else} +-1 +0 + + +{/if} + +{/for} + +{$start_id=353} +{for $mem=8 to 18} +{$pid=($mem-7)*4-4} +{if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.line.$line.device_key_type|in_array:$key_types} +{$key_types[$keys.memory.$mem.device_key_type]} +{$keys.memory.$mem.device_key_line} +{$keys.memory.$mem.device_key_label} +{$keys.memory.$mem.device_key_value} +{else} +-1 +0 + + +{/if} + +{/for} + + +{$start_id=1440} +{for $mem=19 to 24} +{$pid=($mem-18)*4-4} +{if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.line.$line.device_key_type|in_array:$key_types} +{$key_types[$keys.memory.$mem.device_key_type]} +{$keys.memory.$mem.device_key_line} +{$keys.memory.$mem.device_key_label} +{$keys.memory.$mem.device_key_value} +{else} +-1 +0 + + +{/if} + +{/for} + + + + + + + + + 0 + + + + + + 1 + + + + + + 0 + + + + + 0 + + + + + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,Redial,Dial,Backspace,PickUp,Target + + + + BTPhonebook,DirectIP,Onhook,Cancel,Dial,Backspace,Target + + + + Answer,Reject,Forward,ReConf + + + + BTOnOff,EndCall,ReConf,ConfRoom,ConfCall + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,ConfCall,Cancel,NewCall,Swap,Transfer,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,UCallPark,PrivateHold,CallPark + + + + BTOnOff,EndCall,Kick,NewCall,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,ConfRoom,Add + + + + ReConf,Resume,HoldTrnf,ConfCall,Add + + + + EndCall,ReConf,ConfRoom + + + + BTOnOff,Cancel,BlindTrnf,AttTrnf,Backspace,Target + + + + BTOnOff,Cancel,Dial,Backspace,Target + + + + + + + + + + + +{assign var=key_types value=["speed dial"=>10, "speed dial active"=>14,"voicemail"=>16,"call return"=>17,"intercom"=>20,"ldap search"=>21,"menu"=>27]} +{$start_id=2987} +{for $prog=1 to 3} +{$pid=$prog*4-4} +{if isset($keys.programmable.$prog.device_key_category) && isset($keys.programmable.$prog.device_key_type) && $keys.programmable.$prog.device_key_type|in_array:$key_types} +{$key_types[$keys.programmable.$prog.device_key_type]} +{$keys.programmable.$prog.device_key_line} +{$keys.programmable.$prog.device_key_label} +{$keys.programmable.$prog.device_key_value} +{else} +0 +0 + + +{/if} + +{/for} + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + +{if isset($grandstream_ext_1page)} + {$grandstream_ext_1page} +{else} + 1 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} +{$start_id=23000} +{for $exp=1 to 160} +{$pid=$exp*5-5} +{if isset($keys.expansion.$exp.device_key_category) && isset($keys.expansion.$exp.device_key_type) && $keys.expansion.$exp.device_key_type|in_array:$key_types} +{$key_types[$keys.expansion.$exp.device_key_type]} +{$keys.expansion.$exp.device_key_line} +{$keys.expansion.$exp.device_key_label} +{$keys.expansion.$exp.device_key_value} +{else} +-1 +0 + + +{/if} + +{/for} +{ + + + From cc3f919ffbd5501ae54c11d33e44e6d494179299 Mon Sep 17 00:00:00 2001 From: Len Date: Sat, 6 Jun 2020 11:07:40 -0400 Subject: [PATCH 138/621] Update {$mac}.xml (#5292) --- .../provision/grandstream/grp26xx/{$mac}.xml | 17979 +++++++--------- 1 file changed, 8234 insertions(+), 9745 deletions(-) diff --git a/resources/templates/provision/grandstream/grp26xx/{$mac}.xml b/resources/templates/provision/grandstream/grp26xx/{$mac}.xml index ee045de470..513920bece 100644 --- a/resources/templates/provision/grandstream/grp26xx/{$mac}.xml +++ b/resources/templates/provision/grandstream/grp26xx/{$mac}.xml @@ -1,9814 +1,8303 @@ - + + - - - - - - - - - - - - - - - - - - - - Yes - - - {$account.1.display_name} - - - {$account.1.server_address}:{$account.1.sip_port} - - - - {if isset($account.1.server_address_secondary)} - {$account.1.server_address_secondary}:{$account.1.sip_port} - {else} - {$account.1.server_address_secondary} - {/if} - - - - {if isset($account.1.outbound_proxy_primary)} - {$account.1.outbound_proxy_primary}:{$account.1.sip_port} - {else} - {$account.1.outbound_proxy_primary} - {/if} - - - - {if isset($account.1.outbound_proxy_secondary)} - {$account.1.outbound_proxy_secondary}:{$account.1.sip_port} - {else} - {$account.1.outbound_proxy_secondary} - {/if} - - - - - - {$account.1.user_id} - - - {$account.1.auth_id} - - - {$account.1.password} - - - {$account.1.display_name} - - - *97 - - - - {$account.1.user_id} - - - - - - - {if $grandstream_dns_mode == '0'}ARecord{/if} - {if $grandstream_dns_mode == '1'}SRV{/if} - {if $grandstream_dns_mode == '2'}NaptrOrSrv{/if} - {if $grandstream_dns_mode == '3'}UseConfiguredIP{/if} - - - - - Default - - - - - - - - - - - - - - {if $grandstream_nat_traversal == ''}Auto{/if} - {if $grandstream_nat_traversal == '0'}No{/if} - {if $grandstream_nat_traversal == '1'}STUN{/if} - {if $grandstream_nat_traversal == '2'}KeepAlive{/if} - {if $grandstream_nat_traversal == '3'}UPnP{/if} - {if $grandstream_nat_traversal == '4'}Auto{/if} - {if $grandstream_nat_traversal == '5'}VPN{/if} - - - - - - - No - - - - - - Disabled - - - - Yes - - - - Yes - - - - {$account.1.register_expires} - - - - 60 - - - - 0 - - - - Yes - - - 30 - - - 3 - - - 5060 - - - 20 - - - - 0.5sec - - - - 4sec - - - - - {$tp=0} - {if $account.1.sip_transport == 'udp'}{$tp=UDP}{/if} - {if $account.1.sip_transport == 'tcp'}{$tp=TCP}{/if} - {if $account.1.sip_transport == 'tls'}{$tp=TlsOrTcp}{/if} - {if $account.1.sip_transport == 'dns srv'}{$tp=TCP}{/if} - {$tp} - - - - TransportOnly - - - - sips - - - - No - - - - InRoute - - - - Yes - - - - - {if isset($subscribe_mwi)} - Yes - {else} - No - {/if} - - - - No - - - - No - - - - Auto - - - - Header - - - - No - - - - No - - - - No - - - - - - - Default - - - - Default - - - - Yes - - - - Yes - - - - Yes - - - - Yes - - - - - - 15 - - - - - - - - - - Disabled - - - - - - - - - - - {if $grandstream_blf_call_pickup == '0'}Auto{/if} - {if $grandstream_blf_call_pickup == '1'}Force{/if} - {if $grandstream_blf_call_pickup == '2'}Disabled{/if} - - {$grandstream_blf_call_pickup} - - - ** - - - - - - - No - - - - No - - - - Disabled - - - - Standard - - - - No - - - - No - - - - No - - - - No - - - - No - - - - No - - - - - - - - - 5060 - - - - - - No - - - - 180 - - - 90 - - - - No - - - - No - - - - No - - - - UAC - - - - 1 - - - - No - - - - - - No - - - - No - - - - No - - - - No - - - - No - - - - No - - - - - - PCMU - PCMA - G.723.1 - G.729A/B - G.722 - iLBC - G.726-32 - OPUS - - - - No - - - - Callee - - - - No - - - - No - - - - - {if $grandstream_srtp == '0'}Disabled{/if} - {if $grandstream_srtp == '1'}EnabledButNotForced{/if} - {if $grandstream_srtp == '2'}EnabledAndForced{/if} - {if $grandstream_srtp == '3'}Optional{/if} - - - - AES128And256Bit - - - - Yes - - - - No - - - - No - - - - Adaptive - - - - 300ms - - - - 2 - - - - 5.3kbpsEncodingRate - - - - ITU - - - - 30ms - - - 97 - - - 123 - - - 101 - - - - No - Yes - No - - - - 250 - - - - - No - - - - - - - {if isset($grandstream_dial_plan) } - {$grandstream_dial_plan} - {else} - {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} - {/if} - - - - Mpk - - - - All - - - - No - - - - No - - - - No - - - - No - - - - No - - - - - - - - 30 - - - - 4 - - - - Pound - - - - Yes - - - - No - - - - - - - 0 - - - - - {if $grandstream_call_waiting == '2'}Default{/if} - {if $grandstream_call_waiting == '1'}Yes{/if} - {if $grandstream_call_waiting == '0'}No{/if} - - - - - {if isset($grandstream_account_ring_tone_1)} - {$grandstream_account_ring_tone_1} - {/if} - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - 60 - - - - - - - - Yes - - - - No - - - - No - - - - Yes - - - - - - - - - - - - Yes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 12 - - Yes - - - {$account.2.display_name} - - - {$account.2.server_address}:{$account.2.sip_port} - - - - {if isset($account.2.server_address_secondary)} - {$account.2.server_address_secondary}:{$account.2.sip_port} - {else} - {$account.2.server_address_secondary} - {/if} - - - - {if isset($account.2.outbound_proxy_primary)} - {$account.2.outbound_proxy_primary}:{$account.2.sip_port} - {else} - {$account.2.outbound_proxy_primary} - {/if} - - - - {if isset($account.2.outbound_proxy_secondary)} - {$account.2.outbound_proxy_secondary}:{$account.2.sip_port} - {else} - {$account.2.outbound_proxy_secondary} - {/if} - - - - - - {$account.2.user_id} - - - {$account.2.auth_id} - - - {$account.2.password} - - - {$account.2.display_name} - - - *97 - - - - {$account.2.user_id} - - - - - - - - - - {if $grandstream_dns_mode == '0'}ARecord{/if} - {if $grandstream_dns_mode == '1'}SRV{/if} - {if $grandstream_dns_mode == '2'}NaptrOrSrv{/if} - {if $grandstream_dns_mode == '3'}UseConfiguredIP{/if} - - - - - Default - - - - - - - - - - - - - - {if $grandstream_nat_traversal == ''}Auto{/if} - {if $grandstream_nat_traversal == '0'}No{/if} - {if $grandstream_nat_traversal == '1'}STUN{/if} - {if $grandstream_nat_traversal == '2'}KeepAlive{/if} - {if $grandstream_nat_traversal == '3'}UPnP{/if} - {if $grandstream_nat_traversal == '4'}Auto{/if} - {if $grandstream_nat_traversal == '5'}VPN{/if} - - - - - - - No - - - - - - - Disabled - - - - Yes - - - - Yes - - - - {$account.2.register_expires} - - - - 60 - - - - 0 - - - - Yes - - - 30 - - - 3 - - - 5062 - - - 20 - - - - 0.5sec - - - - 4sec - - - - - {$tp=0} - {if $account.2.sip_transport == 'udp'}{$tp=UDP}{/if} - {if $account.2.sip_transport == 'tcp'}{$tp=TCP}{/if} - {if $account.2.sip_transport == 'tls'}{$tp=TlsOrTcp}{/if} - {if $account.2.sip_transport == 'dns srv'}{$tp=TCP}{/if} - {$tp} - - - - TransportOnly - - - - sips - - - - No - - - - InRoute - - - - Yes - - - - - {if isset($subscribe_mwi)} - Yes - {else} - No - {/if} - - - - No - - - - No - - - - Auto - - - - Header - - - - No - - - - No - - - - No - - - - - - - - Default - - - - Default - - - - Yes - - - - Yes - - - - Yes - - - - Yes - - - - - - - 15 - - - - - - - - - - Disabled - - - - - - - - - - - {if $grandstream_blf_call_pickup == '0'}Auto{/if} - {if $grandstream_blf_call_pickup == '1'}Force{/if} - {if $grandstream_blf_call_pickup == '2'}Disabled{/if} - - {$grandstream_blf_call_pickup} - - - ** - - - - - - - No - - - - No - - - - Disabled - - - - Standard - - - - No - - - - No - - - - No - - - - No - - - - No - - - - No - - - - - - - - - 5060 - - - - - - - - No - - - - 180 - - - 90 - - - - No - - - - No - - - - No - - - - UAC - - - - 1 - - - - No - - - - - - - - No - - - - No - - - - No - - - - No - - - - No - - - - No - - - - - - - - PCMU - PCMA - G723.1 - G.729A/B - G.722 - iLBC - G.726-32 - OPUS - - - - No - - - - Callee - - - - No - - - - No - - - - - {if $grandstream_srtp == '0'}Disabled{/if} - {if $grandstream_srtp == '1'}EnabledButNotForced{/if} - {if $grandstream_srtp == '2'}EnabledAndForced{/if} - {if $grandstream_srtp == '3'}Optional{/if} - - - - AES128And256Bit - - - - Yes - - - - No - - - - No - - - - Adaptive - - - - 300ms - - - - 2 - - - - 5.3kbpsEncodingRate - - - - ITU - - - - 30ms - - - 97 - - - 123 - - - 101 - - - - No - Yes - No - - - - 250 - - - - - No - - - - - - - {if isset($grandstream_dial_plan) } - {$grandstream_dial_plan} - {else} - {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} - {/if} - - - - Mpk - - - - All - - - - No - - - - No - - - - No - - - - No - - - - No - - - - - - - - 30 - - - - 4 - - - - Pound - - - - Yes - - - - No - - - - - - - 0 - - - - - {if $grandstream_call_waiting == '2'}Default{/if} - {if $grandstream_call_waiting == '1'}Yes{/if} - {if $grandstream_call_waiting == '0'}No{/if} - - - - - {if isset($grandstream_account_ring_tone_1)} - {$grandstream_account_ring_tone_1} - {/if} - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - 60 - - - - - - - - Yes - - - - No - - - - No - - - - Yes - - - - - - - - - - - - Yes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 12 - - - - - - - - - - Yes - - - {$account.3.display_name} - - - {$account.3.server_address}:{$account.3.sip_port} - - - - {if isset($account.3.server_address_secondary)} - {$account.3.server_address_secondary}:{$account.3.sip_port} - {else} - {$account.3.server_address_secondary} - {/if} - - - - {if isset($account.3.outbound_proxy_primary)} - {$account.3.outbound_proxy_primary}:{$account.3.sip_port} - {else} - {$account.3.outbound_proxy_primary} - {/if} - - - - {if isset($account.3.outbound_proxy_secondary)} - {$account.3.outbound_proxy_secondary}:{$account.3.sip_port} - {else} - {$account.3.outbound_proxy_secondary} - {/if} - - - - - - {$account.3.user_id} - - - {$account.3.auth_id} - - - {$account.3.password} - - - {$account.3.display_name} - - - *97 - - - - {$account.3.user_id} - - - - - - - {if $grandstream_dns_mode == '0'}ARecord{/if} - {if $grandstream_dns_mode == '1'}SRV{/if} - {if $grandstream_dns_mode == '2'}NaptrOrSrv{/if} - {if $grandstream_dns_mode == '3'}UseConfiguredIP{/if} - - - - - Default - - - - - - - - - - - - - - {if $grandstream_nat_traversal == ''}Auto{/if} - {if $grandstream_nat_traversal == '0'}No{/if} - {if $grandstream_nat_traversal == '1'}STUN{/if} - {if $grandstream_nat_traversal == '2'}KeepAlive{/if} - {if $grandstream_nat_traversal == '3'}UPnP{/if} - {if $grandstream_nat_traversal == '4'}Auto{/if} - {if $grandstream_nat_traversal == '5'}VPN{/if} - - - - - - - No - - - - - - Disabled - - - - Yes - - - - Yes - - - - {$account.3.register_expires} - - - - 60 - - - - 0 - - - - Yes - - - 30 - - - 3 - - - 5064 - - - 20 - - - - 0.5sec - - - - 4sec - - - - - {$tp=0} - {if $account.3.sip_transport == 'udp'}{$tp=UDP}{/if} - {if $account.3.sip_transport == 'tcp'}{$tp=TCP}{/if} - {if $account.3.sip_transport == 'tls'}{$tp=TlsOrTcp}{/if} - {if $account.3.sip_transport == 'dns srv'}{$tp=TCP}{/if} - {$tp} - - - - TransportOnly - - - - sips - - - - No - - - - InRoute - - - - Yes - - - - - {if isset($subscribe_mwi)} - Yes - {else} - No - {/if} - - - - No - - - - No - - - - Auto - - - - Header - - - - No - - - - No - - - - No - - - - - - - Default - - - - Default - - - - Yes - - - - Yes - - - - Yes - - - - Yes - - - - - - 15 - - - - - - - - - - Disabled - - - - - - - - - - - {if $grandstream_blf_call_pickup == '0'}Auto{/if} - {if $grandstream_blf_call_pickup == '1'}Force{/if} - {if $grandstream_blf_call_pickup == '2'}Disabled{/if} - - {$grandstream_blf_call_pickup} - - - ** - - - - - - - No - - - - No - - - - Disabled - - - - Standard - - - - No - - - - No - - - - No - - - - No - - - - No - - - - No - - - - - - - - - 5060 - - - - - - No - - - - 180 - - - 90 - - - - No - - - - No - - - - No - - - - UAC - - - - 1 - - - - No - - - - - - No - - - - No - - - - No - - - - No - - - - No - - - - No - - - - - - PCMU - PCMA - G.723.1 - G.729A/B - G.722 - iLBC - G.726-32 - OPUS - - - - No - - - - Callee - - - - No - - - - No - - - - - {if $grandstream_srtp == '0'}Disabled{/if} - {if $grandstream_srtp == '1'}EnabledButNotForced{/if} - {if $grandstream_srtp == '2'}EnabledAndForced{/if} - {if $grandstream_srtp == '3'}Optional{/if} - - - - AES128And256Bit - - - - Yes - - - - No - - - - No - - - - Adaptive - - - - 300ms - - - - 2 - - - - 5.3kbpsEncodingRate - - - - ITU - - - - 30ms - - - 97 - - - 123 - - - 101 - - - - No - Yes - No - - - - 250 - - - - - No - - - - - - - {if isset($grandstream_dial_plan) } - {$grandstream_dial_plan} - {else} - {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} - {/if} - - - - Mpk - - - - All - - - - No - - - - No - - - - No - - - - No - - - - No - - - - - - - - 30 - - - - 4 - - - - Pound - - - - Yes - - - - No - - - - - - - 0 - - - - - {if $grandstream_call_waiting == '2'}Default{/if} - {if $grandstream_call_waiting == '1'}Yes{/if} - {if $grandstream_call_waiting == '0'}No{/if} - - - - - {if isset($grandstream_account_ring_tone_1)} - {$grandstream_account_ring_tone_1} - {/if} - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - 60 - - - - - - - - Yes - - - - No - - - - No - - - - Yes - - - - - - - - - - - - Yes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 12 - - - - - - - - - - - Yes - - - {$account.4.display_name} - - - {$account.4.server_address}:{$account.4.sip_port} - - - - {if isset($account.4.server_address_secondary)} - {$account.4.server_address_secondary}:{$account.4.sip_port} - {else} - {$account.4.server_address_secondary} - {/if} - - - - {if isset($account.4.outbound_proxy_primary)} - {$account.4.outbound_proxy_primary}:{$account.4.sip_port} - {else} - {$account.4.outbound_proxy_primary} - {/if} - - - - {if isset($account.4.outbound_proxy_secondary)} - {$account.4.outbound_proxy_secondary}:{$account.4.sip_port} - {else} - {$account.4.outbound_proxy_secondary} - {/if} - - - - - - {$account.4.user_id} - - - {$account.4.auth_id} - - - {$account.4.password} - - - {$account.4.display_name} - - - *97 - - - - {$account.4.user_id} - - - - - - - {if $grandstream_dns_mode == '0'}ARecord{/if} - {if $grandstream_dns_mode == '1'}SRV{/if} - {if $grandstream_dns_mode == '2'}NaptrOrSrv{/if} - {if $grandstream_dns_mode == '3'}UseConfiguredIP{/if} - - - - - Default - - - - - - - - - - - - - - {if $grandstream_nat_traversal == ''}Auto{/if} - {if $grandstream_nat_traversal == '0'}No{/if} - {if $grandstream_nat_traversal == '1'}STUN{/if} - {if $grandstream_nat_traversal == '2'}KeepAlive{/if} - {if $grandstream_nat_traversal == '3'}UPnP{/if} - {if $grandstream_nat_traversal == '4'}Auto{/if} - {if $grandstream_nat_traversal == '5'}VPN{/if} - - - - - - - No - - - - - - Disabled - - - - Yes - - - - Yes - - - - {$account.4.register_expires} - - - - 60 - - - - 0 - - - - Yes - - - 30 - - - 3 - - - 5060 - - - 20 - - - - 0.5sec - - - - 4sec - - - - - {$tp=0} - {if $account.4.sip_transport == 'udp'}{$tp=UDP}{/if} - {if $account.4.sip_transport == 'tcp'}{$tp=TCP}{/if} - {if $account.4.sip_transport == 'tls'}{$tp=TlsOrTcp}{/if} - {if $account.4.sip_transport == 'dns srv'}{$tp=TCP}{/if} - {$tp} - - - - TransportOnly - - - - sips - - - - No - - - - InRoute - - - - Yes - - - - - {if isset($subscribe_mwi)} - Yes - {else} - No - {/if} - - - - No - - - - No - - - - Auto - - - - Header - - - - No - - - - No - - - - No - - - - - - - Default - - - - Default - - - - Yes - - - - Yes - - - - Yes - - - - Yes - - - - - - 15 - - - - - - - - - - Disabled - - - - - - - - - - - {if $grandstream_blf_call_pickup == '0'}Auto{/if} - {if $grandstream_blf_call_pickup == '1'}Force{/if} - {if $grandstream_blf_call_pickup == '2'}Disabled{/if} - - {$grandstream_blf_call_pickup} - - - ** - - - - - - - No - - - - No - - - - Disabled - - - - Standard - - - - No - - - - No - - - - No - - - - No - - - - No - - - - No - - - - - - - - - 5060 - - - - - - No - - - - 180 - - - 90 - - - - No - - - - No - - - - No - - - - UAC - - - - 1 - - - - No - - - - - - No - - - - No - - - - No - - - - No - - - - No - - - - No - - - - - - PCMU - PCMA - G.723.1 - G.729A/B - G.722 - iLBC - G.726-32 - OPUS - - - - No - - - - Callee - - - - No - - - - No - - - - - {if $grandstream_srtp == '0'}Disabled{/if} - {if $grandstream_srtp == '1'}EnabledButNotForced{/if} - {if $grandstream_srtp == '2'}EnabledAndForced{/if} - {if $grandstream_srtp == '3'}Optional{/if} - - - - AES128And256Bit - - - - Yes - - - - No - - - - No - - - - Adaptive - - - - 300ms - - - - 2 - - - - 5.3kbpsEncodingRate - - - - ITU - - - - 30ms - - - 97 - - - 123 - - - 101 - - - - No - Yes - No - - - - 250 - - - - - No - - - - - - - {if isset($grandstream_dial_plan) } - {$grandstream_dial_plan} - {else} - {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} - {/if} - - - - Mpk - - - - All - - - - No - - - - No - - - - No - - - - No - - - - No - - - - - - - - 30 - - - - 4 - - - - Pound - - - - Yes - - - - No - - - - - - - 0 - - - - - {if $grandstream_call_waiting == '2'}Default{/if} - {if $grandstream_call_waiting == '1'}Yes{/if} - {if $grandstream_call_waiting == '0'}No{/if} - - - - - {if isset($grandstream_account_ring_tone_1)} - {$grandstream_account_ring_tone_1} - {/if} - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - 60 - - - - - - - - Yes - - - - No - - - - No - - - - Yes - - - - - - - - - - - - Yes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 12 - - - - - - - - - - Yes - - - {$account.5.display_name} - - - {$account.5.server_address}:{$account.5.sip_port} - - - - {if isset($account.5.server_address_secondary)} - {$account.5.server_address_secondary}:{$account.5.sip_port} - {else} - {$account.5.server_address_secondary} - {/if} - - - - {if isset($account.5.outbound_proxy_primary)} - {$account.5.outbound_proxy_primary}:{$account.5.sip_port} - {else} - {$account.5.outbound_proxy_primary} - {/if} - - - - {if isset($account.5.outbound_proxy_secondary)} - {$account.5.outbound_proxy_secondary}:{$account.5.sip_port} - {else} - {$account.5.outbound_proxy_secondary} - {/if} - - - - - - {$account.5.user_id} - - - {$account.5.auth_id} - - - {$account.5.password} - - - {$account.5.display_name} - - - *97 - - - - {$account.5.user_id} - - - - - - - {if $grandstream_dns_mode == '0'}ARecord{/if} - {if $grandstream_dns_mode == '1'}SRV{/if} - {if $grandstream_dns_mode == '2'}NaptrOrSrv{/if} - {if $grandstream_dns_mode == '3'}UseConfiguredIP{/if} - - - - - Default - - - - - - - - - - - - - - {if $grandstream_nat_traversal == ''}Auto{/if} - {if $grandstream_nat_traversal == '0'}No{/if} - {if $grandstream_nat_traversal == '1'}STUN{/if} - {if $grandstream_nat_traversal == '2'}KeepAlive{/if} - {if $grandstream_nat_traversal == '3'}UPnP{/if} - {if $grandstream_nat_traversal == '4'}Auto{/if} - {if $grandstream_nat_traversal == '5'}VPN{/if} - - - - - - - No - - - - - - Disabled - - - - Yes - - - - Yes - - - - {$account.5.register_expires} - - - - 60 - - - - 0 - - - - Yes - - - 30 - - - 3 - - - 5060 - - - 20 - - - - 0.5sec - - - - 4sec - - - - - {$tp=0} - {if $account.5.sip_transport == 'udp'}{$tp=UDP}{/if} - {if $account.5.sip_transport == 'tcp'}{$tp=TCP}{/if} - {if $account.5.sip_transport == 'tls'}{$tp=TlsOrTcp}{/if} - {if $account.5.sip_transport == 'dns srv'}{$tp=TCP}{/if} - {$tp} - - - - TransportOnly - - - - sips - - - - No - - - - InRoute - - - - Yes - - - - - {if isset($subscribe_mwi)} - Yes - {else} - No - {/if} - - - - No - - - - No - - - - Auto - - - - Header - - - - No - - - - No - - - - No - - - - - - - Default - - - - Default - - - - Yes - - - - Yes - - - - Yes - - - - Yes - - - - - - 15 - - - - - - - - - - Disabled - - - - - - - - - - - {if $grandstream_blf_call_pickup == '0'}Auto{/if} - {if $grandstream_blf_call_pickup == '1'}Force{/if} - {if $grandstream_blf_call_pickup == '2'}Disabled{/if} - - {$grandstream_blf_call_pickup} - - - ** - - - - - - - No - - - - No - - - - Disabled - - - - Standard - - - - No - - - - No - - - - No - - - - No - - - - No - - - - No - - - - - - - - - 5060 - - - - - - No - - - - 180 - - - 90 - - - - No - - - - No - - - - No - - - - UAC - - - - 1 - - - - No - - - - - - No - - - - No - - - - No - - - - No - - - - No - - - - No - - - - - - PCMU - PCMA - G.723.1 - G.729A/B - G.722 - iLBC - G.726-32 - OPUS - - - - No - - - - Callee - - - - No - - - - No - - - - - {if $grandstream_srtp == '0'}Disabled{/if} - {if $grandstream_srtp == '1'}EnabledButNotForced{/if} - {if $grandstream_srtp == '2'}EnabledAndForced{/if} - {if $grandstream_srtp == '3'}Optional{/if} - - - - AES128And256Bit - - - - Yes - - - - No - - - - No - - - - Adaptive - - - - 300ms - - - - 2 - - - - 5.3kbpsEncodingRate - - - - ITU - - - - 30ms - - - 97 - - - 123 - - - 101 - - - - No - Yes - No - - - - 250 - - - - - No - - - - - - - {if isset($grandstream_dial_plan) } - {$grandstream_dial_plan} - {else} - {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} - {/if} - - - - Mpk - - - - All - - - - No - - - - No - - - - No - - - - No - - - - No - - - - - - - - 30 - - - - 4 - - - - Pound - - - - Yes - - - - No - - - - - - - 0 - - - - - {if $grandstream_call_waiting == '2'}Default{/if} - {if $grandstream_call_waiting == '1'}Yes{/if} - {if $grandstream_call_waiting == '0'}No{/if} - - - - - {if isset($grandstream_account_ring_tone_1)} - {$grandstream_account_ring_tone_1} - {/if} - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - 60 - - - - - - - - Yes - - - - No - - - - No - - - - Yes - - - - - - - - - - - - Yes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 12 - - - - - - - - - - Yes - - - {$account.6.display_name} - - - {$account.6.server_address}:{$account.6.sip_port} - - - - {if isset($account.6.server_address_secondary)} - {$account.6.server_address_secondary}:{$account.6.sip_port} - {else} - {$account.6.server_address_secondary} - {/if} - - - - {if isset($account.6.outbound_proxy_primary)} - {$account.6.outbound_proxy_primary}:{$account.6.sip_port} - {else} - {$account.6.outbound_proxy_primary} - {/if} - - - - {if isset($account.6.outbound_proxy_secondary)} - {$account.6.outbound_proxy_secondary}:{$account.6.sip_port} - {else} - {$account.6.outbound_proxy_secondary} - {/if} - - - - - - {$account.6.user_id} - - - {$account.6.auth_id} - - - {$account.6.password} - - - {$account.6.display_name} - - - *97 - - - - {$account.6.user_id} - - - - - - - {if $grandstream_dns_mode == '0'}ARecord{/if} - {if $grandstream_dns_mode == '1'}SRV{/if} - {if $grandstream_dns_mode == '2'}NaptrOrSrv{/if} - {if $grandstream_dns_mode == '3'}UseConfiguredIP{/if} - - - - - Default - - - - - - - - - - - - - - {if $grandstream_nat_traversal == ''}Auto{/if} - {if $grandstream_nat_traversal == '0'}No{/if} - {if $grandstream_nat_traversal == '1'}STUN{/if} - {if $grandstream_nat_traversal == '2'}KeepAlive{/if} - {if $grandstream_nat_traversal == '3'}UPnP{/if} - {if $grandstream_nat_traversal == '4'}Auto{/if} - {if $grandstream_nat_traversal == '5'}VPN{/if} - - - - - - - No - - - - - - Disabled - - - - Yes - - - - Yes - - - - {$account.6.register_expires} - - - - 60 - - - - 0 - - - - Yes - - - 30 - - - 3 - - - 5060 - - - 20 - - - - 0.5sec - - - - 4sec - - - - - {$tp=0} - {if $account.6.sip_transport == 'udp'}{$tp=UDP}{/if} - {if $account.6.sip_transport == 'tcp'}{$tp=TCP}{/if} - {if $account.6.sip_transport == 'tls'}{$tp=TlsOrTcp}{/if} - {if $account.6.sip_transport == 'dns srv'}{$tp=TCP}{/if} - {$tp} - - - - TransportOnly - - - - sips - - - - No - - - - InRoute - - - - Yes - - - - - {if isset($subscribe_mwi)} - Yes - {else} - No - {/if} - - - - No - - - - No - - - - Auto - - - - Header - - - - No - - - - No - - - - No - - - - - - - Default - - - - Default - - - - Yes - - - - Yes - - - - Yes - - - - Yes - - - - - - 15 - - - - - - - - - - Disabled - - - - - - - - - - - {if $grandstream_blf_call_pickup == '0'}Auto{/if} - {if $grandstream_blf_call_pickup == '1'}Force{/if} - {if $grandstream_blf_call_pickup == '2'}Disabled{/if} - - {$grandstream_blf_call_pickup} - - - ** - - - - - - - No - - - - No - - - - Disabled - - - - Standard - - - - No - - - - No - - - - No - - - - No - - - - No - - - - No - - - - - - - - - 5060 - - - - - - No - - - - 180 - - - 90 - - - - No - - - - No - - - - No - - - - UAC - - - - 1 - - - - No - - - - - - No - - - - No - - - - No - - - - No - - - - No - - - - No - - - - - - PCMU - PCMA - G.723.1 - G.729A/B - G.722 - iLBC - G.726-32 - OPUS - - - - No - - - - Callee - - - - No - - - - No - - - - - {if $grandstream_srtp == '0'}Disabled{/if} - {if $grandstream_srtp == '1'}EnabledButNotForced{/if} - {if $grandstream_srtp == '2'}EnabledAndForced{/if} - {if $grandstream_srtp == '3'}Optional{/if} - - - - AES128And256Bit - - - - Yes - - - - No - - - - No - - - - Adaptive - - - - 300ms - - - - 2 - - - - 5.3kbpsEncodingRate - - - - ITU - - - - 30ms - - - 97 - - - 123 - - - 101 - - - - No - Yes - No - - - - 250 - - - - - No - - - - - - - {if isset($grandstream_dial_plan) } - {$grandstream_dial_plan} - {else} - {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} - {/if} - - - - Mpk - - - - All - - - - No - - - - No - - - - No - - - - No - - - - No - - - - - - - - 30 - - - - 4 - - - - Pound - - - - Yes - - - - No - - - - - - - 0 - - - - - {if $grandstream_call_waiting == '2'}Default{/if} - {if $grandstream_call_waiting == '1'}Yes{/if} - {if $grandstream_call_waiting == '0'}No{/if} - - - - - {if isset($grandstream_account_ring_tone_1)} - {$grandstream_account_ring_tone_1} - {/if} - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - - - 5 - - - - 60 - - - - - - - - Yes - - - - No - - - - No - - - - Yes - - - - - - - - - - - - Yes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 12 - - - - - - - - IPv4Only - - - - DHCP - - - - - - phone-{$mac|replace:'-':''} - - - - - - - - - - - - - - - - - - - - - - - - - - 192 - - 168 - - 0 - - 160 - - - - - 255 - - 255 - - 0 - - 0 - - - - 0 - - 0 - - 0 - - 0 - - - - 0 - - 0 - - 0 - - 0 - - - - 0 - - 0 - - 0 - - 0 - - - - 0 - - 0 - - 0 - - 0 - - - - - - - AutoConfigured - - - - - - - - - - - - - - - - - - - - - - - - - - Disable - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 26 - - - - - 46 - - - - No - - - - Yes - - - - - - {if isset($grandstream_lan_port_vlan) } - {$grandstream_lan_port_vlan} - {else} - 0 - {/if} - - - - 0 - - - - Enabled - - - - - {if isset($grandstream_pc_port_vlan) } - {$grandstream_pc_port_vlan} - {else} - 0 - {/if} - - - 0 - - - - Yes - - - - Yes - - - 60 - - - - 1500 - - - - - - Yes - - - Yes - - - - - - - No - - - - - - No - - - 0 - - - - - - - - - {if $grandstream_bluetooth_power == ''}Off{/if} - {if $grandstream_bluetooth_power == '0'}Off{/if} - {if $grandstream_bluetooth_power == '1'}On{/if} - {if $grandstream_bluetooth_power == '2'}OffAndHideMenuFromLCD{/if} - - - - - {if $grandstream_bluetooth_handsfree == '0'}Off{/if} - {if $grandstream_bluetooth_handsfree == '1'}On{/if} - - - - 0 - - - - {$grandstream_bluetooth_name} - - - - - - - - No - - - - - - 1194 - - - - UDP - - - - Blowfish - - - - - - - - - - - - - - - - - No - - - Version3 - - - - 161 - - - - - - - - Version2 - - - - - - - - 162 - - - - 5 - - - - - - - - - - - - 0 - - - - None - - - - None - - - - - - - - - - - - - - - - 0 - - - - None - - - - None - - - - - - - - - - - - - - - Off - - - - - - - - - - - - - - - WPA_PSK - - - - - None - - - - - - - - - - - - - - - - - - - - - - - - - WPA_PSK - - - - - None - - - - - - - - - - - - - - - - - - - - - - - - - WPA_PSK - - - - - None - - - - - - - - - - - - - - - - - - - - - - - - - WPA_PSK - - - - - None - - - - - - - - - - - - - - - - - - - - - - - - - WPA_PSK - - - - - None - - - - - - - - - - - - - - - - - - - - - - - - - WPA_PSK - - - - - None - - - - - - - - - - - - - - - - - - - - - - - - - WPA_PSK - - - - - None - - - - - - - - - - - - - - - - - - - - - - - - - WPA_PSK - - - - - None - - - - - - - - - - - - - - - - - - - - - - - - - WPA_PSK - - - - - None - - - - - - - - - - - - - - - - - - - - - - - - - WPA_PSK - - - - - None - - - - - - - - - - - - - - - - - - {$user_password} - - - - - - {if isset($admin_password)} - {$admin_password} - {else} - {$mac|replace:'-':''} - {/if} - - - - - - - - AlwaysCheck - - - No - - - No - - - - - - Yes - - - - - - - No - - - No - - - - - No - - - - 10080 - - - No - - - 1 - - - - - - 1 - - - - Yes - - - Yes - - - - HTTPS - - - {if $grandstream_config_server_path=="none"} - - {elseif isset($grandstream_config_server_path)} - {$grandstream_config_server_path} - {else} - {$domain_name}{$project_path}/app/provision - {/if} - - - {$http_auth_username} - - {$http_auth_password} - - - - - - - - - - No - - - No - - - No - - - - - HTTPS - - - {if isset($grandstream_firmware_path) && isset($firmware_version)} - {$grandstream_firmware_path}/{$firmware_version} - {elseif isset($grandstream_firmware_path)} - {$grandstream_firmware_path} - {else} - {$domain_name}{$project_path}/app/provision/resources/firmware/ - {/if} - - - - - - - - - - - - - - - - - UDP - - {$grandstream_syslog_server} - - - - - {if $grandstream_syslog_level == '0'}None{/if} - {if $grandstream_syslog_level == '1'}Debug{/if} - {if $grandstream_syslog_level == '2'}Info{/if} - {if $grandstream_syslog_level == '2'}Warning{/if} - {if $grandstream_syslog_level == '2'}Error{/if} - - - - - - {if $grandstream_send_sip_log == '0'}No{/if} - {if $grandstream_send_sip_log == '1'}Yes{/if} - - - No - - - Yes - - - No - - - - - - https://acs.gdms.cloud - - - - - - - Yes - - 86400 - - - - - - 7547 - - - - - - No - - - - - - - Unrestricted - - - Yes - - - No - - - - - - - - - - - HTTP - - - Yes - - - 80 - - - 443 - - - - - Yes - - - - 5 - - - - 10 - - - - 5 - - - - - - Default Certificates - - - - - - No - - - - 0 - - - - - - - - - - - - 112,911,110 - - - - - - InternalStorage - - - No - - - - - - - - - - - EnabledUseHTTPS - - - {$http_auth_username} - - - {$http_auth_password} - - - - - {if isset($grandstream_phonebook_download)} - {$grandstream_phonebook_xml_server_path}{$mac}/ - {elseif isset($grandstream_phonebook_xml_server_path)} - {$grandstream_phonebook_xml_server_path} - {else} - - {/if} - - - - - - {if isset($grandstream_phonebook_download_interval)} - {$grandstream_phonebook_download_interval} - {else} - 0 - {/if} - - - Yes - - - Replace - - - - - LastName - - - - LocalPhonebook - - - - QuickMatch - - - - - - - - LDAP - - - {$grandstream_ldap_server} - - - - 389 - - - - - {$grandstream_ldap_base_dn} - - - {$grandstream_ldap_username} - - - {$grandstream_ldap_password} - - - {$grandstream_ldap_number_filter} - - - {$grandstream_ldap_name_filter} - - - - version3 - - - - - {$grandstream_ldap_name_attr} - - - - - {$grandstream_ldap_number_attr} - - - - {$grandstream_ldap_display_name} - - - 50 - - - - - 30 - - - - No - - - - No - - - - No - - - - - - - - - - - - 5004 - - - - 200 - - - - Yes - - - - 20 - - - - - - - - - - - 0 - - - - No - - - No - - - No - - - - - - - - - - - No - - - TFTP - - - - - - - - - - - - - - - Yes - - - - - - - - - - - - - - - - - - - - - - - 360 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5222 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - None - - - - - - - - - - - - - - - - - - - - - None - - - - - - - - - - - - - - - - - - - - - None - - - - - - - - - - - - - - - - - - - - - None - - - - - - - - - - - - - - - - - - - - - None - - - - - - - - - - - - - - - - - - - - - None - - - - - - - - - - - - - - - - - - - - - None - - - - - - - - - - - - - - - - - - - - - None - - - - - - - - - - - - - - - - - - - - - None - - - - - - - - - - - - - - - - - - - - - None - - - - - - - - - - - - - - - - - - - - Account1 - - - Yes - - - - CallHistory,LocalPhonebook,RemotePhonebook,FeatureCode - - - Yes - - - - - - - - 4 - - - 30 - - - No - - - - 5 - - - - No - - - No - - - 10 - - - 10 - - - - - - - - {if isset($grandstream_call_waiting)} - {if $grandstream_call_waiting == "0"}No{/if} - {if $grandstream_call_waiting == "1"}Yes{/if} - {/if} - - - - - - {if isset($grandstream_call_waiting)} - {if $grandstream_call_waiting == "0"}No{/if} - {if $grandstream_call_waiting == "1"}Yes{/if} - {/if} - - - - - - {if isset($grandstream_call_waiting)} - {if $grandstream_call_waiting == "0"}No{/if} - {if $grandstream_call_waiting == "1"}Yes{/if} - {/if} - - - - - - - Yes - - - No - - - - Yes - - - - Yes - - - No +{$mac|replace:'-':''} + + + + + + + + + + + + + + + + + + 1 + + + + {$account.1.display_name} + + + + {$account.1.server_address}:{$account.1.sip_port} + + + + +{if isset($account.1.server_address_secondary)} + {$account.1.server_address_secondary}:{$account.1.sip_port} +{else} + {$account.1.server_address_secondary} +{/if} + + + + +{if isset($account.1.outbound_proxy_primary)} + {$account.1.outbound_proxy_primary}:{$account.1.sip_port} +{else} + {$account.1.outbound_proxy_primary} +{/if} + + + + +{if isset($account.1.outbound_proxy_secondary)} + {$account.1.outbound_proxy_secondary}:{$account.1.sip_port} +{else} + {$account.1.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.1.user_id} + + + + {$account.1.auth_id} + + + + {$account.1.password} + + + + {$account.1.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.1.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5060 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + +{$tp=0} +{if $account.1.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.1.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 5060 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + {$grandstream_account_ring_tone_1} + + + + ring1 + + + + + + 5 + + + + ring2 + + + + + + 2 + + + + ring3 + + + + + + 3 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20 + + + + + + + + + + +{if isset($account.2.password)} + 1 +{else} + 0 +{/if} + + + + {$account.2.display_name} + + + + {$account.2.server_address}:{$account.2.sip_port} + + + + +{if isset($account.2.server_address_secondary)} + {$account.2.server_address_secondary}:{$account.2.sip_port} +{else} + {$account.2.server_address_secondary} +{/if} + + + + +{if isset($account.2.outbound_proxy_primary)} + {$account.2.outbound_proxy_primary}:{$account.2.sip_port} +{else} + {$account.2.outbound_proxy_primary} +{/if} + + + + +{if isset($account.2.outbound_proxy_secondary)} + {$account.2.outbound_proxy_secondary}:{$account.2.sip_port} +{else} + {$account.2.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.2.user_id} + + + + {$account.2.auth_id} + + + + {$account.2.password} + + + + {$account.2.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.2.register_expires} + + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5060 + + + + + 20 + + + + + + 100 + + + + + + 400 + + + + +{$tp=0} +{if $account.2.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.2.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.2.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.2.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 5060 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + {$grandstream_account_ring_tone_2} + + + + + + + + + + 0 + + + + ring2 + + + + + + 0 + + + + ring3 + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 12 + + + + + + + + + + +{if isset($account.3.password)} + 1 +{else} + 0 +{/if} + + + + {$account.3.display_name} + + + + {$account.3.server_address}:{$account.3.sip_port} + + + + +{if isset($account.3.server_address_secondary)} + {$account.3.server_address_secondary}:{$account.3.sip_port} +{else} + {$account.3.server_address_secondary} +{/if} + + + + +{if isset($account.3.outbound_proxy_primary)} + {$account.3.outbound_proxy_primary}:{$account.3.sip_port} +{else} + {$account.3.outbound_proxy_primary} +{/if} + + + + +{if isset($account.3.outbound_proxy_secondary)} + {$account.3.outbound_proxy_secondary}:{$account.3.sip_port} +{else} + {$account.3.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.3.user_id} + + + + {$account.3.auth_id} + + + + {$account.3.password} + + + + {$account.3.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.3.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5064 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + +{$tp=0} +{if $account.3.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.3.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.3.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.3.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 5060 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + {$grandstream_account_ring_tone_3} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.4.password)} + 1 +{else} + 0 +{/if} + + + + {$account.4.display_name} + + + + {$account.4.server_address}:{$account.4.sip_port} + + + + +{if isset($account.4.server_address_secondary)} + {$account.4.server_address_secondary}:{$account.4.sip_port} +{else} + {$account.4.server_address_secondary} +{/if} + + + + +{if isset($account.4.outbound_proxy_primary)} + {$account.4.outbound_proxy_primary}:{$account.4.sip_port} +{else} + {$account.4.outbound_proxy_primary} +{/if} + + + + +{if isset($account.4.outbound_proxy_secondary)} + {$account.4.outbound_proxy_secondary}:{$account.4.sip_port} +{else} + {$account.4.outbound_proxy_secondary} +{/if} + + + + + + + + {$account.4.user_id} + + + + {$account.4.auth_id} + + + + {$account.4.password} + + + + {$account.4.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.4.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5066 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + +{$tp=0} +{if $account.4.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.4.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.4.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.4.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + {$grandstream_blf_call_pickup} + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 5060 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 0 + + + + + {$grandstream_account_ring_tone_4} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 12 + + + + + + + + + + +{if isset($account.5.password)} + 1 +{else} + 0 +{/if} + + + + {$account.5.display_name} + + + + {$account.5.server_address}:{$account.5.sip_port} + + + + +{if isset($account.5.server_address_secondary)} + {$account.5.server_address_secondary}:{$account.5.sip_port} +{else} + {$account.5.server_address_secondary} +{/if} + + + + +{if isset($account.5.outbound_proxy_primary)} + {$account.5.outbound_proxy_primary}:{$account.5.sip_port} +{else} + {$account.5.outbound_proxy_primary} +{/if} + + + + +{if isset($account.5.outbound_proxy_secondary)} + {$account.5.outbound_proxy_secondary}:{$account.5.sip_port} +{else} + {$account.5.outbound_proxy_secondary} +{/if} + + + + + + + + + + + + {$account.5.user_id} + + + + {$account.5.password} + + + + {$account.5.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.5.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5066 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + +{$tp=0} +{if $account.5.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.5.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.5.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.5.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 5060 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + {$grandstream_account_ring_tone_5} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 12 + + + + + + + + 2 + + + + + + + + + + + + phone-{$mac|replace:'-':''} + + + + + + + + + + + + + + + + + + + + + + + + + + - - No + + + - - Yes + + + + + + 192 - - - - - Yes + + 168 - - + + 0 - - - No + + 160 - - - + + + 255 - - Dynamic - - {if $grandstream_auto_attended_transfer == '0'}Static{/if} - {if $grandstream_auto_attended_transfer == '1'}Dynamic{/if} + + 255 - - - + + 0 - - Yes + + 0 - - Yes + + + 0 - - No + + 0 - - No + + 0 - - Default + + 0 - - - Busy + + + 0 - - - TemporarilyUnavailable + + 0 - - No + + 0 - - No - - - - - - - - - - No - - - InternalStorage - - - No - - - Yes - - - - 10 - - - - - - 0 - - - - - - - - VPK - - - - - - Yes - - - Yes - - - - - - Yes - - - Yes - - - - 0 - - - - - - - - - - - - - - - - - - - Yes - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - DefaultMode - - - Normal - - - Normal - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - {if isset($ntp_server_primary)} - {$ntp_server_primary} - {else} - pool.ntp.org - {/if} - - - - - - {if isset($ntp_server_secondary)} - {$ntp_server_secondary} - {else} - 2.us.pool.ntp.org - {/if} - - - - - 1440 - - - - No - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {$grandstream_gxp_time_zone} - - - Yes - - - - - MTZ+6MDT+5,M4.1.0,M11.1.0 - - - - - - - - yyyy-mm-dd - - - - 12Hour - - - - - - - - - - - - - - - - - - Automatic - - - - - - - - - - - - - - - {$grandstream_lcd_brightness} - - - - {$grandstream_lcd_brightness_idle} - - - - {$grandstream_active_backlight_timeout} - - - - 1 - - - - Default - - - - - - {if isset($grandstream_wallpaper_url)} - Download - {$grandstream_wallpaper_url} - {else} - Default - - {/if} - - - - - #000000 - - - - - {if $grandstream_screensaver == '0'}No{/if} - {if $grandstream_screensaver == '1'}Yes{/if} - {if $grandstream_screensaver == '2'}OnIfNoVPKIsActive{/if} - - - - - {if $grandstream_screensaver_source == '0'}Default{/if} - {if $grandstream_screensaver_source == '1'}USB{/if} - {if $grandstream_screensaver_source == '2'}Download{/if} - - - - - {if $grandstream_screensaver_source == '0'}No{/if} - {if $grandstream_screensaver_source == '1'}Yes{/if} - - - - - - {if isset($grandstream_screensaver_timeout)} - {$grandstream_screensaver_timeout} - {else} - 3 - {/if} - - - - - - {if isset($grandstream_screensaver_server_path)} - {$grandstream_screensaver_server_path} - {else} - - {/if} - - - - - - {if isset($grandstream_screensaver_xml_download_interval)} - {$grandstream_screensaver_xml_download_interval} - {else} - 0 - {/if} - - - - - - Sequential - - - No - - - Default - - - - - - 0 - - - - Yes - - - - - - - - - f1=440,f2=480,c=200/400; - - - - - f1=350,f2=440; - - - - - f1=350,f2=440; - - - - - f1=350,f2=440,c=10/10; - - - - - f1=440,f2=480,c=200/400; - - - - - f1=440,f2=440,c=25/525; - - - - Low - - - - - f1=480,f2=620,c=50/50; - - - - - f1=480,f2=620,c=25/25; - - - - - 5 - - - - - 5 - - - No - - - - - {if isset($grandstream_default_ringtone)} - {$grandstream_default_ringtone} - {else} - 0 - {/if} - - - - - - - Yes - - - - - - - - - - - XMLApp - - - - - - - - - - - - - No - - - No - - - 20 - - - 0 - - - 0 - - - 0 - - - 0 - - - No - - - No - - - - StartTime,StopTime,LocalUser,RemoteUser,LocalIP,RemoteIP,LocalCodec,RemoteCodec,Jitter,JitterBufferMax,PacketLost,PacketLostRate,MosLQ,MosCQ,RoundTripDelay,EndSysDelay,SymmOneWayDelay - - - - - - - - - - Yes - - - - AccountMode - - - - - - No - - - Show - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{$fixed_keys=12} + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 26 + + + + + 46 + + + + + 0 + + + + + 1 + + + + +{if isset($grandstream_lan_port_vlan) } + {$grandstream_lan_port_vlan} +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + +{if isset($grandstream_pc_port_vlan) } + {$grandstream_pc_port_vlan} +{else} + 0 +{/if} + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 30 + + + + + 1500 + + + + + + + + 1 + + + + + 1 + + + + + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + + + + +{if isset($grandstream_bluetooth_power)} + {$grandstream_bluetooth_power} +{/if} + + + + +{if isset($grandstream_bluetooth_handsfree)} + {$grandstream_bluetooth_handsfree} +{/if} + + + + + + + + + + + + + + 0 + + + + + + + + + 1194 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + + 3 + + + + + 161 + + + + + + + + 2 + + + + + + + + 162 + + + + 5 + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + 4 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + + + + + + + + + + + + + + + + + {$user_password} + + + + +{if isset($admin_password)} + {$admin_password} +{else} + {$mac|replace:'-':''} +{/if} + + + + + + + + + + + + 0 + + + + + 0 + + + + 0 + + + + + + 1 + + + + + 0 + + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 10080 + + + + + 0 + + + + 1 + + + + 0 + + + + 1 + + + + + 0 + + + + + 1 + + + + + + 2 + + + +{if $grandstream_config_server_path=="none"} + +{elseif isset($grandstream_config_server_path)} + {$grandstream_config_server_path} +{else} + {$domain_name}{$project_path}/app/provision +{/if} + + + + {$http_auth_username} + + + + {$http_auth_password} + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 1 + + + +{if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/{$firmware_version} +{elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path} +{else} + {$domain_name}{$project_path}/app/provision/resources/firmware/ +{/if} + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + {$grandstream_syslog_server} + + + + +{if isset($grandstream_syslog_level)} + {$grandstream_syslog_level} +{else} + 0 +{/if} + + + + + + + + +{if isset($grandstream_send_sip_log)} + {$grandstream_send_sip_log} +{else} + 0 +{/if} + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + 86400 + + + + + + + + + + + + 7547 + + + + + + + + + + + + + 0 + + + + + + + + 0 + + + + 1 + + + + + 0 + + + + + + + + + + + + + + + + + 1 + + + + + 1 + + + + + 80 + + + + + 443 + + + + 1 + + + + 5 + + + + 20 + + + + 10 + + + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + {$grandstream_phonebook_download} + + + + + + + + + + + + + +{if isset($grandstream_phonebook_download)} + {$grandstream_phonebook_xml_server_path}{$mac}/ +{elseif isset($grandstream_phonebook_xml_server_path)} + {$grandstream_phonebook_xml_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_phonebook_download_interval)} + {$grandstream_phonebook_download_interval} +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + +{if isset($contact_grandstream)} + 2 +{else} + 0 +{/if} + + + + + 0 + + + + + + + + 0 + + + + + + + + 389 + + + + + + {$grandstream_ldap_base_dn} + + + + {$grandstream_ldap_username} + + + + {$grandstream_ldap_password} + + + + + {$grandstream_ldap_number_filter} + + + + + {$grandstream_ldap_name_filter} + + + + + 3 + + + + + {$grandstream_ldap_name_attr} + + + + + {$grandstream_ldap_number_attr} + + + + {$grandstream_ldap_display_name} + + + + + + 50 + + + + + + 30 + + + + + 0 + + + + 0 + + + 0 + + + + givenName sn title + + + + + + + + + 5004 + + + + + 200 + + + + + 1 + + + + + 20 + + + + + + + + + + + + + 0 + + + + 0 + + + + +{if isset($public_mode) } +{if $public_mode|strtolower == 'true'} + 1 +{elseif $public_mode|strtolower == 'yes'} + 1 +{elseif $public_mode == '1'} + 1 +{else} + 0 +{/if} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + 360 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + + + + + + + 5222 + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + CallHistory,LocalPhonebook,RemotePhonebook,FeatureCode + + + + + 1 + + + + + + + + 4 + + + + + 30 + + + + + 0 + + + + + 5 + + + + 0 + + + + + 0 + + + + + 10 + + + + + 10 + + + + + 0 + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + 1 + + + + + 0 + + + + + 0 + + + + + + + + +{if isset($grandstream_auto_attended_transfer)} + {$grandstream_auto_attended_transfer} +{else} + 1 +{/if} + + + + 0 + + + + 1 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 10 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 1 + + + + 0 + + + + + + + + 0 + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + +{if isset($ntp_server_primary)} + {$ntp_server_primary} +{else} + pool.ntp.org +{/if} + + + +{if isset($ntp_server_secondary)} + {$ntp_server_secondary} +{else} + 2.us.pool.ntp.org +{/if} + + + + + 1440 + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($grandstream_timezone) } + {$grandstream_timezone} +{elseif isset($grandstream_gxp_time_zone) } + {$grandstream_gxp_time_zone} +{else} + auto +{/if} + + + + 1 + + + + + MTZ+6MDT+5,M4.1.0,M11.1.0 + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + auto + + + + 0 + + + + + 0 + + + + + + + + + {$grandstream_lcd_brightness} + + + + + {$grandstream_lcd_brightness_idle} + + + + + {$grandstream_active_backlight_timeout} + + + + + 0 + + + + + + 0 + + + +{if isset($grandstream_wallpaper_url)} + 1 + {$grandstream_wallpaper_url} +{else} + 0 + +{/if} + + + + #000000 + + + + +{if isset($grandstream_screensaver)} + {$grandstream_screensaver} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_source)} + {$grandstream_screensaver_source} +{else} + 0 +{/if} + + + + + +{if isset($grandstream_screensaver_show_date_time)} + {$grandstream_screensaver_show_date_time} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_timeout)} + {$grandstream_screensaver_timeout} +{else} + 3 +{/if} + + + +{if isset($grandstream_screensaver_server_path)} + {$grandstream_screensaver_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_screensaver_xml_download_interval)} + {$grandstream_screensaver_xml_download_interval} +{else} + 0 +{/if} + + + + + + + 0 + + + + 0 + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + f1=440,f2=480,c=200/400; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440,c=10/10; + + + + + f1=440,f2=480,c=200/400; + + + + + f1=440,f2=440,c=25/525; + + + + + 0 + + + + + f1=480,f2=620,c=50/50; + + + + + f1=480,f2=620,c=25/25; + + + + + 5 + + + + + 5 + + + + + 0 + + + + +{if isset($grandstream_default_ringtone)} + {$grandstream_default_ringtone} +{/if} + + + + + + + + + + + 1 + + + + + + + + + + + XMLApp + + + + + + + + + 0 + + + + + + + 0 + + + + 0 + + + + 4 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + StartTime,StopTime,LocalUser,RemoteUser,LocalIP,RemoteIP,LocalCodec,RemoteCodec,Jitter,JitterBufferMax,PacketLost,PacketLostRate,MosLQ,MosCQ,RoundTripDelay,EndSysDelay,SymmOneWayDelay + + + + + + + + + + + 1 + + + + + + 2 + + + + + + + + + + 0 + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{$fixed_keys=10} {if $template == "grandstream/grp2612"}{$fixed_keys=3}{/if} {if $template == "grandstream/grp2613"}{$fixed_keys=4}{/if} {if $template == "grandstream/grp2614"}{$fixed_keys=6}{/if} -{if $template == "grandstream/grp2615"}{$fixed_keys=12}{/if} +{if $template == "grandstream/grp2615"}{$fixed_keys=10}{/if} -{$start_id=1} +{$start_id=1363} {assign var=key_types value=["none"=>-1,"line"=>31,"sharedline"=>32,"speeddial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17,"dnd"=>22]} {for $line=1 to 6} {$pid=$line*2-2} {if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} {if $line <= $fixed_keys} - - - {$key_types[$keys.line.$line.device_key_type]} - - - - - Account{$keys.line.$line.device_key_line} - - - - {$keys.line.$line.device_key_label} - - - - {$keys.line.$line.device_key_value} - - - {if $line == '-1'}uncheck{else}check{/if} - - +{$key_types[$keys.line.$line.device_key_type]} +{else} +{$key_types[$keys.line.$line.device_key_type]-10} +{/if} +{$keys.line.$line.device_key_line} +{$keys.line.$line.device_key_label} +{$keys.line.$line.device_key_value} +{else} +{if $line <= $fixed_keys} +0 +{$line-1} + + +{else} +-1 {/if} {/if} {/for} - - - - -{$start_id=7} + +{$start_id=23800} {for $line=7 to 48} {$pid=($line-6)*4-4} {if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} {if $line <= $fixed_keys} - - - {$key_types[$keys.line.$line.device_key_type]} - - - - - Account{$keys.line.$line.device_key_line} - - - - {$keys.line.$line.device_key_label} - - - - {$keys.line.$line.device_key_value} - - - {if $line == '-1'}uncheck{else}check{/if} - +{$key_types[$keys.line.$line.device_key_type]} +{else} +{$key_types[$keys.line.$line.device_key_type]-10} +{/if} +{$keys.line.$line.device_key_line} +{$keys.line.$line.device_key_label} +{$keys.line.$line.device_key_value} +{else} +{if $line <= $fixed_keys} +-1 +0 + + +{else} +-1 {/if} {/if} {/for} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{assign var=key_types value=[""=>None,"0"=>SpeedDial, "blf"=>BLF, "2"=>PresenceWatcher, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"conference"=>12,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} - -{$start_id=1} -{for $mem=1 to 40} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"conference"=>12,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} +{$start_id=323} +{for $mem=1 to 7} {$pid=$mem*3-3} - {if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.memory.$mem.device_key_type|in_array:$key_types} - - - - {else}Account{$keys.memory.$mem.device_key_line+1}{/if} + + + + + + + - - {$keys.memory.$mem.device_key_label} - - - - {$keys.memory.$mem.device_key_value} - - - {$key_types[$keys.memory.$mem.device_key_type]} +{$key_types[$keys.memory.$mem.device_key_type]} + + + + +{$keys.memory.$mem.device_key_line} + + + + +{$keys.memory.$mem.device_key_label} + + + + +{$keys.memory.$mem.device_key_value} +{else} +-1 +0 + + +{/if} + +{/for} + +{$start_id=353} +{for $mem=8 to 18} +{$pid=($mem-7)*4-4} +{if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.line.$line.device_key_type|in_array:$key_types} +{$key_types[$keys.memory.$mem.device_key_type]} +{$keys.memory.$mem.device_key_line} +{$keys.memory.$mem.device_key_label} +{$keys.memory.$mem.device_key_value} +{else} +-1 +0 + + +{/if} + +{/for} + + +{$start_id=1440} +{for $mem=19 to 24} +{$pid=($mem-18)*4-4} +{if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.line.$line.device_key_type|in_array:$key_types} +{$key_types[$keys.memory.$mem.device_key_type]} +{$keys.memory.$mem.device_key_line} +{$keys.memory.$mem.device_key_label} +{$keys.memory.$mem.device_key_value} +{else} +-1 +0 + + +{/if} {/for} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + 1 + + + + + + 0 + + + + + 0 + + + + + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,Redial,Dial,Backspace,PickUp,Target + + + + BTPhonebook,DirectIP,Onhook,Cancel,Dial,Backspace,Target + + + + Answer,Reject,Forward,ReConf + + + + BTOnOff,Cancel,EndCall,ReConf,ConfRoom,ConfCall + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,ConfCall,Cancel,NewCall,Swap,Transfer,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,UCallPark,PrivateHold,CallPark + + + + BTOnOff,EndCall,Kick,NewCall,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,ConfRoom,Add + + + + ReConf,Resume,HoldTrnf,ConfCall,Add + + + + EndCall,ReConf,ConfRoom + + + + BTOnOff,Cancel,BlindTrnf,AttTrnf,Backspace,Target + + + + BTOnOff,Cancel,Dial,Backspace,Target + + + + + + + + + + +{assign var=key_types value=["speed dial"=>10, "speed dial active"=>14,"voicemail"=>16,"call return"=>17,"intercom"=>20,"ldap search"=>21,"menu"=>27]} +{$start_id=2987} +{for $prog=1 to 3} +{$pid=$prog*4-4} +{if isset($keys.programmable.$prog.device_key_category) && isset($keys.programmable.$prog.device_key_type) && $keys.programmable.$prog.device_key_type|in_array:$key_types} +{$key_types[$keys.programmable.$prog.device_key_type]} +{$keys.programmable.$prog.device_key_line} +{$keys.programmable.$prog.device_key_label} +{$keys.programmable.$prog.device_key_value} +{else} +0 +0 + + +{/if} + +{/for} - - - - - - - - Menu + + + + + - - - Yes + + + - - - No + + + - - No + + + + + + + + + + - - - + + + + - - - - BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,Redial,Dial,Backspace,PickUp,Target + + + - - - BTPhonebook,DirectIP,Onhook,Cancel,Dial,Backspace,Target + + + - - - Answer,Reject,Forward,ReConf + + + + + + + + + + + + + -1 - - - BTOnOff,Cancel,EndCall,ReConf,ConfRoom,ConfCall + + + - - - - BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,ConfCall,Cancel,NewCall,Swap,Transfer,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,UCallPark,PrivateHold,CallPark + + + - - - BTOnOff,EndCall,Kick,NewCall,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,ConfRoom,Add + + + + + + + + + + -1 - - - ReConf,Resume,Transfer,ConfCall,Add + + + - - - EndCall,ReConf,ConfRoom + + + - - - BTOnOff,Cancel,BlindTrnf,AttTrnf,Backspace,Target + + + + + + + + + + -1 - - - BTOnOff,Cancel,Dial,Backspace,Target - - - - - - - - - - Default + + + - - + + + - - - - - - - - - - - - - - - Default - - - - - - - - - - - - - - - - - - - Default - - - - - - - - - - - - - - - - - - - - - - Default - - - - - - - - - - - - - - - - - Default - - - - - - - - - - - - - - - - - Default - - - - - - - - - - + From b65c8cd68b60c584b45dd440b51afa19734e6f4b Mon Sep 17 00:00:00 2001 From: Luis Daniel Lucio Quiroz Date: Sat, 6 Jun 2020 11:11:35 -0400 Subject: [PATCH 139/621] $this is a syntax error when using static classes (#5264) --- core/software/resources/classes/software.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/software/resources/classes/software.php b/core/software/resources/classes/software.php index 8936b707a4..30b043f0e8 100644 --- a/core/software/resources/classes/software.php +++ b/core/software/resources/classes/software.php @@ -19,7 +19,7 @@ if (!class_exists('software')) { * numeric_version */ public static function numeric_version() { - $v = explode('.', $this->version()); + $v = explode('.', software::version()); $n = ($v[0] * 10000 + $v[1] * 100 + $v[2]); return $n; } From 8cc421c6c918cbeb8e5c7ba60b117c78f4c20565 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Mon, 8 Jun 2020 19:11:38 -0400 Subject: [PATCH 140/621] Call broadcast - Add caller ID permission (#5296) * Update call_broadcast_edit.php * Update app_config.php --- app/call_broadcast/app_config.php | 4 ++ app/call_broadcast/call_broadcast_edit.php | 45 +++++++++++----------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/app/call_broadcast/app_config.php b/app/call_broadcast/app_config.php index 2e1407dae3..315f60ae70 100644 --- a/app/call_broadcast/app_config.php +++ b/app/call_broadcast/app_config.php @@ -44,6 +44,10 @@ $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "call_broadcast_caller_id"; + $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; $apps[$x]['permissions'][$y]['name'] = "call_broadcast_delete"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; diff --git a/app/call_broadcast/call_broadcast_edit.php b/app/call_broadcast/call_broadcast_edit.php index 98144adfc2..947a893d7d 100644 --- a/app/call_broadcast/call_broadcast_edit.php +++ b/app/call_broadcast/call_broadcast_edit.php @@ -401,28 +401,29 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { //echo "\n"; //echo "\n"; + if permission_exists("call_broadcast_caller_id") { + echo "\n"; + echo "\n"; + echo " ".$text['label-caller-id-name']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo "".$text['description-caller-id-name']."\n"; + echo "\n"; + echo "\n"; - echo "\n"; - echo "\n"; - echo " ".$text['label-caller-id-name']."\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "".$text['description-caller-id-name']."\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo " ".$text['label-callerid-number']."\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "".$text['description-caller-id-number']."\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; + echo " ".$text['label-callerid-number']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo "".$text['description-caller-id-number']."\n"; + echo "\n"; + echo "\n"; + } /* echo "\n"; echo "\n"; @@ -673,4 +674,4 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> From 8a510401bedf8556f5cdba6d986b6bb8b550f4b2 Mon Sep 17 00:00:00 2001 From: frytimo Date: Tue, 9 Jun 2020 00:57:07 -0400 Subject: [PATCH 141/621] $sql and $parameters never unset (#5295) Change order of unset statement as it is after a return statement thus unreachable. --- resources/switch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/switch.php b/resources/switch.php index 89fd056db8..816df20ad6 100644 --- a/resources/switch.php +++ b/resources/switch.php @@ -544,8 +544,8 @@ function extension_exists($extension) { $parameters['extension'] = $extension; $database = new database; $num_rows = $database->select($sql, $parameters, 'column'); + unset($sql, $parameters); return $num_rows > 0 ? true : false; - unset($sql, $parameters, $num_rows); } function extension_presence_id($extension, $number_alias = false) { From e017bb47519cbd28e6ecf8bf454932298cdd6938 Mon Sep 17 00:00:00 2001 From: hershyheilpern Date: Tue, 9 Jun 2020 00:59:25 -0400 Subject: [PATCH 142/621] Update {$mac}.cfg (#5293) --- resources/templates/provision/polycom/4.x/{$mac}.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/polycom/4.x/{$mac}.cfg b/resources/templates/provision/polycom/4.x/{$mac}.cfg index 24f3f476eb..2b8e1704c7 100644 --- a/resources/templates/provision/polycom/4.x/{$mac}.cfg +++ b/resources/templates/provision/polycom/4.x/{$mac}.cfg @@ -3,7 +3,7 @@ Date: Tue, 9 Jun 2020 10:02:43 -0600 Subject: [PATCH 143/621] Update call_broadcast_edit.php Fixed permission check. --- app/call_broadcast/call_broadcast_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/call_broadcast/call_broadcast_edit.php b/app/call_broadcast/call_broadcast_edit.php index 947a893d7d..43ce0b19a5 100644 --- a/app/call_broadcast/call_broadcast_edit.php +++ b/app/call_broadcast/call_broadcast_edit.php @@ -401,7 +401,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { //echo "\n"; //echo "\n"; - if permission_exists("call_broadcast_caller_id") { + if (permission_exists("call_broadcast_caller_id")) { echo "\n"; echo "\n"; echo " ".$text['label-caller-id-name']."\n"; From 1f4a19bbd88532ac3e2d52370a95051f0a903ebc Mon Sep 17 00:00:00 2001 From: frytimo Date: Wed, 10 Jun 2020 15:23:38 -0400 Subject: [PATCH 144/621] Rogue Apostrophe in SQL statement (#5298) Remove rogue apostrophe in SQL statement for :default_setting_value. --- core/upgrade/app_defaults.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/upgrade/app_defaults.php b/core/upgrade/app_defaults.php index 3d9aa97e28..587e12d116 100644 --- a/core/upgrade/app_defaults.php +++ b/core/upgrade/app_defaults.php @@ -52,7 +52,7 @@ if ($domains_processed == 1) { $sql .= "'login', "; $sql .= "'message', "; $sql .= "'text', "; - $sql .= "':default_setting_value, "; + $sql .= ":default_setting_value, "; $sql .= "'true', "; $sql .= "'' "; $sql .= ")"; From 73fd112e0c19dc7978535db11ad26cca852be3de Mon Sep 17 00:00:00 2001 From: Len Date: Thu, 11 Jun 2020 00:53:45 -0400 Subject: [PATCH 145/621] Update app_config.php (#5300) * Update app_config.php --- app/fanvil/app_config.php | 89 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) diff --git a/app/fanvil/app_config.php b/app/fanvil/app_config.php index cf7c491e77..ed3ec39f9f 100644 --- a/app/fanvil/app_config.php +++ b/app/fanvil/app_config.php @@ -991,6 +991,93 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Provisioning URL for Fanvil"; $y++; - + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8a7e84fb-f625-4ed2-83f4-b9f9d77d2929"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_emergency_number"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "911"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the emergency number."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0b8ab3e6-a2cb-4f01-8b63-b9892311b77b"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_name"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Option to display hotel name."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "63f8249c-646f-4f7c-bf09-f3148a2b8bf1"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_floor_number"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Option to display hotel floor number."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ecfe752a-36d1-4b6f-a69a-25d0f749cb78"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_room_number"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Option to display hotel room number."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9874128d-8331-4f91-9a33-d163d19aca5d"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_address"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Option to display hotel address"; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c9f1075e-a9bc-45af-a21b-fba5b7ece9dd"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_tel_number"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Option to display hotel phone number."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f5beb1d3-a3dd-4636-b0e6-8f05bc8c0c90"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_first_text"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Optional text on the lcd screen."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a4873d14-c5e0-4623-9027-86f63028a7f6"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_second_text"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Optional text on the lcd screen."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e59403c0-fa9d-4b93-b106-478fb9ced5d6"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_third_text"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Optional text on the lcd screen."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0f8ed3f6-9aba-4296-be31-5ab18d9caa64"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_fourth_text"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Optional text on the lcd screen."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b42dba7d-e7c9-4231-8e4a-edc28b301123"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_hotel_lcd"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "2"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set Fanvil LCD energy saving. 0=Sleep, 1=Normal, 2=Disable"; + $y++; ?> From 4b405f6b9beb7cd98c586cfd0d06e358fad7ae9f Mon Sep 17 00:00:00 2001 From: Len Date: Thu, 11 Jun 2020 00:55:39 -0400 Subject: [PATCH 146/621] Fanvil H5 Template Update {$mac}.cfg (#5299) --- .../templates/provision/fanvil/h5/{$mac}.cfg | 250 +++++++++--------- 1 file changed, 124 insertions(+), 126 deletions(-) diff --git a/resources/templates/provision/fanvil/h5/{$mac}.cfg b/resources/templates/provision/fanvil/h5/{$mac}.cfg index 8d89ac6f2a..0697fcde38 100644 --- a/resources/templates/provision/fanvil/h5/{$mac}.cfg +++ b/resources/templates/provision/fanvil/h5/{$mac}.cfg @@ -6,8 +6,8 @@ -{if isset($dns_server_primary)}{$dns_server_primary}{else}8.8.8.8{/if} -{if isset($dns_server_secondary)}{$dns_server_secondary}{else}202.96.134.133{/if} +{if isset($dns_server_primary)}{$dns_server_primary}{else}9.9.9.9{/if} +{if isset($dns_server_secondary)}{$dns_server_secondary}{else}8.8.8.8{/if} 1 0 Fanvil H5 @@ -18,13 +18,14 @@ 0 10000 200 -time.nist.gov -pool.ntp.org +{$ntp_server_primary} +{$ntp_server_secondary} 1 -32 -1 -UTC+8 -1 +{$fanvil_time_zone} +{$fanvil_location} +{$fanvil_time_zone_name} +{$fanvil_enable_dst} + 2 60 60 @@ -69,23 +70,23 @@ - - - +{$fanvil_hotel_name} +{$fanvil_hotel_floor_number} +{$fanvil_hotel_room_number} 0 - +{$fanvil_hotel_address} 2 2 - +{$fanvil_hotel_tel_number} 2 2 - +{$fanvil_hotel_first_text} 2 - +{$fanvil_hotel_second_text} 2 - +{$fanvil_hotel_third_text} 2 - +{$fanvil_hotel_fourth_text} 2 2 1 @@ -104,7 +105,6 @@ 1 5 0 -1 . 0 @@ -172,6 +172,7 @@ 1 2 120 +0 1 1 0 @@ -185,6 +186,7 @@ 3 0 0 +5000 P1 @@ -276,30 +278,36 @@ 1 0 0 +500 +4000 +5000 SIP1 - - - - -5060 - - -3600 +{$account.1.user_id} +{$account.1.display_name} +{$fanvil_server_name} +{$account.1.server_address} +{$account.1.sip_port} +{$account.1.auth_id} +{$account.1.password} +{$account.1.register_expires} + 5060 0 3600 0 -0 - -5060 - - - -5060 -0 + +{if isset($account.1.password)}1{else}0{/if} + +{$account.1.outbound_proxy_primary} +{$account.1.sip_port} +{$account.1.auth_id} +{$account.1.password} +{$account.1.outbound_proxy_secondary} +{$account.1.sip_port} +1 1 1800 0 @@ -350,7 +358,13 @@ 0 1 5060 -0 + +{if $account.1.sip_transport == 'udp'}0{/if} +{if $account.1.sip_transport == 'tcp'}1{/if} +{if $account.1.sip_transport == 'tls'}2{/if} +{if $account.1.sip_transport == 'dns srv'}1{/if} +{if $account.1.sip_transport == 'dns srv'}1{/if} + 1 0 0 @@ -415,27 +429,31 @@ SIP2 - - - - -5060 - - -3600 +{$account.2.user_id} +{$account.2.display_name} +{$fanvil_server_name} +{$account.2.server_address} +{$account.2.sip_port} +{$account.2.auth_id} +{$account.2.password} +{$account.2.register_expires} + 5060 0 3600 0 -0 - -5060 - - - -5060 -0 + +{if isset($account.2.password)}1{else}0{/if} + +{$account.2.outbound_proxy_primary} +{$account.2.sip_port} +{$account.2.auth_id} +{$account.2.password} +{$account.2.outbound_proxy_secondary} +{$account.2.sip_port} +1 + 1 1800 0 @@ -486,7 +504,13 @@ 0 1 5060 -0 + +{if $account.2.sip_transport == 'udp'}0{/if} +{if $account.2.sip_transport == 'tcp'}1{/if} +{if $account.2.sip_transport == 'tls'}2{/if} +{if $account.2.sip_transport == 'dns srv'}1{/if} +{if $account.2.sip_transport == 'dns srv'}1{/if} + 1 0 0 @@ -687,10 +711,10 @@ 0 0 -110 -VOIP PHONE +{$fanvil_emergency_number} +{$fanvil_greeting} 5 -0 +{$fanvil_hotel_lcd} 30 0 0 @@ -702,7 +726,9 @@ 0 1 0 -0 + +{if isset($fanvil_time_display)}1{else}0{/if} + 0 H5 1 @@ -710,7 +736,7 @@ 0 0 1 -0 +{$fanvil_date_display} 0 0 1 @@ -967,98 +993,62 @@ + + +{foreach $keys["memory"] as $row} +{if $row.device_key_id <= 15} + + +Fkey{$row.device_key_id} +{if $row.device_key_type == 3}0{elseif $row.device_key_type == 1}2{else}1{/if} +{if $row.device_key_type == 3}{elseif $row.device_key_type == 1}SIP{$row.device_key_line}{else}{$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type}{/if} +{$row.device_key_label} + + +{/if} +{/foreach} + + Fkey1 1 -@1/f + Reception Fkey2 1 -@1/f + Service Fkey3 1 -@1/f + Cleaning Fkey4 1 -@1/f + WakeUp Fkey5 1 -@1/f + Emergency Fkey6 1 -@1/f + Manager - -Fkey7 -0 - - - - -Fkey8 -0 - - - - -Fkey9 -0 - - - - -Fkey10 -0 - - - - -Fkey11 -0 - - - - -Fkey12 -0 - - - - -Fkey13 -0 - - - - -Fkey14 -0 - - - - -Fkey15 -0 - - - + + SoftFkey1 @@ -1125,6 +1115,7 @@ 0x00$0xa9c1c9 + 0x00$0x786d7e 0x00$0x808080 @@ -1133,6 +1124,12 @@ 0 1 0 +0 +1 + + + +1 history;contact;dnd;menu; @@ -1174,15 +1171,16 @@ - - +{$http_auth_username} +{$http_auth_password} + 0 - -0 -0 +https://{$domain_name}/app/provision +5 +1 1 66 0 @@ -1192,7 +1190,7 @@ 5060 0 1 -0 +1 1 1 5 @@ -1222,7 +1220,7 @@ admin admin 0 -01:80:C2:00:00:03 + 1 @@ -1232,7 +1230,7 @@ admin dps dps -00100400FV02001000000c383e273f40 + @@ -1243,7 +1241,7 @@ 0 0 0 -0 +2 3600 020 0 From 47c8ceb521d0fdfb8676cc8b1a75c579fcedb119 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Thu, 11 Jun 2020 01:07:12 -0400 Subject: [PATCH 147/621] Destinations - Add ability to set condition field on per destination (#5301) * Update destination_edit.php * Update app_languages.php * Update app_config.php --- app/destinations/app_config.php | 7 +++++ app/destinations/app_languages.php | 42 +++++++++++++++++++++++++++ app/destinations/destination_edit.php | 32 ++++++++++++++++++-- 3 files changed, 78 insertions(+), 3 deletions(-) diff --git a/app/destinations/app_config.php b/app/destinations/app_config.php index 411a6174e6..9353062f9b 100644 --- a/app/destinations/app_config.php +++ b/app/destinations/app_config.php @@ -82,6 +82,9 @@ $apps[$x]['permissions'][$y]['name'] = "destination_number"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "destination_condition_field"; + //$apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; $apps[$x]['permissions'][$y]['name'] = "destination_caller_id_name"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; @@ -174,6 +177,10 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the prefix."; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "destination_condition_field"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the condition."; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_number_regex"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Regular Expression version of destination number"; diff --git a/app/destinations/app_languages.php b/app/destinations/app_languages.php index 15e4e98de3..f4c8e3e966 100644 --- a/app/destinations/app_languages.php +++ b/app/destinations/app_languages.php @@ -484,6 +484,27 @@ $text['label-destination_prefix']['ru-ru'] = ""; $text['label-destination_prefix']['sv-se'] = ""; $text['label-destination_prefix']['uk-ua'] = ""; +$text['label-destination_condition_field']['en-us'] = "Condition"; +$text['label-destination_condition_field']['en-gb'] = "Condition"; +$text['label-destination_condition_field']['ar-eg'] = ""; +$text['label-destination_condition_field']['de-at'] = ""; //copied from de-de +$text['label-destination_condition_field']['de-ch'] = ""; //copied from de-de +$text['label-destination_condition_field']['de-de'] = ""; +$text['label-destination_condition_field']['es-cl'] = ""; +$text['label-destination_condition_field']['es-mx'] = ""; //copied from es-cl +$text['label-destination_condition_field']['fr-ca'] = ""; //copied from fr-fr +$text['label-destination_condition_field']['fr-fr'] = ""; +$text['label-destination_condition_field']['he-il'] = ""; +$text['label-destination_condition_field']['it-it'] = ""; +$text['label-destination_condition_field']['nl-nl'] = ""; +$text['label-destination_condition_field']['pl-pl'] = ""; +$text['label-destination_condition_field']['pt-br'] = ""; //copied from pt-pt +$text['label-destination_condition_field']['pt-pt'] = ""; +$text['label-destination_condition_field']['ro-ro'] = ""; +$text['label-destination_condition_field']['ru-ru'] = ""; +$text['label-destination_condition_field']['sv-se'] = ""; +$text['label-destination_condition_field']['uk-ua'] = ""; + $text['label-destination_enabled']['en-us'] = "Enabled"; $text['label-destination_enabled']['en-gb'] = "Enabled"; $text['label-destination_enabled']['ar-eg'] = "مفعل"; @@ -1009,6 +1030,27 @@ $text['description-destination_number']['ru-ru'] = "Введите номер н $text['description-destination_number']['sv-se'] = "Ange destinationen."; $text['description-destination_number']['uk-ua'] = "Введіть номер"; +$text['description-destination_condition_field']['en-us'] = "Enter the destination condition."; +$text['description-destination_condition_field']['en-gb'] = "Enter the destination condition."; +$text['description-destination_condition_field']['ar-eg'] = ""; +$text['description-destination_condition_field']['de-at'] = ""; //copied from de-de +$text['description-destination_condition_field']['de-ch'] = ""; //copied from de-de +$text['description-destination_condition_field']['de-de'] = ""; +$text['description-destination_condition_field']['es-cl'] = ""; +$text['description-destination_condition_field']['es-mx'] = ""; //copied from es-cl +$text['description-destination_condition_field']['fr-ca'] = ""; //copied from fr-fr +$text['description-destination_condition_field']['fr-fr'] = ""; +$text['description-destination_condition_field']['he-il'] = ""; +$text['description-destination_condition_field']['it-it'] = ""; +$text['description-destination_condition_field']['nl-nl'] = ""; +$text['description-destination_condition_field']['pl-pl'] = ""; +$text['description-destination_condition_field']['pt-br'] = ""; +$text['description-destination_condition_field']['pt-pt'] = ""; +$text['description-destination_condition_field']['ro-ro'] = ""; +$text['description-destination_condition_field']['ru-ru'] = ""; +$text['description-destination_condition_field']['sv-se'] = ""; +$text['description-destination_condition_field']['uk-ua'] = ""; + $text['description-destination_prefix']['en-us'] = "Enter the destination prefix."; $text['description-destination_prefix']['en-gb'] = "Enter the destination prefix."; $text['description-destination_prefix']['ar-eg'] = ""; diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index a58c4493fc..a0975c5948 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -84,6 +84,7 @@ $dialplan_uuid = trim($_POST["dialplan_uuid"]); $domain_uuid = trim($_POST["domain_uuid"]); $destination_type = trim($_POST["destination_type"]); + $destination_condition_field = trim($_POST["destination_condition_field"]); $destination_number = trim($_POST["destination_number"]); $destination_prefix = trim($_POST["destination_prefix"]); $db_destination_number = trim($_POST["db_destination_number"]); @@ -237,6 +238,9 @@ $destination_number = $row["destination_number"]; $destination_prefix = $row["destination_prefix"]; } + if (!permission_exists('destination_condition_field')) { + $destination_condition_field = $row["destination_condition_field"]; + } if (!permission_exists('destination_context')) { $destination_context = $row["destination_context"]; } @@ -274,7 +278,10 @@ $dialplan_detail_order = 10; //set the dialplan detail type - if (strlen($_SESSION['dialplan']['destination']['text']) > 0) { + if (strlen($destination_condition_field) > 0) { + $dialplan_detail_type = $destination_condition_field; + } + elseif (strlen($_SESSION['dialplan']['destination']['text']) > 0) { $dialplan_detail_type = $_SESSION['dialplan']['destination']['text']; } else { @@ -348,7 +355,10 @@ //check the destination number $dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "condition"; - if (strlen($_SESSION['dialplan']['destination']['text']) > 0) { + if (strlen($destination_condition_field) > 0) { + $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = $destination_condition_field; + } + elseif (strlen($_SESSION['dialplan']['destination']['text']) > 0) { $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = $_SESSION['dialplan']['destination']['text']; } else { @@ -593,6 +603,9 @@ $array['destinations'][0]["dialplan_uuid"] = $dialplan_uuid; $array['destinations'][0]["fax_uuid"] = $fax_uuid; $array['destinations'][0]["destination_type"] = $destination_type; + if (permission_exists('destination_condition_field')) { + $array['destinations'][0]["destination_condition_field"] = $destination_condition_field; + } if (permission_exists('destination_number')) { $array['destinations'][0]["destination_number"] = $destination_number; $array['destinations'][0]["destination_number_regex"] = $destination_number_regex; @@ -617,7 +630,6 @@ } $array['destinations'][0]["destination_enabled"] = $destination_enabled; $array['destinations'][0]["destination_description"] = $destination_description; - //prepare the array $array['dialplans'][] = $dialplan; unset($dialplan); @@ -713,6 +725,7 @@ $dialplan_uuid = $row["dialplan_uuid"]; $destination_type = $row["destination_type"]; $destination_number = $row["destination_number"]; + $destination_condition_field = $row["destination_condition_field"]; $destination_prefix = $row["destination_prefix"]; $destination_caller_id_name = $row["destination_caller_id_name"]; $destination_caller_id_number = $row["destination_caller_id_number"]; @@ -943,6 +956,19 @@ } echo "\n"; echo "\n"; + + if (permission_exists('destination_condition_field')) { + echo "\n"; + echo "\n"; + echo " ".$text['label-destination_condition_field']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-destination_condition_field']."\n"; + echo "\n"; + echo "\n"; + } if (permission_exists('destination_caller_id_name')) { echo "\n"; From 7647e6efccb42f6431e6550d6f1dd21d21d89752 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 11 Jun 2020 22:46:39 -0600 Subject: [PATCH 148/621] When picking up the domain_uuid get also get the device_uuid. --- app/provision/index.php | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/app/provision/index.php b/app/provision/index.php index 401c651738..bff6f5a36f 100644 --- a/app/provision/index.php +++ b/app/provision/index.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Copyright (C) 2008-2019 All Rights Reserved. + Copyright (C) 2008-2020 All Rights Reserved. Contributor(s): Mark J Crane @@ -136,16 +136,21 @@ } } +//get the domain_uuid + $sql = "select device_uuid, domain_uuid from v_devices "; + $sql .= "where device_mac_address = :mac "; + $parameters['mac'] = $mac; + $database = new database; + $row = $database->select($sql, $parameters, 'row'); + if (is_array($row)) { + $domain_uuid = $row['domain_uuid']; + $device_uuid = $row['device_uuid']; + $_SESSION['domain_uuid'] = $domain_uuid; + } + unset($sql, $parameters); + //get the domain_name and domain_uuid if ($_SESSION['provision']['http_domain_filter']['boolean'] == "false") { - //get the domain_uuid - $sql = "select domain_uuid from v_devices "; - $sql .= "where device_mac_address = :mac "; - $parameters['mac'] = $mac; - $database = new database; - $domain_uuid = $database->select($sql, $parameters, 'column'); - $_SESSION['domain_uuid'] = $domain_uuid; - unset($sql, $parameters); //get the domain name $domain_name = $_SESSION['domains'][$domain_uuid]['domain_name']; @@ -473,4 +478,9 @@ echo $file_contents; closelog(); +//device logs + if (file_exists($_SERVER["PROJECT_ROOT"]."/app/device_logs/app_config.php")){ + require_once "app/domains/device_logs/resources/device_logs.php"; + } + ?> From c42e19fd78f7c84efa398f626928cf50e5158b19 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 11 Jun 2020 23:17:45 -0600 Subject: [PATCH 149/621] Update index.php --- app/provision/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/provision/index.php b/app/provision/index.php index bff6f5a36f..037df0b9ff 100644 --- a/app/provision/index.php +++ b/app/provision/index.php @@ -480,7 +480,7 @@ //device logs if (file_exists($_SERVER["PROJECT_ROOT"]."/app/device_logs/app_config.php")){ - require_once "app/domains/device_logs/resources/device_logs.php"; + require_once "app/device_logs/resources/device_logs.php"; } ?> From f07f82c7cb815f0f57f382dd943f91e57d8bc5b7 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 12 Jun 2020 09:12:52 -0600 Subject: [PATCH 150/621] Update app_config.php --- app/contacts/app_config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/contacts/app_config.php b/app/contacts/app_config.php index eccac6a17e..dd52e141bd 100644 --- a/app/contacts/app_config.php +++ b/app/contacts/app_config.php @@ -5,7 +5,7 @@ $apps[$x]['uuid'] = "04481e0e-a478-c559-adad-52bd4174574c"; $apps[$x]['category'] = "CRM"; $apps[$x]['subcategory'] = ""; - $apps[$x]['version'] = "1.0"; + $apps[$x]['version'] = "1.1"; $apps[$x]['license'] = "Mozilla Public License 1.1"; $apps[$x]['contact_url'] = "http://www.fusionpbx.com"; $apps[$x]['description']['en-us'] = "Provides a place to store contact information for individuals and organizations."; From ea4a92251a4908639be68eda9007d03f9e32a26d Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 12 Jun 2020 09:16:57 -0600 Subject: [PATCH 151/621] Change destination prefix description to country code --- app/destinations/app_languages.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/destinations/app_languages.php b/app/destinations/app_languages.php index f4c8e3e966..210e590df1 100644 --- a/app/destinations/app_languages.php +++ b/app/destinations/app_languages.php @@ -1051,8 +1051,8 @@ $text['description-destination_condition_field']['ru-ru'] = ""; $text['description-destination_condition_field']['sv-se'] = ""; $text['description-destination_condition_field']['uk-ua'] = ""; -$text['description-destination_prefix']['en-us'] = "Enter the destination prefix."; -$text['description-destination_prefix']['en-gb'] = "Enter the destination prefix."; +$text['description-destination_prefix']['en-us'] = "Enter the destination country code."; +$text['description-destination_prefix']['en-gb'] = "Enter the destination country code."; $text['description-destination_prefix']['ar-eg'] = ""; $text['description-destination_prefix']['de-at'] = ""; //copied from de-de $text['description-destination_prefix']['de-ch'] = ""; //copied from de-de From b04d21857e95bc356a49a1abdf0667a9bbdbb4d5 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 13 Jun 2020 21:58:16 -0600 Subject: [PATCH 152/621] Add temporary software_add and software_edit permissions --- core/software/app_defaults.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/core/software/app_defaults.php b/core/software/app_defaults.php index a24f6a06c6..103149fc8c 100644 --- a/core/software/app_defaults.php +++ b/core/software/app_defaults.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2019 + Portions created by the Initial Developer are Copyright (C) 2008-2020 the Initial Developer. All Rights Reserved. Contributor(s): @@ -45,12 +45,23 @@ if ($domains_processed == 1) { $array['software'][0]['software_uuid'] = '7de057e7-333b-4ebf-9466-315ae7d44efd'; $array['software'][0]['software_version'] = software::version(); } + + //add the temporary permission + $p = new permissions; + $p->add("software_add", 'temp'); + $p->add("software_edit", 'temp'); + + //save the data $database = new database; $database->app_name = 'software'; $database->app_uuid = 'b88c795f-7dea-4fc8-9ab7-edd555242cff'; $database->save($array); unset($array); + //remove the temporary permission + $p->delete("software_add", 'temp'); + $p->delete("software_edit", 'temp'); + } ?> From 62c11613282f1d45fe5ef7a2bac5ffd21aa8c25c Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 15 Jun 2020 13:20:55 -0600 Subject: [PATCH 153/621] Require the ring group call timeout. --- app/ring_groups/ring_group_edit.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/ring_groups/ring_group_edit.php b/app/ring_groups/ring_group_edit.php index 5d40c8fd03..45320969f8 100644 --- a/app/ring_groups/ring_group_edit.php +++ b/app/ring_groups/ring_group_edit.php @@ -246,6 +246,7 @@ if (strlen($ring_group_extension) == 0) { $msg .= $text['message-extension']."
\n"; } //if (strlen($ring_group_greeting) == 0) { $msg .= $text['message-greeting']."
\n"; } if (strlen($ring_group_strategy) == 0) { $msg .= $text['message-strategy']."
\n"; } + if (strlen($ring_group_call_timeout) == 0) { $msg .= $text['message-call_timeout']."
\n"; } //if (strlen($ring_group_timeout_app) == 0) { $msg .= $text['message-timeout-action']."
\n"; } //if (strlen($ring_group_cid_name_prefix) == 0) { $msg .= "Please provide: Caller ID Name Prefix
\n"; } //if (strlen($ring_group_cid_number_prefix) == 0) { $msg .= "Please provide: Caller ID Number Prefix
\n"; } @@ -829,7 +830,7 @@ echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo " ".$text['label-call_timeout']."\n"; echo "\n"; echo "\n"; From be8d2fcc3def524fc4b5263350ea41b17763f39d Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 15 Jun 2020 13:24:31 -0600 Subject: [PATCH 154/621] Rename translation label message-timeout to message-call_timeout --- app/ring_groups/app_languages.php | 80 +++++++++++++++---------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/app/ring_groups/app_languages.php b/app/ring_groups/app_languages.php index fee81fc33c..2674e4379c 100644 --- a/app/ring_groups/app_languages.php +++ b/app/ring_groups/app_languages.php @@ -274,47 +274,47 @@ $text['option-disabled']['ru-ru'] = "Выключено"; $text['option-disabled']['sv-se'] = "Avaktiverad"; $text['option-disabled']['uk-ua'] = "Виключено"; -$text['message-timeout-action']['en-us'] = "Please provide: Timeout Action"; -$text['message-timeout-action']['en-gb'] = "Please provide: Timeout Action"; -$text['message-timeout-action']['ar-eg'] = ""; -$text['message-timeout-action']['de-at'] = "Bitte geben Sie folgendes an: Time-Out Aktion"; //copied from de-de -$text['message-timeout-action']['de-ch'] = "Bitte geben Sie folgendes an: Time-Out Aktion"; //copied from de-de -$text['message-timeout-action']['de-de'] = "Bitte geben Sie folgendes an: Time-Out Aktion"; -$text['message-timeout-action']['es-cl'] = "Por favor indique: Acción en timeout"; -$text['message-timeout-action']['es-mx'] = "Por favor indique: Acción en timeout"; //copied from es-cl -$text['message-timeout-action']['fr-ca'] = "Merci d'indiquer: Action sur non réponse"; //copied from fr-fr -$text['message-timeout-action']['fr-fr'] = "Merci d'indiquer: Action sur non réponse"; -$text['message-timeout-action']['he-il'] = ""; -$text['message-timeout-action']['it-it'] = "Prego fornire: Azione al timeout"; -$text['message-timeout-action']['nl-nl'] = "Geef aub.: Aktie timeout"; -$text['message-timeout-action']['pl-pl'] = "Wprowadź następny krok po upływie limitu czasu operacji"; -$text['message-timeout-action']['pt-br'] = "Por favor indique: Ação de tempo de saída"; -$text['message-timeout-action']['pt-pt'] = "Por favor indique: Acção de Timeout"; -$text['message-timeout-action']['ro-ro'] = ""; -$text['message-timeout-action']['ru-ru'] = "Пожалуйста, предоставьте: Действие при превышении времени ожидания"; -$text['message-timeout-action']['sv-se'] = "Ange: Timeout Åtgärd"; -$text['message-timeout-action']['uk-ua'] = ""; +$text['message-timeout_action']['en-us'] = "Please provide: Timeout Action"; +$text['message-timeout_action']['en-gb'] = "Please provide: Timeout Action"; +$text['message-timeout_action']['ar-eg'] = ""; +$text['message-timeout_action']['de-at'] = "Bitte geben Sie folgendes an: Time-Out Aktion"; //copied from de-de +$text['message-timeout_action']['de-ch'] = "Bitte geben Sie folgendes an: Time-Out Aktion"; //copied from de-de +$text['message-timeout_action']['de-de'] = "Bitte geben Sie folgendes an: Time-Out Aktion"; +$text['message-timeout_action']['es-cl'] = "Por favor indique: Acción en timeout"; +$text['message-timeout_action']['es-mx'] = "Por favor indique: Acción en timeout"; //copied from es-cl +$text['message-timeout_action']['fr-ca'] = "Merci d'indiquer: Action sur non réponse"; //copied from fr-fr +$text['message-timeout_action']['fr-fr'] = "Merci d'indiquer: Action sur non réponse"; +$text['message-timeout_action']['he-il'] = ""; +$text['message-timeout_action']['it-it'] = "Prego fornire: Azione al timeout"; +$text['message-timeout_action']['nl-nl'] = "Geef aub.: Aktie timeout"; +$text['message-timeout_action']['pl-pl'] = "Wprowadź następny krok po upływie limitu czasu operacji"; +$text['message-timeout_action']['pt-br'] = "Por favor indique: Ação de tempo de saída"; +$text['message-timeout_action']['pt-pt'] = "Por favor indique: Acção de Timeout"; +$text['message-timeout_action']['ro-ro'] = ""; +$text['message-timeout_action']['ru-ru'] = "Пожалуйста, предоставьте: Действие при превышении времени ожидания"; +$text['message-timeout_action']['sv-se'] = "Ange: Timeout Åtgärd"; +$text['message-timeout_action']['uk-ua'] = ""; -$text['message-timeout']['en-us'] = "Please provide: Timeout"; -$text['message-timeout']['en-gb'] = "Please provide: Timeout"; -$text['message-timeout']['ar-eg'] = ""; -$text['message-timeout']['de-at'] = "Bitte geben Sie folgendes an: Time-Out"; //copied from de-de -$text['message-timeout']['de-ch'] = "Bitte geben Sie folgendes an: Time-Out"; //copied from de-de -$text['message-timeout']['de-de'] = "Bitte geben Sie folgendes an: Time-Out"; -$text['message-timeout']['es-cl'] = "Por favor indique: Timeout"; -$text['message-timeout']['es-mx'] = "Por favor indique: Timeout"; //copied from es-cl -$text['message-timeout']['fr-ca'] = "Merci d'indiquer: Durée de sonnerie"; //copied from fr-fr -$text['message-timeout']['fr-fr'] = "Merci d'indiquer: Durée de sonnerie"; -$text['message-timeout']['he-il'] = ""; -$text['message-timeout']['it-it'] = "Prego fornire: Timeout"; -$text['message-timeout']['nl-nl'] = "Geef aub.: Timeout"; -$text['message-timeout']['pl-pl'] = "Wprowadź limit czasu operacji"; -$text['message-timeout']['pt-br'] = "Por favor indique: Tempo de saída"; -$text['message-timeout']['pt-pt'] = "Por favor indique: Timeout"; -$text['message-timeout']['ro-ro'] = ""; -$text['message-timeout']['ru-ru'] = "Пожалуйста укажите: время ожидания"; -$text['message-timeout']['sv-se'] = "Ange: Timeout"; -$text['message-timeout']['uk-ua'] = ""; +$text['message-call_timeout']['en-us'] = "Please provide: Timeout"; +$text['message-call_timeout']['en-gb'] = "Please provide: Timeout"; +$text['message-call_timeout']['ar-eg'] = ""; +$text['message-call_timeout']['de-at'] = "Bitte geben Sie folgendes an: Time-Out"; //copied from de-de +$text['message-call_timeout']['de-ch'] = "Bitte geben Sie folgendes an: Time-Out"; //copied from de-de +$text['message-call_timeout']['de-de'] = "Bitte geben Sie folgendes an: Time-Out"; +$text['message-call_timeout']['es-cl'] = "Por favor indique: Timeout"; +$text['message-call_timeout']['es-mx'] = "Por favor indique: Timeout"; //copied from es-cl +$text['message-call_timeout']['fr-ca'] = "Merci d'indiquer: Durée de sonnerie"; //copied from fr-fr +$text['message-call_timeout']['fr-fr'] = "Merci d'indiquer: Durée de sonnerie"; +$text['message-call_timeout']['he-il'] = ""; +$text['message-call_timeout']['it-it'] = "Prego fornire: Timeout"; +$text['message-call_timeout']['nl-nl'] = "Geef aub.: Timeout"; +$text['message-call_timeout']['pl-pl'] = "Wprowadź limit czasu operacji"; +$text['message-call_timeout']['pt-br'] = "Por favor indique: Tempo de saída"; +$text['message-call_timeout']['pt-pt'] = "Por favor indique: Timeout"; +$text['message-call_timeout']['ro-ro'] = ""; +$text['message-call_timeout']['ru-ru'] = "Пожалуйста укажите: время ожидания"; +$text['message-call_timeout']['sv-se'] = "Ange: Timeout"; +$text['message-call_timeout']['uk-ua'] = ""; $text['message-strategy']['en-us'] = "Please provide: Strategy"; $text['message-strategy']['en-gb'] = "Please provide: Strategy"; From dc137edabe50d116c6f57fce68d5cde26bc14ad2 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 15 Jun 2020 13:26:02 -0600 Subject: [PATCH 155/621] Rename message-timeout-action to message-timeout_action --- app/ring_groups/ring_group_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/ring_groups/ring_group_edit.php b/app/ring_groups/ring_group_edit.php index 45320969f8..b454aaae3f 100644 --- a/app/ring_groups/ring_group_edit.php +++ b/app/ring_groups/ring_group_edit.php @@ -247,7 +247,7 @@ //if (strlen($ring_group_greeting) == 0) { $msg .= $text['message-greeting']."
\n"; } if (strlen($ring_group_strategy) == 0) { $msg .= $text['message-strategy']."
\n"; } if (strlen($ring_group_call_timeout) == 0) { $msg .= $text['message-call_timeout']."
\n"; } - //if (strlen($ring_group_timeout_app) == 0) { $msg .= $text['message-timeout-action']."
\n"; } + //if (strlen($ring_group_timeout_app) == 0) { $msg .= $text['message-timeout_action']."
\n"; } //if (strlen($ring_group_cid_name_prefix) == 0) { $msg .= "Please provide: Caller ID Name Prefix
\n"; } //if (strlen($ring_group_cid_number_prefix) == 0) { $msg .= "Please provide: Caller ID Number Prefix
\n"; } //if (strlen($ring_group_ringback) == 0) { $msg .= "Please provide: Ringback
\n"; } From 87497721c6639945e367f479739dd95dbd3b95d5 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 15 Jun 2020 13:38:53 -0600 Subject: [PATCH 156/621] Default the ring_group_call_timeout to 30 seconds. --- app/ring_groups/ring_group_edit.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/ring_groups/ring_group_edit.php b/app/ring_groups/ring_group_edit.php index b454aaae3f..3051a12cd0 100644 --- a/app/ring_groups/ring_group_edit.php +++ b/app/ring_groups/ring_group_edit.php @@ -497,6 +497,9 @@ if (strlen($ring_group_ringback) == 0) { $ring_group_ringback = '${us-ring}'; } + if (strlen($ring_group_call_timeout) == 0) { + $ring_group_call_timeout = '30'; + } //get the ring group destination array if ($action == "add") { From 0ce0f597f68dfae5cdd34026f0467343260f5a7b Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Tue, 16 Jun 2020 22:35:51 -0400 Subject: [PATCH 157/621] Update functions.php (#5302) --- resources/functions.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/resources/functions.php b/resources/functions.php index 6bb3113db6..5eac3af9e1 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -1708,6 +1708,7 @@ function number_pad($number,$n) { //converts a string to a regular expression if (!function_exists('string_to_regex')) { function string_to_regex($string, $prefix='') { + $original_string = $string; //escape the plus if (substr($string, 0, 1) == "+") { $string = "^\\+(".substr($string, 1).")$"; @@ -1723,9 +1724,11 @@ function number_pad($number,$n) { } } //convert N,X,Z syntax to regex - $string = str_ireplace("N", "[2-9]", $string); - $string = str_ireplace("X", "[0-9]", $string); - $string = str_ireplace("Z", "[1-9]", $string); + if (preg_match('/^[NnXxZz]+$/', $original_string)) { + $string = str_ireplace("N", "[2-9]", $string); + $string = str_ireplace("X", "[0-9]", $string); + $string = str_ireplace("Z", "[1-9]", $string); + } //add ^ to the start of the string if missing if (substr($string, 0, 1) != "^") { $string = "^".$string; @@ -2162,4 +2165,4 @@ function number_pad($number,$n) { } } -?> \ No newline at end of file +?> From 10d95bb11789773bd004930602688620551c512f Mon Sep 17 00:00:00 2001 From: frytimo Date: Wed, 17 Jun 2020 12:14:23 -0400 Subject: [PATCH 158/621] Fix typo (#5303) Missing ";" on unset statement. --- app/contacts/contact_import_google.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/contacts/contact_import_google.php b/app/contacts/contact_import_google.php index ec9703a643..51372e9a3e 100644 --- a/app/contacts/contact_import_google.php +++ b/app/contacts/contact_import_google.php @@ -114,7 +114,7 @@ if ($_POST['a'] == 'import') { //delete duplicate contact $obj = new contacts; $obj->delete($array); - unset($array) + unset($array); //revoke temporary permissions $p->delete('contact_delete', 'temp'); @@ -604,4 +604,4 @@ function curl_file_get_contents($url) { curl_close($curl); return $contents; } -?> \ No newline at end of file +?> From 0671ed9f1ed153c0337b755d7a3817682cefc6c8 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Wed, 17 Jun 2020 12:47:41 -0400 Subject: [PATCH 159/621] Update ivr.conf.lua (#5304) --- .../xml_handler/resources/scripts/configuration/ivr.conf.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua index 46378dcdb5..d6450bcea7 100644 --- a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua +++ b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua @@ -274,7 +274,7 @@ --freeswitch.consoleLog("notice", "[xml_handler]"..api:execute("eval ${dsn}")); --set the cache - local ok, err = cache.set(ivr_menu_uuid, XML_STRING, expire["ivr"]); + local ok, err = cache.set("configuration:ivr.conf:" .. ivr_menu_uuid, XML_STRING, expire["ivr"]); if debug["cache"] then if ok then freeswitch.consoleLog("notice", "[xml_handler] " .. ivr_menu_uuid .. " stored in the cache\n"); From ecaf45b407f63f40f2722ef1e34ba059cf6b9a71 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 17 Jun 2020 13:11:33 -0600 Subject: [PATCH 160/621] Add ivr_menu_parent_uuid --- app/ivr_menus/app_config.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/ivr_menus/app_config.php b/app/ivr_menus/app_config.php index b79ec5450c..1a50e39f3c 100644 --- a/app/ivr_menus/app_config.php +++ b/app/ivr_menus/app_config.php @@ -187,6 +187,13 @@ $apps[$x]['db'][$y]['fields'][$z]['search'] = 'true'; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "ivr_menu_parent_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']['mysql'] = "char(36)"; + $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "ivr_menu_language"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; From 754692bc7677d4662d8297743555fe3164264a51 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 17 Jun 2020 13:20:38 -0600 Subject: [PATCH 161/621] Add new label label-ivr_menu_parent_uuid --- app/ivr_menus/app_languages.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/app/ivr_menus/app_languages.php b/app/ivr_menus/app_languages.php index 4011cde672..6b9dd4408d 100644 --- a/app/ivr_menus/app_languages.php +++ b/app/ivr_menus/app_languages.php @@ -421,6 +421,27 @@ $text['label-extension']['ru-ru'] = "Внутренний Номер"; $text['label-extension']['sv-se'] = "Anknytning"; $text['label-extension']['uk-ua'] = ""; +$text['label-ivr_menu_parent_uuid']['en-us'] = "Parent Menu"; +$text['label-ivr_menu_parent_uuid']['en-gb'] = "Parent Menu"; +$text['label-ivr_menu_parent_uuid']['ar-eg'] = ""; +$text['label-ivr_menu_parent_uuid']['de-at'] = "Übergeordnetes Menü"; //copied from de-de +$text['label-ivr_menu_parent_uuid']['de-ch'] = "Übergeordnetes Menü"; //copied from de-de +$text['label-ivr_menu_parent_uuid']['de-de'] = "Übergeordnetes Menü"; +$text['label-ivr_menu_parent_uuid']['es-cl'] = "Nivel Superior"; +$text['label-ivr_menu_parent_uuid']['es-mx'] = "Nivel Superior"; //copied from es-cl +$text['label-ivr_menu_parent_uuid']['fr-ca'] = "Menu Parent"; //copied from fr-fr +$text['label-ivr_menu_parent_uuid']['fr-fr'] = "Menu Parent"; +$text['label-ivr_menu_parent_uuid']['he-il'] = ""; +$text['label-ivr_menu_parent_uuid']['it-it'] = "Menu Padre"; +$text['label-ivr_menu_parent_uuid']['nl-nl'] = ""; +$text['label-ivr_menu_parent_uuid']['pl-pl'] = "Główne menu"; +$text['label-ivr_menu_parent_uuid']['pt-br'] = "Menu Pai"; +$text['label-ivr_menu_parent_uuid']['pt-pt'] = "Menu Pai"; +$text['label-ivr_menu_parent_uuid']['ro-ro'] = ""; +$text['label-ivr_menu_parent_uuid']['ru-ru'] = "Родительское меню"; +$text['label-ivr_menu_parent_uuid']['sv-se'] = "Överordnad Meny"; +$text['label-ivr_menu_parent_uuid']['uk-ua'] = "Батьківське меню"; + $text['label-exit_sound']['en-us'] = "Exit Sound"; $text['label-exit_sound']['en-gb'] = "Exit Sound"; $text['label-exit_sound']['ar-eg'] = ""; From ec7024ed414eb461b353f97b8d0b4a88a31f43b8 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 17 Jun 2020 13:39:57 -0600 Subject: [PATCH 162/621] Add ivr_menu_parent_uuid for adding a parent IVR Menu --- app/ivr_menus/ivr_menu_edit.php | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/app/ivr_menus/ivr_menu_edit.php b/app/ivr_menus/ivr_menu_edit.php index 47c4188d5f..ab80aecc7c 100644 --- a/app/ivr_menus/ivr_menu_edit.php +++ b/app/ivr_menus/ivr_menu_edit.php @@ -105,6 +105,7 @@ //get ivr menu $ivr_menu_name = $_POST["ivr_menu_name"]; $ivr_menu_extension = $_POST["ivr_menu_extension"]; + $ivr_menu_parent_uuid = $_POST["ivr_menu_parent_uuid"]; $ivr_menu_greet_long = $_POST["ivr_menu_greet_long"]; $ivr_menu_greet_short = $_POST["ivr_menu_greet_short"]; $ivr_menu_language = $_POST["ivr_menu_language"]; @@ -253,6 +254,7 @@ $array['ivr_menus'][0]["dialplan_uuid"] = $dialplan_uuid; $array['ivr_menus'][0]["ivr_menu_name"] = $ivr_menu_name; $array['ivr_menus'][0]["ivr_menu_extension"] = $ivr_menu_extension; + $array['ivr_menus'][0]["ivr_menu_parent_uuid"] = $ivr_menu_parent_uuid; $array['ivr_menus'][0]["ivr_menu_language"] = $ivr_menu_language; $array['ivr_menus'][0]["ivr_menu_greet_long"] = $ivr_menu_greet_long; $array['ivr_menus'][0]["ivr_menu_greet_short"] = $ivr_menu_greet_short; @@ -421,6 +423,7 @@ $dialplan_uuid = $row["dialplan_uuid"]; $ivr_menu_name = $row["ivr_menu_name"]; $ivr_menu_extension = $row["ivr_menu_extension"]; + $ivr_menu_parent_uuid = $row["ivr_menu_parent_uuid"]; $ivr_menu_language = $row["ivr_menu_language"]; $ivr_menu_dialect = $row["ivr_menu_dialect"]; $ivr_menu_voice = $row["ivr_menu_voice"]; @@ -469,6 +472,15 @@ $ivr_menu_options = $database->select($sql, $parameters, 'all'); unset($sql, $parameters); +//get the ivr menus + $sql = "select * from v_ivr_menus "; + $sql .= "where domain_uuid = :domain_uuid "; + $sql .= "order by v_ivr_menus asc "; + $parameters['domain_uuid'] = $_SESSION['domain_uuid']; + $database = new database; + $ivr_menus = $database->select($sql, $parameters, 'all'); + unset($sql, $parameters); + //add an empty row to the options array if (count($ivr_menu_options) == 0) { $rows = $_SESSION['ivr_menu']['option_add_rows']['numeric']; @@ -616,7 +628,24 @@ echo $text['description-extension']."\n"; echo "\n"; echo "\n"; - + + echo " "; + echo " ".$text['label-ivr_menu_parent_uuid'].""; + echo " "; + echo ""; + echo " "; + echo " "; + echo "\n"; echo "\n"; echo " ".$text['label-language']."\n"; From 5eb7df9d766a0efc80091cc90a4f61f0c7b31b67 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 17 Jun 2020 18:51:13 -0600 Subject: [PATCH 163/621] Rename README.md to readme.md --- README.md => readme.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README.md => readme.md (100%) diff --git a/README.md b/readme.md similarity index 100% rename from README.md rename to readme.md From f97249aa79d7b5095a71bfa2cd13f0a6b9147df1 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Wed, 17 Jun 2020 21:18:09 -0400 Subject: [PATCH 164/621] Update ivr_menu_edit.php (#5305) --- app/ivr_menus/ivr_menu_edit.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/ivr_menus/ivr_menu_edit.php b/app/ivr_menus/ivr_menu_edit.php index ab80aecc7c..9212395e39 100644 --- a/app/ivr_menus/ivr_menu_edit.php +++ b/app/ivr_menus/ivr_menu_edit.php @@ -635,12 +635,14 @@ echo ""; echo " "; From ddc27525a8a4be38de30c13edef62397815cb8a6 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 17 Jun 2020 19:27:22 -0600 Subject: [PATCH 165/621] Combine related IVR menu XML. --- .../scripts/configuration/ivr.conf.lua | 346 +++++++++--------- 1 file changed, 180 insertions(+), 166 deletions(-) diff --git a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua index d6450bcea7..22549a07da 100644 --- a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua +++ b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua @@ -1,6 +1,6 @@ -- xml_handler.lua -- Part of FusionPBX --- Copyright (C) 2016-2018 Mark J Crane +-- Copyright (C) 2016-2020 Mark J Crane -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -49,6 +49,14 @@ json = require "resources.functions.lunajson" end + --start the xml array + local xml = {} + table.insert(xml, [[]]); + table.insert(xml, [[]]); + table.insert(xml, [[
]]); + table.insert(xml, [[ ]]); + table.insert(xml, [[ ]]); + --set the sound prefix sound_prefix = sounds_dir.."/${default_language}/${default_dialect}/${default_voice}/"; @@ -60,211 +68,217 @@ --get the ivr menu from the database local sql = [[SELECT * FROM v_ivr_menus - WHERE ivr_menu_uuid = :ivr_menu_uuid - AND ivr_menu_enabled = 'true' ]]; + WHERE (ivr_menu_uuid = :ivr_menu_uuid or ivr_menu_parent_uuid = :ivr_menu_uuid) + AND ivr_menu_enabled = 'true' + ORDER BY ivr_menu_parent_uuid desc + ]]; local params = {ivr_menu_uuid = ivr_menu_uuid}; if (debug["sql"]) then freeswitch.consoleLog("notice", "[ivr_menu] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n"); end dbh:query(sql, params, function(row) - domain_uuid = row["domain_uuid"]; - ivr_menu_name = row["ivr_menu_name"]; - ivr_menu_extension = row["ivr_menu_extension"]; - ivr_menu_greet_long = row["ivr_menu_greet_long"]; - ivr_menu_greet_short = row["ivr_menu_greet_short"]; - ivr_menu_invalid_sound = row["ivr_menu_invalid_sound"]; - ivr_menu_exit_sound = row["ivr_menu_exit_sound"]; - ivr_menu_confirm_macro = row["ivr_menu_confirm_macro"]; - ivr_menu_confirm_key = row["ivr_menu_confirm_key"]; - ivr_menu_tts_engine = row["ivr_menu_tts_engine"]; - ivr_menu_tts_voice = row["ivr_menu_tts_voice"]; - ivr_menu_confirm_attempts = row["ivr_menu_confirm_attempts"]; - ivr_menu_timeout = row["ivr_menu_timeout"]; - --ivr_menu_exit_app = row["ivr_menu_exit_app"]; - --ivr_menu_exit_data = row["ivr_menu_exit_data"]; - ivr_menu_inter_digit_timeout = row["ivr_menu_inter_digit_timeout"]; - ivr_menu_max_failures = row["ivr_menu_max_failures"]; - ivr_menu_max_timeouts = row["ivr_menu_max_timeouts"]; - ivr_menu_digit_len = row["ivr_menu_digit_len"]; - ivr_menu_direct_dial = row["ivr_menu_direct_dial"]; - ivr_menu_ringback = row["ivr_menu_ringback"]; - ivr_menu_cid_prefix = row["ivr_menu_cid_prefix"]; - ivr_menu_description = row["ivr_menu_description"]; - end); + --set the variables + domain_uuid = row["domain_uuid"]; + ivr_menu_name = row["ivr_menu_name"]; + ivr_menu_extension = row["ivr_menu_extension"]; + ivr_menu_greet_long = row["ivr_menu_greet_long"]; + ivr_menu_greet_short = row["ivr_menu_greet_short"]; + ivr_menu_invalid_sound = row["ivr_menu_invalid_sound"]; + ivr_menu_exit_sound = row["ivr_menu_exit_sound"]; + ivr_menu_confirm_macro = row["ivr_menu_confirm_macro"]; + ivr_menu_confirm_key = row["ivr_menu_confirm_key"]; + ivr_menu_tts_engine = row["ivr_menu_tts_engine"]; + ivr_menu_tts_voice = row["ivr_menu_tts_voice"]; + ivr_menu_confirm_attempts = row["ivr_menu_confirm_attempts"]; + ivr_menu_timeout = row["ivr_menu_timeout"]; + --ivr_menu_exit_app = row["ivr_menu_exit_app"]; + --ivr_menu_exit_data = row["ivr_menu_exit_data"]; + ivr_menu_inter_digit_timeout = row["ivr_menu_inter_digit_timeout"]; + ivr_menu_max_failures = row["ivr_menu_max_failures"]; + ivr_menu_max_timeouts = row["ivr_menu_max_timeouts"]; + ivr_menu_digit_len = row["ivr_menu_digit_len"]; + ivr_menu_direct_dial = row["ivr_menu_direct_dial"]; + ivr_menu_ringback = row["ivr_menu_ringback"]; + ivr_menu_cid_prefix = row["ivr_menu_cid_prefix"]; + ivr_menu_description = row["ivr_menu_description"]; - local settings = Settings.new(dbh, domain_name, domain_uuid) - local storage_type = settings:get('recordings', 'storage_type', 'text') - local storage_path = settings:get('recordings', 'storage_path', 'text') - if (storage_path ~= nil) then - storage_path = storage_path:gsub("${domain_name}", domain_name) - storage_path = storage_path:gsub("${domain_uuid}", domain_uuid) - end - --get the recordings from the database - ivr_menu_greet_long_is_base64 = false; - ivr_menu_greet_short_is_base64 = false; - ivr_menu_invalid_sound_is_base64 = false; - ivr_menu_exit_sound_is_base64 = false; - if (storage_type == "base64") then - --include the file io - local file = require "resources.functions.file" + --set the storage path + local settings = Settings.new(dbh, domain_name, domain_uuid) + local storage_type = settings:get('recordings', 'storage_type', 'text') + local storage_path = settings:get('recordings', 'storage_path', 'text') + if (storage_path ~= nil) then + storage_path = storage_path:gsub("${domain_name}", domain_name) + storage_path = storage_path:gsub("${domain_uuid}", domain_uuid) + end - --connect to db - local dbh = Database.new('system', 'base64/read'); + --get the recordings from the database + ivr_menu_greet_long_is_base64 = false; + ivr_menu_greet_short_is_base64 = false; + ivr_menu_invalid_sound_is_base64 = false; + ivr_menu_exit_sound_is_base64 = false; + if (storage_type == "base64") then + --include the file io + local file = require "resources.functions.file" - --base path for recordings - local base_path = recordings_dir.."/"..domain_name + --connect to db + local dbh = Database.new('system', 'base64/read'); - --function to get recording to local fs - local function load_record(name) - local path = base_path .. "/" .. name; - local is_base64 = false; + --base path for recordings + local base_path = recordings_dir.."/"..domain_name - if not file_exists(path) then - local sql = "SELECT recording_base64 FROM v_recordings " .. - "WHERE domain_uuid = :domain_uuid " .. - "AND recording_filename = :name " - local params = {domain_uuid = domain_uuid, name = name}; - if (debug["sql"]) then - freeswitch.consoleLog("notice", "[ivr_menu] SQL: "..sql.."; params:" .. json.encode(params) .. "\n"); + --function to get recording to local fs + local function load_record(name) + local path = base_path .. "/" .. name; + local is_base64 = false; + + if not file_exists(path) then + local sql = "SELECT recording_base64 FROM v_recordings " .. + "WHERE domain_uuid = :domain_uuid " .. + "AND recording_filename = :name " + local params = {domain_uuid = domain_uuid, name = name}; + if (debug["sql"]) then + freeswitch.consoleLog("notice", "[ivr_menu] SQL: "..sql.."; params:" .. json.encode(params) .. "\n"); + end + + dbh:query(sql, params, function(row) + --save the recording to the file system + if #row.recording_base64 > 32 then + is_base64 = true; + file.write_base64(path, row.recording_base64); + --add the full path and file name + name = path; + end + end); + end + return name, is_base64 end - dbh:query(sql, params, function(row) - --save the recording to the file system - if #row.recording_base64 > 32 then - is_base64 = true; - file.write_base64(path, row.recording_base64); - --add the full path and file name - name = path; - end - end); - end - return name, is_base64 + --greet long + if #ivr_menu_greet_long > 1 then + ivr_menu_greet_long, ivr_menu_greet_long_is_base64 = load_record(ivr_menu_greet_long) + end + + --greet short + if #ivr_menu_greet_short > 1 then + ivr_menu_greet_short, ivr_menu_greet_short_is_base64 = load_record(ivr_menu_greet_short) + end + + --invalid sound + if #ivr_menu_invalid_sound > 1 then + ivr_menu_invalid_sound, ivr_menu_invalid_sound_is_base64 = load_record(ivr_menu_invalid_sound) + end + + --exit sound + if #ivr_menu_exit_sound > 1 then + ivr_menu_exit_sound, ivr_menu_exit_sound_is_base64 = load_record(ivr_menu_exit_sound) + end + + dbh:release() + elseif (storage_type == "http_cache") then + --add the path to file name + ivr_menu_greet_long = storage_path.."/"..ivr_menu_greet_long; + ivr_menu_greet_short = storage_path.."/"..ivr_menu_greet_short; + ivr_menu_invalid_sound = storage_path.."/"..ivr_menu_invalid_sound; + ivr_menu_exit_sound = storage_path.."/"..ivr_menu_exit_sound; end --greet long - if #ivr_menu_greet_long > 1 then - ivr_menu_greet_long, ivr_menu_greet_long_is_base64 = load_record(ivr_menu_greet_long) + if (not ivr_menu_greet_long_is_base64 and not file_exists(ivr_menu_greet_long)) then + if (file_exists(recordings_dir.."/"..domain_name.."/"..ivr_menu_greet_long)) then + ivr_menu_greet_long = recordings_dir.."/"..domain_name.."/"..ivr_menu_greet_long; + elseif (file_exists(sounds_dir.."/en/us/callie/8000/"..ivr_menu_greet_long)) then + ivr_menu_greet_long = sounds_dir.."/${default_language}/${default_dialect}/${default_voice}/"..ivr_menu_greet_long; + end end --greet short - if #ivr_menu_greet_short > 1 then - ivr_menu_greet_short, ivr_menu_greet_short_is_base64 = load_record(ivr_menu_greet_short) + if (string.len(ivr_menu_greet_short) > 1) then + if (not ivr_menu_greet_short_is_base64 and not file_exists(ivr_menu_greet_short)) then + if (file_exists(recordings_dir.."/"..domain_name.."/"..ivr_menu_greet_short)) then + ivr_menu_greet_short = recordings_dir.."/"..domain_name.."/"..ivr_menu_greet_short; + elseif (file_exists(sounds_dir.."/en/us/callie/8000/"..ivr_menu_greet_short)) then + ivr_menu_greet_short = sounds_dir.."/${default_language}/${default_dialect}/${default_voice}/"..ivr_menu_greet_short; + end + end + else + ivr_menu_greet_short = ivr_menu_greet_long; end --invalid sound - if #ivr_menu_invalid_sound > 1 then - ivr_menu_invalid_sound, ivr_menu_invalid_sound_is_base64 = load_record(ivr_menu_invalid_sound) + if (not ivr_menu_invalid_sound_is_base64 and not file_exists(ivr_menu_invalid_sound)) then + if (file_exists(recordings_dir.."/"..domain_name.. "/"..ivr_menu_invalid_sound)) then + ivr_menu_invalid_sound = recordings_dir.."/"..domain_name.."/"..ivr_menu_invalid_sound; + elseif (file_exists(sounds_dir.."/en/us/callie/8000/"..ivr_menu_invalid_sound)) then + ivr_menu_invalid_sound = sounds_dir.."/${default_language}/${default_dialect}/${default_voice}/"..ivr_menu_invalid_sound; + end end --exit sound - if #ivr_menu_exit_sound > 1 then - ivr_menu_exit_sound, ivr_menu_exit_sound_is_base64 = load_record(ivr_menu_exit_sound) + if (not ivr_menu_exit_sound_is_base64 and not file_exists(ivr_menu_exit_sound)) then + if (file_exists(recordings_dir.."/"..ivr_menu_exit_sound)) then + if (ivr_menu_exit_sound ~= nil and ivr_menu_exit_sound ~= "") then + ivr_menu_exit_sound = recordings_dir.."/"..domain_name.."/"..ivr_menu_exit_sound; + end + elseif (file_exists(sounds_dir.."/en/us/callie/8000/"..ivr_menu_exit_sound)) then + ivr_menu_exit_sound = sounds_dir.."/${default_language}/${default_dialect}/${default_voice}/"..ivr_menu_exit_sound; + end end - dbh:release() - elseif (storage_type == "http_cache") then - --add the path to file name - ivr_menu_greet_long = storage_path.."/"..ivr_menu_greet_long; - ivr_menu_greet_short = storage_path.."/"..ivr_menu_greet_short; - ivr_menu_invalid_sound = storage_path.."/"..ivr_menu_invalid_sound; - ivr_menu_exit_sound = storage_path.."/"..ivr_menu_exit_sound; - end + --add xml to the array + table.insert(xml, [[ ]]); - --greet long - if (not ivr_menu_greet_long_is_base64 and not file_exists(ivr_menu_greet_long)) then - if (file_exists(recordings_dir.."/"..domain_name.."/"..ivr_menu_greet_long)) then - ivr_menu_greet_long = recordings_dir.."/"..domain_name.."/"..ivr_menu_greet_long; - elseif (file_exists(sounds_dir.."/en/us/callie/8000/"..ivr_menu_greet_long)) then - ivr_menu_greet_long = sounds_dir.."/${default_language}/${default_dialect}/${default_voice}/"..ivr_menu_greet_long; - end - end - - --greet short - if (string.len(ivr_menu_greet_short) > 1) then - if (not ivr_menu_greet_short_is_base64 and not file_exists(ivr_menu_greet_short)) then - if (file_exists(recordings_dir.."/"..domain_name.."/"..ivr_menu_greet_short)) then - ivr_menu_greet_short = recordings_dir.."/"..domain_name.."/"..ivr_menu_greet_short; - elseif (file_exists(sounds_dir.."/en/us/callie/8000/"..ivr_menu_greet_short)) then - ivr_menu_greet_short = sounds_dir.."/${default_language}/${default_dialect}/${default_voice}/"..ivr_menu_greet_short; + --get the ivr menu options + local sql = [[SELECT * FROM v_ivr_menu_options WHERE ivr_menu_uuid = :ivr_menu_uuid ORDER BY ivr_menu_option_order asc ]]; + local params = {ivr_menu_uuid = ivr_menu_uuid}; + if (debug["sql"]) then + freeswitch.consoleLog("notice", "[ivr_menu] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n"); end - end - else - ivr_menu_greet_short = ivr_menu_greet_long; - end + dbh:query(sql, params, function(r) + ivr_menu_option_digits = r.ivr_menu_option_digits + ivr_menu_option_action = r.ivr_menu_option_action + ivr_menu_option_param = r.ivr_menu_option_param + ivr_menu_option_description = r.ivr_menu_option_description + table.insert(xml, [[ ]]); + end); - --invalid sound - if (not ivr_menu_invalid_sound_is_base64 and not file_exists(ivr_menu_invalid_sound)) then - if (file_exists(recordings_dir.."/"..domain_name.. "/"..ivr_menu_invalid_sound)) then - ivr_menu_invalid_sound = recordings_dir.."/"..domain_name.."/"..ivr_menu_invalid_sound; - elseif (file_exists(sounds_dir.."/en/us/callie/8000/"..ivr_menu_invalid_sound)) then - ivr_menu_invalid_sound = sounds_dir.."/${default_language}/${default_dialect}/${default_voice}/"..ivr_menu_invalid_sound; - end - end - - --exit sound - if (not ivr_menu_exit_sound_is_base64 and not file_exists(ivr_menu_exit_sound)) then - if (file_exists(recordings_dir.."/"..ivr_menu_exit_sound)) then - if (ivr_menu_exit_sound ~= nil and ivr_menu_exit_sound ~= "") then - ivr_menu_exit_sound = recordings_dir.."/"..domain_name.."/"..ivr_menu_exit_sound; + --direct dial + if (ivr_menu_direct_dial == "true") then + table.insert(xml, [[ \n]]); + table.insert(xml, [[ \n]]); + table.insert(xml, [[ \n]]); end - elseif (file_exists(sounds_dir.."/en/us/callie/8000/"..ivr_menu_exit_sound)) then - ivr_menu_exit_sound = sounds_dir.."/${default_language}/${default_dialect}/${default_voice}/"..ivr_menu_exit_sound; - end - end - --start the xml array - local xml = {} - table.insert(xml, [[]]); - table.insert(xml, [[]]); - table.insert(xml, [[
]]); - table.insert(xml, [[ ]]); - table.insert(xml, [[ ]]); - table.insert(xml, [[ ]]); + --close the extension tag if it was left open + table.insert(xml, [[ ]]); - --get the ivr menu options - local sql = [[SELECT * FROM v_ivr_menu_options WHERE ivr_menu_uuid = :ivr_menu_uuid ORDER BY ivr_menu_option_order asc ]]; - local params = {ivr_menu_uuid = ivr_menu_uuid}; - if (debug["sql"]) then - freeswitch.consoleLog("notice", "[ivr_menu] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n"); - end - dbh:query(sql, params, function(r) - ivr_menu_option_digits = r.ivr_menu_option_digits - ivr_menu_option_action = r.ivr_menu_option_action - ivr_menu_option_param = r.ivr_menu_option_param - ivr_menu_option_description = r.ivr_menu_option_description - table.insert(xml, [[ ]]); end); - --direct dial - if (ivr_menu_direct_dial == "true") then - table.insert(xml, [[ \n]]); - table.insert(xml, [[ \n]]); - table.insert(xml, [[ \n]]); - end - - --close the extension tag if it was left open - table.insert(xml, [[
]]); + --add the xml closing tags table.insert(xml, [[
]]); table.insert(xml, [[
]]); table.insert(xml, [[
]]); table.insert(xml, [[
]]); + + --save the xml table into a string XML_STRING = table.concat(xml, "\n"); + + --optinonal debug message if (debug["xml_string"]) then freeswitch.consoleLog("notice", "[xml_handler] XML_STRING: " .. XML_STRING .. "\n"); end From dd9e61862da3ae906479ed1a2c035a38634f5769 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 18 Jun 2020 07:56:00 -0600 Subject: [PATCH 166/621] Change the destination prefix description. --- app/destinations/app_languages.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/destinations/app_languages.php b/app/destinations/app_languages.php index 210e590df1..e9083b475d 100644 --- a/app/destinations/app_languages.php +++ b/app/destinations/app_languages.php @@ -1051,8 +1051,8 @@ $text['description-destination_condition_field']['ru-ru'] = ""; $text['description-destination_condition_field']['sv-se'] = ""; $text['description-destination_condition_field']['uk-ua'] = ""; -$text['description-destination_prefix']['en-us'] = "Enter the destination country code."; -$text['description-destination_prefix']['en-gb'] = "Enter the destination country code."; +$text['description-destination_prefix']['en-us'] = "Enter the country code."; +$text['description-destination_prefix']['en-gb'] = "Enter the country code."; $text['description-destination_prefix']['ar-eg'] = ""; $text['description-destination_prefix']['de-at'] = ""; //copied from de-de $text['description-destination_prefix']['de-ch'] = ""; //copied from de-de From 6378e395ae0ea9f6be39eff3ad2cbd5aabab496e Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 18 Jun 2020 08:08:26 -0600 Subject: [PATCH 167/621] Add prefix to the destination list. --- app/destinations/destinations.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/destinations/destinations.php b/app/destinations/destinations.php index 86e83e9c26..36a4477959 100644 --- a/app/destinations/destinations.php +++ b/app/destinations/destinations.php @@ -225,6 +225,7 @@ echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param, "class='shrink'"); } echo th_order_by('destination_type', $text['label-destination_type'], $order_by, $order, $param, "class='shrink'"); + echo th_order_by('destination_prefix', $text['label-destination_prefix'], $order_by, $order, $param, "class='shrink'"); echo th_order_by('destination_number', $text['label-destination_number'], $order_by, $order, $param, "class='shrink'"); if (!$_GET['show'] == "all") { echo "". $text['label-detail_action'].""; @@ -266,14 +267,17 @@ echo " ".escape($domain)."\n"; } echo " ".escape($row['destination_type'])." \n"; - echo " "; + echo " ".escape($row['destination_prefix'])." \n"; + + echo " \n"; if (permission_exists('destination_edit')) { - echo "".escape(format_phone($row['destination_number'])).""; + echo " ".escape(format_phone($row['destination_number']))."\n"; } else { - echo escape(format_phone($row['destination_number'])); + echo " ".escape(format_phone($row['destination_number'])); } echo " \n"; + if (!$_GET['show'] == "all") { echo " ".action_name($destination_array, $row['destination_app'].':'.$row['destination_data'])." \n"; } @@ -308,4 +312,4 @@ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> From 3c3932ca7d58172d2cf34265e504f2aced7ddf9d Mon Sep 17 00:00:00 2001 From: Mark J Crane Date: Thu, 18 Jun 2020 10:44:16 -0600 Subject: [PATCH 168/621] Add additional IVR Menu Options to the Destination Select list --- .../resources/classes/destinations.php | 12 +++- app/ivr_menus/app_config.php | 42 ++++++++----- app/ivr_menus/app_languages.php | 63 +++++++++++++++++++ 3 files changed, 99 insertions(+), 18 deletions(-) diff --git a/app/destinations/resources/classes/destinations.php b/app/destinations/resources/classes/destinations.php index ea1a355f61..28d492564c 100644 --- a/app/destinations/resources/classes/destinations.php +++ b/app/destinations/resources/classes/destinations.php @@ -125,7 +125,7 @@ if (!class_exists('destinations')) { if ($this->destinations !== null && is_array($this->destinations)) { $x = 0; foreach ($this->destinations as $row) { - if ($row['type'] = 'sql') { + if ($row['type'] === 'sql') { $table_name = preg_replace('#[^a-zA-Z0-9_]#', '', $row['name']); if (isset($row['sql'])) { if (is_array($row['sql'])) { @@ -160,6 +160,9 @@ if (!class_exists('destinations')) { $this->destinations[$x]['result']['sql'] = $sql; $this->destinations[$x]['result']['data'] = $result; } + if ($row['type'] === 'array') { + $this->destinations[$x] = $row; + } $x++; } } @@ -268,7 +271,7 @@ if (!class_exists('destinations')) { $select_label = $row['select_label']; foreach ($row['field'] as $key => $value) { if ($key == 'destination' and is_array($value)){ - if ($value['type'] == 'csv') { + if ($value['type'] === 'csv') { $array = explode($value['delimiter'], $data[$key]); $select_value = str_replace("\${destination}", $array[0], $select_value); $select_label = str_replace("\${destination}", $array[0], $select_label); @@ -384,7 +387,7 @@ if (!class_exists('destinations')) { //add the sql and data to the array $x = 0; foreach ($this->destinations as $row) { - if ($row['type'] = 'sql') { + if ($row['type'] === 'sql') { $table_name = preg_replace('#[^a-zA-Z0-9_]#', '', $row['name']); if (isset($row['sql'])) { if (is_array($row['sql'])) { @@ -419,6 +422,9 @@ if (!class_exists('destinations')) { $this->destinations[$x]['result']['sql'] = $sql; $this->destinations[$x]['result']['data'] = $result; } + if ($row['type'] === 'array') { + $this->destinations[$x] = $row; + } $x++; } $this->destinations[$x]['type'] = 'array'; diff --git a/app/ivr_menus/app_config.php b/app/ivr_menus/app_config.php index 1a50e39f3c..cca6fed5d9 100644 --- a/app/ivr_menus/app_config.php +++ b/app/ivr_menus/app_config.php @@ -42,21 +42,33 @@ $apps[$x]['destinations'][$y]['select_value']['dialplan'] = "transfer:\${destination} XML \${context}"; $apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-exec-app:transfer \${destination} XML \${context}"; $apps[$x]['destinations'][$y]['select_label'] = "\${destination} \${name}"; - //if ($_SESSION['ivr_menu']['application']['text'] != "lua") { - // $y++; - // $apps[$x]['destinations'][$y]['type'] = "sql"; - // $apps[$x]['destinations'][$y]['label'] = "ivr_menus_sub"; - // $apps[$x]['destinations'][$y]['name'] = "ivr_menus"; - // $apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and ivr_menu_enabled = 'true' "; - // $apps[$x]['destinations'][$y]['order_by'] = "ivr_menu_extension asc"; - // $apps[$x]['destinations'][$y]['field']['name'] = "ivr_menu_name"; - // $apps[$x]['destinations'][$y]['field']['uuid'] = "ivr_menu_uuid"; - // //$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "ivr:\${ivr_menu_uuid}"; - // $apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-sub:\${uuid}"; - // $apps[$x]['destinations'][$y]['select_label'] = "\${name}"; - //} - //menu-top - //menu-exit + + $y++; + $apps[$x]['destinations'][$y]['type'] = "sql"; + $apps[$x]['destinations'][$y]['label'] = "ivr_menus_sub"; + $apps[$x]['destinations'][$y]['name'] = "ivr_menus"; + $apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and ivr_menu_enabled = 'true' "; + $apps[$x]['destinations'][$y]['order_by'] = "ivr_menu_extension asc"; + $apps[$x]['destinations'][$y]['field']['name'] = "ivr_menu_name"; + $apps[$x]['destinations'][$y]['field']['uuid'] = "ivr_menu_uuid"; + $apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-sub:\${uuid}"; + $apps[$x]['destinations'][$y]['select_label'] = "\${name}"; + + $y++; + $apps[$x]['destinations'][$y]['type'] = 'array'; + $apps[$x]['destinations'][$y]['label'] = 'ivr_menus_other'; + $apps[$x]['destinations'][$y]['name'] = 'ivr_menus'; + $apps[$x]['destinations'][$y]['field']['name'] = 'name'; + $apps[$x]['destinations'][$y]['field']['destination'] = 'destination'; + $apps[$x]['destinations'][$y]['select_value']['ivr'] = "\${name}:"; + $apps[$x]['destinations'][$y]['select_label'] = "\${name}"; + $z=0; + $apps[$x]['destinations'][$y]['result']['data'][$z]['label'] = 'top'; + $apps[$x]['destinations'][$y]['result']['data'][$z]['name'] = 'menu-top'; + $apps[$x]['destinations'][$y]['result']['data'][$z]['application'] = 'menu-top'; + $z++; + $apps[$x]['destinations'][$y]['result']['data'][$z]['label'] = 'exit'; + $apps[$x]['destinations'][$y]['result']['data'][$z]['name'] = 'menu-exit'; //menu-say-phrase //menu-play-sound diff --git a/app/ivr_menus/app_languages.php b/app/ivr_menus/app_languages.php index 6b9dd4408d..f8dc93c149 100644 --- a/app/ivr_menus/app_languages.php +++ b/app/ivr_menus/app_languages.php @@ -106,6 +106,69 @@ $text['title-ivr_menus_sub']['ru-ru'] = "Суб-опции Голосового $text['title-ivr_menus_sub']['sv-se'] = "IVR Menyer - Sub"; $text['title-ivr_menus_sub']['uk-ua'] = ""; +$text['title-ivr_menus_other']['en-us'] = "IVR Menus - Other"; +$text['title-ivr_menus_other']['en-gb'] = "IVR Menus - Other"; +$text['title-ivr_menus_other']['ar-eg'] = ""; +$text['title-ivr_menus_other']['de-at'] = "Automatische Vermittlungen - Other"; //copied from de-de +$text['title-ivr_menus_other']['de-ch'] = "Automatische Vermittlungen - Other"; //copied from de-de +$text['title-ivr_menus_other']['de-de'] = "Automatische Vermittlungen - Other"; +$text['title-ivr_menus_other']['es-cl'] = "Menus IVR - Other"; +$text['title-ivr_menus_other']['es-mx'] = "Menus IVR - Other"; //copied from es-cl +$text['title-ivr_menus_other']['fr-ca'] = "Menus SVI - Other"; //copied from fr-fr +$text['title-ivr_menus_other']['fr-fr'] = "Menus SVI - Other"; +$text['title-ivr_menus_other']['he-il'] = ""; +$text['title-ivr_menus_other']['it-it'] = "Menu IVR - Other"; +$text['title-ivr_menus_other']['nl-nl'] = "IVR Sub - menu"; +$text['title-ivr_menus_other']['pl-pl'] = "Menu zapowiedzi głosowych (IVR) - Other"; +$text['title-ivr_menus_other']['pt-br'] = "Menus de IVR - Other"; //copied from pt-pt +$text['title-ivr_menus_other']['pt-pt'] = "Menus de IVR - Other"; +$text['title-ivr_menus_other']['ro-ro'] = ""; +$text['title-ivr_menus_other']['ru-ru'] = "Суб-опции Голосового Меню (IVR)"; +$text['title-ivr_menus_other']['sv-se'] = "IVR Menyer - Other"; +$text['title-ivr_menus_other']['uk-ua'] = ""; + +$text['option-exit']['en-us'] = "Exit"; +$text['option-exit']['en-gb'] = ""; +$text['option-exit']['ar-eg'] = ""; +$text['option-exit']['de-at'] = ""; //copied from de-de +$text['option-exit']['de-ch'] = ""; //copied from de-de +$text['option-exit']['de-de'] = ""; +$text['option-exit']['es-cl'] = ""; +$text['option-exit']['es-mx'] = ""; //copied from es-cl +$text['option-exit']['fr-ca'] = ""; //copied from fr-fr +$text['option-exit']['fr-fr'] = ""; +$text['option-exit']['he-il'] = ""; +$text['option-exit']['it-it'] = ""; +$text['option-exit']['nl-nl'] = ""; +$text['option-exit']['pl-pl'] = ""; +$text['option-exit']['pt-br'] = ""; //copied from pt-pt +$text['option-exit']['pt-pt'] = ""; +$text['option-exit']['ro-ro'] = ""; +$text['option-exit']['ru-ru'] = ""; +$text['option-exit']['sv-se'] = ""; +$text['option-exit']['uk-ua'] = ""; + +$text['option-top']['en-us'] = "Top"; +$text['option-top']['en-gb'] = ""; +$text['option-top']['ar-eg'] = ""; +$text['option-top']['de-at'] = ""; //copied from de-de +$text['option-top']['de-ch'] = ""; //copied from de-de +$text['option-top']['de-de'] = ""; +$text['option-top']['es-cl'] = ""; +$text['option-top']['es-mx'] = ""; //copied from es-cl +$text['option-top']['fr-ca'] = ""; //copied from fr-fr +$text['option-top']['fr-fr'] = ""; +$text['option-top']['he-il'] = ""; +$text['option-top']['it-it'] = ""; +$text['option-top']['nl-nl'] = ""; +$text['option-top']['pl-pl'] = ""; +$text['option-top']['pt-br'] = ""; //copied from pt-pt +$text['option-top']['pt-pt'] = ""; +$text['option-top']['ro-ro'] = ""; +$text['option-top']['ru-ru'] = ""; +$text['option-top']['sv-se'] = ""; +$text['option-top']['uk-ua'] = ""; + $text['message-maximum_ivr_menus']['en-us'] = "Maximum IVR Menus:"; $text['message-maximum_ivr_menus']['en-gb'] = "Maximum IVR Menus:"; $text['message-maximum_ivr_menus']['ar-eg'] = ""; From 1bee86dba0968b6350f9dc74d07f14b83a8a29ff Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 18 Jun 2020 11:31:08 -0600 Subject: [PATCH 169/621] Comment out the example fifo --- resources/templates/conf/autoload_configs/fifo.conf.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/templates/conf/autoload_configs/fifo.conf.xml b/resources/templates/conf/autoload_configs/fifo.conf.xml index d7c65968c6..0ea2eebfdc 100644 --- a/resources/templates/conf/autoload_configs/fifo.conf.xml +++ b/resources/templates/conf/autoload_configs/fifo.conf.xml @@ -4,8 +4,10 @@ + + {member_wait=nowait}user/1005@$${domain} + --> From 4a67c9c0bd7e577443c28c17bd0981f17ed71bcf Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Thu, 18 Jun 2020 13:38:32 -0400 Subject: [PATCH 170/621] Update ivr.conf.lua (#5306) --- .../xml_handler/resources/scripts/configuration/ivr.conf.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua index 22549a07da..8d4cbe0ad1 100644 --- a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua +++ b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua @@ -26,6 +26,7 @@ --get the ivr name ivr_menu_uuid = params:getHeader("Menu-Name"); + original_ivr_menu_uuid = ivr_menu_uuid local log = require "resources.functions.log".ivr_menu @@ -80,6 +81,7 @@ dbh:query(sql, params, function(row) --set the variables domain_uuid = row["domain_uuid"]; + ivr_menu_uuid = row["ivr_menu_uuid"]; ivr_menu_name = row["ivr_menu_name"]; ivr_menu_extension = row["ivr_menu_extension"]; ivr_menu_greet_long = row["ivr_menu_greet_long"]; @@ -288,7 +290,7 @@ --freeswitch.consoleLog("notice", "[xml_handler]"..api:execute("eval ${dsn}")); --set the cache - local ok, err = cache.set("configuration:ivr.conf:" .. ivr_menu_uuid, XML_STRING, expire["ivr"]); + local ok, err = cache.set("configuration:ivr.conf:" .. original_ivr_menu_uuid, XML_STRING, expire["ivr"]); if debug["cache"] then if ok then freeswitch.consoleLog("notice", "[xml_handler] " .. ivr_menu_uuid .. " stored in the cache\n"); From 38adb8013054996b11933ccc2d4b3f33b1ddea86 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Thu, 18 Jun 2020 15:16:22 -0400 Subject: [PATCH 171/621] Add IVR menu-back (#5307) * Update app_config.php * Update app_languages.php * Update ivr_menu_edit.php --- app/ivr_menus/app_config.php | 4 ++++ app/ivr_menus/app_languages.php | 21 +++++++++++++++++++++ app/ivr_menus/ivr_menu_edit.php | 1 + 3 files changed, 26 insertions(+) diff --git a/app/ivr_menus/app_config.php b/app/ivr_menus/app_config.php index cca6fed5d9..43a68f709c 100644 --- a/app/ivr_menus/app_config.php +++ b/app/ivr_menus/app_config.php @@ -67,6 +67,10 @@ $apps[$x]['destinations'][$y]['result']['data'][$z]['name'] = 'menu-top'; $apps[$x]['destinations'][$y]['result']['data'][$z]['application'] = 'menu-top'; $z++; + $apps[$x]['destinations'][$y]['result']['data'][$z]['label'] = 'back'; + $apps[$x]['destinations'][$y]['result']['data'][$z]['label'] = 'back'; + $apps[$x]['destinations'][$y]['result']['data'][$z]['name'] = 'menu-back'; + $z++; $apps[$x]['destinations'][$y]['result']['data'][$z]['label'] = 'exit'; $apps[$x]['destinations'][$y]['result']['data'][$z]['name'] = 'menu-exit'; //menu-say-phrase diff --git a/app/ivr_menus/app_languages.php b/app/ivr_menus/app_languages.php index f8dc93c149..62e135c59f 100644 --- a/app/ivr_menus/app_languages.php +++ b/app/ivr_menus/app_languages.php @@ -169,6 +169,27 @@ $text['option-top']['ru-ru'] = ""; $text['option-top']['sv-se'] = ""; $text['option-top']['uk-ua'] = ""; +$text['option-back']['en-us'] = "Back"; +$text['option-back']['en-gb'] = "Back"; +$text['option-back']['ar-eg'] = ""; +$text['option-back']['de-at'] = ""; //copied from de-de +$text['option-back']['de-ch'] = ""; //copied from de-de +$text['option-back']['de-de'] = ""; +$text['option-back']['es-cl'] = ""; +$text['option-back']['es-mx'] = ""; //copied from es-cl +$text['option-back']['fr-ca'] = ""; //copied from fr-fr +$text['option-back']['fr-fr'] = ""; +$text['option-back']['he-il'] = ""; +$text['option-back']['it-it'] = ""; +$text['option-back']['nl-nl'] = ""; +$text['option-back']['pl-pl'] = ""; +$text['option-back']['pt-br'] = ""; //copied from pt-pt +$text['option-back']['pt-pt'] = ""; +$text['option-back']['ro-ro'] = ""; +$text['option-back']['ru-ru'] = ""; +$text['option-back']['sv-se'] = ""; +$text['option-back']['uk-ua'] = ""; + $text['message-maximum_ivr_menus']['en-us'] = "Maximum IVR Menus:"; $text['message-maximum_ivr_menus']['en-gb'] = "Maximum IVR Menus:"; $text['message-maximum_ivr_menus']['ar-eg'] = ""; diff --git a/app/ivr_menus/ivr_menu_edit.php b/app/ivr_menus/ivr_menu_edit.php index 9212395e39..ef823ffa5a 100644 --- a/app/ivr_menus/ivr_menu_edit.php +++ b/app/ivr_menus/ivr_menu_edit.php @@ -393,6 +393,7 @@ $cache = new cache; $cache->delete("dialplan:".$_SESSION["context"]); $cache->delete("configuration:ivr.conf:".$ivr_menu_uuid); + $cache->delete("configuration:ivr.conf:".$ivr_menu_parent_uuid); //set the add message if ($action == "add" && permission_exists('ivr_menu_add')) { From 7786e3e1b4ac8020162cf7ef8c7cf487a2f478e5 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 18 Jun 2020 17:07:24 -0600 Subject: [PATCH 172/621] Add type to the destination class valid method. --- app/destinations/resources/classes/destinations.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/destinations/resources/classes/destinations.php b/app/destinations/resources/classes/destinations.php index 28d492564c..a17f22cb64 100644 --- a/app/destinations/resources/classes/destinations.php +++ b/app/destinations/resources/classes/destinations.php @@ -427,6 +427,7 @@ if (!class_exists('destinations')) { } $x++; } + $this->destinations[$x]['type'] = 'array'; $this->destinations[$x]['label'] = 'other'; $this->destinations[$x]['name'] = 'dialplans'; @@ -549,8 +550,8 @@ if (!class_exists('destinations')) { /** * valid destination */ - public function valid($destination) { - $destinations = $this->all('dialplan'); + public function valid($destination, $type = 'dialplan') { + $destinations = $this->all($type); foreach($destinations as $category => $array) { if (is_array($array)) { foreach ($array as $key => $value) { From 5e1d8c74effa4fd8e3b7a6eb3f4b556c833590d2 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 18 Jun 2020 17:08:46 -0600 Subject: [PATCH 173/621] Use the valid type = ivr --- app/ivr_menus/ivr_menu_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/ivr_menus/ivr_menu_edit.php b/app/ivr_menus/ivr_menu_edit.php index ef823ffa5a..e7f41e3939 100644 --- a/app/ivr_menus/ivr_menu_edit.php +++ b/app/ivr_menus/ivr_menu_edit.php @@ -303,7 +303,7 @@ $array['ivr_menus'][0]['ivr_menu_options'][$y]["ivr_menu_option_uuid"] = $ivr_menu_option_uuid; $array['ivr_menus'][0]['ivr_menu_options'][$y]["ivr_menu_option_digits"] = $row["ivr_menu_option_digits"]; $array['ivr_menus'][0]['ivr_menu_options'][$y]["ivr_menu_option_action"] = $ivr_menu_option_action; - if ($destination->valid(preg_replace('/\s/', ':', $ivr_menu_option_param, 1))) { + if ($destination->valid(preg_replace('/\s/', ':', $ivr_menu_option_param, 1), 'ivr')) { $array['ivr_menus'][0]['ivr_menu_options'][$y]["ivr_menu_option_param"] = $ivr_menu_option_param; } $array['ivr_menus'][0]['ivr_menu_options'][$y]["ivr_menu_option_order"] = $row["ivr_menu_option_order"]; From 32a9799241a816b328b2c5922ef9ddd37481ab21 Mon Sep 17 00:00:00 2001 From: benwiesner1 <42681729+benwiesner1@users.noreply.github.com> Date: Thu, 18 Jun 2020 17:59:01 -0700 Subject: [PATCH 174/621] Update {$mac}.cfg (#5308) fixed small error --- resources/templates/provision/polycom/5.x/{$mac}.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/polycom/5.x/{$mac}.cfg b/resources/templates/provision/polycom/5.x/{$mac}.cfg index 85e7ce6cf7..d80b25dede 100644 --- a/resources/templates/provision/polycom/5.x/{$mac}.cfg +++ b/resources/templates/provision/polycom/5.x/{$mac}.cfg @@ -233,7 +233,7 @@ efk.efkprompt.1.label="Voice Mail ID to transfer to:" efk.efkprompt.1.status="1" efk.efkprompt.1.type="numeric" - {if isset($polycom_softkey__do_not_disturb)}softkey.feature.doNotDisturb="{$polycom_softkey_do_not_disturb}"{/if} + {if isset($polycom_softkey_do_not_disturb)}softkey.feature.doNotDisturb="{$polycom_softkey_do_not_disturb}"{/if} {if isset($polycom_softkey_forward)}softkey.feature.forward="{$polycom_softkey_forward}"{/if} /> Date: Fri, 19 Jun 2020 08:41:50 -0600 Subject: [PATCH 175/621] Remove a line that was accidently added to the new ivr_menu_uuid field. --- app/ivr_menus/app_config.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/ivr_menus/app_config.php b/app/ivr_menus/app_config.php index 43a68f709c..4590922f77 100644 --- a/app/ivr_menus/app_config.php +++ b/app/ivr_menus/app_config.php @@ -207,7 +207,6 @@ $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']['mysql'] = "char(36)"; - $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "ivr_menu_language"; From d7881b7dc5fd8d5d34b79e7f45f41153085334fb Mon Sep 17 00:00:00 2001 From: Luis Daniel Lucio Quiroz Date: Fri, 19 Jun 2020 11:00:02 -0400 Subject: [PATCH 176/621] [4.5] Use INT instead of NUMERIC (#5311) --- app/devices/device_copy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/devices/device_copy.php b/app/devices/device_copy.php index 588d612896..a383e4f871 100644 --- a/app/devices/device_copy.php +++ b/app/devices/device_copy.php @@ -99,7 +99,7 @@ $sql .= "when 'programmable' then 3 "; $sql .= "when 'expansion' then 4 "; $sql .= "else 100 END, "; - $sql .= "cast(device_key_id as numeric) asc "; + $sql .= "cast(device_key_id as int) asc "; $parameters['device_uuid'] = $device_uuid; $database = new database; $device_keys = $database->select($sql, $parameters, 'all'); From aa9c7c1277a2409e87a16377e6dd426e240d1c84 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 19 Jun 2020 17:55:46 -0600 Subject: [PATCH 177/621] Removed the ellipsis function which is not used in anywhere in the FusionPBX project. --- resources/functions.php | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/resources/functions.php b/resources/functions.php index 5eac3af9e1..47b0e1539e 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -1029,24 +1029,6 @@ function number_pad($number,$n) { } } -// ellipsis nicely truncate long text - if(!function_exists('ellipsis')) { - function ellipsis($string, $max_characters, $preserve_word = true) { - if ($max_characters+$x >= strlen($string)) { return $string; } - if ($preserve_word) { - for ($x = 0; $x < strlen($string); $x++) { - if ($string{$max_characters+$x} == " ") { - return substr($string,0,$max_characters+$x)." ..."; - } - else { continue; } - } - } - else { - return substr($string,0,$max_characters)." ..."; - } - } - } - //function to convert hexidecimal color value to rgb string/array value if (!function_exists('hex_to_rgb')) { function hex_to_rgb($hex, $delim = '') { From b42cbc60b3010c0af66818f95d759109b404ea34 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 19 Jun 2020 19:00:33 -0600 Subject: [PATCH 178/621] Update destinations.php --- app/destinations/resources/classes/destinations.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/destinations/resources/classes/destinations.php b/app/destinations/resources/classes/destinations.php index a17f22cb64..4b81f8bac2 100644 --- a/app/destinations/resources/classes/destinations.php +++ b/app/destinations/resources/classes/destinations.php @@ -551,7 +551,7 @@ if (!class_exists('destinations')) { * valid destination */ public function valid($destination, $type = 'dialplan') { - $destinations = $this->all($type); + $destinations = $this->all('dialplan'); foreach($destinations as $category => $array) { if (is_array($array)) { foreach ($array as $key => $value) { From bcc990e84f2145ed11c39ec45a6b3adbb739aed2 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 19 Jun 2020 20:14:28 -0600 Subject: [PATCH 179/621] Fix follow me calls to external destinations. --- app/scripts/resources/scripts/app/follow_me/index.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/resources/scripts/app/follow_me/index.lua b/app/scripts/resources/scripts/app/follow_me/index.lua index 4ade174cf2..1fc01f88eb 100644 --- a/app/scripts/resources/scripts/app/follow_me/index.lua +++ b/app/scripts/resources/scripts/app/follow_me/index.lua @@ -341,7 +341,7 @@ end --get the destination caller id name and number - if (follow_me_caller_id_uuid ~= nil) then + if (follow_me_caller_id_uuid and follow_me_caller_id_uuid ~= '') then local sql = "select destination_uuid, destination_number, destination_description, destination_caller_id_name, destination_caller_id_number "; sql = sql .. "from v_destinations "; sql = sql .. "where domain_uuid = :domain_uuid "; From 794df3d00b544e8202a74dedaedb9c0c47f472ea Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 20 Jun 2020 11:13:06 -0600 Subject: [PATCH 180/621] Use iconv only if the function exists. --- app/registrations/resources/classes/registrations.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/registrations/resources/classes/registrations.php b/app/registrations/resources/classes/registrations.php index aa3fde0656..9631123964 100644 --- a/app/registrations/resources/classes/registrations.php +++ b/app/registrations/resources/classes/registrations.php @@ -88,7 +88,7 @@ if (!class_exists('registrations')) { //get sofia status profile information including registrations $cmd = "api sofia xmlstatus profile ".$field['sip_profile_name']." reg"; $xml_response = trim(event_socket_request($fp, $cmd)); - $xml_response = iconv("utf-8", "utf-8//ignore", $xml_response); + if (function_exists('iconv')) { $xml_response = iconv("utf-8", "utf-8//ignore", $xml_response); } $xml_response = preg_replace('/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/u', '', $xml_response); if ($xml_response == "Invalid Profile!") { $xml_response = "".$text['label-message'].""; } $xml_response = str_replace("", "", $xml_response); From 6cc4f79f5a573b4865d1d0bd48798d8af216ab9e Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 20 Jun 2020 23:23:17 -0600 Subject: [PATCH 181/621] Update switch_music_on_hold.php --- .../classes/switch_music_on_hold.php | 98 +++++++++++++++++-- 1 file changed, 92 insertions(+), 6 deletions(-) diff --git a/app/music_on_hold/resources/classes/switch_music_on_hold.php b/app/music_on_hold/resources/classes/switch_music_on_hold.php index 1e414356e1..3d38ca4b75 100644 --- a/app/music_on_hold/resources/classes/switch_music_on_hold.php +++ b/app/music_on_hold/resources/classes/switch_music_on_hold.php @@ -48,12 +48,12 @@ if (!class_exists('switch_music_on_hold')) { public function __construct() { //assign private variables - $this->app_name = 'music_on_hold'; - $this->app_uuid = '1dafe0f8-c08a-289b-0312-15baf4f20f81'; - $this->permission_prefix = 'music_on_hold_'; - $this->list_page = 'music_on_hold.php'; - $this->table = 'music_on_hold'; - $this->uuid_prefix = 'music_on_hold_'; + $this->app_name = 'music_on_hold'; + $this->app_uuid = '1dafe0f8-c08a-289b-0312-15baf4f20f81'; + $this->permission_prefix = 'music_on_hold_'; + $this->list_page = 'music_on_hold.php'; + $this->table = 'music_on_hold'; + $this->uuid_prefix = 'music_on_hold_'; } @@ -238,6 +238,92 @@ if (!class_exists('switch_music_on_hold')) { $this->reload(); } + /** + * read the music files to add the music on hold into the database + */ + public function import() { + //get the domains + $sql = "select * from v_domains "; + $database = new database; + $domains = $database->select($sql, null, 'all'); + unset($sql); + + //get the music_on_hold array + $sql = "select * from v_music_on_hold "; + $sql .= "order by domain_uuid desc, music_on_hold_name asc, music_on_hold_rate asc"; + $database = new database; + $music_on_hold = $database->select($sql, null, 'all'); + unset($sql); + + //build an array of the sound files + $music_directory = $_SESSION['switch']['sounds']['dir'].'/music'; + if (file_exists($music_directory)) { + $files = array_merge(glob($music_directory.'/*/*/*.wav'), glob($music_directory.'/*/*/*/*.wav'), glob($stream_path.'/*/*/*/*.mp3'), glob($stream_path.'/*/*/*/*.ogg')); + } + + //build a new file array + foreach($files as $file) { + $path = substr($file, strlen($music_directory.'/')); + $path = str_replace("\\", "/", $path); + $path_array = explode("/", $path); + $file_array[$path_array[0]][$path_array[1]][$path_array[2]] = dirname($file); + //echo "domain_name ".$path_array[0]."
\n"; + //echo "category_name ".$path_array[1]."
\n"; + } + //view_array($file_array); + + //prepare the data + $i = 0; + foreach($file_array as $domain_name => $a1) { + foreach($a1 as $category_name => $a2) { + foreach($a2 as $sample_rate => $file_path) { + //echo "domain_name ".$domain_name."
\n"; + //echo "category_name ".$category_name."
\n"; + foreach($domains as $domain) { + //view_array($field, false); + if ($field['domain_name'] === $domain_name) { + $domain_uuid = $domain['domain_uuid']; + //echo "domain_uuid ".$domain_uuid."
\n"; + } + } + + if ($domain_name == 'global' || $domain_name == 'default') { + $domain_uuid = null; + } + //view_array($row, false); + + $array['music_on_hold'][$i]['music_on_hold_uuid'] = uuid(); + $array['music_on_hold'][$i]['domain_uuid'] = $domain_uuid; + $array['music_on_hold'][$i]['music_on_hold_name'] = $category_name; + $array['music_on_hold'][$i]['music_on_hold_path'] = $file_path; + $array['music_on_hold'][$i]['music_on_hold_rate'] = strlen($sample_rate) != 0 ? $sample_rate : null; + $array['music_on_hold'][$i]['music_on_hold_shuffle'] = 'false'; + $array['music_on_hold'][$i]['music_on_hold_channels'] = 1; + $array['music_on_hold'][$i]['music_on_hold_interval'] = 20; + $array['music_on_hold'][$i]['music_on_hold_timer_name'] = 'soft'; + $array['music_on_hold'][$i]['music_on_hold_chime_list'] = null; + $array['music_on_hold'][$i]['music_on_hold_chime_freq'] = null; + $array['music_on_hold'][$i]['music_on_hold_chime_max'] = null; + $i++; + } + } + } + //view_array($array, false); + + //save the data + $p = new permissions; + $p->add('music_on_hold_add', 'temp'); + + $database = new database; + $database->app_name = 'music_on_hold'; + $database->app_uuid = '1dafe0f8-c08a-289b-0312-15baf4f20f81'; + $database->save($array); + //echo $database->message; + unset($array); + + $p->delete('music_on_hold_add', 'temp'); + } + /** * delete records/files */ From 96a261e44463800db79a24f80a546e22ca550a2f Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sun, 21 Jun 2020 00:01:28 -0600 Subject: [PATCH 182/621] Add dialplan context global. --- .../app/xml_handler/resources/scripts/dialplan/dialplan.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua index b235ba7041..aae93b2611 100644 --- a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua +++ b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua @@ -124,7 +124,7 @@ if (context_name == "public" or string.match(context_name, "@")) then sql = sql .. "where p.dialplan_context = :call_context "; else - sql = sql .. "where (p.dialplan_context = :call_context or p.dialplan_context = '${domain_name}') "; + sql = sql .. "where p.dialplan_context in (:call_context, '${domain_name}', 'global') "; end sql = sql .. "and (p.hostname = :hostname or p.hostname is null) "; sql = sql .. "and p.dialplan_enabled = 'true' "; From 0abbb1e51ac687a653f2674ad3f558472e0f7def Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Mon, 22 Jun 2020 12:19:25 -0400 Subject: [PATCH 183/621] Update ivr_menu_edit.php (#5316) --- app/ivr_menus/ivr_menu_edit.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/ivr_menus/ivr_menu_edit.php b/app/ivr_menus/ivr_menu_edit.php index e7f41e3939..13e2af7033 100644 --- a/app/ivr_menus/ivr_menu_edit.php +++ b/app/ivr_menus/ivr_menu_edit.php @@ -266,8 +266,13 @@ $array['ivr_menus'][0]["ivr_menu_tts_voice"] = $ivr_menu_tts_voice; $array['ivr_menus'][0]["ivr_menu_confirm_attempts"] = $ivr_menu_confirm_attempts; $array['ivr_menus'][0]["ivr_menu_timeout"] = $ivr_menu_timeout; - $array['ivr_menus'][0]["ivr_menu_exit_app"] = $ivr_menu_exit_app; - $array['ivr_menus'][0]["ivr_menu_exit_data"] = $ivr_menu_exit_data; + if ($destination->valid($ivr_menu_exit_app.":".$ivr_menu_exit_data)) { + $array['ivr_menus'][0]["ivr_menu_exit_app"] = $ivr_menu_exit_app; + $array['ivr_menus'][0]["ivr_menu_exit_data"] = $ivr_menu_exit_data; + } + else { + $ivr_menu_exit_app = ""; + } $array['ivr_menus'][0]["ivr_menu_inter_digit_timeout"] = $ivr_menu_inter_digit_timeout; $array['ivr_menus'][0]["ivr_menu_max_failures"] = $ivr_menu_max_failures; $array['ivr_menus'][0]["ivr_menu_max_timeouts"] = $ivr_menu_max_timeouts; @@ -338,7 +343,9 @@ $dialplan_xml .= " \n"; } - $dialplan_xml .= " \n"; + if (strlen($ivr_menu_exit_app) > 0) { + $dialplan_xml .= " \n"; + } $dialplan_xml .= " \n"; $dialplan_xml .= "\n"; From 5ec163b488c12699e34266f83dab6e784bf4e086 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Mon, 22 Jun 2020 12:20:37 -0400 Subject: [PATCH 184/621] Update ivr.conf.lua (#5309) --- .../scripts/configuration/ivr.conf.lua | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua index 8d4cbe0ad1..046b4bc37a 100644 --- a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua +++ b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua @@ -68,11 +68,20 @@ assert(dbh:connected()); --get the ivr menu from the database - local sql = [[SELECT * FROM v_ivr_menus - WHERE (ivr_menu_uuid = :ivr_menu_uuid or ivr_menu_parent_uuid = :ivr_menu_uuid) - AND ivr_menu_enabled = 'true' - ORDER BY ivr_menu_parent_uuid desc - ]]; + local sql = [[ + with recursive ivr_menus as ( + select * + from v_ivr_menus + where ivr_menu_uuid = :ivr_menu_uuid + and ivr_menu_enabled = 'true' + union all + select child.* + from v_ivr_menus as child, ivr_menus as parent + where child.ivr_menu_parent_uuid = parent.ivr_menu_uuid + and child.ivr_menu_enabled = 'true' + ) + select * from ivr_menus + ]]; local params = {ivr_menu_uuid = ivr_menu_uuid}; if (debug["sql"]) then freeswitch.consoleLog("notice", "[ivr_menu] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n"); From 4b5ed3d8eff276892c0b0c1fbfc257f5c3a8f778 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Tue, 23 Jun 2020 00:58:15 -0400 Subject: [PATCH 185/621] Update ivr_menu_edit.php (#5317) --- app/ivr_menus/ivr_menu_edit.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/app/ivr_menus/ivr_menu_edit.php b/app/ivr_menus/ivr_menu_edit.php index 13e2af7033..f1b876ac9f 100644 --- a/app/ivr_menus/ivr_menu_edit.php +++ b/app/ivr_menus/ivr_menu_edit.php @@ -400,8 +400,25 @@ $cache = new cache; $cache->delete("dialplan:".$_SESSION["context"]); $cache->delete("configuration:ivr.conf:".$ivr_menu_uuid); - $cache->delete("configuration:ivr.conf:".$ivr_menu_parent_uuid); - + //get all ivr parent menus + $sql = "with recursive ivr_menus as ( "; + $sql .=" select ivr_menu_parent_uuid "; + $sql .=" from v_ivr_menus "; + $sql .=" where ivr_menu_parent_uuid = :ivr_menu_parent_uuid "; + $sql .=" and ivr_menu_enabled = 'true' "; + $sql .=" union all "; + $sql .=" select parent.ivr_menu_parent_uuid "; + $sql .=" from v_ivr_menus as parent, ivr_menus as child "; + $sql .=" where parent.ivr_menu_uuid = child.ivr_menu_parent_uuid "; + $sql .=" and parent.ivr_menu_enabled = 'true' "; + $sql .=" ) "; + $sql .=" select * from ivr_menus "; + $parameters['ivr_menu_parent_uuid'] = $ivr_menu_parent_uuid; + $database = new database; + $parent_uuids = $database->select($sql, $parameters, "all"); + foreach ($parent_uuids as $x => $row) { + $cache->delete("configuration:ivr.conf:".$row['ivr_menu_parent_uuid']); + } //set the add message if ($action == "add" && permission_exists('ivr_menu_add')) { message::add($text['message-add']); From 19df9b4aa87026529f5cd5f1eaf4b93e50898204 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 23 Jun 2020 13:24:54 -0600 Subject: [PATCH 186/621] Change sip_from_user to user_name --- app/dialplans/resources/switch/conf/dialplan/330_vmain_user.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/dialplans/resources/switch/conf/dialplan/330_vmain_user.xml b/app/dialplans/resources/switch/conf/dialplan/330_vmain_user.xml index 5dd12b7c00..9bf06b56ac 100644 --- a/app/dialplans/resources/switch/conf/dialplan/330_vmain_user.xml +++ b/app/dialplans/resources/switch/conf/dialplan/330_vmain_user.xml @@ -6,7 +6,7 @@ - + From e5d3295975713dc1cddfed2dd6ddb7028dc7bf89 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Wed, 24 Jun 2020 18:42:03 -0400 Subject: [PATCH 187/621] Fix destination->valid method for ivr (#5312) * Update destinations.php * Update ivr_menu_edit.php --- app/destinations/resources/classes/destinations.php | 2 +- app/ivr_menus/ivr_menu_edit.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/destinations/resources/classes/destinations.php b/app/destinations/resources/classes/destinations.php index 4b81f8bac2..a17f22cb64 100644 --- a/app/destinations/resources/classes/destinations.php +++ b/app/destinations/resources/classes/destinations.php @@ -551,7 +551,7 @@ if (!class_exists('destinations')) { * valid destination */ public function valid($destination, $type = 'dialplan') { - $destinations = $this->all('dialplan'); + $destinations = $this->all($type); foreach($destinations as $category => $array) { if (is_array($array)) { foreach ($array as $key => $value) { diff --git a/app/ivr_menus/ivr_menu_edit.php b/app/ivr_menus/ivr_menu_edit.php index f1b876ac9f..a45b7c0a94 100644 --- a/app/ivr_menus/ivr_menu_edit.php +++ b/app/ivr_menus/ivr_menu_edit.php @@ -308,7 +308,7 @@ $array['ivr_menus'][0]['ivr_menu_options'][$y]["ivr_menu_option_uuid"] = $ivr_menu_option_uuid; $array['ivr_menus'][0]['ivr_menu_options'][$y]["ivr_menu_option_digits"] = $row["ivr_menu_option_digits"]; $array['ivr_menus'][0]['ivr_menu_options'][$y]["ivr_menu_option_action"] = $ivr_menu_option_action; - if ($destination->valid(preg_replace('/\s/', ':', $ivr_menu_option_param, 1), 'ivr')) { + if ($destination->valid($ivr_menu_option_action.":".$ivr_menu_option_param, 'ivr')) { $array['ivr_menus'][0]['ivr_menu_options'][$y]["ivr_menu_option_param"] = $ivr_menu_option_param; } $array['ivr_menus'][0]['ivr_menu_options'][$y]["ivr_menu_option_order"] = $row["ivr_menu_option_order"]; From 3eb22577457d6edfe706c610998908e5f44d0762 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 24 Jun 2020 19:14:33 -0600 Subject: [PATCH 188/621] Add indentation to improve the html output. --- resources/classes/modal.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/classes/modal.php b/resources/classes/modal.php index e01cdd1104..db4d58fce8 100644 --- a/resources/classes/modal.php +++ b/resources/classes/modal.php @@ -57,9 +57,9 @@ if (!class_exists('modal')) { //prefix cancel button to action $array['actions'] = button::create(['type'=>'button','label'=>$text['button-cancel'],'icon'=>$_SESSION['theme']['button_icon_cancel'],'collapse'=>'never','onclick'=>'modal_close(); '.$array['onclose']]).$array['actions']; } - $modal .= $array['title'] ? "".$array['title']."\n" : null; - $modal .= $array['message'] ? "".$array['message']."\n" : null; - $modal .= $array['actions'] ? "".$array['actions']."\n" : null; + $modal .= $array['title'] ? " ".$array['title']."\n" : null; + $modal .= $array['message'] ? " ".$array['message']."\n" : null; + $modal .= $array['actions'] ? " ".$array['actions']."\n" : null; $modal .= "
\n"; $modal .= "
"; @@ -71,4 +71,4 @@ if (!class_exists('modal')) { } } -?> \ No newline at end of file +?> From f643b0ee407db50490d271fc901fba81b27f004b Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Thu, 25 Jun 2020 02:37:39 -0400 Subject: [PATCH 189/621] Added group permission protection (#5320) --- core/groups/app_config.php | 8 + core/groups/group_permissions.php | 200 ++++++++++++------- core/groups/resources/classes/groups.php | 2 + core/groups/resources/classes/permission.php | 7 +- 4 files changed, 140 insertions(+), 77 deletions(-) diff --git a/core/groups/app_config.php b/core/groups/app_config.php index 8eef02ad78..3cd8705603 100644 --- a/core/groups/app_config.php +++ b/core/groups/app_config.php @@ -173,6 +173,14 @@ $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']['text'] = "permission_protected"; + $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']['text'] = "permission_assigned"; + $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'] = "group_name"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['search'] = "true"; diff --git a/core/groups/group_permissions.php b/core/groups/group_permissions.php index c8926b441a..8fb203056f 100644 --- a/core/groups/group_permissions.php +++ b/core/groups/group_permissions.php @@ -66,6 +66,7 @@ $x = 0; $sql = "select distinct(permission_name) from v_group_permissions "; $sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) "; + $sql .= "and permission_assigned = 'true' "; foreach ($_SESSION["groups"] as $field) { if (strlen($field['group_name']) > 0) { $sql_where_or[] = "group_name = :group_name_".$x; @@ -100,61 +101,132 @@ $group_permissions = $_POST['group_permissions']; } +//add the search string + if (isset($_REQUEST["search"])) { + $search = strtolower($_REQUEST["search"]); + $sql_search = " ("; + $sql_search .= " lower(p.permission_name) like :search \n"; + $sql_search .= ") "; + $parameters['search'] = '%'.$search.'%'; + } + +//get the list + $sql = "select "; + $sql .= " distinct p.permission_name, \n"; + $sql .= " p.application_name, \n"; + $sql .= " g.permission_protected, \n"; + $sql .= " g.group_permission_uuid, \n"; + $sql .= " g.permission_assigned \n"; + $sql .= "from v_permissions as p \n"; + $sql .= "left join \n"; + $sql .= " v_group_permissions as g \n"; + $sql .= " on p.permission_name = g.permission_name \n"; + $sql .= " and group_name = :group_name \n"; + if (isset($sql_search)) { + $sql .= "where ".$sql_search; + } + $sql .= " order by p.application_name, p.permission_name asc "; + $parameters['group_name'] = $group_name; + $database = new database; + $group_permissions = $database->select($sql, $parameters, 'all'); + //process the user data and save it to the database if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { - //get the list - $sql = "select p.*, "; - $sql .= "exists(select from v_group_permissions where permission_name = p.permission_name and group_name = :group_name) as permission_assigned "; - $sql .= "from v_permissions as p "; - $parameters['group_name'] = $group_name; - //$sql = "select * from v_group_permissions "; - //$sql .= "where group_uuid = :group_uuid "; - //$parameters['group_uuid'] = $group_uuid; - $database = new database; - $group_permissions = $database->select($sql, $parameters, 'all'); - - //add or remove permissions from the group $x = 0; if (is_array($_POST['group_permissions'])) { foreach($_POST['group_permissions'] as $row) { - //check to see if the group has been assigned the permission - $in_database = false; - foreach($group_permissions as $field) { - if ($field['permission_name'] === $row['permission_name'] && $field['permission_assigned'] === true) { - $in_database = true; - break; - } - } + //reset values + $action = ""; + $save_permission = false; + $delete_permission = false; + $save_protected = false; + $delete_protected = false; + $persist = false; - //add - checked on html form and not in the database - if ($row['checked'] === 'true') { - if (!$in_database) { + //get the action save or delete + foreach($group_permissions as $field) { + if ($field['permission_name'] === $row['permission_name']) { + if ($field['permission_assigned'] == 'true') { + if ($row['checked'] == "true") { + $persist = true; + } + else { + $delete_permission = true; + } + } + else { + + if ($row['checked'] == "true") { + $save_permission = true; + } + else { + //do nothing + } + } + + if ($field['permission_protected'] == 'true') { + if ($row['permission_protected'] == "true") { + $persist = true; + } + else { + $delete_protected = true; + } + } + else { + if ($row['permission_protected'] == "true") { + $save_protected = true; + } + else { + //do nothing + } + } + + if ($save_permission || $save_protected) { + $action = "save"; + } + elseif ($delete_permission || $delete_protected){ + if ($persist) { + $action = "save"; + } + else { + $action = "delete"; + } + } + else { + $action = ""; + } + $group_permission_uuid = $field['group_permission_uuid']; + break; + } + } + + //build the array; + if ($action == "save") { + if (strlen($group_permission_uuid) == 0) { + $group_permission_uuid = uuid(); + } if (isset($row['permission_name']) && strlen($row['permission_name']) > 0) { - $array['add']['group_permissions'][$x]['group_permission_uuid'] = uuid(); - $array['add']['group_permissions'][$x]['permission_name'] = $row['permission_name']; - $array['add']['group_permissions'][$x]['group_uuid'] = $group_uuid; - $array['add']['group_permissions'][$x]['group_name'] = $group_name; - //$array['add']['group_permissions'][$x]['permission_uuid'] = $row['uuid']; + $array['save']['group_permissions'][$x]['group_permission_uuid'] = $group_permission_uuid; + $array['save']['group_permissions'][$x]['permission_name'] = $row['permission_name']; + $array['save']['group_permissions'][$x]['permission_protected'] = $row['permission_protected'] == 'true' ? "true" : 'false'; + $array['save']['group_permissions'][$x]['permission_assigned'] = $row['checked'] != "true" ? "false" : "true"; + $array['save']['group_permissions'][$x]['group_uuid'] = $group_uuid; + $array['save']['group_permissions'][$x]['group_name'] = $group_name; $x++; } } - } - //delete - unchecked on the form and in the database - if ($row['checked'] !== 'true') { - if ($in_database) { + if ($action == "delete") { if (isset($row['permission_name']) && strlen($row['permission_name']) > 0) { $array['delete']['group_permissions'][$x]['permission_name'] = $row['permission_name']; $array['delete']['group_permissions'][$x]['group_uuid'] = $group_uuid; $array['delete']['group_permissions'][$x]['group_name'] = $group_name; - //$array['delete'][$x]['permission_uuid'] = $row['uuid']; } $x++; } - } } } - + //validate the token $token = new token; if (!$token->validate($_SERVER['PHP_SELF'])) { @@ -163,16 +235,16 @@ exit; } - //save to the data - if (is_array($array['add']) && @sizeof($array['add']) != 0) { + //save the save array + if (is_array($array['save']) && @sizeof($array['save']) != 0) { $database = new database; $database->app_name = 'groups'; $database->app_uuid = '2caf27b0-540a-43d5-bb9b-c9871a1e4f84'; - $database->save($array['add']); + $database->save($array['save']); $message = $database->message; } - //delete the permissions + //delete the delete array if (is_array($array['delete']) && @sizeof($array['delete']) != 0) { if (permission_exists('group_permission_delete')) { $database = new database; @@ -194,41 +266,6 @@ //$order_by = $_GET["order_by"]; //$order = $_GET["order"]; -//add the search string - if (isset($_REQUEST["search"])) { - $search = strtolower($_REQUEST["search"]); - $sql_search = " ("; - $sql_search .= " lower(p.permission_name) like :search "; - //$sql_search .= " or lower(p.group_name) like :search "; - $sql_search .= ") "; - $parameters['search'] = '%'.$search.'%'; - } - -//get the count - /* - $sql = "select count(group_permission_uuid) from v_group_permissions "; - $sql .= "where group_uuid = :group_uuid "; - $parameters['group_uuid'] = $group_uuid; - if (isset($sql_search)) { - $sql .= "where ".$sql_search; - } - $database = new database; - $num_rows = $database->select($sql, $parameters, 'column'); - */ - -//get the list - $sql = "select p.*, "; - $sql .= "exists(select from v_group_permissions where permission_name = p.permission_name and group_name = :group_name) as permission_assigned "; - $sql .= "from v_permissions as p "; - $parameters['group_name'] = $group_name; - if (isset($sql_search)) { - $sql .= "where ".$sql_search; - } - $sql .= "order by application_name asc, permission_name asc "; - $database = new database; - $group_permissions = $database->select($sql, $parameters, 'all'); - unset($sql, $parameters); - //create token $object = new token; $token = $object->create($_SERVER['PHP_SELF']); @@ -270,7 +307,8 @@ if (is_array($group_permissions) && @sizeof($group_permissions) != 0) { $x = 0; foreach ($group_permissions as $row) { - $checked = ($row['permission_assigned'] === true) ? " checked=\"checked\"" : $checked = ''; + $checked = ($row['permission_assigned'] === 'true') ? " checked=\"checked\"" : $checked = ''; + $protected = ($row['permission_protected'] === 'true') ? " checked=\"checked\"" : ''; $application_name = strtolower($row['application_name']); $label_application_name = ucwords(str_replace(['_','-'], " ", $row['application_name'])); @@ -293,6 +331,10 @@ if (permission_exists('group_permission_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { echo "  \n"; } + echo " \n"; + echo " \n"; + echo " \n"; + echo th_order_by('group_permission_protected', $text['label-group_protected'], $order_by, $order, null, "class=''"); echo "\n"; } @@ -305,6 +347,14 @@ echo " \n"; } echo " ".escape($row['permission_name'])."\n"; + if (permission_exists('group_permission_add') || permission_exists('group_permission_edit') || permission_exists('group_permission_delete')) { + echo " \n"; + echo " \n"; + echo " \n"; + } + echo " \n"; + echo " "; + echo " \n"; echo "\n"; //set the previous category diff --git a/core/groups/resources/classes/groups.php b/core/groups/resources/classes/groups.php index 432abd253f..a18f0ec1ba 100644 --- a/core/groups/resources/classes/groups.php +++ b/core/groups/resources/classes/groups.php @@ -445,6 +445,8 @@ if (!class_exists('groups')) { $array['group_permissions'][$x]['group_permission_uuid'] = uuid(); $array['group_permissions'][$x]['domain_uuid'] = null; $array['group_permissions'][$x]['permission_name'] = $row['name']; + $array['group_permissions'][$x]['permission_protected'] = 'false'; + $array['group_permissions'][$x]['permission_assigned'] = 'true'; $array['group_permissions'][$x]['group_name'] = $group; $array['group_permissions'][$x]['group_uuid'] = $group_uuids[$group]; } diff --git a/core/groups/resources/classes/permission.php b/core/groups/resources/classes/permission.php index ae8d49d4b2..c4d2708713 100644 --- a/core/groups/resources/classes/permission.php +++ b/core/groups/resources/classes/permission.php @@ -58,14 +58,15 @@ } $group_names = "'".implode("','", $group_name_array)."'"; - //delete unprotected system group permissions + //delete unprotected permissions $sql = "delete from v_group_permissions as p "; $sql .= "where group_name in ( "; $sql .= " select group_name "; $sql .= " from v_groups "; $sql .= " where group_protected <> 'true' "; $sql .= " and group_name in (".$group_names.") "; - $sql .= ");"; + $sql .= ")"; + $sql .= "and (permission_protected <> 'true' or permission_protected is null)"; $database = new database; $result = $database->select($sql); @@ -166,6 +167,8 @@ //build default permissions insert array $array['group_permissions'][$x]['group_permission_uuid'] = uuid(); $array['group_permissions'][$x]['permission_name'] = $permission['name']; + $array['group_permissions'][$x]['permission_protected'] = 'false'; + $array['group_permissions'][$x]['permission_assigned'] = 'true'; $array['group_permissions'][$x]['group_name'] = $group_name; $array['group_permissions'][$x]['group_uuid'] = $group_uuid; $x++; From 9b3de1d8954470101f88b7f03a84e10e802014ee Mon Sep 17 00:00:00 2001 From: Chris Black Date: Wed, 24 Jun 2020 23:44:57 -0700 Subject: [PATCH 190/621] Update scripts.php (#5263) fix so that if user has a hostname instead of IP address the config.lua gets written correctly --- app/scripts/resources/classes/scripts.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/scripts/resources/classes/scripts.php b/app/scripts/resources/classes/scripts.php index a4a7dd32cd..69c682c681 100644 --- a/app/scripts/resources/classes/scripts.php +++ b/app/scripts/resources/classes/scripts.php @@ -239,12 +239,12 @@ if (!class_exists('scripts')) { elseif ($this->db_type == "pgsql") { if ($this->db_host == "localhost") { $this->db_host = "127.0.0.1"; } if ($this->db_secure == true) { - $tmp .= " database.system = \"pgsql://hostaddr=".$this->db_host." port=".$this->db_port." dbname=".$this->db_name." user=".$this->db_username." password=".$this->db_password." sslmode=verify-ca sslrootcert=".$this->db_cert_authority." options=''\";\n"; - $tmp .= " database.switch = \"pgsql://hostaddr=".$this->db_host." port=".$this->db_port." dbname=freeswitch user=".$this->db_username." password=".$this->db_password." sslmode=verify-ca sslrootcert=".$this->db_cert_authority." options=''\";\n"; + $tmp .= " database.system = \"pgsql://".(filter_var($this->db_host, FILTER_VALIDATE_IP) ? "hostaddr" : "host")."=".$this->db_host." port=".$this->db_port." dbname=".$this->db_name." user=".$this->db_username." password=".$this->db_password." sslmode=verify-ca sslrootcert=".$this->db_cert_authority." options=''\";\n"; + $tmp .= " database.switch = \"pgsql://".(filter_var($this->db_host, FILTER_VALIDATE_IP) ? "hostaddr" : "host")."=".$this->db_host." port=".$this->db_port." dbname=freeswitch user=".$this->db_username." password=".$this->db_password." sslmode=verify-ca sslrootcert=".$this->db_cert_authority." options=''\";\n"; } else { - $tmp .= " database.system = \"pgsql://hostaddr=".$this->db_host." port=".$this->db_port." dbname=".$this->db_name." user=".$this->db_username." password=".$this->db_password." options=''\";\n"; - $tmp .= " database.switch = \"pgsql://hostaddr=".$this->db_host." port=".$this->db_port." dbname=freeswitch user=".$this->db_username." password=".$this->db_password." options=''\";\n"; + $tmp .= " database.system = \"pgsql://".(filter_var($this->db_host, FILTER_VALIDATE_IP) ? "hostaddr" : "host")."=".$this->db_host." port=".$this->db_port." dbname=".$this->db_name." user=".$this->db_username." password=".$this->db_password." options=''\";\n"; + $tmp .= " database.switch = \"pgsql://".(filter_var($this->db_host, FILTER_VALIDATE_IP) ? "hostaddr" : "host")."=".$this->db_host." port=".$this->db_port." dbname=freeswitch user=".$this->db_username." password=".$this->db_password." options=''\";\n"; } } elseif ($this->db_type == "sqlite") { From 966a218da2db9a3d888b95640d9b52a83b761ad4 Mon Sep 17 00:00:00 2001 From: Baji Zsolt Date: Thu, 25 Jun 2020 08:49:45 +0200 Subject: [PATCH 191/621] Daylight Saving changes (#5229) * Daylight Saving changes: - enabled on server auto.DST.xml configuration for phones - added new autoDST.xml file to fusionpbx server - corrected autoDST.xml, addde balkans countries * Fixed the yealink_auto_dst_url name to fix the syntax problem. * Rename AutoDST.xml to auto_dst.xml * Update app_config.php * Update auto_dst.xml Co-authored-by: FusionPBX --- app/yealink/app_config.php | 10 +- app/yealink/resources/auto_dst.xml | 112 ++++++++++++++++++ .../provision/yealink/cp860/y000000000037.cfg | 4 +- .../provision/yealink/cp920/y000000000000.cfg | 4 +- .../provision/yealink/cp960/y000000000000.cfg | 4 +- .../provision/yealink/t19p/y000000000053.cfg | 4 +- .../provision/yealink/t20p/y000000000007.cfg | 4 +- .../provision/yealink/t21p/y000000000052.cfg | 4 +- .../provision/yealink/t22p/y000000000005.cfg | 4 +- .../provision/yealink/t23g/y000000000044.cfg | 4 +- .../provision/yealink/t23p/y000000000044.cfg | 4 +- .../provision/yealink/t26p/y000000000004.cfg | 4 +- .../provision/yealink/t27g/y000000000069.cfg | 4 +- .../provision/yealink/t27p/y000000000045.cfg | 4 +- .../provision/yealink/t28p/y000000000000.cfg | 4 +- .../provision/yealink/t29g/y000000000046.cfg | 4 +- .../provision/yealink/t32g/y000000000032.cfg | 4 +- .../provision/yealink/t38g/y000000000038.cfg | 4 +- .../provision/yealink/t40g/y000000000076.cfg | 4 +- .../provision/yealink/t40p/y000000000054.cfg | 4 +- .../provision/yealink/t41p/y000000000036.cfg | 4 +- .../provision/yealink/t41s/y000000000068.cfg | 4 +- .../provision/yealink/t42g/y000000000029.cfg | 4 +- .../provision/yealink/t42s/y000000000067.cfg | 4 +- .../provision/yealink/t46g/y000000000028.cfg | 4 +- .../provision/yealink/t46s/y000000000066.cfg | 4 +- .../provision/yealink/t48g/y000000000035.cfg | 4 +- .../provision/yealink/t48s/y000000000065.cfg | 4 +- .../provision/yealink/t49g/y000000000051.cfg | 4 +- .../provision/yealink/t52s/y000000000074.cfg | 4 +- .../provision/yealink/t53w/y000000000095.cfg | 4 +- .../provision/yealink/t54s/y000000000070.cfg | 4 +- .../provision/yealink/t54w/y000000000096.cfg | 4 +- .../provision/yealink/t56a/{$mac}.cfg | 4 +- .../provision/yealink/t57w/y000000000097.cfg | 4 +- .../provision/yealink/t58v/{$mac}.cfg | 4 +- .../provision/yealink/vp530/y000000000023.cfg | 4 +- .../provision/yealink/w52p/y000000000025.cfg | 4 +- .../provision/yealink/w56p/y000000000025.cfg | 4 +- .../provision/yealink/w60b/y000000000077.cfg | 4 +- 40 files changed, 196 insertions(+), 78 deletions(-) create mode 100644 app/yealink/resources/auto_dst.xml diff --git a/app/yealink/app_config.php b/app/yealink/app_config.php index b0601d1044..3daf80337a 100644 --- a/app/yealink/app_config.php +++ b/app/yealink/app_config.php @@ -1079,6 +1079,14 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set 1 = ON 0 = OFF."; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3f6beec0-01d0-4015-b7f2-26a2b94a0b5d"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_auto_dst_url" + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "https://server.yourdomain.com/app/yealink/resources/auto_dst.xml"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "URL to AutoDST.xml file. The time zone and corresponding DST pre-configurations exist in the AutoDST file. If the DST is set to Automatic, the IP phone obtains the DST configuration from the AutoDST file."; + $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "4351b29e-d12e-4887-bd60-3b4ae0c33784"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_inter_digit_time"; @@ -1112,6 +1120,4 @@ $apps[$x]['default_settings'][$y]['default_setting_description'] = "TLS cipher list Default"; $y++; - - ?> diff --git a/app/yealink/resources/auto_dst.xml b/app/yealink/resources/auto_dst.xml new file mode 100644 index 0000000000..500a32e4cb --- /dev/null +++ b/app/yealink/resources/auto_dst.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/provision/yealink/cp860/y000000000037.cfg b/resources/templates/provision/yealink/cp860/y000000000037.cfg index 1b01b4a4e1..0ffcc89df9 100644 --- a/resources/templates/provision/yealink/cp860/y000000000037.cfg +++ b/resources/templates/provision/yealink/cp860/y000000000037.cfg @@ -484,7 +484,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = @@ -1547,7 +1547,7 @@ local_contact.data.url = ####################################################################################### ## Auto DST ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} ####################################################################################### ## Dialplan Now ## diff --git a/resources/templates/provision/yealink/cp920/y000000000000.cfg b/resources/templates/provision/yealink/cp920/y000000000000.cfg index 8f059d6908..a746c06f71 100644 --- a/resources/templates/provision/yealink/cp920/y000000000000.cfg +++ b/resources/templates/provision/yealink/cp920/y000000000000.cfg @@ -483,7 +483,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = @@ -1546,7 +1546,7 @@ local_contact.data.url = ####################################################################################### ## Auto DST ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} ####################################################################################### ## Dialplan Now ## diff --git a/resources/templates/provision/yealink/cp960/y000000000000.cfg b/resources/templates/provision/yealink/cp960/y000000000000.cfg index 2f2b4f9a0a..09b73e62f4 100644 --- a/resources/templates/provision/yealink/cp960/y000000000000.cfg +++ b/resources/templates/provision/yealink/cp960/y000000000000.cfg @@ -483,7 +483,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = @@ -1546,7 +1546,7 @@ local_contact.data.url = ####################################################################################### ## Auto DST ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} ####################################################################################### ## Dialplan Now ## diff --git a/resources/templates/provision/yealink/t19p/y000000000053.cfg b/resources/templates/provision/yealink/t19p/y000000000053.cfg index 07c45148a4..055eb6b5f2 100644 --- a/resources/templates/provision/yealink/t19p/y000000000053.cfg +++ b/resources/templates/provision/yealink/t19p/y000000000053.cfg @@ -716,7 +716,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = @@ -1259,7 +1259,7 @@ server_certificates.delete = ## Local Contact/DST Time/Dialnow Rule/Replace Rule ## ####################################################################################### local_contact.data.url = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} dialplan_dialnow.url = dialplan_replace_rule.url = diff --git a/resources/templates/provision/yealink/t20p/y000000000007.cfg b/resources/templates/provision/yealink/t20p/y000000000007.cfg index ba95e6ab42..6588b61c52 100644 --- a/resources/templates/provision/yealink/t20p/y000000000007.cfg +++ b/resources/templates/provision/yealink/t20p/y000000000007.cfg @@ -716,7 +716,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = @@ -1259,7 +1259,7 @@ server_certificates.delete = ## Local Contact/DST Time/Dialnow Rule/Replace Rule ## ####################################################################################### local_contact.data.url = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} dialplan_dialnow.url = dialplan_replace_rule.url = diff --git a/resources/templates/provision/yealink/t21p/y000000000052.cfg b/resources/templates/provision/yealink/t21p/y000000000052.cfg index d9da0759ef..749f5f4701 100644 --- a/resources/templates/provision/yealink/t21p/y000000000052.cfg +++ b/resources/templates/provision/yealink/t21p/y000000000052.cfg @@ -425,7 +425,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = {$yealink_time_update} #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = {$yealink_dst_type} @@ -1542,7 +1542,7 @@ local_contact.data.url = ####################################################################################### ## Auto DST ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} ####################################################################################### ## Dialplan Now ## diff --git a/resources/templates/provision/yealink/t22p/y000000000005.cfg b/resources/templates/provision/yealink/t22p/y000000000005.cfg index 702b3f5b90..6152713777 100644 --- a/resources/templates/provision/yealink/t22p/y000000000005.cfg +++ b/resources/templates/provision/yealink/t22p/y000000000005.cfg @@ -716,7 +716,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = @@ -1259,7 +1259,7 @@ server_certificates.delete = ## Local Contact/DST Time/Dialnow Rule/Replace Rule ## ####################################################################################### local_contact.data.url = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} dialplan_dialnow.url = dialplan_replace_rule.url = diff --git a/resources/templates/provision/yealink/t23g/y000000000044.cfg b/resources/templates/provision/yealink/t23g/y000000000044.cfg index 2bdac60f29..6d72471634 100644 --- a/resources/templates/provision/yealink/t23g/y000000000044.cfg +++ b/resources/templates/provision/yealink/t23g/y000000000044.cfg @@ -465,7 +465,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = {$yealink_time_update} #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = {$yealink_dst_type} @@ -1582,7 +1582,7 @@ local_contact.data.url = ####################################################################################### ## Auto DST ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} ####################################################################################### ## Dialplan Now ## diff --git a/resources/templates/provision/yealink/t23p/y000000000044.cfg b/resources/templates/provision/yealink/t23p/y000000000044.cfg index d45e2c45f5..adf39cd5de 100644 --- a/resources/templates/provision/yealink/t23p/y000000000044.cfg +++ b/resources/templates/provision/yealink/t23p/y000000000044.cfg @@ -465,7 +465,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = {$yealink_time_update} #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = {$yealink_dst_type} @@ -1582,7 +1582,7 @@ local_contact.data.url = ####################################################################################### ## Auto DST ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} ####################################################################################### ## Dialplan Now ## diff --git a/resources/templates/provision/yealink/t26p/y000000000004.cfg b/resources/templates/provision/yealink/t26p/y000000000004.cfg index 80192d7efb..4417f41e8f 100644 --- a/resources/templates/provision/yealink/t26p/y000000000004.cfg +++ b/resources/templates/provision/yealink/t26p/y000000000004.cfg @@ -716,7 +716,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = @@ -1259,7 +1259,7 @@ server_certificates.delete = ## Local Contact/DST Time/Dialnow Rule/Replace Rule ## ####################################################################################### local_contact.data.url = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} dialplan_dialnow.url = dialplan_replace_rule.url = diff --git a/resources/templates/provision/yealink/t27g/y000000000069.cfg b/resources/templates/provision/yealink/t27g/y000000000069.cfg index 70c52dccf7..6d95c2f5f9 100644 --- a/resources/templates/provision/yealink/t27g/y000000000069.cfg +++ b/resources/templates/provision/yealink/t27g/y000000000069.cfg @@ -464,7 +464,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = {$yealink_time_update} #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = {$yealink_dst_type} @@ -1582,7 +1582,7 @@ local_contact.data.url = ####################################################################################### ## Auto DST ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} ####################################################################################### ## Dialplan Now ## diff --git a/resources/templates/provision/yealink/t27p/y000000000045.cfg b/resources/templates/provision/yealink/t27p/y000000000045.cfg index 7b7f267b9f..defe312497 100644 --- a/resources/templates/provision/yealink/t27p/y000000000045.cfg +++ b/resources/templates/provision/yealink/t27p/y000000000045.cfg @@ -465,7 +465,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = {$yealink_time_update} #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = {$yealink_dst_type} @@ -1583,7 +1583,7 @@ local_contact.data.url = ####################################################################################### ## Auto DST ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} ####################################################################################### ## Dialplan Now ## diff --git a/resources/templates/provision/yealink/t28p/y000000000000.cfg b/resources/templates/provision/yealink/t28p/y000000000000.cfg index fe6cc3a3bd..6c15005011 100644 --- a/resources/templates/provision/yealink/t28p/y000000000000.cfg +++ b/resources/templates/provision/yealink/t28p/y000000000000.cfg @@ -716,7 +716,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = @@ -1241,7 +1241,7 @@ server_certificates.delete = ## Local Contact/DST Time/Dialnow Rule/Replace Rule ## ####################################################################################### local_contact.data.url = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} dialplan_dialnow.url = dialplan_replace_rule.url = diff --git a/resources/templates/provision/yealink/t29g/y000000000046.cfg b/resources/templates/provision/yealink/t29g/y000000000046.cfg index ef1d097282..1342a76869 100644 --- a/resources/templates/provision/yealink/t29g/y000000000046.cfg +++ b/resources/templates/provision/yealink/t29g/y000000000046.cfg @@ -466,7 +466,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = {$yealink_time_update} #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = {$yealink_dst_type} @@ -1583,7 +1583,7 @@ local_contact.data.url = ####################################################################################### ## Auto DST ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} ####################################################################################### ## Dialplan Now ## diff --git a/resources/templates/provision/yealink/t32g/y000000000032.cfg b/resources/templates/provision/yealink/t32g/y000000000032.cfg index 6c1e42e8c2..383557dd2d 100644 --- a/resources/templates/provision/yealink/t32g/y000000000032.cfg +++ b/resources/templates/provision/yealink/t32g/y000000000032.cfg @@ -716,7 +716,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = @@ -1256,7 +1256,7 @@ server_certificates.delete = ## Local Contact/DST Time/Dialnow Rule/Replace Rule ## ####################################################################################### local_contact.data.url = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} dialplan_dialnow.url = dialplan_replace_rule.url = diff --git a/resources/templates/provision/yealink/t38g/y000000000038.cfg b/resources/templates/provision/yealink/t38g/y000000000038.cfg index 52e93c203b..da0d703da3 100644 --- a/resources/templates/provision/yealink/t38g/y000000000038.cfg +++ b/resources/templates/provision/yealink/t38g/y000000000038.cfg @@ -716,7 +716,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = @@ -1259,7 +1259,7 @@ server_certificates.delete = ## Local Contact/DST Time/Dialnow Rule/Replace Rule ## ####################################################################################### local_contact.data.url = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} dialplan_dialnow.url = dialplan_replace_rule.url = diff --git a/resources/templates/provision/yealink/t40g/y000000000076.cfg b/resources/templates/provision/yealink/t40g/y000000000076.cfg index 2662f6f3cb..d97c2c17dc 100644 --- a/resources/templates/provision/yealink/t40g/y000000000076.cfg +++ b/resources/templates/provision/yealink/t40g/y000000000076.cfg @@ -466,7 +466,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = {$yealink_time_update} #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = {$yealink_dst_type} @@ -1584,7 +1584,7 @@ local_contact.data.url = ####################################################################################### ## Auto DST ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} ####################################################################################### ## Dialplan Now ## diff --git a/resources/templates/provision/yealink/t40p/y000000000054.cfg b/resources/templates/provision/yealink/t40p/y000000000054.cfg index ab23eb4adf..468ad62189 100644 --- a/resources/templates/provision/yealink/t40p/y000000000054.cfg +++ b/resources/templates/provision/yealink/t40p/y000000000054.cfg @@ -466,7 +466,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = {$yealink_time_update} #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = {$yealink_dst_type} @@ -1565,7 +1565,7 @@ local_contact.data.url = ####################################################################################### ## Auto DST ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} ####################################################################################### ## Dialplan Now ## diff --git a/resources/templates/provision/yealink/t41p/y000000000036.cfg b/resources/templates/provision/yealink/t41p/y000000000036.cfg index ff575187eb..9a6f03b6cf 100644 --- a/resources/templates/provision/yealink/t41p/y000000000036.cfg +++ b/resources/templates/provision/yealink/t41p/y000000000036.cfg @@ -466,7 +466,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = {$yealink_time_update} #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = {$yealink_dst_type} @@ -1583,7 +1583,7 @@ local_contact.data.url = ####################################################################################### ## Auto DST ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} ####################################################################################### ## Dialplan Now ## diff --git a/resources/templates/provision/yealink/t41s/y000000000068.cfg b/resources/templates/provision/yealink/t41s/y000000000068.cfg index 84fd66c9f4..8685561767 100644 --- a/resources/templates/provision/yealink/t41s/y000000000068.cfg +++ b/resources/templates/provision/yealink/t41s/y000000000068.cfg @@ -1206,14 +1206,14 @@ phone_setting.missed_call_power_led_flash.enable = {$yealink_missed_call_power_l ## Time&Date ## ####################################################################################### lcl.datetime.date.format = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} local_time.manual_time_enable = local_time.manual_ntp_srv_prior = local_time.time_format = {$yealink_time_format} local_time.date_format = {$yealink_date_format} local_time.dhcp_time = {$yealink_dhcp_time} -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} local_time.dst_time_type = {$yealink_dst_type} local_time.start_time = {$yealink_time_zone_start_time} local_time.end_time = {$yealink_time_zone_end_time} diff --git a/resources/templates/provision/yealink/t42g/y000000000029.cfg b/resources/templates/provision/yealink/t42g/y000000000029.cfg index 1eb5e75039..a3c29dacd2 100644 --- a/resources/templates/provision/yealink/t42g/y000000000029.cfg +++ b/resources/templates/provision/yealink/t42g/y000000000029.cfg @@ -466,7 +466,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = {$yealink_time_update} #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = {$yealink_dst_type} @@ -1564,7 +1564,7 @@ local_contact.data.url = ####################################################################################### ## Auto DST ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} ####################################################################################### ## Dialplan Now ## diff --git a/resources/templates/provision/yealink/t42s/y000000000067.cfg b/resources/templates/provision/yealink/t42s/y000000000067.cfg index ce865f153c..832fcdb702 100644 --- a/resources/templates/provision/yealink/t42s/y000000000067.cfg +++ b/resources/templates/provision/yealink/t42s/y000000000067.cfg @@ -1204,14 +1204,14 @@ phone_setting.missed_call_power_led_flash.enable = {$yealink_missed_call_power_l ## Time&Date ## ####################################################################################### lcl.datetime.date.format = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} local_time.manual_time_enable = local_time.manual_ntp_srv_prior = local_time.time_format = {$yealink_time_format} local_time.date_format = {$yealink_date_format} local_time.dhcp_time = {$yealink_dhcp_time} -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} local_time.dst_time_type = {$yealink_dst_type} local_time.start_time = {$yealink_time_zone_start_time} local_time.end_time = {$yealink_time_zone_end_time} diff --git a/resources/templates/provision/yealink/t46g/y000000000028.cfg b/resources/templates/provision/yealink/t46g/y000000000028.cfg index d5a98869c8..2a4430c558 100644 --- a/resources/templates/provision/yealink/t46g/y000000000028.cfg +++ b/resources/templates/provision/yealink/t46g/y000000000028.cfg @@ -466,7 +466,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = {$yealink_time_update} #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = {$yealink_dst_type} @@ -1582,7 +1582,7 @@ local_contact.data.url = ####################################################################################### ## Auto DST ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} ####################################################################################### ## Dialplan Now ## diff --git a/resources/templates/provision/yealink/t46s/y000000000066.cfg b/resources/templates/provision/yealink/t46s/y000000000066.cfg index ace9e0a068..953a564878 100644 --- a/resources/templates/provision/yealink/t46s/y000000000066.cfg +++ b/resources/templates/provision/yealink/t46s/y000000000066.cfg @@ -1206,14 +1206,14 @@ phone_setting.missed_call_power_led_flash.enable = {$yealink_missed_call_power_l ## Time&Date ## ####################################################################################### lcl.datetime.date.format = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} local_time.manual_time_enable = local_time.manual_ntp_srv_prior = local_time.time_format = {$yealink_time_format} local_time.date_format = {$yealink_date_format} local_time.dhcp_time = {$yealink_dhcp_time} -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} local_time.dst_time_type = {$yealink_dst_type} local_time.start_time = {$yealink_time_zone_start_time} local_time.end_time = {$yealink_time_zone_end_time} diff --git a/resources/templates/provision/yealink/t48g/y000000000035.cfg b/resources/templates/provision/yealink/t48g/y000000000035.cfg index 50bfcc89cc..2ff25a4395 100644 --- a/resources/templates/provision/yealink/t48g/y000000000035.cfg +++ b/resources/templates/provision/yealink/t48g/y000000000035.cfg @@ -466,7 +466,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = {$yealink_time_update} #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = {$yealink_dst_type} @@ -1563,7 +1563,7 @@ local_contact.data.url = ####################################################################################### ## Auto DST ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} ####################################################################################### ## Dialplan Now ## diff --git a/resources/templates/provision/yealink/t48s/y000000000065.cfg b/resources/templates/provision/yealink/t48s/y000000000065.cfg index f851095a8c..5233a94efa 100644 --- a/resources/templates/provision/yealink/t48s/y000000000065.cfg +++ b/resources/templates/provision/yealink/t48s/y000000000065.cfg @@ -1255,14 +1255,14 @@ phone_setting.missed_call_power_led_flash.enable = {$yealink_missed_call_power_l ## Time&Date ## ####################################################################################### lcl.datetime.date.format = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} local_time.manual_time_enable = local_time.manual_ntp_srv_prior = local_time.time_format = {$yealink_time_format} local_time.date_format = {$yealink_date_format} local_time.dhcp_time = {$yealink_dhcp_time} -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} local_time.dst_time_type = {$yealink_dst_type} local_time.start_time = {$yealink_time_zone_start_time} local_time.end_time = {$yealink_time_zone_end_time} diff --git a/resources/templates/provision/yealink/t49g/y000000000051.cfg b/resources/templates/provision/yealink/t49g/y000000000051.cfg index 1829c9e556..724e46f934 100644 --- a/resources/templates/provision/yealink/t49g/y000000000051.cfg +++ b/resources/templates/provision/yealink/t49g/y000000000051.cfg @@ -425,7 +425,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = {$yealink_time_update} #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = {$yealink_dst_type} @@ -1523,7 +1523,7 @@ local_contact.data.url = ####################################################################################### ## Auto DST ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} ####################################################################################### ## Dialplan Now ## diff --git a/resources/templates/provision/yealink/t52s/y000000000074.cfg b/resources/templates/provision/yealink/t52s/y000000000074.cfg index 7267c8a21a..f8bceed792 100644 --- a/resources/templates/provision/yealink/t52s/y000000000074.cfg +++ b/resources/templates/provision/yealink/t52s/y000000000074.cfg @@ -1204,14 +1204,14 @@ phone_setting.missed_call_power_led_flash.enable = {$yealink_missed_call_power_l ## Time&Date ## ####################################################################################### lcl.datetime.date.format = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} local_time.manual_time_enable = local_time.manual_ntp_srv_prior = local_time.time_format = {$yealink_time_format} local_time.date_format = {$yealink_date_format} local_time.dhcp_time = {$yealink_dhcp_time} -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} local_time.dst_time_type = {$yealink_dst_type} local_time.start_time = {$yealink_time_zone_start_time} local_time.end_time = {$yealink_time_zone_end_time} diff --git a/resources/templates/provision/yealink/t53w/y000000000095.cfg b/resources/templates/provision/yealink/t53w/y000000000095.cfg index 006102cb87..a576003307 100644 --- a/resources/templates/provision/yealink/t53w/y000000000095.cfg +++ b/resources/templates/provision/yealink/t53w/y000000000095.cfg @@ -1348,14 +1348,14 @@ phone_setting.missed_call_power_led_flash.enable = {$yealink_missed_call_power_l ## Time&Date ## ####################################################################################### lcl.datetime.date.format = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} local_time.manual_time_enable = local_time.manual_ntp_srv_prior = local_time.time_format = {$yealink_time_format} local_time.date_format = {$yealink_date_format} local_time.dhcp_time = {$yealink_dhcp_time} -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} local_time.dst_time_type = {$yealink_dst_type} local_time.start_time = {$yealink_time_zone_start_time} local_time.end_time = {$yealink_time_zone_end_time} diff --git a/resources/templates/provision/yealink/t54s/y000000000070.cfg b/resources/templates/provision/yealink/t54s/y000000000070.cfg index c392bb6a1b..af932198f1 100644 --- a/resources/templates/provision/yealink/t54s/y000000000070.cfg +++ b/resources/templates/provision/yealink/t54s/y000000000070.cfg @@ -1201,14 +1201,14 @@ phone_setting.missed_call_power_led_flash.enable = {$yealink_missed_call_power_l ## Time&Date ## ####################################################################################### lcl.datetime.date.format = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} local_time.manual_time_enable = local_time.manual_ntp_srv_prior = local_time.time_format = {$yealink_time_format} local_time.date_format = {$yealink_date_format} local_time.dhcp_time = {$yealink_dhcp_time} -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} local_time.dst_time_type = {$yealink_dst_type} local_time.start_time = {$yealink_time_zone_start_time} local_time.end_time = {$yealink_time_zone_end_time} diff --git a/resources/templates/provision/yealink/t54w/y000000000096.cfg b/resources/templates/provision/yealink/t54w/y000000000096.cfg index a2f08557f7..4652f61806 100644 --- a/resources/templates/provision/yealink/t54w/y000000000096.cfg +++ b/resources/templates/provision/yealink/t54w/y000000000096.cfg @@ -1348,14 +1348,14 @@ phone_setting.missed_call_power_led_flash.enable = {$yealink_missed_call_power_l ## Time&Date ## ####################################################################################### lcl.datetime.date.format = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} local_time.manual_time_enable = local_time.manual_ntp_srv_prior = local_time.time_format = {$yealink_time_format} local_time.date_format = {$yealink_date_format} local_time.dhcp_time = {$yealink_dhcp_time} -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} local_time.dst_time_type = {$yealink_dst_type} local_time.start_time = {$yealink_time_zone_start_time} local_time.end_time = {$yealink_time_zone_end_time} diff --git a/resources/templates/provision/yealink/t56a/{$mac}.cfg b/resources/templates/provision/yealink/t56a/{$mac}.cfg index c9489591b5..ed14c9ca0f 100644 --- a/resources/templates/provision/yealink/t56a/{$mac}.cfg +++ b/resources/templates/provision/yealink/t56a/{$mac}.cfg @@ -2960,7 +2960,7 @@ local_time.interval = ##It enables or disables daylight saving time (DST) feature. ##0-Disabled,1-Enabled,2-Automatic. ##The default value is 2. -local_time.summer_time = +local_time.summer_time = {$yealink_summer_time} ##It configures the way DST works when DST feature is enabled. ##0-DST By Date ,1-DST By Week. @@ -3002,7 +3002,7 @@ local_time.manual_time_enable = ##The default value is 0. local_time.manual_ntp_srv_prior = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} ####################################################################################### diff --git a/resources/templates/provision/yealink/t57w/y000000000097.cfg b/resources/templates/provision/yealink/t57w/y000000000097.cfg index fd897f07bb..ee5eb1e18c 100644 --- a/resources/templates/provision/yealink/t57w/y000000000097.cfg +++ b/resources/templates/provision/yealink/t57w/y000000000097.cfg @@ -1348,14 +1348,14 @@ phone_setting.missed_call_power_led_flash.enable = {$yealink_missed_call_power_l ## Time&Date ## ####################################################################################### lcl.datetime.date.format = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} local_time.manual_time_enable = local_time.manual_ntp_srv_prior = local_time.time_format = {$yealink_time_format} local_time.date_format = {$yealink_date_format} local_time.dhcp_time = {$yealink_dhcp_time} -local_time.summer_time = {$yealink_dst_enable} +local_time.summer_time = {$yealink_summer_time} local_time.dst_time_type = {$yealink_dst_type} local_time.start_time = {$yealink_time_zone_start_time} local_time.end_time = {$yealink_time_zone_end_time} diff --git a/resources/templates/provision/yealink/t58v/{$mac}.cfg b/resources/templates/provision/yealink/t58v/{$mac}.cfg index a125c99d93..db8b835f64 100644 --- a/resources/templates/provision/yealink/t58v/{$mac}.cfg +++ b/resources/templates/provision/yealink/t58v/{$mac}.cfg @@ -2960,7 +2960,7 @@ local_time.interval = ##It enables or disables daylight saving time (DST) feature. ##0-Disabled,1-Enabled,2-Automatic. ##The default value is 2. -local_time.summer_time = +local_time.summer_time = {$yealink_summer_time} ##It configures the way DST works when DST feature is enabled. ##0-DST By Date ,1-DST By Week. @@ -3001,7 +3001,7 @@ local_time.manual_time_enable = ##The default value is 0. local_time.manual_ntp_srv_prior = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} ####################################################################################### diff --git a/resources/templates/provision/yealink/vp530/y000000000023.cfg b/resources/templates/provision/yealink/vp530/y000000000023.cfg index 618a73da80..f59729148f 100644 --- a/resources/templates/provision/yealink/vp530/y000000000023.cfg +++ b/resources/templates/provision/yealink/vp530/y000000000023.cfg @@ -616,7 +616,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = @@ -1040,7 +1040,7 @@ server_certificates.delete = ## Local Contact/DST Time/Dialnow Rule/Replace Rule ## ####################################################################################### local_contact.data.url = -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} dialplan_dialnow.url = dialplan_replace_rule.url = diff --git a/resources/templates/provision/yealink/w52p/y000000000025.cfg b/resources/templates/provision/yealink/w52p/y000000000025.cfg index e5ac1a0edf..585fc99612 100644 --- a/resources/templates/provision/yealink/w52p/y000000000025.cfg +++ b/resources/templates/provision/yealink/w52p/y000000000025.cfg @@ -234,7 +234,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = @@ -357,7 +357,7 @@ server_certificates.delete = ####################################################################################### ## Local Contact/DST Time/Replace Rule ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} dialplan_replace_rule.url = blacklist.url = handset.X.contact_list.url = diff --git a/resources/templates/provision/yealink/w56p/y000000000025.cfg b/resources/templates/provision/yealink/w56p/y000000000025.cfg index bd647fb5dd..8657569475 100644 --- a/resources/templates/provision/yealink/w56p/y000000000025.cfg +++ b/resources/templates/provision/yealink/w56p/y000000000025.cfg @@ -234,7 +234,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = @@ -357,7 +357,7 @@ server_certificates.delete = ####################################################################################### ## Local Contact/DST Time/Replace Rule ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} dialplan_replace_rule.url = blacklist.url = handset.X.contact_list.url = diff --git a/resources/templates/provision/yealink/w60b/y000000000077.cfg b/resources/templates/provision/yealink/w60b/y000000000077.cfg index 1fc37f9e4a..ad4c3ed1dc 100644 --- a/resources/templates/provision/yealink/w60b/y000000000077.cfg +++ b/resources/templates/provision/yealink/w60b/y000000000077.cfg @@ -234,7 +234,7 @@ local_time.ntp_server2 = {$ntp_server_secondary} local_time.interval = #Configure the daylight saving time feature; 0-Disabled, 1-Enabled, 2-Automatic (default); -local_time.summer_time = +local_time.summer_time = {$yealink_summer_time} #Configure the DST type when the DST feature is enabled; 0-By Date (default), 1-By Week; local_time.dst_time_type = @@ -357,7 +357,7 @@ server_certificates.delete = ####################################################################################### ## Local Contact/DST Time/Replace Rule ## ####################################################################################### -auto_dst.url = +auto_dst.url = {$yealink_auto_dst_url} dialplan_replace_rule.url = blacklist.url = handset.X.contact_list.url = From a8b22d04cfbb50408e91347f3f520fd21c40aa9e Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 25 Jun 2020 07:29:09 -0600 Subject: [PATCH 192/621] Add button css class and styles --- resources/header.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/resources/header.php b/resources/header.php index 3722956c73..31dfdd6822 100644 --- a/resources/header.php +++ b/resources/header.php @@ -118,6 +118,26 @@ unset($sql, $parameters, $content_result, $content_row); } +//button css class and styles + $button_icon_class = ''; + $button_icon_style = 'padding: 3px;'; + $button_label_class = 'button-label'; + $button_label_style = 'padding-left: 5px; padding-right: 3px;'; + $button_icons = $_SESSION['theme']['button_icons']['text']; + switch ($button_icons) { + case 'auto': + $button_label_class .= ' hide-md-dn'; + break; + case 'only': + $button_label_style .= ' display: none;'; + break; + case 'never': + $button_icon_class .= ' display: none;'; + break; + case 'always': + break; + } + //start the output buffer ob_start(); From 77055dfa9a7e42a9893456aab3121b5a9fb9bc26 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 25 Jun 2020 09:27:05 -0600 Subject: [PATCH 193/621] Fix a syntax bug that originated from a pull request. --- app/yealink/app_config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/yealink/app_config.php b/app/yealink/app_config.php index 3daf80337a..7c3cb355d3 100644 --- a/app/yealink/app_config.php +++ b/app/yealink/app_config.php @@ -1081,7 +1081,7 @@ $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3f6beec0-01d0-4015-b7f2-26a2b94a0b5d"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; - $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_auto_dst_url" + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_auto_dst_url"; $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "https://server.yourdomain.com/app/yealink/resources/auto_dst.xml"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; From 39646284ea279fd47b779a049a49e211d2e25698 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 25 Jun 2020 19:10:19 -0600 Subject: [PATCH 194/621] Setting default values to help with new permission protected option. --- core/groups/app_defaults.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/groups/app_defaults.php b/core/groups/app_defaults.php index 7b0b4be3a6..00ae1727ea 100644 --- a/core/groups/app_defaults.php +++ b/core/groups/app_defaults.php @@ -124,6 +124,11 @@ if ($domains_processed == 1) { $database->execute($sql, null); unset($sql); + //group permissions + $database = new database; + $database->execute("update v_group_permissions set permission_protected = 'false' where permission_protected is null;", null); + $database->execute("update v_group_permissions set permission_assigned = 'true' where permission_assigned is null;", null); + } ?> From f5a8a3b99894175c1cfa404379d11b2dd161b025 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Fri, 26 Jun 2020 11:58:00 -0400 Subject: [PATCH 195/621] Optimize permission defaults (#5323) * Update permission.php --- core/groups/resources/classes/permission.php | 29 +++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/core/groups/resources/classes/permission.php b/core/groups/resources/classes/permission.php index c4d2708713..8da5eb5749 100644 --- a/core/groups/resources/classes/permission.php +++ b/core/groups/resources/classes/permission.php @@ -121,6 +121,11 @@ //delete the group permissions $this->delete(); + + //get the remaining group permissions + $sql = "select permission_name, group_name from v_group_permissions "; + $database = new database; + $remianing_group_permissions = $database->select($sql, null, 'all'); //get the $apps array from the installed apps from the core and mod directories $config_list = glob($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/*/*/app_config.php"); @@ -150,20 +155,18 @@ } } } - if (!$group_protected) { - //if the item uuid is not currently in the db then add it - $sql = "select count(*) from v_group_permissions "; - $sql .= "where permission_name = :permission_name "; - $sql .= "and group_name = :group_name "; - $parameters['permission_name'] = $permission['name']; - $parameters['group_name'] = $group_name; - - $database = new database; - $num_rows = $database->select($sql, $parameters, 'column'); - unset($sql, $parameters); - - if ($num_rows == 0) { + // check if the item is not currently in the db + $exists = false; + foreach ($remianing_group_permissions as $i => $group_permission) { + if ($group_permission['permission_name'] == $permission['name']) { + if ($group_permission['group_name'] == $group_name) { + $exists = true; + break; + } + } + } + if (!$exists) { //build default permissions insert array $array['group_permissions'][$x]['group_permission_uuid'] = uuid(); $array['group_permissions'][$x]['permission_name'] = $permission['name']; From 468cdb9a88aa3efb502480cff63673af8ca60a3c Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 10:00:24 -0600 Subject: [PATCH 196/621] Rename the array $remianing_group_permissions to $database_group_permissions --- core/groups/resources/classes/permission.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/groups/resources/classes/permission.php b/core/groups/resources/classes/permission.php index 8da5eb5749..da85a98df3 100644 --- a/core/groups/resources/classes/permission.php +++ b/core/groups/resources/classes/permission.php @@ -125,7 +125,7 @@ //get the remaining group permissions $sql = "select permission_name, group_name from v_group_permissions "; $database = new database; - $remianing_group_permissions = $database->select($sql, null, 'all'); + $database_group_permissions = $database->select($sql, null, 'all'); //get the $apps array from the installed apps from the core and mod directories $config_list = glob($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/*/*/app_config.php"); @@ -156,9 +156,9 @@ } } if (!$group_protected) { - // check if the item is not currently in the db + // check if the item is not currently in the database $exists = false; - foreach ($remianing_group_permissions as $i => $group_permission) { + foreach ($database_group_permissions as $i => $group_permission) { if ($group_permission['permission_name'] == $permission['name']) { if ($group_permission['group_name'] == $group_name) { $exists = true; From 836fe64cf6b90d288f0e744694b0a16864a33f1c Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Fri, 26 Jun 2020 12:07:07 -0400 Subject: [PATCH 197/621] pin_number.lua get pin number description (#5322) * Update pin_number.lua --- app/scripts/resources/scripts/pin_number.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/scripts/resources/scripts/pin_number.lua b/app/scripts/resources/scripts/pin_number.lua index edced0ba8b..ac08191e0b 100644 --- a/app/scripts/resources/scripts/pin_number.lua +++ b/app/scripts/resources/scripts/pin_number.lua @@ -113,6 +113,7 @@ dbh:query(sql, params, function(row) --get the values from the database accountcode = row["accountcode"]; + description = row["description"]; --set the variable to true auth = true; --set the accountcode @@ -121,6 +122,7 @@ end --set the authorized pin number that was used session:setVariable("pin_number", digits); + session:setVariable("pin_description", description); end); elseif (pin_number == "voicemail") then local sql = [[SELECT * FROM v_voicemails @@ -194,4 +196,4 @@ if (pin_number) then check_pin_number(); end - end \ No newline at end of file + end From c1ef1ec084ba535769bb90656ccad4cc8a7e72b3 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 14:18:36 -0600 Subject: [PATCH 198/621] Update {$mac}.xml --- resources/templates/provision/snom/3xx/{$mac}.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/snom/3xx/{$mac}.xml b/resources/templates/provision/snom/3xx/{$mac}.xml index 4aedcd388b..15ba4b7def 100644 --- a/resources/templates/provision/snom/3xx/{$mac}.xml +++ b/resources/templates/provision/snom/3xx/{$mac}.xml @@ -3,7 +3,7 @@ English auto_update -http://{$domain_name}{$project_path}/app/provision/index.php?mac={$mac} +http://{$domain_name}{$project_path}/app/provision/{mac}.xml on {$snom_time_zone} http://{$domain_name}{$project_path}/app/provision/firmware.xml From 487c53bd2326b7e5f17a2bb592a70893ec7c239b Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 14:19:58 -0600 Subject: [PATCH 199/621] Simplify the snom provisioning URL. --- resources/templates/provision/snom/7xx/{$mac}.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/snom/7xx/{$mac}.xml b/resources/templates/provision/snom/7xx/{$mac}.xml index 4236d26815..d789fe3113 100644 --- a/resources/templates/provision/snom/7xx/{$mac}.xml +++ b/resources/templates/provision/snom/7xx/{$mac}.xml @@ -3,7 +3,7 @@ English auto_update -https://{$domain_name}{$project_path}/app/provision/index.php?mac={$mac} +https://{$domain_name}{$project_path}/app/provision/{mac}.xml on {$snom_time_zone} https://{$domain_name}{$project_path}/app/provision/firmware.xml From d76fc08868717a3d9643e9aa99e34b3227b84ee8 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 14:21:39 -0600 Subject: [PATCH 200/621] Simplify the snom provisioning URL --- resources/templates/provision/snom/720/{$mac}.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/snom/720/{$mac}.xml b/resources/templates/provision/snom/720/{$mac}.xml index e61d19dec9..82bd18cd54 100644 --- a/resources/templates/provision/snom/720/{$mac}.xml +++ b/resources/templates/provision/snom/720/{$mac}.xml @@ -16,7 +16,7 @@ snom720 160 -http://{$domain_name}/app/provision/index.php?mac={$mac} +http://{$domain_name}/app/provision/{mac}.xml on 3600 03.05.07 02:00:00 10.05.07 03:00:00 {$snom_time_zone} From 88e88e44f9b5fdcca6b7d569013adac05b69cd14 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 14:22:32 -0600 Subject: [PATCH 201/621] Update {$mac}.xml --- resources/templates/provision/snom/820/{$mac}.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/snom/820/{$mac}.xml b/resources/templates/provision/snom/820/{$mac}.xml index aed4c06f80..0dc19d9e4f 100644 --- a/resources/templates/provision/snom/820/{$mac}.xml +++ b/resources/templates/provision/snom/820/{$mac}.xml @@ -1,7 +1,7 @@ auto_update -http://{$domain_name}{$project_path}/app/provision/?mac={$v_mac}&filename_firmware-{$v_mac}.xml +http://{$domain_name}{$project_path}/app/provision/?mac={$mac}&filename_firmware-{mac}.xml off on off From 8562a998232872abcdcbf691f34c0f744a2cf4cc Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 14:23:14 -0600 Subject: [PATCH 202/621] Simplify the snom provisioning URL. --- resources/templates/provision/snom/360/{$mac}.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/snom/360/{$mac}.xml b/resources/templates/provision/snom/360/{$mac}.xml index 7117bd4b0e..38d32b5344 100644 --- a/resources/templates/provision/snom/360/{$mac}.xml +++ b/resources/templates/provision/snom/360/{$mac}.xml @@ -3,7 +3,7 @@ English auto_update -http://{$domain_name}{$project_path}/app/provision/index.php?mac={$mac} +http://{$domain_name}{$project_path}/app/provision/{mac}.xml on http://provisioning.snom.com:80/download/fw/snom360-8.7.3.19-SIP-f.bin on From 0d5d99acb285fa7fc6d301129af8956bab2914a6 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 14:24:06 -0600 Subject: [PATCH 203/621] Simplify the snom provisioning URL. --- resources/templates/provision/snom/320/{$mac}.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/templates/provision/snom/320/{$mac}.xml b/resources/templates/provision/snom/320/{$mac}.xml index 379ed05fc7..94717edd85 100644 --- a/resources/templates/provision/snom/320/{$mac}.xml +++ b/resources/templates/provision/snom/320/{$mac}.xml @@ -8,8 +8,8 @@ on on auto_update -http://{$domain_name}{$project_path}/app/provision/?mac={$mac}&filename_firmware-{$mac}.xml -http://{$domain_name}{$project_path}/app/provision/index.php?mac={$mac} +http://{$domain_name}{$project_path}/app/provision/?mac={mac}&filename_firmware-{mac}.xml +http://{$domain_name}{$project_path}/app/provision/{mac}.xml off on off From 734237143c525c4d4f187ca245cd7ff4827aed04 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 14:24:57 -0600 Subject: [PATCH 204/621] Simplify the snom provisioning URL --- resources/templates/provision/snom/300/{$mac}.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/templates/provision/snom/300/{$mac}.xml b/resources/templates/provision/snom/300/{$mac}.xml index ff53f92350..9108043e8d 100644 --- a/resources/templates/provision/snom/300/{$mac}.xml +++ b/resources/templates/provision/snom/300/{$mac}.xml @@ -6,7 +6,7 @@ off on auto_update -http://{$domain_name}{$project_path}/app/provision/?mac={$mac}&filename_firmware-{$mac}.xml +http://{$domain_name}{$project_path}/app/provision/?mac={mac}&filename_firmware-{mac}.xml off on off @@ -35,7 +35,7 @@ {$snom_time_zone} GBR none -http://{$domain_name}{$project_path}/app/provision/index.php?mac={$mac} +http://{$domain_name}{$project_path}/app/provision/{mac}.xml off Ringer6 off From 363df88954b2869ba3c8b2be6f86e0b97ed0c948 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 14:48:33 -0600 Subject: [PATCH 205/621] Add the SIP port and transport to snom 3xx --- resources/templates/provision/snom/3xx/{$mac}.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/templates/provision/snom/3xx/{$mac}.xml b/resources/templates/provision/snom/3xx/{$mac}.xml index 15ba4b7def..8f47661574 100644 --- a/resources/templates/provision/snom/3xx/{$mac}.xml +++ b/resources/templates/provision/snom/3xx/{$mac}.xml @@ -36,25 +36,25 @@ {$user.1.display_name} {$user.1.user_id} {$user.1.user_password} -{$user.1.server_address} +{$user.1.server_address}:{$user.1.sip_port};transport={$user.1.sip_transport} Default off *97 -{$user.2.display_name} +{$user.2.display_name}:{$user.2.sip_port};transport={$user.2.sip_transport} {$user.2.user_id} {$user.2.user_password} {$user.2.server_address} Default off *97 -{$user.3.display_name} +{$user.3.display_name}:{$user.3.sip_port};transport={$user.3.sip_transport} {$user.3.user_id} {$user.3.user_password} {$user.3.server_address} Default off *97 -{$user.4.display_name} +{$user.4.display_name}:{$user.4.sip_port};transport={$user.4.sip_transport} {$user.4.user_id} {$user.4.user_password} {$user.4.server_address} From a642745586249128b8ccd60122adacdf2ac50982 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 14:50:25 -0600 Subject: [PATCH 206/621] Add the SIP transport to the snom 7xx template --- resources/templates/provision/snom/7xx/{$mac}.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/templates/provision/snom/7xx/{$mac}.xml b/resources/templates/provision/snom/7xx/{$mac}.xml index d789fe3113..5131931338 100644 --- a/resources/templates/provision/snom/7xx/{$mac}.xml +++ b/resources/templates/provision/snom/7xx/{$mac}.xml @@ -36,7 +36,7 @@ {$user.1.display_name} {$user.1.user_id} {$user.1.password} -{$user.1.server_address}:{$user.1.sip_port} +{$user.1.server_address}:{$user.1.sip_port};transport={$user.1.sip_transport} {$user.1.register_expires} Default off @@ -44,7 +44,7 @@ {$user.2.display_name} {$user.2.user_id} {$user.2.password} -{$user.2.server_address}:{$sip_port} +{$user.2.server_address}:{$sip_port};transport={$user.2.sip_transport} {$user.2.register_expires} Default off @@ -52,7 +52,7 @@ {$user.3.display_name} {$user.3.user_id} {$user.3.password} -{$user.3.server_address}:{$user.3.sip_port} +{$user.3.server_address}:{$user.3.sip_port};transport={$user.3.sip_transport} {$user.3.register_expires} Default off @@ -60,7 +60,7 @@ {$user.4.display_name} {$user.4.user_id} {$user.4.password} -{$user.4.server_address}:{$user.4.sip_port} +{$user.4.server_address}:{$user.4.sip_port};transport={$user.4.sip_transport} {$user.4.register_expires} Default off @@ -68,7 +68,7 @@ {$user.5.display_name} {$user.5.user_id} {$user.5.password} -{$user.5.server_address}:{$user.5.sip_port} +{$user.5.server_address}:{$user.5.sip_port};transport={$user.5.sip_transport} {$user.5.register_expires} Default off From 59c3b912acdb09d81aaca45a78a35fa8c0ffe13e Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 15:09:20 -0600 Subject: [PATCH 207/621] Add ntp server info to the snom 3xx template --- resources/templates/provision/snom/3xx/{$mac}.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/templates/provision/snom/3xx/{$mac}.xml b/resources/templates/provision/snom/3xx/{$mac}.xml index 8f47661574..8ace76a94c 100644 --- a/resources/templates/provision/snom/3xx/{$mac}.xml +++ b/resources/templates/provision/snom/3xx/{$mac}.xml @@ -5,6 +5,8 @@ auto_update http://{$domain_name}{$project_path}/app/provision/{mac}.xml on +{$ntp_server_primary} +3600 {$snom_time_zone} http://{$domain_name}{$project_path}/app/provision/firmware.xml {if isset($admin_password) } From 9b19637d6792d3391d14bf250af0608a6091cb21 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 15:10:07 -0600 Subject: [PATCH 208/621] Add ntp server to snom 7xx template. --- resources/templates/provision/snom/7xx/{$mac}.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/templates/provision/snom/7xx/{$mac}.xml b/resources/templates/provision/snom/7xx/{$mac}.xml index 5131931338..ad4f89785d 100644 --- a/resources/templates/provision/snom/7xx/{$mac}.xml +++ b/resources/templates/provision/snom/7xx/{$mac}.xml @@ -5,6 +5,8 @@ auto_update https://{$domain_name}{$project_path}/app/provision/{mac}.xml on +{$ntp_server_primary} +3600 {$snom_time_zone} https://{$domain_name}{$project_path}/app/provision/firmware.xml {if isset($admin_password) } From 00c5f1d54ac2b24e9cf76fb9c3872fd2759208d6 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 15:18:48 -0600 Subject: [PATCH 209/621] Add literal to the snom 7xx template --- resources/templates/provision/snom/7xx/{$mac}.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/snom/7xx/{$mac}.xml b/resources/templates/provision/snom/7xx/{$mac}.xml index ad4f89785d..028deafd62 100644 --- a/resources/templates/provision/snom/7xx/{$mac}.xml +++ b/resources/templates/provision/snom/7xx/{$mac}.xml @@ -3,7 +3,7 @@ English auto_update -https://{$domain_name}{$project_path}/app/provision/{mac}.xml +https://{$domain_name}{$project_path}/app/provision/{literal}{mac}{/literal}.xml on {$ntp_server_primary} 3600 From 7074e7fc31db4701554dec5aa6da9ea6022d58fb Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 15:20:45 -0600 Subject: [PATCH 210/621] Update the provision URL on snom 8xx --- resources/templates/provision/snom/8xx/{$mac}.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/snom/8xx/{$mac}.xml b/resources/templates/provision/snom/8xx/{$mac}.xml index 4e407ac5a3..86aa425b4c 100644 --- a/resources/templates/provision/snom/8xx/{$mac}.xml +++ b/resources/templates/provision/snom/8xx/{$mac}.xml @@ -3,7 +3,7 @@ English auto_update -http://{$domain_name}{$project_path}/app/provision/index.php?mac={$mac} +http://{$domain_name}{$project_path}/app/provision/{literal}{mac}{/literal}.xml on {$snom_time_zone} http://{$domain_name}{$project_path}/app/provision/firmware.xml From 17af75268fcd032b6320201946ffc3ca0f9cea52 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 15:27:26 -0600 Subject: [PATCH 211/621] Add literal to snom 300 --- resources/templates/provision/snom/300/{$mac}.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/templates/provision/snom/300/{$mac}.xml b/resources/templates/provision/snom/300/{$mac}.xml index 9108043e8d..859d8395b0 100644 --- a/resources/templates/provision/snom/300/{$mac}.xml +++ b/resources/templates/provision/snom/300/{$mac}.xml @@ -6,7 +6,7 @@ off on auto_update -http://{$domain_name}{$project_path}/app/provision/?mac={mac}&filename_firmware-{mac}.xml +http://{$domain_name}{$project_path}/app/provision/?mac={$mac}&filename_firmware-{$mac}.xml off on off @@ -35,7 +35,7 @@ {$snom_time_zone} GBR none -http://{$domain_name}{$project_path}/app/provision/{mac}.xml +http://{$domain_name}{$project_path}/app/provision/{literal}{mac}{/literal}.xml off Ringer6 off From 9f0077341100fddd0c6df8d47749e00e9d9f18ca Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 15:28:06 -0600 Subject: [PATCH 212/621] Add literal to snom 320 --- resources/templates/provision/snom/320/{$mac}.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/templates/provision/snom/320/{$mac}.xml b/resources/templates/provision/snom/320/{$mac}.xml index 94717edd85..273a63d5c6 100644 --- a/resources/templates/provision/snom/320/{$mac}.xml +++ b/resources/templates/provision/snom/320/{$mac}.xml @@ -8,8 +8,8 @@ on on auto_update -http://{$domain_name}{$project_path}/app/provision/?mac={mac}&filename_firmware-{mac}.xml -http://{$domain_name}{$project_path}/app/provision/{mac}.xml +http://{$domain_name}{$project_path}/app/provision/?mac={$mac}&filename_firmware-{$mac}.xml +http://{$domain_name}{$project_path}/app/provision/{literal}{mac}{/literal}.xml off on off From e012bb008243741af302ea01df3fb6ec5d5dd4fe Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 15:28:45 -0600 Subject: [PATCH 213/621] Add literal to snom 360 --- resources/templates/provision/snom/360/{$mac}.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/snom/360/{$mac}.xml b/resources/templates/provision/snom/360/{$mac}.xml index 38d32b5344..4fbfe55c9f 100644 --- a/resources/templates/provision/snom/360/{$mac}.xml +++ b/resources/templates/provision/snom/360/{$mac}.xml @@ -3,7 +3,7 @@ English auto_update -http://{$domain_name}{$project_path}/app/provision/{mac}.xml +http://{$domain_name}{$project_path}/app/provision/{literal}{mac}{/literal}.xml on http://provisioning.snom.com:80/download/fw/snom360-8.7.3.19-SIP-f.bin on From 7c76af223b67a957619d8c6295ac01dc23e271e4 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 15:29:45 -0600 Subject: [PATCH 214/621] Add literal to snom 300 --- resources/templates/provision/snom/3xx/{$mac}.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/snom/3xx/{$mac}.xml b/resources/templates/provision/snom/3xx/{$mac}.xml index 8ace76a94c..fe2671a686 100644 --- a/resources/templates/provision/snom/3xx/{$mac}.xml +++ b/resources/templates/provision/snom/3xx/{$mac}.xml @@ -3,7 +3,7 @@ English auto_update -http://{$domain_name}{$project_path}/app/provision/{mac}.xml +http://{$domain_name}{$project_path}/app/provision/{literal}{mac}{/literal}.xml on {$ntp_server_primary} 3600 From fb76c787073cb2bc6cffe5e78cc1b116185314e1 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 15:32:17 -0600 Subject: [PATCH 215/621] Add literal to snom 720 --- resources/templates/provision/snom/720/{$mac}.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/snom/720/{$mac}.xml b/resources/templates/provision/snom/720/{$mac}.xml index 82bd18cd54..c725ff1c0c 100644 --- a/resources/templates/provision/snom/720/{$mac}.xml +++ b/resources/templates/provision/snom/720/{$mac}.xml @@ -16,7 +16,7 @@ snom720 160 -http://{$domain_name}/app/provision/{mac}.xml +http://{$domain_name}/app/provision/{literal}{mac}{/literal}.xml on 3600 03.05.07 02:00:00 10.05.07 03:00:00 {$snom_time_zone} From 764a8d89691d6eb7fe80b397ec02dd2de41fe4f1 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 15:33:49 -0600 Subject: [PATCH 216/621] Update {$mac}.xml --- resources/templates/provision/snom/820/{$mac}.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/snom/820/{$mac}.xml b/resources/templates/provision/snom/820/{$mac}.xml index 0dc19d9e4f..e64690fe58 100644 --- a/resources/templates/provision/snom/820/{$mac}.xml +++ b/resources/templates/provision/snom/820/{$mac}.xml @@ -1,7 +1,7 @@ auto_update -http://{$domain_name}{$project_path}/app/provision/?mac={$mac}&filename_firmware-{mac}.xml +http://{$domain_name}{$project_path}/app/provision/?mac={$mac}&filename_firmware-{$mac}.xml off on off From 30e3b9022809817ca482692b03a217b1382959a6 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Jun 2020 21:57:32 -0600 Subject: [PATCH 217/621] Update the uuid function --- resources/functions.php | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/resources/functions.php b/resources/functions.php index 47b0e1539e..66f14a97e2 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -106,22 +106,41 @@ $uuid = null; if (PHP_OS === 'FreeBSD') { $uuid = trim(shell_exec("uuid -v 4")); - if (!is_uuid($uuid)) { + if (is_uuid($uuid)) { + return $uuid; + } + else { echo "Please install the following package.\n"; echo "pkg install ossp-uuid\n"; exit; } } - if (PHP_OS === 'Linux' && !is_uuid($uuid)) { + if (PHP_OS === 'Linux') { $uuid = trim(file_get_contents('/proc/sys/kernel/random/uuid')); + if (is_uuid($uuid)) { + return $uuid; + } + else { + $uuid = trim(shell_exec("uuidgen")); + if (is_uuid($uuid)) { + return $uuid; + } + else { + echo "Please install the uuidgen.\n"; + exit; + } + } } - if (!is_uuid($uuid)) { - $uuid = trim(shell_exec("uuidgen")); - } - if (function_exists('com_create_guid') === true && PHP_OS === 'Windows') { + if (PHP_OS === 'Windows' && function_exists('com_create_guid')) { $uuid = trim(com_create_guid(), '{}'); + if (is_uuid($uuid)) { + return $uuid; + } + else { + echo "The com_create_guid() function failed to create a uuid.\n"; + exit; + } } - return $uuid; } } From c020592f0c645b3bc0a4cca9d7cc413f77bb540c Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 29 Jun 2020 08:59:49 -0600 Subject: [PATCH 218/621] Update version to 4.5.15 --- core/software/resources/classes/software.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/software/resources/classes/software.php b/core/software/resources/classes/software.php index 30b043f0e8..05b80c7300 100644 --- a/core/software/resources/classes/software.php +++ b/core/software/resources/classes/software.php @@ -12,7 +12,7 @@ if (!class_exists('software')) { * version */ public static function version() { - return '4.5.14'; + return '4.5.15'; } /** From 85b6f20158223920ef45f87a1902d5e384851f82 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 30 Jun 2020 17:40:31 -0600 Subject: [PATCH 219/621] Change the order of the xml tags --- resources/templates/provision/polycom/5.x/{$mac}.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/polycom/5.x/{$mac}.cfg b/resources/templates/provision/polycom/5.x/{$mac}.cfg index d80b25dede..4e8f844b68 100644 --- a/resources/templates/provision/polycom/5.x/{$mac}.cfg +++ b/resources/templates/provision/polycom/5.x/{$mac}.cfg @@ -182,8 +182,8 @@ {/if} nat.keepalive.interval="30" voIpProt.SIP.specialEvent.checkSync.alwaysReboot="1" - voIpProt.SIP.requestValidation.1.request="{$polycom_request_validation_request}" voIpProt.SIP.requestValidation.1.method="{$polycom_request_validation_method}" + voIpProt.SIP.requestValidation.1.request="{$polycom_request_validation_request}" voIpProt.server.1.failOver.reRegisterOn="1" voIpProt.server.1.failOver.failRegistrationOn="1" voIpProt.server.1.failOver.onlySignalWithRegistered="1" From f6277e9fa55813b910c2b4fdebe1ce50529d5498 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 30 Jun 2020 17:42:20 -0600 Subject: [PATCH 220/621] Use polycom_request_validation_method and polycom_request_validation_request template variables --- resources/templates/provision/polycom/4.x/{$mac}.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/templates/provision/polycom/4.x/{$mac}.cfg b/resources/templates/provision/polycom/4.x/{$mac}.cfg index 2b8e1704c7..dd4ae700cc 100644 --- a/resources/templates/provision/polycom/4.x/{$mac}.cfg +++ b/resources/templates/provision/polycom/4.x/{$mac}.cfg @@ -174,8 +174,8 @@ {/if} nat.keepalive.interval="30" voIpProt.SIP.specialEvent.checkSync.alwaysReboot="1" - voIpProt.SIP.requestValidation.1.request="INVITE" - voIpProt.SIP.requestValidation.1.method="source" + voIpProt.SIP.requestValidation.1.method="{$polycom_request_validation_method}" + voIpProt.SIP.requestValidation.1.request="{$polycom_request_validation_request}" feature.broadsoftUcOne.enabled="0" voice.volume.persist.handset="1" voice.volume.persist.handsfree="1" From 5dc1137a6407e9e75389797c075c438884e33e2c Mon Sep 17 00:00:00 2001 From: konradSC Date: Wed, 1 Jul 2020 18:28:36 -0400 Subject: [PATCH 221/621] Fix Yealink Expansion Modules in Device Profiles (#5324) The 'if' statements need to reference v_device_profile_keys.profile_key_vendor instead of device_key_vendor which is in a different table. --- app/devices/device_profile_edit.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/devices/device_profile_edit.php b/app/devices/device_profile_edit.php index 07c656d29d..8d16ef0a5e 100644 --- a/app/devices/device_profile_edit.php +++ b/app/devices/device_profile_edit.php @@ -489,12 +489,12 @@ echo " \n"; echo " \n"; - echo "
\n"; - echo $text['description-auth_acl']."\n"; - echo "\n"; - echo "\n"; - - if (permission_exists("extension_cidr")) { + if (permission_exists(extension_advanced)) { echo "\n"; - echo "\n"; - echo " ".$text['label-cidr']."\n"; + echo "\n"; + + echo "
\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
 \n"; + echo button::create(['type'=>'button','label'=>$text['button-advanced'],'icon'=>'tools','onclick'=>'show_advanced_config();']); + echo "
\n"; + echo "
\n"; + + echo "
\n"; + echo " \n"; + + echo "\n"; + echo "\n"; - echo "\n"; echo "\n"; - } - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + if (permission_exists("extension_cidr")) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - if (permission_exists('extension_nibble_account')) { echo "\n"; echo "\n"; echo "\n"; - echo "\n"; - } - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - if (permission_exists('extension_absolute_codec_string')) { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - - if (permission_exists('extension_force_ping')) { - echo "\n"; - echo "\n"; - echo "\n"; echo "\n"; - } - if (permission_exists('extension_domain')) { echo "\n"; echo "\n"; echo "\n"; + echo "\n"; + + if (permission_exists('extension_nibble_account')) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + if (permission_exists('extension_absolute_codec_string')) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + + if (permission_exists('extension_force_ping')) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; } - echo " \n"; - echo "
\n"; - echo $text['description-domain_name']."\n"; + + if (permission_exists('extension_domain')) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + + if (permission_exists('extension_dial_string')) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + + echo "
\n"; + echo " ".$text['label-auth_acl']."\n"; echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-cidr']."\n"; + echo "
\n"; + echo " \n"; + echo "
\n"; + echo $text['description-auth_acl']."\n"; echo "
\n"; - echo " ".$text['label-sip_force_contact']."\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-sip_force_contact']."\n"; - echo "
\n"; + echo " ".$text['label-cidr']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-cidr']."\n"; + echo "
\n"; - echo " ".$text['label-sip_force_expires']."\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-sip_force_expires']."\n"; - echo "
\n"; - echo " ".$text['label-nibble_account']."\n"; + echo " ".$text['label-sip_force_contact']."\n"; echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-nibble_account']."\n"; - echo "
\n"; - echo " ".$text['label-mwi_account']."\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-mwi_account']."\n"; - echo "
\n"; - echo " ".$text['label-sip_bypass_media']."\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-sip_bypass_media']."\n"; - echo "
\n"; - echo " ".$text['label-absolute_codec_string']."\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-absolute_codec_string']."\n"; - echo "
\n"; - echo " ".$text['label-force_ping']."\n"; - echo "\n"; - echo " \n"; + echo " \n"; + switch ($sip_force_contact) { + case "NDLB-connectile-dysfunction": $selected[1] = "selected='selected'"; break; + case "NDLB-connectile-dysfunction-2.0": $selected[2] = "selected='selected'"; break; + case "NDLB-tls-connectile-dysfunction": $selected[3] = "selected='selected'"; break; } + echo " \n"; + echo " \n"; + echo " \n"; + unset($selected); echo " \n"; echo "
\n"; - echo $text['description-force_ping']."\n"; + echo $text['description-sip_force_contact']."\n"; echo "
\n"; - echo " ".$text['label-domain']."\n"; + echo " ".$text['label-sip_force_expires']."\n"; echo "\n"; - echo " \n"; + echo "
\n"; + echo $text['description-sip_force_expires']."\n"; + echo "
\n"; + echo " ".$text['label-nibble_account']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-nibble_account']."\n"; + echo "
\n"; + echo " ".$text['label-mwi_account']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-mwi_account']."\n"; + echo "
\n"; + echo " ".$text['label-sip_bypass_media']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-sip_bypass_media']."\n"; + echo "
\n"; + echo " ".$text['label-absolute_codec_string']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-absolute_codec_string']."\n"; + echo "
\n"; + echo " ".$text['label-force_ping']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-force_ping']."\n"; + echo "
\n"; + echo " ".$text['label-domain']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-domain_name']."\n"; + echo "
\n"; + echo " ".$text['label-dial_string']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-dial_string']."\n"; + echo "
\n"; + echo "
"; + echo "\n"; echo "\n"; + } - - if (permission_exists('extension_dial_string')) { - echo "\n"; - echo "\n"; - echo " ".$text['label-dial_string']."\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-dial_string']."\n"; - echo "\n"; - echo "\n"; - } - - echo " \n"; - echo " "; - - echo "\n"; - echo "\n"; - //--- end: show_advanced ----------------------- if (permission_exists('extension_enabled')) { From 64ca99001295d4dd2e1f7ababdf9ac9cb7ddbde3 Mon Sep 17 00:00:00 2001 From: Len Date: Thu, 2 Jul 2020 03:34:11 -0400 Subject: [PATCH 223/621] Update {$mac}.cfg (#5325) --- resources/templates/provision/snom/m3/{$mac}.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/templates/provision/snom/m3/{$mac}.cfg b/resources/templates/provision/snom/m3/{$mac}.cfg index 3cbfdd57b1..0dadeb6fa8 100644 --- a/resources/templates/provision/snom/m3/{$mac}.cfg +++ b/resources/templates/provision/snom/m3/{$mac}.cfg @@ -183,3 +183,4 @@ //%EMERGENCY_PRIMARY_PORT%:1 //1-VOIP1 .. 8-VOIP8 +END_OF_FILE From baaf95781e9d1969efe24617b417534c9fddffeb Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 2 Jul 2020 10:54:20 -0600 Subject: [PATCH 224/621] Add toggle to number translations --- app/number_translations/app_config.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/number_translations/app_config.php b/app/number_translations/app_config.php index 6fb2930c4a..c351b96a73 100644 --- a/app/number_translations/app_config.php +++ b/app/number_translations/app_config.php @@ -86,6 +86,7 @@ $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = 'number_translation_enabled'; $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; + $apps[$x]['db'][$y]['fields'][$z]['toggle'] = ['true','false']; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the number translation enabled.'; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = 'number_translation_description'; From 1e7cccff2aab199e67dd38f128ebb54348e74497 Mon Sep 17 00:00:00 2001 From: Mark J Crane Date: Thu, 2 Jul 2020 10:58:00 -0600 Subject: [PATCH 225/621] Remove the old application manager that was view only. --- core/apps/app_config.php | 70 ---------------- core/apps/app_languages.php | 160 ------------------------------------ core/apps/app_menu.php | 28 ------- core/apps/apps.php | 106 ------------------------ core/apps/root.php | 90 -------------------- 5 files changed, 454 deletions(-) delete mode 100644 core/apps/app_config.php delete mode 100644 core/apps/app_languages.php delete mode 100644 core/apps/app_menu.php delete mode 100644 core/apps/apps.php delete mode 100644 core/apps/root.php diff --git a/core/apps/app_config.php b/core/apps/app_config.php deleted file mode 100644 index 71c0ff8277..0000000000 --- a/core/apps/app_config.php +++ /dev/null @@ -1,70 +0,0 @@ - diff --git a/core/apps/app_languages.php b/core/apps/app_languages.php deleted file mode 100644 index d741ba3310..0000000000 --- a/core/apps/app_languages.php +++ /dev/null @@ -1,160 +0,0 @@ - diff --git a/core/apps/app_menu.php b/core/apps/app_menu.php deleted file mode 100644 index 701acf5cea..0000000000 --- a/core/apps/app_menu.php +++ /dev/null @@ -1,28 +0,0 @@ - diff --git a/core/apps/apps.php b/core/apps/apps.php deleted file mode 100644 index 24178ab5c5..0000000000 --- a/core/apps/apps.php +++ /dev/null @@ -1,106 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2020 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -//includes - require_once "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - require_once "resources/paging.php"; - -//check permissions - if (if_group("admin") || if_group("superadmin")) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//get variables used to control the order - $order_by = $_GET["order_by"]; - $order = $_GET["order"]; - -//get the list of installed apps from the core and mod directories - $config_list = glob($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/*/*/app_config.php"); - $x=0; - foreach ($config_list as $config_path) { - include($config_path); - $x++; - } - -//include the header - $document['title'] = $text['title-apps']; - require_once "resources/header.php"; - -//show the content - echo "
\n"; - echo "
".$text['header-apps']."
\n"; - echo "
\n"; - echo "
\n"; - echo "
\n"; - echo "
\n"; - - echo $text['description-apps']; - echo "

\n"; - - echo "\n"; - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "\n"; - - foreach ($apps as $row) { - if ($row['uuid'] == "d8704214-75a0-e52f-1336-f0780e29fef8") { continue; } - - $description = $row['description'][$_SESSION['domain']['language']['code']]; - if (strlen($description) == 0) { $description = $row['description']['en-us']; } - if (strlen($description) == 0) { $description = ''; } - $row['$description'] = $description; - - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "\n"; - } - unset($apps); - - echo "
".$text['label-name']."".$text['label-category']."".$text['label-subcategory']."".$text['label-version']."".$text['label-description']."
".$row['name']."".escape($row['category'])." ".escape($row['subcategory'])." ".escape($row['version'])." ".escape($row['$description'])."
"; - echo "

"; - -//include the footer - require_once "resources/footer.php"; - -?> \ No newline at end of file diff --git a/core/apps/root.php b/core/apps/root.php deleted file mode 100644 index 6fdf32f37b..0000000000 --- a/core/apps/root.php +++ /dev/null @@ -1,90 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -// make sure the PATH_SEPARATOR is defined - umask(2); - if (!defined("PATH_SEPARATOR")) { - if (strpos($_ENV["OS"], "Win") !== false) { - define("PATH_SEPARATOR", ";"); - } else { - define("PATH_SEPARATOR", ":"); - } - } - - if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html'; - - // make sure the document_root is set - $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]); - if(PHP_SAPI == 'cli'){ - chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME)); - $script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]); - $dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME)); - if (file_exists('/project_root.php')) { - $path = '/'; - } else { - $i = 1; - $path = ''; - while ($i < count($dirs)) { - $path .= '/' . $dirs[$i]; - if (file_exists($path. '/project_root.php')) { - break; - } - $i++; - } - } - $_SERVER["DOCUMENT_ROOT"] = $path; - }else{ - $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]); - } - $_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]); -// try to detect if a project path is being used - if (!defined('PROJECT_PATH')) { - if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) { - define('PROJECT_PATH', '/fusionpbx'); - } elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) { - define('PROJECT_PATH', ''); - } else { - $dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME))); - $i = 1; - $path = $_SERVER["DOCUMENT_ROOT"]; - while ($i < count($dirs)) { - $path .= '/' . $dirs[$i]; - if (file_exists($path. '/project_root.php')) { - break; - } - $i++; - } - if(!file_exists($path. '/project_root.php')){ - die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance"); - } - $project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path); - define('PROJECT_PATH', $project_path); - } - $_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH); - set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]); - } - -?> \ No newline at end of file From a07781860be491a9d53e1343ab977aa0d031cd95 Mon Sep 17 00:00:00 2001 From: Mark J Crane Date: Thu, 2 Jul 2020 12:02:54 -0600 Subject: [PATCH 226/621] Change data type and add toggle values --- core/default_settings/app_config.php | 5 ++++- core/domain_settings/app_config.php | 5 ++++- core/domains/app_config.php | 5 ++++- core/user_settings/app_config.php | 5 ++++- core/users/app_config.php | 6 +++++- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/core/default_settings/app_config.php b/core/default_settings/app_config.php index 82be5c2f5c..a5e72052f8 100644 --- a/core/default_settings/app_config.php +++ b/core/default_settings/app_config.php @@ -487,7 +487,10 @@ $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "default_setting_enabled"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "boolean"; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['toggle'] = ['true','false']; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "default_setting_description"; diff --git a/core/domain_settings/app_config.php b/core/domain_settings/app_config.php index ec709adfdd..5fffef49cb 100644 --- a/core/domain_settings/app_config.php +++ b/core/domain_settings/app_config.php @@ -100,7 +100,10 @@ $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_setting_enabled"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "boolean"; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['toggle'] = ['true','false']; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_setting_description"; diff --git a/core/domains/app_config.php b/core/domains/app_config.php index b49bdb6f7e..5e84d462e5 100644 --- a/core/domains/app_config.php +++ b/core/domains/app_config.php @@ -82,7 +82,10 @@ $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the domain name."; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_enabled"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "boolean"; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['toggle'] = ['true','false']; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Set the status of the domain."; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_description"; diff --git a/core/user_settings/app_config.php b/core/user_settings/app_config.php index f7e3271343..fcb107229c 100644 --- a/core/user_settings/app_config.php +++ b/core/user_settings/app_config.php @@ -103,7 +103,10 @@ $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_enabled"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "boolean"; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['toggle'] = ['true','false']; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_description"; diff --git a/core/users/app_config.php b/core/users/app_config.php index 845d0cbd71..ffba651654 100644 --- a/core/users/app_config.php +++ b/core/users/app_config.php @@ -220,6 +220,7 @@ $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "user_enabled"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['toggle'] = ['true','false']; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "add_user"; @@ -346,7 +347,10 @@ $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_enabled"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "boolean"; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['toggle'] = ['true','false']; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_description"; From fc8746c87e67b3d7a08143a8e9ed3217654119d6 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 2 Jul 2020 12:23:55 -0600 Subject: [PATCH 227/621] Company directory add order by first name --- app/scripts/resources/scripts/directory.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/resources/scripts/directory.lua b/app/scripts/resources/scripts/directory.lua index 8712255ca9..abfe7ae48e 100644 --- a/app/scripts/resources/scripts/directory.lua +++ b/app/scripts/resources/scripts/directory.lua @@ -345,7 +345,7 @@ end --get the extensions from the database - local sql = "SELECT * FROM v_extensions WHERE domain_uuid = :domain_uuid AND enabled = 'true' AND (directory_visible is null or directory_visible = 'true'); "; + local sql = "SELECT * FROM v_extensions WHERE domain_uuid = :domain_uuid AND enabled = 'true' AND (directory_visible is null or directory_visible = 'true') ORDER BY directory_first_name, effective_caller_id_name asc; "; local params = {domain_uuid = domain_uuid}; if (debug["sql"]) then freeswitch.consoleLog("notice", "[directory] SQL: " .. sql .. "; params: " .. json.encode(params) .. "\n"); From 0a3d809556d66555a67a2806ca299838aec929ec Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 2 Jul 2020 16:27:54 -0600 Subject: [PATCH 228/621] Add cc values to the altnernate import. --- app/xml_cdr/resources/classes/xml_cdr.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index 614062045a..c4ab63d667 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -160,6 +160,8 @@ if (!class_exists('xml_cdr')) { $this->fields[] = "cc_agent_bridged"; $this->fields[] = "cc_queue_answered_epoch"; $this->fields[] = "cc_queue_terminated_epoch"; + $this->fields[] = "cc_queue_canceled_epoch"; + $this->fields[] = "cc_cancel_reason"; $this->fields[] = "cc_cause"; $this->fields[] = "waitsec"; $this->fields[] = "conference_name"; @@ -353,6 +355,7 @@ if (!class_exists('xml_cdr')) { //$this->array[$key]['digits_dialed'] = urldecode($xml->variables->digits_dialed); $this->array[$key]['sip_hangup_disposition'] = urldecode($xml->variables->sip_hangup_disposition); $this->array[$key]['pin_number'] = urldecode($xml->variables->pin_number); + //time $this->array[$key]['start_epoch'] = urldecode($xml->variables->start_epoch); $start_stamp = urldecode($xml->variables->start_stamp); @@ -365,6 +368,7 @@ if (!class_exists('xml_cdr')) { $this->array[$key]['mduration'] = urldecode($xml->variables->mduration); $this->array[$key]['billsec'] = urldecode($xml->variables->billsec); $this->array[$key]['billmsec'] = urldecode($xml->variables->billmsec); + //codecs $this->array[$key]['read_codec'] = urldecode($xml->variables->read_codec); $this->array[$key]['read_rate'] = urldecode($xml->variables->read_rate); @@ -373,22 +377,33 @@ if (!class_exists('xml_cdr')) { $this->array[$key]['remote_media_ip'] = urldecode($xml->variables->remote_media_ip); $this->array[$key]['hangup_cause'] = urldecode($xml->variables->hangup_cause); $this->array[$key]['hangup_cause_q850'] = urldecode($xml->variables->hangup_cause_q850); + //call center $this->array[$key]['cc_side'] = urldecode($xml->variables->cc_side); $this->array[$key]['cc_member_uuid'] = urldecode($xml->variables->cc_member_uuid); $this->array[$key]['cc_queue_joined_epoch'] = urldecode($xml->variables->cc_queue_joined_epoch); $this->array[$key]['cc_queue'] = urldecode($xml->variables->cc_queue); $this->array[$key]['cc_member_session_uuid'] = urldecode($xml->variables->cc_member_session_uuid); + $this->array[$key]['cc_agent'] = urldecode($xml->variables->cc_agent_uuid); $this->array[$key]['cc_agent'] = urldecode($xml->variables->cc_agent); $this->array[$key]['cc_agent_type'] = urldecode($xml->variables->cc_agent_type); + $this->array[$key]['cc_agent_type'] = urldecode($xml->variables->cc_agent_bridged); + $this->array[$key]['cc_agent_type'] = urldecode($xml->variables->cc_queue_answered_epoch); + $this->array[$key]['cc_agent_type'] = urldecode($xml->variables->cc_queue_terminated_epoch); + $this->array[$key]['cc_agent_type'] = urldecode($xml->variables->cc_queue_canceled_epoch); + $this->array[$key]['cc_agent_type'] = urldecode($xml->variables->cc_cancel_reason); + $this->array[$key]['cc_agent_type'] = urldecode($xml->variables->cc_cause); $this->array[$key]['waitsec'] = urldecode($xml->variables->waitsec); + //app info $this->array[$key]['last_app'] = urldecode($xml->variables->last_app); $this->array[$key]['last_arg'] = urldecode($xml->variables->last_arg); + //conference $this->array[$key]['conference_name'] = urldecode($xml->variables->conference_name); $this->array[$key]['conference_uuid'] = urldecode($xml->variables->conference_uuid); $this->array[$key]['conference_member_id'] = urldecode($xml->variables->conference_member_id); + //call quality $rtp_audio_in_mos = urldecode($xml->variables->rtp_audio_in_mos); if (strlen($rtp_audio_in_mos) > 0) { From 2d5745c28346ef1474c13ad7bbecae40e9e89425 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 2 Jul 2020 16:48:07 -0600 Subject: [PATCH 229/621] Adjust the key string to match the value. --- app/xml_cdr/resources/classes/xml_cdr.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index c4ab63d667..596e36a00b 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -384,15 +384,15 @@ if (!class_exists('xml_cdr')) { $this->array[$key]['cc_queue_joined_epoch'] = urldecode($xml->variables->cc_queue_joined_epoch); $this->array[$key]['cc_queue'] = urldecode($xml->variables->cc_queue); $this->array[$key]['cc_member_session_uuid'] = urldecode($xml->variables->cc_member_session_uuid); - $this->array[$key]['cc_agent'] = urldecode($xml->variables->cc_agent_uuid); + $this->array[$key]['cc_agent_uuid'] = urldecode($xml->variables->cc_agent_uuid); $this->array[$key]['cc_agent'] = urldecode($xml->variables->cc_agent); $this->array[$key]['cc_agent_type'] = urldecode($xml->variables->cc_agent_type); - $this->array[$key]['cc_agent_type'] = urldecode($xml->variables->cc_agent_bridged); - $this->array[$key]['cc_agent_type'] = urldecode($xml->variables->cc_queue_answered_epoch); - $this->array[$key]['cc_agent_type'] = urldecode($xml->variables->cc_queue_terminated_epoch); - $this->array[$key]['cc_agent_type'] = urldecode($xml->variables->cc_queue_canceled_epoch); - $this->array[$key]['cc_agent_type'] = urldecode($xml->variables->cc_cancel_reason); - $this->array[$key]['cc_agent_type'] = urldecode($xml->variables->cc_cause); + $this->array[$key]['cc_agent_bridged'] = urldecode($xml->variables->cc_agent_bridged); + $this->array[$key]['cc_queue_answered_epoch'] = urldecode($xml->variables->cc_queue_answered_epoch); + $this->array[$key]['cc_queue_terminated_epoch'] = urldecode($xml->variables->cc_queue_terminated_epoch); + $this->array[$key]['cc_queue_canceled_epoch'] = urldecode($xml->variables->cc_queue_canceled_epoch); + $this->array[$key]['cc_cancel_reason'] = urldecode($xml->variables->cc_cancel_reason); + $this->array[$key]['cc_cause'] = urldecode($xml->variables->cc_cause); $this->array[$key]['waitsec'] = urldecode($xml->variables->waitsec); //app info From f845711cda769b28164bb2e322dcc9a98acdb387 Mon Sep 17 00:00:00 2001 From: chansizzle <14916599+chansizzle@users.noreply.github.com> Date: Thu, 2 Jul 2020 16:56:22 -0600 Subject: [PATCH 230/621] Update voicemail_greetings.php (#5328) allow wav OR mp3 upload --- app/voicemail_greetings/voicemail_greetings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/voicemail_greetings/voicemail_greetings.php b/app/voicemail_greetings/voicemail_greetings.php index 12e9bad461..50e2111454 100644 --- a/app/voicemail_greetings/voicemail_greetings.php +++ b/app/voicemail_greetings/voicemail_greetings.php @@ -159,7 +159,7 @@ $file_ext = substr($_FILES['file']['name'], -4); //check file extension - if ($file_ext == '.wav' || $file_ext != '.mp3') { + if ($file_ext == '.wav' || $file_ext == '.mp3') { //find the next available for ($i = 1; $i < 10; $i++) { @@ -667,4 +667,4 @@ fclose($fp); } -?> \ No newline at end of file +?> From 237551e78042363591ca2e4488766300483f9cc3 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Thu, 2 Jul 2020 19:55:10 -0400 Subject: [PATCH 231/621] Update call_block_edit.php (#5327) --- app/call_block/call_block_edit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/call_block/call_block_edit.php b/app/call_block/call_block_edit.php index 53b4160424..33e6581b43 100644 --- a/app/call_block/call_block_edit.php +++ b/app/call_block/call_block_edit.php @@ -253,7 +253,7 @@ } //get the extensions - if (permission_exists('call_block_all')) { + if (permission_exists('call_block_all') || permission_exists('call_block_extension')) { $sql = "select extension_uuid, extension, number_alias, user_context, description from v_extensions "; $sql .= "where domain_uuid = :domain_uuid "; $sql .= "and enabled = 'true' "; @@ -263,7 +263,7 @@ $extensions = $database->select($sql, $parameters); } -//get the extensions +//get the voicemails $sql = "select voicemail_uuid, voicemail_id, voicemail_description "; $sql .= "from v_voicemails "; $sql .= "where domain_uuid = :domain_uuid "; From e1f428db5919ca6e07e8d98c24cb70abaa79e5e2 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 2 Jul 2020 18:01:59 -0600 Subject: [PATCH 232/621] Add direction inbound for call center calls and update missed_calls. --- app/xml_cdr/v_xml_cdr_import.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/xml_cdr/v_xml_cdr_import.php b/app/xml_cdr/v_xml_cdr_import.php index 3151d89ffe..1ccdf7187c 100644 --- a/app/xml_cdr/v_xml_cdr_import.php +++ b/app/xml_cdr/v_xml_cdr_import.php @@ -171,6 +171,9 @@ $database->fields['hangup_cause'] = urldecode($xml->variables->hangup_cause); $database->fields['hangup_cause_q850'] = urldecode($xml->variables->hangup_cause_q850); + //store the call direction + $database->fields['direction'] = urldecode($xml->variables->call_direction); + //call center $database->fields['cc_side'] = urldecode($xml->variables->cc_side); $database->fields['cc_member_uuid'] = urldecode($xml->variables->cc_member_uuid); @@ -187,6 +190,9 @@ $database->fields['cc_cancel_reason'] = urldecode($xml->variables->cc_cancel_reason); $database->fields['cc_cause'] = urldecode($xml->variables->cc_cause); $database->fields['waitsec'] = urldecode($xml->variables->waitsec); + if (urldecode($xml->variables->cc_side) == 'agent') { + $database->fields['direction'] = 'inbound'; + } //app info $database->fields['last_app'] = urldecode($xml->variables->last_app); @@ -205,10 +211,8 @@ //set missed calls $database->fields['missed_call'] = 'false'; - if ($xml->variables->call_direction == 'local' || $xml->variables->call_direction == 'inbound') { - if ($xml->variables->billsec == 0) { - $database->fields['missed_call'] = 'true'; - } + if (strlen($xml->variables->answer_stamp) == 0) { + $database->fields['missed_call'] = 'true'; } if ($xml->variables->missed_call == 'true') { $database->fields['missed_call'] = 'true'; @@ -262,9 +266,6 @@ //store the call leg $database->fields['leg'] = $leg; - //store the call direction - $database->fields['direction'] = urldecode($xml->variables->call_direction); - //store post dial delay, in milliseconds $database->fields['pdd_ms'] = urldecode($xml->variables->progress_mediamsec) + urldecode($xml->variables->progressmsec); From fa7bb2a781b50fcb2baa637878f0fedfd530e338 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 2 Jul 2020 18:02:19 -0600 Subject: [PATCH 233/621] Add direction inbound for call center calls and update missed_calls. --- app/xml_cdr/resources/classes/xml_cdr.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index 596e36a00b..736e2e34ed 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -329,10 +329,8 @@ if (!class_exists('xml_cdr')) { //set missed calls $missed_call = 'false'; - if ($xml->variables->call_direction == 'local' || $xml->variables->call_direction == 'inbound') { - if ($xml->variables->billsec == 0) { - $missed_call = 'true'; - } + if (strlen($xml->variables->answer_stamp) == 0) { + $missed_call = 'true'; } if ($xml->variables->missed_call == 'true') { $missed_call = 'true'; @@ -378,6 +376,9 @@ if (!class_exists('xml_cdr')) { $this->array[$key]['hangup_cause'] = urldecode($xml->variables->hangup_cause); $this->array[$key]['hangup_cause_q850'] = urldecode($xml->variables->hangup_cause_q850); + //store the call direction + $this->array[$key]['direction'] = urldecode($xml->variables->call_direction); + //call center $this->array[$key]['cc_side'] = urldecode($xml->variables->cc_side); $this->array[$key]['cc_member_uuid'] = urldecode($xml->variables->cc_member_uuid); @@ -394,6 +395,9 @@ if (!class_exists('xml_cdr')) { $this->array[$key]['cc_cancel_reason'] = urldecode($xml->variables->cc_cancel_reason); $this->array[$key]['cc_cause'] = urldecode($xml->variables->cc_cause); $this->array[$key]['waitsec'] = urldecode($xml->variables->waitsec); + if (urldecode($xml->variables->cc_side) == 'agent') { + $this->array[$key]['direction'] = 'inbound'; + } //app info $this->array[$key]['last_app'] = urldecode($xml->variables->last_app); @@ -413,9 +417,6 @@ if (!class_exists('xml_cdr')) { //store the call leg $this->array[$key]['leg'] = $leg; - //store the call direction - $this->array[$key]['direction'] = urldecode($xml->variables->call_direction); - //store post dial delay, in milliseconds $this->array[$key]['pdd_ms'] = urldecode($xml->variables->progress_mediamsec) + urldecode($xml->variables->progressmsec); From ff1477e2ef72145076505808bd58eed64d4c8d4c Mon Sep 17 00:00:00 2001 From: Len Date: Thu, 2 Jul 2020 20:37:41 -0400 Subject: [PATCH 234/621] Update callcenter.conf.lua (#5326) updated unused variable/typo --- .../resources/scripts/configuration/callcenter.conf.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua index 269963c56b..4afdd3df4b 100644 --- a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua +++ b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua @@ -197,7 +197,7 @@ --add the call_timeout pos = string.find(agent_contact, "}"); first = string.sub(agent_contact, 0, pos); - last = string.sub(agent_contact, tmp_pos); + last = string.sub(agent_contact, pos); agent_contact = first..[[,sip_h_caller_destination=${caller_destination},call_timeout=]]..agent_call_timeout..last; else --the string has the call timeout From b6c92847a127017a9b6d963cd56d77791f83bbea Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 2 Jul 2020 20:16:39 -0600 Subject: [PATCH 235/621] extension edit correct domain_uuid so that it has a value. --- app/extensions/extension_edit.php | 62 +++++++++++++++++++------------ 1 file changed, 38 insertions(+), 24 deletions(-) diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php index ea3b87bd9b..d668a75fd6 100644 --- a/app/extensions/extension_edit.php +++ b/app/extensions/extension_edit.php @@ -181,16 +181,20 @@ $array['extension_users'][0]['extension_uuid'] = $extension_uuid; $array['extension_users'][0]['user_uuid'] = $user_uuid; + //add temporary permission $p = new permissions; $p->add('extension_user_delete', 'temp'); + //save the array $database = new database; $database->app_name = 'extensions'; $database->app_uuid = 'e68d9689-2769-e013-28fa-6214bf47fca3'; $database->delete($array); unset($array); + //remove temporary permission $p->delete('extension_user_delete', 'temp'); + //redirect header("Location: extension_edit.php?id=".$extension_uuid); exit; @@ -201,19 +205,24 @@ if ($_REQUEST["delete_type"] == "device_line" && is_uuid($_REQUEST["delete_uuid"]) && permission_exists("extension_delete")) { //set the variables $device_line_uuid = $_REQUEST["delete_uuid"]; + //delete device_line $array['device_lines'][0]['device_line_uuid'] = $device_line_uuid; + //add temporary permission $p = new permissions; $p->add('device_line_delete', 'temp'); + //save the array $database = new database; $database->app_name = 'extensions'; $database->app_uuid = 'e68d9689-2769-e013-28fa-6214bf47fca3'; $database->delete($array); unset($array); + //remove temporary permission $p->delete('device_line_delete', 'temp'); + //redirect header("Location: extension_edit.php?id=".$extension_uuid); exit; @@ -224,7 +233,12 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { //set the domain_uuid - $domain_uuid = permission_exists('extension_domain') ? $_POST["domain_uuid"] : $_SESSION['domain_uuid']; + if (permission_exists('extension_domain') && is_uuid($_POST["domain_uuid"])) { + $domain_uuid = $_POST["domain_uuid"]; + } + else { + $domain_uuid = $_SESSION['domain_uuid']; + } //validate the token $token = new token; @@ -1682,6 +1696,28 @@ echo "\n"; } + if (permission_exists('extension_domain')) { + echo "\n"; + echo "\n"; + echo " ".$text['label-domain']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-domain_name']."\n"; + echo "\n"; + echo "\n"; + } + if (permission_exists("extension_user_context")) { echo "\n"; echo "\n"; @@ -1863,28 +1899,6 @@ echo "\n"; } - if (permission_exists('extension_domain')) { - echo "\n"; - echo "\n"; - echo " ".$text['label-domain']."\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-domain_name']."\n"; - echo "\n"; - echo "\n"; - } - if (permission_exists('extension_dial_string')) { echo "\n"; echo "\n"; @@ -1962,8 +1976,8 @@ echo "\n"; echo ""; - echo "\n"; -?> \ No newline at end of file +?> From 18339563aab7f23d70b87e004b2b38ee1eb60f88 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sun, 5 Jul 2020 19:25:50 -0600 Subject: [PATCH 242/621] Update the SQL statement add cast domain_setting_enabled as text. --- core/domain_settings/domain_setting_edit.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/domain_settings/domain_setting_edit.php b/core/domain_settings/domain_setting_edit.php index 8ad05d7141..52fa697580 100644 --- a/core/domain_settings/domain_setting_edit.php +++ b/core/domain_settings/domain_setting_edit.php @@ -325,7 +325,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { //pre-populate the form if (count($_GET)>0 && $_POST["persistformvar"] != "true" && is_uuid($_GET["id"])) { $domain_setting_uuid = $_GET["id"]; - $sql = "select * from v_domain_settings "; + $sql = "select domain_setting_uuid, domain_setting_category, domain_setting_subcategory, domain_setting_name, domain_setting_value, cast(domain_setting_enabled as text), domain_setting_description "; + $sql .= "from v_domain_settings "; $sql .= "where domain_uuid = :domain_uuid "; $sql .= "and domain_setting_uuid = :domain_setting_uuid "; $parameters['domain_uuid'] = $domain_uuid; @@ -822,4 +823,4 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> From 9ff9346cc4755fb112452b45dab875d528d35673 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sun, 5 Jul 2020 19:28:49 -0600 Subject: [PATCH 243/621] Update default_setting_edit.php --- core/default_settings/default_setting_edit.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/default_settings/default_setting_edit.php b/core/default_settings/default_setting_edit.php index de3c8a1a93..39f156f577 100644 --- a/core/default_settings/default_setting_edit.php +++ b/core/default_settings/default_setting_edit.php @@ -206,7 +206,8 @@ //pre-populate the form if (count($_GET) > 0 && $_POST["persistformvar"] != "true") { $default_setting_uuid = $_GET["id"]; - $sql = "select * from v_default_settings "; + $sql = "select default_setting_uuid, default_setting_category, default_setting_subcategory, default_setting_name, default_setting_value, cast(default_setting_enabled as text), default_setting_description "; + $sql .= "from v_default_settings "; $sql .= "where default_setting_uuid = :default_setting_uuid "; $parameters['default_setting_uuid'] = $default_setting_uuid; $database = new database; @@ -766,4 +767,4 @@ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> From e385b3116f12076212511207d1cacbe3bbefb2ff Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sun, 5 Jul 2020 19:47:18 -0600 Subject: [PATCH 244/621] Add cast user_enabled as text --- core/users/users.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/users/users.php b/core/users/users.php index a44b0a2dc7..23eddf274c 100644 --- a/core/users/users.php +++ b/core/users/users.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008 - 2019 + Portions created by the Initial Developer are Copyright (C) 2008 - 2020 the Initial Developer. All Rights Reserved. Contributor(s): @@ -129,7 +129,8 @@ $offset = $rows_per_page * $page; //get the list - $sql = "select * from view_users "; + $sql = "select domain_name, user_uuid, username, groups, contact_organization,contact_name, cast(user_enabled as text) "; + $sql .= "from view_users "; if ($_GET['show'] == "all" && permission_exists('user_all')) { if (isset($sql_search)) { $sql .= "where ".$sql_search; @@ -303,4 +304,4 @@ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> From 1a6f537d53f40aff301495c7fb5f3aab367eacae Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sun, 5 Jul 2020 20:07:42 -0600 Subject: [PATCH 245/621] Add cast user_enabled as text --- core/users/user_edit.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/users/user_edit.php b/core/users/user_edit.php index 98f3df7344..c0190fd82d 100644 --- a/core/users/user_edit.php +++ b/core/users/user_edit.php @@ -569,7 +569,9 @@ else { //populate the form with values from db if ($action == 'edit') { - $sql = "select * from v_users where user_uuid = :user_uuid "; + $sql = "select domain_uuid, user_uuid, username, user_email, api_key, user_enabled, contact_uuid, cast(user_enabled as text), user_status "; + $sql .= "from v_users "; + $sql .= "where user_uuid = :user_uuid "; if (!permission_exists('user_all')) { $sql .= "and domain_uuid = :domain_uuid "; $parameters['domain_uuid'] = $domain_uuid; From 9780547fb55f3e248ec36fb58462de96bf130e36 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sun, 5 Jul 2020 20:49:32 -0600 Subject: [PATCH 246/621] Add sql column names and cast user_setting_enabled as text --- core/user_settings/user_setting_edit.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/user_settings/user_setting_edit.php b/core/user_settings/user_setting_edit.php index af36ed1861..ea62d57a6b 100644 --- a/core/user_settings/user_setting_edit.php +++ b/core/user_settings/user_setting_edit.php @@ -317,13 +317,15 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { } //pre-populate the form - if (is_uuid($_GET["id"]) && count($_GET)>0 && $_POST["persistformvar"] != "true") { + if (is_uuid($_GET["id"]) && count($_GET) > 0 && $_POST["persistformvar"] != "true") { $user_setting_uuid = $_GET["id"]; + $sql = "select user_setting_category, user_setting_subcategory, user_setting_name, user_setting_value, cast(user_setting_enabled as text), user_setting_description "; $sql = "select * from v_user_settings "; - $sql .= "where user_uuid = :user_uuid "; - $sql .= "and user_setting_uuid = :user_setting_uuid "; - $parameters['user_uuid'] = $user_uuid; + $sql .= "from v_user_settings "; + $sql .= "where user_setting_uuid = :user_setting_uuid "; + $sql .= "and user_uuid = :user_uuid "; $parameters['user_setting_uuid'] = $user_setting_uuid; + $parameters['user_uuid'] = $user_uuid; $database = new database; $row = $database->select($sql, $parameters, 'row'); if (is_array($row) && sizeof($row) != 0) { @@ -764,4 +766,4 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> From 36292f5881df4b41e4d4cc1aceb628aa8a2ae0f8 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sun, 5 Jul 2020 20:53:05 -0600 Subject: [PATCH 247/621] Forgot to remove this before committing it. --- core/user_settings/user_setting_edit.php | 1 - 1 file changed, 1 deletion(-) diff --git a/core/user_settings/user_setting_edit.php b/core/user_settings/user_setting_edit.php index ea62d57a6b..cb57ebda9f 100644 --- a/core/user_settings/user_setting_edit.php +++ b/core/user_settings/user_setting_edit.php @@ -320,7 +320,6 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { if (is_uuid($_GET["id"]) && count($_GET) > 0 && $_POST["persistformvar"] != "true") { $user_setting_uuid = $_GET["id"]; $sql = "select user_setting_category, user_setting_subcategory, user_setting_name, user_setting_value, cast(user_setting_enabled as text), user_setting_description "; - $sql = "select * from v_user_settings "; $sql .= "from v_user_settings "; $sql .= "where user_setting_uuid = :user_setting_uuid "; $sql .= "and user_uuid = :user_uuid "; From 21815a9ffd16e9b0371e0e3cb681726eb121ea97 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sun, 5 Jul 2020 21:04:37 -0600 Subject: [PATCH 248/621] Add the column names and cast user_setting_enabled as text. --- core/user_settings/user_settings.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/user_settings/user_settings.php b/core/user_settings/user_settings.php index 371f187078..ad7421d20d 100644 --- a/core/user_settings/user_settings.php +++ b/core/user_settings/user_settings.php @@ -128,8 +128,10 @@ list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page); $offset = $rows_per_page * $page; } + //get the list - $sql = "select * from v_user_settings "; + $sql = "select user_setting_uuid, user_uuid, user_setting_category, user_setting_subcategory, user_setting_name, user_setting_value, cast(user_setting_enabled as text), user_setting_description "; + $sql .= "from v_user_settings "; $sql .= $sql_where; if ($order_by == '') { $sql .= "order by user_setting_category, user_setting_subcategory, user_setting_order asc "; @@ -350,4 +352,4 @@ echo "\n"; -?> \ No newline at end of file +?> From f0383e491ac2d6255010aeee9f45a71960afca10 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 6 Jul 2020 10:33:52 -0600 Subject: [PATCH 249/621] Use multiple lines for column names. --- core/domain_settings/domain_settings.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/domain_settings/domain_settings.php b/core/domain_settings/domain_settings.php index 8d5b16d36a..7b760b4f25 100644 --- a/core/domain_settings/domain_settings.php +++ b/core/domain_settings/domain_settings.php @@ -90,7 +90,8 @@ $num_rows = $database->select($sql, $parameters, 'column'); //get the list - $sql = "select domain_setting_uuid, domain_setting_category, domain_setting_subcategory, domain_setting_name, domain_setting_value, cast(domain_setting_enabled as text), domain_setting_description "; + $sql = "select domain_setting_uuid, domain_setting_category, domain_setting_subcategory, domain_setting_name, "; + $sql .= "domain_setting_value, cast(domain_setting_enabled as text), domain_setting_description "; $sql .= "from v_domain_settings "; $sql .= "where domain_uuid = :domain_uuid "; if ($order_by == '') { From 8f5f94507a9af5248b61a3e62a4ee6fcd0b5032a Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 6 Jul 2020 10:39:33 -0600 Subject: [PATCH 250/621] Use multiple lines for column names. --- core/default_settings/default_settings.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/default_settings/default_settings.php b/core/default_settings/default_settings.php index d1e8cc4b3f..7b88cc0761 100644 --- a/core/default_settings/default_settings.php +++ b/core/default_settings/default_settings.php @@ -104,7 +104,8 @@ $num_rows = $database->select($sql, $parameters, 'column'); //get the list - $sql = "select default_setting_uuid, default_setting_category, default_setting_subcategory, default_setting_name, default_setting_value, cast(default_setting_enabled as text), default_setting_description "; + $sql = "select default_setting_uuid, default_setting_category, default_setting_subcategory, default_setting_name, "; + $sql .= "default_setting_value, cast(default_setting_enabled as text), default_setting_description "; $sql .= "from v_default_settings "; if (isset($search) && strlen($search) > 0) { $sql .= "where ("; From b3a854eec6a9ac5e88fd76e8af3f4efe526de587 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 6 Jul 2020 11:29:11 -0600 Subject: [PATCH 251/621] Add domain_uuid column name and use multiple lines for column names. --- core/users/users.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/users/users.php b/core/users/users.php index 23eddf274c..5e6d4c1db7 100644 --- a/core/users/users.php +++ b/core/users/users.php @@ -129,7 +129,8 @@ $offset = $rows_per_page * $page; //get the list - $sql = "select domain_name, user_uuid, username, groups, contact_organization,contact_name, cast(user_enabled as text) "; + $sql = "select domain_name, domain_uuid, user_uuid, username, groups, "; + $sql .= "contact_organization,contact_name, cast(user_enabled as text) "; $sql .= "from view_users "; if ($_GET['show'] == "all" && permission_exists('user_all')) { if (isset($sql_search)) { From 2df30633be2b11b07f67cc2075426f45c904ce0b Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 6 Jul 2020 14:48:55 -0600 Subject: [PATCH 252/621] Add the grandstream_dial_plan again however use single quotes to prevent \r and \f from being interpreted. --- app/grandstream/app_config.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/grandstream/app_config.php b/app/grandstream/app_config.php index f4ef676754..cb735d8a6f 100644 --- a/app/grandstream/app_config.php +++ b/app/grandstream/app_config.php @@ -278,6 +278,14 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Wallpaper Image JPEG 480x272 16-bit depth dithered"; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f7f352d2-a3f0-4ea3-b013-8856404b66a4"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_dial_plan"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = '{\+x+|x+|*x+|*++|\p\a\r\k\+*x+|\f\l\o\w\+*x+}'; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Define the digits that are allowed to be called."; + $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a004dee4-4621-4c6d-8c20-7f315f812d85"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_bluetooth_power"; From 71854ba40ec87a112c8082077576a8e2e7d9e5f5 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Mon, 6 Jul 2020 20:21:56 -0400 Subject: [PATCH 253/621] Phrases: Remove unused code (#5335) * Remove unncessery code * remove unnecessary code * Update phrases.php --- app/phrases/phrase_edit.php | 4 - app/phrases/resources/classes/phrases.php | 14 +-- .../resources/functions/save_phrases_xml.php | 92 ------------------- 3 files changed, 1 insertion(+), 109 deletions(-) delete mode 100644 app/phrases/resources/functions/save_phrases_xml.php diff --git a/app/phrases/phrase_edit.php b/app/phrases/phrase_edit.php index 102c10d00a..6550540cda 100644 --- a/app/phrases/phrase_edit.php +++ b/app/phrases/phrase_edit.php @@ -28,7 +28,6 @@ require_once "root.php"; require_once "resources/require.php"; require_once "resources/check_auth.php"; - require_once "resources/functions/save_phrases_xml.php"; //check permissions if (permission_exists('phrase_add') || permission_exists('phrase_edit')) { @@ -237,9 +236,6 @@ $obj->delete_details($phrase_details_delete); } - //save the xml to the file system if the phrase directory is set - save_phrases_xml(); - //clear the cache $cache = new cache; $cache->delete("languages:".$phrase_language.".".$phrase_uuid); diff --git a/app/phrases/resources/classes/phrases.php b/app/phrases/resources/classes/phrases.php index 09d85d1b06..2fcbc013bd 100644 --- a/app/phrases/resources/classes/phrases.php +++ b/app/phrases/resources/classes/phrases.php @@ -145,9 +145,6 @@ if (!class_exists('phrases')) { //revoke temporary permissions $p->delete('phrase_detail_delete', 'temp'); - //save the xml - save_phrases_xml(); - //clear the cache $phrase_languages = array_unique($phrase_languages); $cache = new cache; @@ -225,9 +222,6 @@ if (!class_exists('phrases')) { //revoke temporary permissions $p->delete('phrase_detail_delete', 'temp'); - //save the xml - save_phrases_xml(); - //clear the cache if ($phrase_language != '') { $cache = new cache; @@ -301,9 +295,6 @@ if (!class_exists('phrases')) { $database->save($array); unset($array); - //save the xml - save_phrases_xml(); - //clear the cache $phrase_languages = array_unique($phrase_languages); $cache = new cache; @@ -416,9 +407,6 @@ if (!class_exists('phrases')) { //revoke temporary permissions $p->delete('phrase_detail_add', 'temp'); - //save the xml - save_phrases_xml(); - //clear the cache $phrase_languages = array_unique($phrase_languages); $cache = new cache; @@ -439,4 +427,4 @@ if (!class_exists('phrases')) { } //class } -?> \ No newline at end of file +?> diff --git a/app/phrases/resources/functions/save_phrases_xml.php b/app/phrases/resources/functions/save_phrases_xml.php deleted file mode 100644 index b6cfd85fc4..0000000000 --- a/app/phrases/resources/functions/save_phrases_xml.php +++ /dev/null @@ -1,92 +0,0 @@ -select($sql, $parameters, 'all'); - unset($sql, $parameters); - - $prev_language = ''; - if (is_array($result) && @sizeof($result) != 0) { - foreach ($result as $row) { - - if ($row['phrase_language'] != $prev_language) { - if ($prev_language != '') { - //output xml & close previous file - $xml .= "\n"; - fwrite($fout, $xml); - unset($xml); - fclose($fout); - } - - //create/open new xml file for writing - if (!file_exists($_SESSION['switch']['phrases']['dir']."/".$row['phrase_language']."/phrases/")) { - mkdir($_SESSION['switch']['phrases']['dir']."/".$row['phrase_language']."/phrases/", 0755); - } - $xml_path = $_SESSION['switch']['phrases']['dir']."/".$row['phrase_language']."/phrases/".$domain_uuid.".xml"; - $fout = fopen($xml_path, "w"); - $xml = "\n"; - } - - //build xml - $xml .= " \n"; - $xml .= " \n"; - $xml .= " \n"; - - $sql = "select * from v_phrase_details "; - $sql .= "where domain_uuid = :domain_uuid "; - $sql .= "and phrase_uuid = :phrase_uuid "; - $sql .= "order by phrase_detail_order"; - $parameters['domain_uuid'] = $domain_uuid; - $parameters['phrase_uuid'] = $row['phrase_uuid']; - $database = new database; - $result_2 = $database->select($sql, $parameters, 'all'); - foreach ($result_2 as &$row_2) { - $xml .= " \n"; - } - unset($sql, $parameters, $result_2, $row_2); - $xml .= " \n"; - $xml .= " \n"; - $xml .= " \n"; - - $prev_language = $row['phrase_language']; - - } - - if ($fout && $xml) { - //output xml & close previous file - $xml .= "\n"; - - fwrite($fout, $xml); - unset($xml); - fclose($fout); - } - - } - unset($result, $row); - - //apply settings - $_SESSION["reload_xml"] = true; - -} - -?> \ No newline at end of file From 91f2f67fc43b04185231dd80289c994f6b77eb32 Mon Sep 17 00:00:00 2001 From: phoneben <67923255+phoneben@users.noreply.github.com> Date: Tue, 7 Jul 2020 17:17:22 +0300 Subject: [PATCH 254/621] Update app_config.php (#5334) * Update app_config.php * change type to text for pin in conferences in conference centers you can not save a pin as 0123 it will save as 123 due in data base it was saved to numeric vrs text * Update conference_edit.php * Update app_languages.php updated hebrew name for title * Update app_languages.php hebrew language for title conference_center * Update app_languages.php active_conferences he-il --- app/conference_centers/app_languages.php | 2 +- app/conference_centers/conference_room_edit.php | 4 ++-- app/conferences/app_languages.php | 2 +- app/conferences/conference_edit.php | 2 +- app/conferences_active/app_languages.php | 12 ++++++------ app/meetings/app_config.php | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/conference_centers/app_languages.php b/app/conference_centers/app_languages.php index cc2f27b218..7f10328487 100644 --- a/app/conference_centers/app_languages.php +++ b/app/conference_centers/app_languages.php @@ -11,7 +11,7 @@ $text['title-conference_centers']['es-cl'] = "Centro de Conferencias"; $text['title-conference_centers']['es-mx'] = "Centro de Conferencias"; //copied from es-cl $text['title-conference_centers']['fr-ca'] = "Centre de conférence"; //copied from fr-fr $text['title-conference_centers']['fr-fr'] = "Centre de conférence"; -$text['title-conference_centers']['he-il'] = ""; +$text['title-conference_centers']['he-il'] = "מרכזי ועידה"; $text['title-conference_centers']['it-it'] = "Centri Conferenza"; $text['title-conference_centers']['nl-nl'] = "Cenferentie centra"; $text['title-conference_centers']['pl-pl'] = "Centra Konferencyjne"; diff --git a/app/conference_centers/conference_room_edit.php b/app/conference_centers/conference_room_edit.php index 1a713b4e2e..b1e480de94 100644 --- a/app/conference_centers/conference_room_edit.php +++ b/app/conference_centers/conference_room_edit.php @@ -640,7 +640,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " "; echo " ".$text['label-moderator-pin'].""; echo " "; - echo " \n"; + echo " \n"; echo "
\n"; echo " ".$text['description-moderator_pin']."\n"; echo " "; @@ -649,7 +649,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " "; echo " ".$text['label-participant-pin'].""; echo " "; - echo " \n"; + echo " \n"; echo "
\n"; echo " ".$text['description-participant-pin']."\n"; echo " "; diff --git a/app/conferences/app_languages.php b/app/conferences/app_languages.php index e937117a2d..3d1275b2ff 100644 --- a/app/conferences/app_languages.php +++ b/app/conferences/app_languages.php @@ -11,7 +11,7 @@ $text['title-conferences']['es-cl'] = "Conferencias"; $text['title-conferences']['es-mx'] = "Conferencias"; //copied from es-cl $text['title-conferences']['fr-ca'] = "Conférences"; //copied from fr-fr $text['title-conferences']['fr-fr'] = "Conférences"; -$text['title-conferences']['he-il'] = ""; +$text['title-conferences']['he-il'] = "חדר ועידה"; $text['title-conferences']['it-it'] = "Conferenze"; $text['title-conferences']['nl-nl'] = "Conferenties"; $text['title-conferences']['pl-pl'] = ""; diff --git a/app/conferences/conference_edit.php b/app/conferences/conference_edit.php index 1b6f0dea4e..e01f704122 100644 --- a/app/conferences/conference_edit.php +++ b/app/conferences/conference_edit.php @@ -370,7 +370,7 @@ echo " ".$text['label-pin']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo "".$text['description-pin']."\n"; echo "\n"; diff --git a/app/conferences_active/app_languages.php b/app/conferences_active/app_languages.php index 546cfa86fc..abe8fb0f02 100644 --- a/app/conferences_active/app_languages.php +++ b/app/conferences_active/app_languages.php @@ -11,7 +11,7 @@ $text['title-active_conferences']['es-cl'] = "Conferencias Activas"; $text['title-active_conferences']['es-mx'] = "Conferencias Activas"; //copied from es-cl $text['title-active_conferences']['fr-ca'] = "Conférences Avtives"; //copied from fr-fr $text['title-active_conferences']['fr-fr'] = "Conférences Avtives"; -$text['title-active_conferences']['he-il'] = ""; +$text['title-active_conferences']['he-il'] = "ניהול חדרי ועידה"; $text['title-active_conferences']['it-it'] = "Conferenze Attive"; $text['title-active_conferences']['nl-nl'] = "Aktieve conferenties"; $text['title-active_conferences']['pl-pl'] = "Aktywne konferencje"; @@ -528,18 +528,18 @@ $text['label-mute']['uk-ua'] = ""; $text['label-hand_raised']['en-us'] = "Hand Raised"; $text['label-hand_raised']['ar-eg'] = ""; -$text['label-hand_raised']['de-at'] = ""; -$text['label-hand_raised']['de-ch'] = ""; +$text['label-hand_raised']['de-at'] = ""; +$text['label-hand_raised']['de-ch'] = ""; $text['label-hand_raised']['de-de'] = ""; $text['label-hand_raised']['es-cl'] = ""; -$text['label-hand_raised']['es-mx'] = ""; -$text['label-hand_raised']['fr-ca'] = ""; +$text['label-hand_raised']['es-mx'] = ""; +$text['label-hand_raised']['fr-ca'] = ""; $text['label-hand_raised']['fr-fr'] = ""; $text['label-hand_raised']['he-il'] = ""; $text['label-hand_raised']['it-it'] = ""; $text['label-hand_raised']['nl-nl'] = ""; $text['label-hand_raised']['pl-pl'] = ""; -$text['label-hand_raised']['pt-br'] = ""; +$text['label-hand_raised']['pt-br'] = ""; $text['label-hand_raised']['pt-pt'] = ""; $text['label-hand_raised']['ro-ro'] = ""; $text['label-hand_raised']['ru-ru'] = ""; diff --git a/app/meetings/app_config.php b/app/meetings/app_config.php index 9c3a0bfa39..7b1d7b56d3 100644 --- a/app/meetings/app_config.php +++ b/app/meetings/app_config.php @@ -83,11 +83,11 @@ $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary"; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "moderator_pin"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the moderator PIN number."; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "participant_pin"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the participant PIN number."; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "enabled"; From 65fdd51f076cb560c55814375e5a8d3fe21c93af Mon Sep 17 00:00:00 2001 From: chansizzle <14916599+chansizzle@users.noreply.github.com> Date: Tue, 7 Jul 2020 10:35:01 -0600 Subject: [PATCH 255/621] Update dialplan_outbound_add.php (#5336) gateway's order --- app/dialplan_outbound/dialplan_outbound_add.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/dialplan_outbound/dialplan_outbound_add.php b/app/dialplan_outbound/dialplan_outbound_add.php index 41d0a5f97d..cf0fe4867c 100644 --- a/app/dialplan_outbound/dialplan_outbound_add.php +++ b/app/dialplan_outbound/dialplan_outbound_add.php @@ -723,7 +723,7 @@ $sql = "select * from v_gateways "; $sql .= "where enabled = 'true' "; if (permission_exists('outbound_route_any_gateway')) { - $sql .= "order by domain_uuid "; + $sql .= "order by domain_uuid, gateway "; } else { $sql .= "and domain_uuid = :domain_uuid "; From e9584fe09cf5fd5ff8995f01ba5e263fd4fd850a Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 7 Jul 2020 11:04:17 -0600 Subject: [PATCH 256/621] Add permission_exists outbound_caller_id_name to hide column if user is does not have the permission. --- app/extensions/extensions.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/extensions/extensions.php b/app/extensions/extensions.php index 3e6fd83441..aea7b296d5 100644 --- a/app/extensions/extensions.php +++ b/app/extensions/extensions.php @@ -255,7 +255,9 @@ } echo th_order_by('extension', $text['label-extension'], $order_by, $order); echo th_order_by('effective_caller_id_name', $text['label-effective_cid_name'], $order_by, $order, null, "class='hide-xs'"); - echo th_order_by('outbound_caller_id_name', $text['label-outbound_cid_name'], $order_by, $order, null, "class='hide-sm-dn'"); + if (permission_exists("outbound_caller_id_name")) { + echo th_order_by('outbound_caller_id_name', $text['label-outbound_cid_name'], $order_by, $order, null, "class='hide-sm-dn'"); + } echo th_order_by('call_group', $text['label-call_group'], $order_by, $order); if (permission_exists("extension_user_context")) { echo th_order_by('user_context', $text['label-user_context'], $order_by, $order); @@ -296,7 +298,9 @@ echo " \n"; echo " ".escape($row['effective_caller_id_name'])." \n"; - echo " ".escape($row['outbound_caller_id_name'])." \n"; + if (permission_exists("outbound_caller_id_name")) { + echo " ".escape($row['outbound_caller_id_name'])." \n"; + } echo " ".escape($row['call_group'])." \n"; if (permission_exists("extension_user_context")) { echo " ".escape($row['user_context'])."\n"; @@ -358,4 +362,4 @@ //show the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> From 0d2e62bc9bf63acd82dd725fbe87ff27f990a6cb Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 7 Jul 2020 22:13:28 -0600 Subject: [PATCH 257/621] Add answered to the extension summary --- app/xml_cdr/xml_cdr_extension_summary.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/xml_cdr/xml_cdr_extension_summary.php b/app/xml_cdr/xml_cdr_extension_summary.php index bae0537485..97dcd6cfaf 100644 --- a/app/xml_cdr/xml_cdr_extension_summary.php +++ b/app/xml_cdr/xml_cdr_extension_summary.php @@ -193,6 +193,7 @@ } echo " ".$text['label-extension']."\n"; echo " ".$text['label-number_alias']."\n"; + echo " ".$text['label-answered']."\n"; echo " ".$text['label-missed']."\n"; echo " ".$text['label-no_answer']."\n"; echo " ".$text['label-busy']."\n"; @@ -212,6 +213,7 @@ } echo " ".escape($row['extension'])."\n"; echo " ".escape($row['number_alias'])." \n"; + echo " ".escape($row['answered'])." \n"; echo " ".escape($row['missed'])." \n"; echo " ".escape($row['no_answer'])." \n"; echo " ".escape($row['busy'])." \n"; @@ -231,4 +233,4 @@ //show the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> From 37061b7d6c1ba1d13b210065ddba59126939efad Mon Sep 17 00:00:00 2001 From: chansizzle <14916599+chansizzle@users.noreply.github.com> Date: Wed, 8 Jul 2020 14:22:42 -0600 Subject: [PATCH 258/621] Update phrases.php (#5338) --- app/phrases/phrases.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/phrases/phrases.php b/app/phrases/phrases.php index e7262da5a8..2e281f9126 100644 --- a/app/phrases/phrases.php +++ b/app/phrases/phrases.php @@ -29,7 +29,6 @@ require_once "resources/require.php"; require_once "resources/check_auth.php"; require_once "resources/paging.php"; - require_once "resources/functions/save_phrases_xml.php"; //check the permission if (!permission_exists('phrase_view')) { @@ -240,4 +239,4 @@ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> From 5b5696456fa346ed991a32af487f7566ad922166 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 9 Jul 2020 02:57:28 -0600 Subject: [PATCH 259/621] Update the database class toggle, copy an delete methods. --- resources/classes/database.php | 602 +++++++++++++++++++++++++++++++-- 1 file changed, 568 insertions(+), 34 deletions(-) diff --git a/resources/classes/database.php b/resources/classes/database.php index 1ab0f06acc..a6da9e0cff 100644 --- a/resources/classes/database.php +++ b/resources/classes/database.php @@ -66,7 +66,7 @@ include "root.php"; $this->domain_uuid = $_SESSION['domain_uuid']; } } - + /** * Called when there are no references to a particular object * unset the variables used in the class @@ -76,7 +76,7 @@ include "root.php"; unset($this->$key); } } - + /** * Connect to the database */ @@ -683,7 +683,10 @@ include "root.php"; unset($sql); } - public function delete($delete_array) { + public function delete($array) { + + //return the array + if (!is_array($array)) { echo "not an array"; return false; } //connect to the database if needed if (!$this->db) { @@ -710,38 +713,171 @@ include "root.php"; //echo "\n"; //exit; - //get the current data - if (is_array($delete_array)) { - foreach($delete_array as $table_name => $rows) { - foreach($rows as $row) { - $i = 0; - $sql = "select * from ".$table_prefix.$table_name." "; - foreach($row as $field_name => $field_value) { - if ($i == 0) { $sql .= "where "; } else { $sql .= "and "; } - $sql .= $field_name." = :".$field_name." "; - $parameters[$field_name] = $field_value; - $i++; + //set the message id + $m = 0; + + //loop through the array + $checked = false; + if (is_array($array)) { + + $x = 0; + foreach ($array as $parent_name => $tables) { + if (is_array($tables)) { + foreach ($tables as $id => $row) { + + //prepare the variables + $parent_name = preg_replace('#[^a-zA-Z0-9_\-]#', '', $parent_name); + $parent_key_name = $this->singular($parent_name)."_uuid"; + + //build the delete array + if ($row['checked'] == 'true') { + //set checked to true + $checked = true; + + //delete the child data + if (isset($row[$parent_key_name])) { + $new_array[$parent_name][$x][$parent_key_name] = $row[$parent_key_name]; + } + + //remove the row from the main array + unset($array[$parent_name][$x]); + } + + //loop through the fields + foreach($row as $field_name => $field_value) { + + //find the child tables + $y = 0; + if (is_array($field_value)) { + //prepare the variables + $child_name = preg_replace('#[^a-zA-Z0-9_\-]#', '', $field_name); + $child_key_name = $this->singular($child_name)."_uuid"; + + //loop through the child rows + foreach ($field_value as $sub_row) { + + //build the delete array + if ($row['checked'] == 'true') { + //set checked to true + $checked = true; + + //delete the child data + $new_array[$child_name][][$child_key_name] = $sub_row[$child_key_name]; + + //remove the row from the main array + unset($array[$parent_name][$x][$child_name][$y]); + } + + //increment the value + $y++; + } + } + } + + //increment the value + $x++; + } - if (strlen($field_value) > 0) { - $results = $this->execute($sql, $parameters, 'all'); - if (is_array($results)) { - $array[$table_name] = $results; - } - } - unset($parameters); } } } - //save the array - $old_array = &$array; + //if not checked then copy the array to delete array + if (!$checked) { + $new_array = $array; + } + + //get the current data + if (is_array($new_array) && count($new_array) > 0) { + //build an array of tables, fields, and values + foreach($new_array as $table_name => $rows) { + foreach($rows as $row) { + foreach($row as $field_name => $field_value) { + $keys[$table_name][$field_name][] = $field_value; + } + } + } + + //use the array to get a copy of the parent data before deleting it + foreach($new_array as $table_name => $rows) { + foreach($rows as $row) { + $table_name = preg_replace('#[^a-zA-Z0-9_\-]#', '', $table_name); + $sql = "select * from ".$table_prefix.$table_name." "; + $i = 0; + foreach($row as $field_name => $field_value) { + if ($i == 0) { $sql .= "where "; } else { $sql .= "and "; } + $sql .= $field_name." in ( "; + $i = 0; + foreach($keys[$table_name][$field_name] as $field_value) { + $field_name = preg_replace('#[^a-zA-Z0-9_\-]#', '', $field_name); + if ($i > 0) { $sql .= " ,"; } + $sql .= " :".$field_name."_".$i." "; + $i++; + } + $sql .= ") "; + $i = 0; + foreach($keys[$table_name][$field_name] as $field_value) { + $parameters[$field_name.'_'.$i] = $field_value; + $i++; + } + } + } + if (strlen($field_value) > 0) { + $results = $this->execute($sql, $parameters, 'all'); + unset($parameters); + if (is_array($results)) { + $old_array[$table_name] = $results; + } + } + } + + //add child data to the old array + foreach($old_array as $parent_name => $rows) { + //get relations array + $relations = $this->get_relations($parent_name); + + //loop through the rows + $x = 0; + foreach($rows as $row) { + if (is_array($relations)) { + foreach ($relations as $relation) { + //set the child table + $child_table = $relation['table']; + + //remove the v_ prefix + if (substr($child_table, 0, 2) == "v_") { + $child_table = substr($child_table, 2); + } + + //get the child data + $sql = "select * from ".$table_prefix.$child_table." "; + $sql .= "where ".$relation['field']." = :".$relation['field']; + $parameters[$relation['field']] = $row[$relation['field']]; + $results = $this->execute($sql, $parameters, 'all'); + unset($parameters); + if (is_array($results)) { + $old_array[$parent_name][$x][$child_table] = $results; + } + + //delete the child data + $sql = "delete from ".$table_prefix.$child_table." "; + $sql .= "where ".$relation['field']." = :".$relation['field']; + $parameters[$relation['field']] = $row[$relation['field']]; + $this->execute($sql, $parameters); + unset($parameters); + } + } + $x++; + } + } + } //start the atomic transaction $this->db->beginTransaction(); //delete the current data - if (is_array($delete_array)) { - foreach($delete_array as $table_name => $rows) { + if (is_array($new_array)) { + foreach($new_array as $table_name => $rows) { //echo "table: ".$table_name."\n"; foreach($rows as $row) { if (permission_exists($this->singular($table_name).'_delete')) { @@ -1143,6 +1279,338 @@ include "root.php"; return $this; } + public function copy($array) { + + //return the array + if (!is_array($array)) { echo "not an array"; return false; } + + //set the table prefix + $table_prefix = 'v_'; + + //set the message id + $m = 0; + + //loop through the array + if (is_array($array)) { + $x = 0; + foreach ($array as $parent_name => $tables) { + if (is_array($tables)) { + foreach ($tables as $id => $row) { + + //prepare the variables + $parent_name = preg_replace('#[^a-zA-Z0-9_\-]#', '', $parent_name); + $parent_key_name = $this->singular($parent_name)."_uuid"; + + //build the copy array + if ($row['checked'] == 'true') { + //set checked to true + $checked = true; + + //copy the child data + $copy_array[$parent_name][$x][$parent_key_name] = $row[$parent_key_name]; + + //remove the row from the main array + unset($array[$parent_name][$x]); + } + + //loop through the fields + foreach($row as $field_name => $field_value) { + + //find the child tables + $y = 0; + if (is_array($field_value)) { + //prepare the variables + $child_name = preg_replace('#[^a-zA-Z0-9_\-]#', '', $field_name); + $child_key_name = $this->singular($child_name)."_uuid"; + + //loop through the child rows + foreach ($field_value as $sub_row) { + + //build the delete array + if ($sub_row['checked'] == 'true') { + //delete the child data + $copy_array[$child_name][$y][$child_key_name] = $sub_row[$child_key_name]; + + //remove the row from the main array + unset($array[$parent_name][$x][$child_name][$y]); + } + + //increment the value + $y++; + } + } + } + + //increment the value + $x++; + + } + } + } + } + + //get the current data + if (is_array($copy_array) && count($copy_array) > 0) { + //build an array of tables, fields, and values + foreach($copy_array as $table_name => $rows) { + foreach($rows as $row) { + foreach($row as $field_name => $field_value) { + $keys[$table_name][$field_name][] = $field_value; + } + } + } + + //unset the array + unset($array); + + //use the array to get a copy of the paent data before deleting it + foreach($copy_array as $table_name => $rows) { + foreach($rows as $row) { + $table_name = preg_replace('#[^a-zA-Z0-9_\-]#', '', $table_name); + $sql = "select * from ".$table_prefix.$table_name." "; + $i = 0; + foreach($row as $field_name => $field_value) { + if ($i == 0) { $sql .= "where "; } else { $sql .= "and "; } + $sql .= $field_name." in ( "; + $i = 0; + foreach($keys[$table_name][$field_name] as $field_value) { + $field_name = preg_replace('#[^a-zA-Z0-9_\-]#', '', $field_name); + if ($i > 0) { $sql .= " ,"; } + $sql .= " :".$field_name."_".$i." "; + $i++; + } + $sql .= ") "; + $i = 0; + foreach($keys[$table_name][$field_name] as $field_value) { + $parameters[$field_name.'_'.$i] = $field_value; + $i++; + } + } + } + + $results = $this->execute($sql, $parameters, 'all'); + unset($parameters); + if (is_array($results)) { + $array[$table_name] = $results; + } + } + + //add child data to the old array + foreach($copy_array as $parent_name => $rows) { + //get relations array + $relations = $this->get_relations($parent_name); + + //loop through the rows + $x = 0; + foreach($rows as $row) { + if (is_array($relations)) { + foreach ($relations as $relation) { + //set the child table + $child_table = $relation['table']; + + //remove the v_ prefix + if (substr($child_table, 0, 2) == "v_") { + $child_table = substr($child_table, 2); + } + + //get the child data + $sql = "select * from ".$table_prefix.$child_table." "; + $sql .= "where ".$relation['field']." = :".$relation['field']; + $parameters[$relation['field']] = $row[$relation['field']]; + $results = $this->execute($sql, $parameters, 'all'); + unset($parameters); + if (is_array($results)) { + $array[$parent_name][$x][$child_table] = $results; + } + } + } + $x++; + } + } + } + + //update the parent and child keys + $checked = false; + if (is_array($array)) { + $x = 0; + foreach ($array as $parent_name => $tables) { + if (is_array($tables)) { + foreach ($tables as $id => $row) { + + //prepare the variables + $parent_name = preg_replace('#[^a-zA-Z0-9_\-]#', '', $parent_name); + $parent_key_name = $this->singular($parent_name)."_uuid"; + $parent_key_value = uuid(); + + //update the parent key id + $array[$parent_name][$x][$parent_key_name] = $parent_key_value; + + //add copy to the description + if (isset($array[$parent_name][$x][$this->singular($parent_name).'_description'])) { + $array[$parent_name][$x][$this->singular($parent_name).'_description'] = '(Copy) '.$array[$parent_name][$x][$this->singular($parent_name).'_description']; + } + + //loop through the fields + foreach($row as $field_name => $field_value) { + + //find the child tables + $y = 0; + if (is_array($field_value)) { + //prepare the variables + $child_name = preg_replace('#[^a-zA-Z0-9_\-]#', '', $field_name); + $child_key_name = $this->singular($child_name)."_uuid"; + + //loop through the child rows + foreach ($field_value as $sub_row) { + //update the parent key id + $array[$parent_name][$x][$child_name][$y][$parent_key_name] = $parent_key_value; + + //udpate the child key id + $array[$parent_name][$x][$child_name][$y][$child_key_name] = uuid(); + + //increment the value + $y++; + } + } + } + + //increment the value + $x++; + + } + } + } + } + + //save the copy of the data + if (is_array($array) && count($array) > 0) { + $this->save($array); + unset($array); + } + + } //end function copy + + + public function toggle($array) { + + //return the array + if (!is_array($array)) { echo "not an array"; return false; } + + //set the message id + $m = 0; + + //loop through the array + if (is_array($array)) { + $x = 0; + foreach ($array as $parent_name => $tables) { + if (is_array($tables)) { + foreach ($tables as $id => $row) { + + //prepare the variables + $parent_name = preg_replace('#[^a-zA-Z0-9_\-]#', '', $parent_name); + $parent_key_name = $this->singular($parent_name)."_uuid"; + + //build the toggle array + if ($row['checked'] == 'true') { + //toggle the field value + //$toggle_array[$parent_name][$x][$parent_key_name] = $row[$parent_key_name]; + $toggle_array[$parent_name][$x] = $row; + + //remove the row from the main array + unset($array[$parent_name][$x]); + } + + //loop through the fields + foreach($row as $field_name => $field_value) { + + //find the child tables + $y = 0; + if (is_array($field_value)) { + //prepare the variables + $child_name = preg_replace('#[^a-zA-Z0-9_\-]#', '', $field_name); + $child_key_name = $this->singular($child_name)."_uuid"; + + //loop through the child rows + foreach ($field_value as $sub_row) { + + //build the delete array + if ($action == 'delete' && $sub_row['checked'] == 'true') { + //delete the child data + $delete_array[$child_name][$y][$child_key_name] = $sub_row[$child_key_name]; + + //remove the row from the main array + unset($array[$parent_name][$x][$child_name][$y]); + } + + //increment the value + $y++; + } + } + } + + //increment the value + $x++; + + } + } + } + } + + //unset the original array + unset($array); + + //get the $apps array from the installed apps from the core and mod directories + if (!is_array($_SESSION['apps'])) { + $this->get_apps(); + } + + //search through all fields to see if toggle field exists + if (is_array($_SESSION['apps'])) { + foreach ($_SESSION['apps'] as $x => $app) { + if (is_array($app['db'])) { + foreach ($app['db'] as $y => $row) { + if (is_array($row['table']['name'])) { + $table_name = $row['table']['name']['text']; + } + else { + $table_name = $row['table']['name']; + } + if ($table_name === 'v_'.$parent_name) { + if (is_array($row['fields'])) { + foreach ($row['fields'] as $field) { + if (isset($field['toggle'])) { + $toggle_field = $field['name']; + $toggle_values = $field['toggle']; + } + } + } + } + } + } + } + } + + //get the current values from the database + foreach ($toggle_array as $table_name => $table) { + $x = 0; + foreach($table as $row) { + $child_name = preg_replace('#[^a-zA-Z0-9_\-]#', '', $table_name); + $child_key_name = $this->singular($child_name)."_uuid"; + + $array[$table_name][$x][$child_key_name] = $row[$child_key_name]; + $array[$table_name][$x][$toggle_field] = ($row[$toggle_field] === $toggle_values[0]) ? $toggle_values[1] : $toggle_values[0]; + $x++; + } + } + unset($toggle_array); + + //save the array + $this->save($array); + //view_array($this->message); + + } //end function toggle + + public function save($array) { //return the array @@ -1156,18 +1624,18 @@ include "root.php"; $this->app_name = $this->name; } - //normalize the array structure - //$new_array = $this->normalize_array($array, $this->name); - //unset($array); - $new_array = $array; + //debug sql + $this->debug["sql"] = true; //connect to the database if needed if (!$this->db) { $this->connect(); } - //debug sql - $this->debug["sql"] = true; + //normalize the array structure + //$new_array = $this->normalize_array($array, $this->name); + //unset($array); + $new_array = $array; //start the atomic transaction $this->db->beginTransaction(); @@ -1485,7 +1953,7 @@ include "root.php"; $child_field_names = array(); if (is_array($row)) { foreach ($row as $k => $v) { - if (!is_array($v)) { + if (!is_array($v) && $k !== 'checked') { $child_field_names[] = preg_replace('#[^a-zA-Z0-9_\-]#', '', $k); } } @@ -1500,6 +1968,7 @@ include "root.php"; //get the data $prep_statement->execute(); $child_array = $prep_statement->fetch(PDO::FETCH_ASSOC); + //set the action if (is_array($child_array)) { $action = "update"; @@ -1507,6 +1976,7 @@ include "root.php"; else { $action = "add"; } + //add to the parent array if (is_array($child_array)) { $old_array[$schema_name][$schema_id][$key][] = $child_array; @@ -1931,15 +2401,22 @@ include "root.php"; if (!is_array($_SESSION['apps'])) { $this->get_apps(); } + //search through all fields to see if domain_uuid exists $apps = $_SESSION['apps']; if (is_array($apps)) { foreach ($apps as $x => &$app) { if (is_array($app['db'])) { foreach ($app['db'] as $y => &$row) { - if ($row['table'] == $name) { + if (is_array($row['table']['name'])) { + $table_name = $row['table']['name']['text']; + } + else { + $table_name = $row['table']['name']; + } + if ($table_name === 'v_'.$name) { if (is_array($row['fields'])) { - foreach ($row['fields'] as $z => $field) { + foreach ($row['fields'] as $field) { if ($field['name'] == "domain_uuid") { return true; } @@ -1950,10 +2427,67 @@ include "root.php"; } //is array } //foreach } //is array + //not found return false; } + private function get_relations($schema) { + + //remove the v_ prefix + if (substr($schema, 0, 2) == "v_") { + $schema = substr($schema, 2); + } + + //sanitize the values + $schema = preg_replace('#[^a-zA-Z0-9_\-]#', '', $schema); + + //get the apps array + $config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/{core,app}/{".$schema.",".$this->singular($schema)."}/app_config.php", GLOB_BRACE); + foreach ($config_list as &$config_path) { + include($config_path); + } + + //search through all fields to find relations + $i = 0; + if (is_array($apps)) { + foreach ($apps as $x => &$app) { + foreach ($app['db'] as $y => &$row) { + foreach ($row['fields'] as $z => $field) { + if ($field['deprecated'] != "true") { + if ($field['key']['type'] == "foreign") { + if ($row['table']['name'] == "v_".$schema || $field['key']['reference']['table'] == "v_".$schema) { + //get the field name + if (is_array($field['name'])) { + $field_name = trim($field['name']['text']); + } + else { + $field_name = trim($field['name']); + } + //build the array + $array[$i]['table'] = $row['table']['name']; + $array[$i]['field'] = $field_name; + $array[$i]['key']['table'] = $field['key']['reference']['table']; + $array[$i]['key']['field'] = $field['key']['reference']['field']; + //increment the value + $i++; + } + } + } + unset($field_name); + } + } + } + } + + //return the array + if (is_array($array)) { + return $array; + } else { + return false; + } + } + } //class database } //!class_exists From e3680139792fb798ae9848ab7fca4d2e2f48c8f2 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 9 Jul 2020 14:34:55 -0600 Subject: [PATCH 260/621] Add option for destination hold music to the database. --- app/destinations/app_config.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/destinations/app_config.php b/app/destinations/app_config.php index 9353062f9b..5264266fb8 100644 --- a/app/destinations/app_config.php +++ b/app/destinations/app_config.php @@ -208,6 +208,10 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Select whether to record the call."; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_hold_music"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Select whether to set music on hold."; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_accountcode"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['search'] = 'true'; From 3afcef6b38fd123f48db78fd98aebc70c53d2bbd Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 9 Jul 2020 14:51:31 -0600 Subject: [PATCH 261/621] Add hold music translation to the languages file. --- app/destinations/app_languages.php | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/app/destinations/app_languages.php b/app/destinations/app_languages.php index e9083b475d..42818432c9 100644 --- a/app/destinations/app_languages.php +++ b/app/destinations/app_languages.php @@ -652,6 +652,27 @@ $text['label-carrier']['ru-ru'] = "Название оператора"; $text['label-carrier']['sv-se'] = "Operatör"; $text['label-carrier']['uk-ua'] = "Назва оператора"; +$text['label-destination_hold_music']['en-us'] = "Hold Music"; +$text['label-destination_hold_music']['en-gb'] = "Hold Music"; +$text['label-destination_hold_music']['ar-eg'] = ""; +$text['label-destination_hold_music']['de-at'] = "Wartemusik"; //copied from de-de +$text['label-destination_hold_music']['de-ch'] = "Wartemusik"; //copied from de-de +$text['label-destination_hold_music']['de-de'] = "Wartemusik"; +$text['label-destination_hold_music']['es-cl'] = "Música en Espera"; +$text['label-destination_hold_music']['es-mx'] = "Música en Espera"; //copied from es-cl +$text['label-destination_hold_music']['fr-ca'] = "Musique de Garde"; //copied from fr-fr +$text['label-destination_hold_music']['fr-fr'] = "Musique de Garde"; +$text['label-destination_hold_music']['he-il'] = "מוסיקה בהמתנה"; +$text['label-destination_hold_music']['it-it'] = "Musica di Attesa"; +$text['label-destination_hold_music']['nl-nl'] = "Wachtmuziek"; +$text['label-destination_hold_music']['pl-pl'] = "Muzyka na czekanie"; +$text['label-destination_hold_music']['pt-br'] = "Música de espera"; +$text['label-destination_hold_music']['pt-pt'] = "Música em Espera"; +$text['label-destination_hold_music']['ro-ro'] = ""; +$text['label-destination_hold_music']['ru-ru'] = "Музыка на Удержании"; +$text['label-destination_hold_music']['sv-se'] = "Vänt-musik"; +$text['label-destination_hold_music']['uk-ua'] = ""; + $text['label-destination_record']['en-us'] = "Record"; $text['label-destination_record']['en-gb'] = "Record"; $text['label-destination_record']['ar-eg'] = ""; @@ -1219,6 +1240,27 @@ $text['description-carrier']['ru-ru'] = "Введите имя оператор $text['description-carrier']['sv-se'] = "Ange operatörens namn. Detta används för att hålla reda på debitering."; $text['description-carrier']['uk-ua'] = "Введіть назву оператора. Використовується для тарифікації"; +$text['description-hold_music']['en-us'] = "Select the MOH Category here."; +$text['description-hold_music']['en-gb'] = "Select the MOH Category here."; +$text['description-hold_music']['ar-eg'] = ""; +$text['description-hold_music']['de-at'] = "Wählen Sie die Wartemusik Kategorie."; //copied from de-de +$text['description-hold_music']['de-ch'] = "Wählen Sie die Wartemusik Kategorie."; //copied from de-de +$text['description-hold_music']['de-de'] = "Wählen Sie die Wartemusik Kategorie."; +$text['description-hold_music']['es-cl'] = "Ingrese la categoría de música en espera aquí"; +$text['description-hold_music']['es-mx'] = "Ingrese la categoría de música en espera aquí"; //copied from es-cl +$text['description-hold_music']['fr-ca'] = "Choisir la musique de garde."; //copied from fr-fr +$text['description-hold_music']['fr-fr'] = "Choisir la musique de garde."; +$text['description-hold_music']['he-il'] = ""; +$text['description-hold_music']['it-it'] = "Seleziona la categoria di Musica d'attesa."; +$text['description-hold_music']['nl-nl'] = "Kies Wachtmuziek hier."; +$text['description-hold_music']['pl-pl'] = "Wybierz kategorie muzyki na czekanie."; +$text['description-hold_music']['pt-br'] = "Escolha a categoria de música de espera aqui (MOH)."; +$text['description-hold_music']['pt-pt'] = "Escolha a categoria MOH da música aqui."; +$text['description-hold_music']['ro-ro'] = ""; +$text['description-hold_music']['ru-ru'] = "Выберите мелодию Музыки на Ожидании (MOH)."; +$text['description-hold_music']['sv-se'] = "Välj MOH Kategori här."; +$text['description-hold_music']['uk-ua'] = ""; + $text['description-destination_record']['en-us'] = "Save the recording."; $text['description-destination_record']['en-gb'] = "Save the recording."; $text['description-destination_record']['ar-eg'] = ""; From 492ed6a19178b28495563421aa929f6322b9be6d Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 9 Jul 2020 15:12:43 -0600 Subject: [PATCH 262/621] Add hold music to destination_edit.php --- app/destinations/destination_edit.php | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index a0975c5948..b07b6efa53 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -99,6 +99,7 @@ $currency = trim($_POST["currency"]); $destination_buy = check_float($_POST["destination_buy"]); $currency_buy = trim($_POST["currency_buy"]); + $destination_hold_music = trim($_POST["destination_hold_music"]); $destination_record = trim($_POST["destination_record"]); $destination_accountcode = trim($_POST["destination_accountcode"]); $destination_type_voice = $_POST["destination_type_voice"]; @@ -308,6 +309,9 @@ $dialplan["dialplan_xml"] .= " \n"; $dialplan["dialplan_xml"] .= " \n"; } + if (strlen($destination_hold_music) > 0) { + $dialplan["dialplan_xml"] .= " \n"; + } if (strlen($destination_accountcode) > 0) { $dialplan["dialplan_xml"] .= " \n"; } @@ -376,6 +380,7 @@ $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set"; $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "hangup_after_bridge=true"; + $dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true"; $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; $y++; @@ -387,6 +392,7 @@ $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set"; $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "continue_on_fail=true"; + $dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true"; $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; $y++; @@ -399,6 +405,7 @@ $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set"; $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "effective_caller_id_name=".$destination_cid_name_prefix."#\${caller_id_name}"; + $dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true"; $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; $y++; @@ -412,6 +419,7 @@ $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set"; $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "accountcode=".$destination_accountcode; + $dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true"; $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; $y++; @@ -425,6 +433,7 @@ $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set"; $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "carrier=$destination_carrier"; + $dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true"; $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; $y++; @@ -432,6 +441,17 @@ $dialplan_detail_order = $dialplan_detail_order + 10; } + //set the hold music + if (strlen($destination_hold_music) > 0) { + $dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; + $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; + $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set"; + $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "hold_music=".$destination_hold_music; + $dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true"; + $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; + $y++; + } + //add fax detection if (is_uuid($fax_uuid)) { @@ -440,6 +460,7 @@ $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set"; $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "tone_detect_hits=1"; + $dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true"; $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; $y++; @@ -451,6 +472,7 @@ $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set"; $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "execute_on_tone_detect=transfer ".$fax_extension." XML \${domain_name}"; + $dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true"; $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; $y++; @@ -615,6 +637,7 @@ $array['destinations'][0]["destination_caller_id_number"] = $destination_caller_id_number; $array['destinations'][0]["destination_cid_name_prefix"] = $destination_cid_name_prefix; $array['destinations'][0]["destination_context"] = $destination_context; + $array['destinations'][0]["destination_hold_music"] = $destination_hold_music; $array['destinations'][0]["destination_record"] = $destination_record; $array['destinations'][0]["destination_accountcode"] = $destination_accountcode; $array['destinations'][0]["destination_type_voice"] = $destination_type_voice ? 1 : null; @@ -730,6 +753,7 @@ $destination_caller_id_name = $row["destination_caller_id_name"]; $destination_caller_id_number = $row["destination_caller_id_number"]; $destination_cid_name_prefix = $row["destination_cid_name_prefix"]; + $destination_hold_music = $row["destination_hold_music"]; $destination_record = $row["destination_record"]; $destination_accountcode = $row["destination_accountcode"]; $destination_type_voice = $row["destination_type_voice"]; @@ -1123,6 +1147,21 @@ echo "\n"; } + if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/music_on_hold')) { + echo "\n"; + echo "\n"; + echo " ".$text['label-destination_hold_music']."\n"; + echo "\n"; + echo "\n"; + require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php"; + $music_on_hold = new switch_music_on_hold; + echo $music_on_hold->select('destination_hold_music', $destination_hold_music, null); + echo "
\n"; + echo $text['description-destination_hold_music']."\n"; + echo "\n"; + echo "\n"; + } + echo "\n"; echo "\n"; echo " ".$text['label-account_code']."\n"; From 9d48084b273ad05caf4ceadd5a4e9094e9e417e8 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 9 Jul 2020 15:14:43 -0600 Subject: [PATCH 263/621] Fix the description lable for destination hold music. --- app/destinations/app_languages.php | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/app/destinations/app_languages.php b/app/destinations/app_languages.php index 42818432c9..d1414a8fdb 100644 --- a/app/destinations/app_languages.php +++ b/app/destinations/app_languages.php @@ -1240,26 +1240,26 @@ $text['description-carrier']['ru-ru'] = "Введите имя оператор $text['description-carrier']['sv-se'] = "Ange operatörens namn. Detta används för att hålla reda på debitering."; $text['description-carrier']['uk-ua'] = "Введіть назву оператора. Використовується для тарифікації"; -$text['description-hold_music']['en-us'] = "Select the MOH Category here."; -$text['description-hold_music']['en-gb'] = "Select the MOH Category here."; -$text['description-hold_music']['ar-eg'] = ""; -$text['description-hold_music']['de-at'] = "Wählen Sie die Wartemusik Kategorie."; //copied from de-de -$text['description-hold_music']['de-ch'] = "Wählen Sie die Wartemusik Kategorie."; //copied from de-de -$text['description-hold_music']['de-de'] = "Wählen Sie die Wartemusik Kategorie."; -$text['description-hold_music']['es-cl'] = "Ingrese la categoría de música en espera aquí"; -$text['description-hold_music']['es-mx'] = "Ingrese la categoría de música en espera aquí"; //copied from es-cl -$text['description-hold_music']['fr-ca'] = "Choisir la musique de garde."; //copied from fr-fr -$text['description-hold_music']['fr-fr'] = "Choisir la musique de garde."; -$text['description-hold_music']['he-il'] = ""; -$text['description-hold_music']['it-it'] = "Seleziona la categoria di Musica d'attesa."; -$text['description-hold_music']['nl-nl'] = "Kies Wachtmuziek hier."; -$text['description-hold_music']['pl-pl'] = "Wybierz kategorie muzyki na czekanie."; -$text['description-hold_music']['pt-br'] = "Escolha a categoria de música de espera aqui (MOH)."; -$text['description-hold_music']['pt-pt'] = "Escolha a categoria MOH da música aqui."; -$text['description-hold_music']['ro-ro'] = ""; -$text['description-hold_music']['ru-ru'] = "Выберите мелодию Музыки на Ожидании (MOH)."; -$text['description-hold_music']['sv-se'] = "Välj MOH Kategori här."; -$text['description-hold_music']['uk-ua'] = ""; +$text['description-destination_hold_music']['en-us'] = "Select the MOH Category here."; +$text['description-destination_hold_music']['en-gb'] = "Select the MOH Category here."; +$text['description-destination_hold_music']['ar-eg'] = ""; +$text['description-destination_hold_music']['de-at'] = "Wählen Sie die Wartemusik Kategorie."; //copied from de-de +$text['description-destination_hold_music']['de-ch'] = "Wählen Sie die Wartemusik Kategorie."; //copied from de-de +$text['description-destination_hold_music']['de-de'] = "Wählen Sie die Wartemusik Kategorie."; +$text['description-destination_hold_music']['es-cl'] = "Ingrese la categoría de música en espera aquí"; +$text['description-destination_hold_music']['es-mx'] = "Ingrese la categoría de música en espera aquí"; //copied from es-cl +$text['description-destination_hold_music']['fr-ca'] = "Choisir la musique de garde."; //copied from fr-fr +$text['description-destination_hold_music']['fr-fr'] = "Choisir la musique de garde."; +$text['description-destination_hold_music']['he-il'] = ""; +$text['description-destination_hold_music']['it-it'] = "Seleziona la categoria di Musica d'attesa."; +$text['description-destination_hold_music']['nl-nl'] = "Kies Wachtmuziek hier."; +$text['description-destination_hold_music']['pl-pl'] = "Wybierz kategorie muzyki na czekanie."; +$text['description-destination_hold_music']['pt-br'] = "Escolha a categoria de música de espera aqui (MOH)."; +$text['description-destination_hold_music']['pt-pt'] = "Escolha a categoria MOH da música aqui."; +$text['description-destination_hold_music']['ro-ro'] = ""; +$text['description-destination_hold_music']['ru-ru'] = "Выберите мелодию Музыки на Ожидании (MOH)."; +$text['description-destination_hold_music']['sv-se'] = "Välj MOH Kategori här."; +$text['description-destination_hold_music']['uk-ua'] = ""; $text['description-destination_record']['en-us'] = "Save the recording."; $text['description-destination_record']['en-gb'] = "Save the recording."; From 0bdf2a7abe8449aa39bbc183845bd3a2ea532f3f Mon Sep 17 00:00:00 2001 From: phoneben <67923255+phoneben@users.noreply.github.com> Date: Fri, 10 Jul 2020 02:44:13 +0300 Subject: [PATCH 264/621] Hebrew language for the recordings app(#5343) --- app/recordings/app_languages.php | 40 ++++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/app/recordings/app_languages.php b/app/recordings/app_languages.php index f2e6b5041d..e04e9f74fb 100644 --- a/app/recordings/app_languages.php +++ b/app/recordings/app_languages.php @@ -11,7 +11,7 @@ $text['title-edit']['es-cl'] = "Grabación"; $text['title-edit']['es-mx'] = "Grabación"; //copied from es-cl $text['title-edit']['fr-ca'] = "Guide"; //copied from fr-fr $text['title-edit']['fr-fr'] = "Guide"; -$text['title-edit']['he-il'] = ""; +$text['title-edit']['he-il'] = "קובץ מדיה"; $text['title-edit']['it-it'] = "Registrazioni Audio"; $text['title-edit']['nl-nl'] = "Opname"; $text['title-edit']['pl-pl'] = "Nagrywanie rozmów"; @@ -32,7 +32,7 @@ $text['title-add']['es-cl'] = "Agregar Grabación"; $text['title-add']['es-mx'] = "Agregar Grabación"; //copied from es-cl $text['title-add']['fr-ca'] = "Ajouter un Guide"; //copied from fr-fr $text['title-add']['fr-fr'] = "Ajouter un Guide"; -$text['title-add']['he-il'] = ""; +$text['title-add']['he-il'] = "הוסף קבצי מדיה"; $text['title-add']['it-it'] = "Inserire Registrazione"; $text['title-add']['nl-nl'] = "Voeg opname toe"; $text['title-add']['pl-pl'] = "Dodaj nagrywanie rozmów"; @@ -53,7 +53,7 @@ $text['title-recordings']['es-cl'] = "Grabaciones"; $text['title-recordings']['es-mx'] = "Grabaciones"; //copied from es-cl $text['title-recordings']['fr-ca'] = "Guides Vocaux"; //copied from fr-fr $text['title-recordings']['fr-fr'] = "Guides Vocaux"; -$text['title-recordings']['he-il'] = ""; +$text['title-recordings']['he-il'] = "קבצי מדיה"; $text['title-recordings']['it-it'] = "Registrazioni"; $text['title-recordings']['nl-nl'] = "Opnamen"; $text['title-recordings']['pl-pl'] = "Nagrywanie rozmów"; @@ -74,7 +74,7 @@ $text['message-uploaded']['es-cl'] = "Subida de Archivos"; $text['message-uploaded']['es-mx'] = "Subida de Archivos"; //copied from es-cl $text['message-uploaded']['fr-ca'] = "Fichier Téléchargé"; //copied from fr-fr $text['message-uploaded']['fr-fr'] = "Fichier Téléchargé"; -$text['message-uploaded']['he-il'] = ""; +$text['message-uploaded']['he-il'] = "הקובץ הועלה"; $text['message-uploaded']['it-it'] = "File Caricato"; $text['message-uploaded']['nl-nl'] = "Bestand opsturen"; $text['message-uploaded']['pl-pl'] = "Dodany Plik"; @@ -116,7 +116,7 @@ $text['label-upload']['es-cl'] = "Archivo a subir"; $text['label-upload']['es-mx'] = "Archivo a subir"; //copied from es-cl $text['label-upload']['fr-ca'] = "Fichier à déposer"; //copied from fr-fr $text['label-upload']['fr-fr'] = "Fichier à déposer"; -$text['label-upload']['he-il'] = ""; +$text['label-upload']['he-il'] = ""נתיב הקובץ; $text['label-upload']['it-it'] = "Percorso File"; $text['label-upload']['nl-nl'] = "Bestandspad"; $text['label-upload']['pl-pl'] = "Ścieżka do pliku"; @@ -137,7 +137,7 @@ $text['label-tools']['es-cl'] = "Instrumentos"; $text['label-tools']['es-mx'] = "Instrumentos"; //copied from es-cl $text['label-tools']['fr-ca'] = "Outils"; //copied from fr-fr $text['label-tools']['fr-fr'] = "Outils"; -$text['label-tools']['he-il'] = ""; +$text['label-tools']['he-il'] = "כלים"; $text['label-tools']['it-it'] = "Strumenti"; $text['label-tools']['nl-nl'] = "Gereedschappen"; $text['label-tools']['pl-pl'] = "Narzędzia"; @@ -158,7 +158,7 @@ $text['label-recording_name']['es-cl'] = "Nombre de la grabación"; $text['label-recording_name']['es-mx'] = "Nombre de la grabación"; //copied from es-cl $text['label-recording_name']['fr-ca'] = "Nom de l'enregistrement"; //copied from fr-fr $text['label-recording_name']['fr-fr'] = "Nom de l'enregistrement"; -$text['label-recording_name']['he-il'] = ""; +$text['label-recording_name']['he-il'] = "שם הקובץ מדיה"; $text['label-recording_name']['it-it'] = "Nome Registrazione"; $text['label-recording_name']['nl-nl'] = "Opnamenaam"; $text['label-recording_name']['pl-pl'] = "Nazwa nagrania"; @@ -179,7 +179,7 @@ $text['label-play']['es-cl'] = "Reproducir"; $text['label-play']['es-mx'] = "Reproducir"; //copied from es-cl $text['label-play']['fr-ca'] = "Jouer"; //copied from fr-fr $text['label-play']['fr-fr'] = "Jouer"; -$text['label-play']['he-il'] = ""; +$text['label-play']['he-il'] = "נגן"; $text['label-play']['it-it'] = "Riproduci"; $text['label-play']['nl-nl'] = "Afspelen"; $text['label-play']['pl-pl'] = "Odtwórz"; @@ -200,7 +200,7 @@ $text['label-pause']['es-cl'] = "Pausa"; $text['label-pause']['es-mx'] = "Pausa"; //copied from es-cl $text['label-pause']['fr-ca'] = "Pause"; //copied from fr-fr $text['label-pause']['fr-fr'] = "Pause"; -$text['label-pause']['he-il'] = ""; +$text['label-pause']['he-il'] = "השהה"; $text['label-pause']['it-it'] = "Pausa"; $text['label-pause']['nl-nl'] = "Pauze"; $text['label-pause']['pl-pl'] = "Pauza"; @@ -221,7 +221,7 @@ $text['label-file_name']['es-cl'] = "Nombre del Archivo"; $text['label-file_name']['es-mx'] = "Nombre del Archivo"; //copied from es-cl $text['label-file_name']['fr-ca'] = "Nom du Fichier"; //copied from fr-fr $text['label-file_name']['fr-fr'] = "Nom du Fichier"; -$text['label-file_name']['he-il'] = ""; +$text['label-file_name']['he-il'] = "שם קובץ מדיה"; $text['label-file_name']['it-it'] = "Nome File"; $text['label-file_name']['nl-nl'] = "Bestandsnaam"; $text['label-file_name']['pl-pl'] = "Nazwa pliku"; @@ -242,7 +242,7 @@ $text['label-file_size']['es-cl'] = "Tamaño del archivo"; $text['label-file_size']['es-mx'] = "Tamaño del archivo"; //copied from es-cl $text['label-file_size']['fr-ca'] = "Taille de Fichier"; //copied from fr-fr $text['label-file_size']['fr-fr'] = "Taille de Fichier"; -$text['label-file_size']['he-il'] = ""; +$text['label-file_size']['he-il'] = "גודל קובץ"; $text['label-file_size']['it-it'] = "Dimensioni File"; $text['label-file_size']['nl-nl'] = "Bestandsomvang"; $text['label-file_size']['pl-pl'] = "Rozmiar pliku"; @@ -263,7 +263,7 @@ $text['label-size']['es-cl'] = "Tamaño del archivo"; $text['label-size']['es-mx'] = "Tamaño del archivo"; //copied from es-cl $text['label-size']['fr-ca'] = "Taille de Fichier"; //copied from fr-fr $text['label-size']['fr-fr'] = "Taille de Fichier"; -$text['label-size']['he-il'] = ""; +$text['label-size']['he-il'] = "גודל"; $text['label-size']['it-it'] = "Dimensioni File"; $text['label-size']['nl-nl'] = "Afmetingen"; $text['label-size']['pl-pl'] = "Rozmiar pliku"; @@ -284,7 +284,7 @@ $text['label-file']['es-cl'] = "Nombre de archivo (Descargar)"; $text['label-file']['es-mx'] = "Nombre de archivo (Descargar)"; //copied from es-cl $text['label-file']['fr-ca'] = "Nom du fichier (Télécharger)"; //copied from fr-fr $text['label-file']['fr-fr'] = "Nom du fichier (Télécharger)"; -$text['label-file']['he-il'] = ""; +$text['label-file']['he-il'] = "שם קובץ הורדה"; $text['label-file']['it-it'] = "Nome File (Scarica)"; $text['label-file']['nl-nl'] = "Bestandsnaam (ophalen)"; $text['label-file']['pl-pl'] = "Nazwa pliku (pobranie)"; @@ -305,7 +305,7 @@ $text['label-edit-recording']['es-cl'] = "Por favor indique: Nombre de la grabac $text['label-edit-recording']['es-mx'] = "Por favor indique: Nombre de la grabación (reproducir)"; //copied from es-cl $text['label-edit-recording']['fr-ca'] = "Merci d'indiquer: nom de l'enregistrement (jouer)"; //copied from fr-fr $text['label-edit-recording']['fr-fr'] = "Merci d'indiquer: nom de l'enregistrement (jouer)"; -$text['label-edit-recording']['he-il'] = ""; +$text['label-edit-recording']['he-il'] = "אנא ספק: הקלטת שם הפעלה"; $text['label-edit-recording']['it-it'] = "Prego fornire: Nome Registrazione (riproduci)"; $text['label-edit-recording']['nl-nl'] = "Geef aub.: Opename naam (afspelen)"; $text['label-edit-recording']['pl-pl'] = "Wprowadź: Nazwę nagrania (do odsłuchania)"; @@ -326,7 +326,7 @@ $text['label-edit-file']['es-cl'] = "Por favor indique: Nombre de archivo (desca $text['label-edit-file']['es-mx'] = "Por favor indique: Nombre de archivo (descargar)"; //copied from es-cl $text['label-edit-file']['fr-ca'] = "Merci d'indiquer: nom de fichier (Télécharger)"; //copied from fr-fr $text['label-edit-file']['fr-fr'] = "Merci d'indiquer: nom de fichier (Télécharger)"; -$text['label-edit-file']['he-il'] = ""; +$text['label-edit-file']['he-il'] = "אנא ספק: הקלטת שם הורדה"; $text['label-edit-file']['it-it'] = "Prego fornire: Nome file (scarica)"; $text['label-edit-file']['nl-nl'] = "Geef aug.: Bestandsnaam (ophalen)"; $text['label-edit-file']['pl-pl'] = "Wprowadź: Nazwę pliku (do pobrania)"; @@ -347,7 +347,7 @@ $text['label-download']['es-cl'] = "Descargar"; $text['label-download']['es-mx'] = "Descargar"; //copied from es-cl $text['label-download']['fr-ca'] = "Télécharger"; //copied from fr-fr $text['label-download']['fr-fr'] = "Télécharger"; -$text['label-download']['he-il'] = ""; +$text['label-download']['he-il'] = "הורדה"; $text['label-download']['it-it'] = "Scaricare"; $text['label-download']['nl-nl'] = "Ophalen"; $text['label-download']['pl-pl'] = "Pobierz"; @@ -368,7 +368,7 @@ $text['header']['es-cl'] = "Subir Grabación"; $text['header']['es-mx'] = "Subir Grabación"; //copied from es-cl $text['header']['fr-ca'] = "Télécharger Enregistrement"; //copied from fr-fr $text['header']['fr-fr'] = "Télécharger Enregistrement"; -$text['header']['he-il'] = ""; +$text['header']['he-il'] = "העלאת הקלטה"; $text['header']['it-it'] = "Caricare Registrazione"; $text['header']['nl-nl'] = "Opsturen opname"; $text['header']['pl-pl'] = "Wyślij nagranie"; @@ -389,7 +389,7 @@ $text['description-recording']['es-cl'] = "Nombre de la grabación."; $text['description-recording']['es-mx'] = "Nombre de la grabación."; //copied from es-cl $text['description-recording']['fr-ca'] = "Nom de l'enregistrement (non parsé)."; //copied from fr-fr $text['description-recording']['fr-fr'] = "Nom de l'enregistrement (non parsé)."; -$text['description-recording']['he-il'] = ""; +$text['description-recording']['he-il'] = "שם להקלטה לא מנותח."; $text['description-recording']['it-it'] = "Un nome per la registrazione (non parsato)."; $text['description-recording']['nl-nl'] = "Een naam voor de opname (niet gecontroleerd)."; $text['description-recording']['pl-pl'] = "Nazwa nagrania."; @@ -410,7 +410,7 @@ $text['description-file']['es-cl'] = "Nombre del archivo. ejemplo.wav"; $text['description-file']['es-mx'] = "Nombre del archivo. ejemplo.wav"; //copied from es-cl $text['description-file']['fr-ca'] = "Nom du fichier. exemple.wav"; //copied from fr-fr $text['description-file']['fr-fr'] = "Nom du fichier. exemple.wav"; -$text['description-file']['he-il'] = ""; +$text['description-file']['he-il'] = "שם הקובץ. example.wav"; $text['description-file']['it-it'] = "Nome del file. (es. nome.wav)"; $text['description-file']['nl-nl'] = "Naam van het bestand"; $text['description-file']['pl-pl'] = "Nazwa pliku: przykład.wav"; @@ -431,7 +431,7 @@ $text['description']['es-cl'] = "Para realizar una grabación marque *732 o pued $text['description']['es-mx'] = "Para realizar una grabación marque *732 o puede crear un archivo en formato WAV a 16 bit 8khz/16khz Mono y luego copiarlo en el siguiente directorio y refrezcar la página para reproducirlo."; //copied from es-cl $text['description']['fr-ca'] = "Pour créer un guide vocal, composer le *732 ou créer un fichier audio WAV 16bit 8khz/16khz Mono et ensuite le copier dans le répertoire qui suit. Rafraîchir ensuite cette page pour le voir apparaitre."; //copied from fr-fr $text['description']['fr-fr'] = "Pour créer un guide vocal, composer le *732 ou créer un fichier audio WAV 16bit 8khz/16khz Mono et ensuite le copier dans le répertoire qui suit. Rafraîchir ensuite cette page pour le voir apparaitre."; -$text['description']['he-il'] = ""; +$text['description']['he-il'] = "חייג * 732 ליצירת הקלטה, או (לקבלת התוצאות הטובות ביותר) העלה קובץ WAV מונו בגודל 16bit 8khz / 16khz"; $text['description']['it-it'] = "Chiamare *732 per creare una registrazione, o (per un risultato migliore) caricare file WAV a 16bit 8khz/16khz mono."; $text['description']['nl-nl'] = "Kies *732 om een opname te make, of voor betere resultaten, stuur een 16bit 8kHz/16kHz mono WAV bestand. op"; $text['description']['pl-pl'] = "Aby stworzyć własne nagranie wybierz *732 z klawiatury telefonu lub stwórz plik audio w formacie WAV o następujących parametrach: 16bit 8khz/16khz Mono, a następnie skopiuj go do odpowiedniego katalogu i odśwież, aby go odsłuchać."; From 758f38d66474280f5ad07d45aa18026017677a23 Mon Sep 17 00:00:00 2001 From: Len Date: Thu, 9 Jul 2020 19:47:56 -0400 Subject: [PATCH 265/621] Update app_config.php (#5342) * Update app_config.php Description: It configures whether to use audio encryption service. CFG Configuration: account.x.srtp_encryption Valid Value: (0-Disabled;1-Optional;2-Compulsory) Optional: The phone will negotiate with the other phone what type of encryption to use for the session. Compulsory: The phone must use SRTP during a call. --- app/yealink/app_config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/yealink/app_config.php b/app/yealink/app_config.php index 739361479c..d213ae8ecd 100644 --- a/app/yealink/app_config.php +++ b/app/yealink/app_config.php @@ -109,7 +109,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "0-Disabled (default), 1-Forced, 2-Negotiate"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "0=Disabled, 1=Optional, 2=Compulsory"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f0704072-c3d9-48df-b89b-2aea6035b3c4"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; From 9dc180626ac0075525343a57a10a8e7c5a562479 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Thu, 9 Jul 2020 19:49:19 -0400 Subject: [PATCH 266/621] xml handler: fix duplicate gateways and unnecessary query (#5341) --- .../scripts/configuration/sofia.conf.lua | 25 +++---------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/sofia.conf.lua b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/sofia.conf.lua index 8364caa00e..71beae1443 100644 --- a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/sofia.conf.lua +++ b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/sofia.conf.lua @@ -55,22 +55,6 @@ --exits the script if we didn't connect properly assert(dbh:connected()); - --get the domain_uuid - if (domain_uuid == nil) then - --get the domain_uuid - if (domain_name ~= nil) then - sql = "SELECT domain_uuid FROM v_domains "; - sql = sql .. "WHERE domain_name = :domain_name"; - local params = {domain_name = domain_name}; - if (debug["sql"]) then - freeswitch.consoleLog("notice", "[xml_handler] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n"); - end - dbh:query(sql, params, function(row) - domain_uuid = row.domain_uuid; - end); - end - end - --get the variables vars = trim(api:execute("global_getvar", "")); @@ -126,11 +110,10 @@ --table.insert(xml, [[ ]]); --get the gateways - sql = "select * from v_gateways as g, v_domains as d "; - sql = sql .. "where g.profile = :profile "; - sql = sql .. "and g.enabled = 'true' "; - sql = sql .. "and (g.domain_uuid = d.domain_uuid or g.domain_uuid is null) "; - sql = sql .. "and (g.hostname = :hostname or g.hostname is null or g.hostname = '') "; + sql = "select * from v_gateways "; + sql = sql .. "where profile = :profile "; + sql = sql .. "and enabled = 'true' "; + sql = sql .. "and (hostname = :hostname or hostname is null or hostname = '') "; local params = {profile = sip_profile_name, hostname = hostname}; if (debug["sql"]) then freeswitch.consoleLog("notice", "[xml_handler] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n"); From f04dbe861ce7464995a24eee2c7493e9bf4194ca Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 9 Jul 2020 18:59:52 -0600 Subject: [PATCH 267/621] Fix a syntax problem from new Hebrew translation. --- app/recordings/app_languages.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/recordings/app_languages.php b/app/recordings/app_languages.php index e04e9f74fb..fb7c7d59d3 100644 --- a/app/recordings/app_languages.php +++ b/app/recordings/app_languages.php @@ -116,7 +116,7 @@ $text['label-upload']['es-cl'] = "Archivo a subir"; $text['label-upload']['es-mx'] = "Archivo a subir"; //copied from es-cl $text['label-upload']['fr-ca'] = "Fichier à déposer"; //copied from fr-fr $text['label-upload']['fr-fr'] = "Fichier à déposer"; -$text['label-upload']['he-il'] = ""נתיב הקובץ; +$text['label-upload']['he-il'] = "נתיב הקובץ"; $text['label-upload']['it-it'] = "Percorso File"; $text['label-upload']['nl-nl'] = "Bestandspad"; $text['label-upload']['pl-pl'] = "Ścieżka do pliku"; From 8cd1c447f52b99a2304050671fae425283bf464f Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 10 Jul 2020 01:02:16 -0600 Subject: [PATCH 268/621] Remove hold_music from user_exists dialplan --- app/dialplans/resources/switch/conf/dialplan/010_user_exists.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/dialplans/resources/switch/conf/dialplan/010_user_exists.xml b/app/dialplans/resources/switch/conf/dialplan/010_user_exists.xml index 35359accac..b0bffe4cc6 100644 --- a/app/dialplans/resources/switch/conf/dialplan/010_user_exists.xml +++ b/app/dialplans/resources/switch/conf/dialplan/010_user_exists.xml @@ -9,7 +9,6 @@ - From 0be0bc34177410b9d92bf8800eecb6a563d83084 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 10 Jul 2020 01:02:52 -0600 Subject: [PATCH 269/621] Create 080_hold_music.xml --- .../resources/switch/conf/dialplan/080_hold_music.xml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 app/dialplans/resources/switch/conf/dialplan/080_hold_music.xml diff --git a/app/dialplans/resources/switch/conf/dialplan/080_hold_music.xml b/app/dialplans/resources/switch/conf/dialplan/080_hold_music.xml new file mode 100644 index 0000000000..33a7c71188 --- /dev/null +++ b/app/dialplans/resources/switch/conf/dialplan/080_hold_music.xml @@ -0,0 +1,8 @@ + + + + + + + + From 95faf76f97a361f3c780ee031c83d20f948d3d1e Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 10 Jul 2020 09:41:43 -0600 Subject: [PATCH 270/621] Use cast to text on domain_enabled. --- core/domains/domains.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/domains/domains.php b/core/domains/domains.php index e28d783192..4e06cb8908 100644 --- a/core/domains/domains.php +++ b/core/domains/domains.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2018 - 2019 + Portions created by the Initial Developer are Copyright (C) 2018 - 2020 the Initial Developer. All Rights Reserved. Contributor(s): @@ -61,7 +61,7 @@ //update the domain session variables $domain_uuid = $_GET["domain_uuid"]; - $_SESSION["previous_domain_uuid"] = $_SESSION['domain_uuid']; + $_SESSION["previous_domain_uuid"] = $_SESSION['domain_uuid']; $_SESSION['domain_uuid'] = $domain_uuid; $_SESSION["domain_name"] = $_SESSION['domains'][$domain_uuid]['domain_name']; $_SESSION['domain']['template']['name'] = $_SESSION['domains'][$domain_uuid]['template_name']; @@ -164,7 +164,11 @@ $offset = $rows_per_page * $page; //get the list - $sql = str_replace('count(domain_uuid)', '*', $sql); + $sql = "select domain_uuid, domain_name, domain_uuid, cast(domain_enabled as text), domain_description "; + $sql .= "from v_domains "; + if (isset($sql_search)) { + $sql .= "where ".$sql_search; + } $sql .= order_by($order_by, $order, 'domain_name', 'asc'); $sql .= limit_offset($rows_per_page, $offset); $database = new database; From 42a926684a0756fc3169a7bec83be5caec61315b Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 10 Jul 2020 09:44:53 -0600 Subject: [PATCH 271/621] Remove a duplicate domain_uuid. --- core/domains/domains.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/domains/domains.php b/core/domains/domains.php index 4e06cb8908..1f1ca5a62f 100644 --- a/core/domains/domains.php +++ b/core/domains/domains.php @@ -164,7 +164,7 @@ $offset = $rows_per_page * $page; //get the list - $sql = "select domain_uuid, domain_name, domain_uuid, cast(domain_enabled as text), domain_description "; + $sql = "select domain_uuid, domain_name, cast(domain_enabled as text), domain_description "; $sql .= "from v_domains "; if (isset($sql_search)) { $sql .= "where ".$sql_search; From b4beae1e97210815147f5eb15d84d24187edd45c Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 10 Jul 2020 09:45:54 -0600 Subject: [PATCH 272/621] Cast domain_enabled to text --- core/domains/domain_edit.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/domains/domain_edit.php b/core/domains/domain_edit.php index 6a286a9e2e..4c99d3ef57 100644 --- a/core/domains/domain_edit.php +++ b/core/domains/domain_edit.php @@ -528,7 +528,8 @@ //pre-populate the form (admin won't have domain_add permissions, but domain_uuid will already be set above) if ((count($_GET) > 0 || (!permission_exists('domain_add') && $domain_uuid != '')) && $_POST["persistformvar"] != "true") { - $sql = "select * from v_domains "; + $sql = "select domain_uuid, domain_name, cast(domain_enabled as text), domain_description "; + $sql .= "from v_domains "; $sql .= "where domain_uuid = :domain_uuid "; $parameters['domain_uuid'] = $domain_uuid; $database = new database; @@ -698,4 +699,4 @@ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> From 7a720b84a9d458f8571de6a72c04b2282fce85f2 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 10 Jul 2020 12:36:11 -0600 Subject: [PATCH 273/621] Disable the delete for now. --- resources/classes/database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/classes/database.php b/resources/classes/database.php index a6da9e0cff..d0613f3a5a 100644 --- a/resources/classes/database.php +++ b/resources/classes/database.php @@ -863,7 +863,7 @@ include "root.php"; $sql = "delete from ".$table_prefix.$child_table." "; $sql .= "where ".$relation['field']." = :".$relation['field']; $parameters[$relation['field']] = $row[$relation['field']]; - $this->execute($sql, $parameters); + //$this->execute($sql, $parameters); unset($parameters); } } From 451494722334fcef74b532dc865bf2da7ef3fde9 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 10 Jul 2020 12:55:58 -0600 Subject: [PATCH 274/621] Disable this until it has been improved and tested more. --- resources/classes/database.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/resources/classes/database.php b/resources/classes/database.php index d0613f3a5a..dd815cc1e2 100644 --- a/resources/classes/database.php +++ b/resources/classes/database.php @@ -850,21 +850,21 @@ include "root.php"; } //get the child data - $sql = "select * from ".$table_prefix.$child_table." "; - $sql .= "where ".$relation['field']." = :".$relation['field']; - $parameters[$relation['field']] = $row[$relation['field']]; - $results = $this->execute($sql, $parameters, 'all'); - unset($parameters); - if (is_array($results)) { - $old_array[$parent_name][$x][$child_table] = $results; - } + //$sql = "select * from ".$table_prefix.$child_table." "; + //$sql .= "where ".$relation['field']." = :".$relation['field']; + //$parameters[$relation['field']] = $row[$relation['field']]; + //$results = $this->execute($sql, $parameters, 'all'); + //unset($parameters); + //if (is_array($results)) { + // $old_array[$parent_name][$x][$child_table] = $results; + //} //delete the child data - $sql = "delete from ".$table_prefix.$child_table." "; - $sql .= "where ".$relation['field']." = :".$relation['field']; - $parameters[$relation['field']] = $row[$relation['field']]; + //$sql = "delete from ".$table_prefix.$child_table." "; + //$sql .= "where ".$relation['field']." = :".$relation['field']; + //$parameters[$relation['field']] = $row[$relation['field']]; //$this->execute($sql, $parameters); - unset($parameters); + //unset($parameters); } } $x++; From 466b77053d3f3d325fd685cb51c090ce17370078 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 10 Jul 2020 13:38:04 -0600 Subject: [PATCH 275/621] Rename the new hold music dialplan to user hold music. --- app/dialplans/resources/switch/conf/dialplan/080_hold_music.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/dialplans/resources/switch/conf/dialplan/080_hold_music.xml b/app/dialplans/resources/switch/conf/dialplan/080_hold_music.xml index 33a7c71188..b4998787e6 100644 --- a/app/dialplans/resources/switch/conf/dialplan/080_hold_music.xml +++ b/app/dialplans/resources/switch/conf/dialplan/080_hold_music.xml @@ -1,5 +1,5 @@ - + From 4eea4ee3cd40fbe3b15d6c2bd15cd95f301cc81f Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 10 Jul 2020 18:55:22 -0600 Subject: [PATCH 276/621] Rename 080_hold_music.xml to 080_user_hold_music.xml --- .../conf/dialplan/{080_hold_music.xml => 080_user_hold_music.xml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename app/dialplans/resources/switch/conf/dialplan/{080_hold_music.xml => 080_user_hold_music.xml} (100%) diff --git a/app/dialplans/resources/switch/conf/dialplan/080_hold_music.xml b/app/dialplans/resources/switch/conf/dialplan/080_user_hold_music.xml similarity index 100% rename from app/dialplans/resources/switch/conf/dialplan/080_hold_music.xml rename to app/dialplans/resources/switch/conf/dialplan/080_user_hold_music.xml From a499b36277b1580b10a75e1721ec087be1b9d0f5 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 10 Jul 2020 20:30:25 -0600 Subject: [PATCH 277/621] Added array option. --- app/devices/device_edit.php | 55 +++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index d0a90e7e0b..de5ef68e23 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -1047,28 +1047,65 @@ if (permission_exists('device_line_server_address_primary')) { echo " \n"; - echo " \n"; + if (is_uuid($_SESSION['provision']['server_address_primary']['uuid'])) { + echo " \n"; + } + else { + echo " \n"; + } echo " \n"; } + if (permission_exists('device_line_server_address_secondary')) { echo " \n"; - echo " \n"; + if (is_uuid($_SESSION['provision']['server_address_secondary']['uuid'])) { + echo " \n"; + } + else { + echo " \n"; + } echo " \n"; } if (permission_exists('device_line_outbound_proxy_primary')) { - if (permission_exists('device_line_outbound_proxy_secondary')) { - $placeholder_label = $text['label-primary']; - } echo " \n"; - echo " \n"; + if (is_uuid($_SESSION['provision']['outbound_proxy_primary']['uuid'])) { + echo " \n"; + } + else { + echo " \n"; + } echo " \n"; - unset($placeholder_label); } if (permission_exists('device_line_outbound_proxy_secondary')) { echo " \n"; - echo " \n"; + if (is_uuid($_SESSION['provision']['outbound_proxy_secondary']['uuid'])) { + echo " \n"; + } + else { + echo " \n"; + } echo " \n"; } @@ -1770,4 +1807,4 @@ //show the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> From 59bd5a9e5447df7b92a4e73748a6174d0394d280 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Sun, 12 Jul 2020 17:47:54 -0400 Subject: [PATCH 278/621] Add domain_uuid variable (#5344) --- app/scripts/resources/scripts/app/follow_me/index.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/resources/scripts/app/follow_me/index.lua b/app/scripts/resources/scripts/app/follow_me/index.lua index 1fc01f88eb..0394adf17a 100644 --- a/app/scripts/resources/scripts/app/follow_me/index.lua +++ b/app/scripts/resources/scripts/app/follow_me/index.lua @@ -384,7 +384,7 @@ end --set the destination dial string - dial_string = "[ignore_early_media=true,toll_allow=".. toll_allow ..",".. caller_id ..",sip_invite_domain="..domain_name..",call_direction="..call_direction..","..group_confirm..","..timeout_name.."="..destination_timeout..","..delay_name.."="..destination_delay.."]"..route_bridge + dial_string = "[ignore_early_media=true,toll_allow=".. toll_allow ..",".. caller_id ..",sip_invite_domain="..domain_name..",domain_uuid="..domain_uuid..",call_direction="..call_direction..","..group_confirm..","..timeout_name.."="..destination_timeout..","..delay_name.."="..destination_delay.."]"..route_bridge end --add a delimiter between destinations From 0cdab532efc4f33551ceb0a6cda8de110f5b63bb Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Sun, 12 Jul 2020 18:23:20 -0400 Subject: [PATCH 279/621] set domain_uuid variable (#5345) --- app/scripts/resources/scripts/app/ring_groups/index.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/resources/scripts/app/ring_groups/index.lua b/app/scripts/resources/scripts/app/ring_groups/index.lua index e284082046..6bb1a0126e 100644 --- a/app/scripts/resources/scripts/app/ring_groups/index.lua +++ b/app/scripts/resources/scripts/app/ring_groups/index.lua @@ -834,7 +834,7 @@ end --set the destination dial string - dial_string = "[ignore_early_media=true,toll_allow=".. toll_allow ..",".. caller_id ..",sip_invite_domain="..domain_name..",domain_name="..domain_name..",call_direction="..call_direction..","..group_confirm.."leg_timeout="..destination_timeout..","..delay_name.."="..destination_delay.."]"..route_bridge + dial_string = "[ignore_early_media=true,toll_allow=".. toll_allow ..",".. caller_id ..",sip_invite_domain="..domain_name..",domain_name="..domain_name..",domain_uuid="..domain_uuid..",call_direction="..call_direction..","..group_confirm.."leg_timeout="..destination_timeout..","..delay_name.."="..destination_delay.."]"..route_bridge end --add a delimiter between destinations From 0e42b17dd09615e692b040d1d7f02e238016110a Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 13 Jul 2020 11:21:42 -0600 Subject: [PATCH 280/621] Destinations re-enable local --- app/destinations/destinations.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/destinations/destinations.php b/app/destinations/destinations.php index 36a4477959..3e2b5b50d3 100644 --- a/app/destinations/destinations.php +++ b/app/destinations/destinations.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2019 + Portions created by the Initial Developer are Copyright (C) 2008-2020 the Initial Developer. All Rights Reserved. Contributor(s): @@ -100,7 +100,7 @@ switch ($_GET['type']) { case 'inbound': $destination_type = 'inbound'; break; case 'outbound': $destination_type = 'outbound'; break; - //case 'local': $destination_type = 'local'; break; + case 'local': $destination_type = 'local'; break; default: $destination_type = 'inbound'; } @@ -173,7 +173,7 @@ echo "
\n"; echo button::create(['type'=>'button','label'=>$text['button-inbound'],'icon'=>'location-arrow fa-rotate-90','link'=>'?type=inbound'.($_GET['show'] == 'all' ? '&show=all' : null).($search != '' ? "&search=".urlencode($search) : null)]); echo button::create(['type'=>'button','label'=>$text['button-outbound'],'icon'=>'location-arrow','link'=>'?type=outbound'.($_GET['show'] == 'all' ? '&show=all' : null).($search != '' ? "&search=".urlencode($search) : null)]); - //echo button::create(['type'=>'button','label'=>$text['button-local'],'icon'=>'vector-square','link'=>'?type=local'.($_GET['show'] == 'all' ? '&show=all' : null).($search != '' ? "&search=".urlencode($search) : null)]); + echo button::create(['type'=>'button','label'=>$text['button-local'],'icon'=>'vector-square','link'=>'?type=local'.($_GET['show'] == 'all' ? '&show=all' : null).($search != '' ? "&search=".urlencode($search) : null)]); if (permission_exists('destination_import')) { echo button::create(['type'=>'button','label'=>$text['button-import'],'icon'=>$_SESSION['theme']['button_icon_import'],'link'=>'destination_imports.php']); } From b61d13fcf5dfda0700da8422b5e0d6629cd4e637 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 13 Jul 2020 11:22:52 -0600 Subject: [PATCH 281/621] Re-enable local destination on destination_edit.php --- app/destinations/destination_edit.php | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index b07b6efa53..d0a2947f1d 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -55,7 +55,7 @@ switch ($_GET['type']) { case 'inbound': $destination_type = 'inbound'; break; case 'outbound': $destination_type = 'outbound'; break; - //case 'local': $destination_type = 'local'; break; + case 'local': $destination_type = 'local'; break; default: $destination_type = 'inbound'; } @@ -830,7 +830,7 @@ if (strlen($destination_type) == 0) { $destination_type = 'inbound'; } if (strlen($destination_context) == 0) { $destination_context = 'public'; } if ($destination_type =="outbound") { $destination_context = $_SESSION['domain_name']; } - //if ($destination_type =="local") { $destination_context = $_SESSION['domain_name']; } + if ($destination_type =="local") { $destination_context = $_SESSION['domain_name']; } //initialize the destinations object $destination = new destinations; @@ -864,7 +864,7 @@ echo " if (document.getElementById('tr_buy')) { document.getElementById('tr_buy').style.display = 'none'; }\n"; echo " if (document.getElementById('tr_carrier')) { document.getElementById('tr_carrier').style.display = 'none'; }\n"; echo " document.getElementById('tr_account_code').style.display = 'none';\n"; -// echo " document.getElementById('destination_context').value = '".$destination_context."'"; + //echo " document.getElementById('destination_context').value = '".$destination_context."'"; echo " }\n"; echo " else if (dir == 'inbound') {\n"; echo " if (document.getElementById('tr_caller_id_name')) { document.getElementById('tr_caller_id_name').style.display = ''; }\n"; @@ -878,18 +878,18 @@ echo " document.getElementById('tr_account_code').style.display = '';\n"; echo " document.getElementById('destination_context').value = 'public'"; echo " }\n"; - //echo " else if (dir == 'local') {\n"; - //echo " if (document.getElementById('tr_caller_id_name')) { document.getElementById('tr_caller_id_name').style.display = 'none'; }\n"; - //echo " if (document.getElementById('tr_caller_id_number')) { document.getElementById('tr_caller_id_number').style.display = 'none'; }\n"; - //echo " document.getElementById('tr_actions').style.display = '';\n"; - //echo " if (document.getElementById('tr_fax_detection')) { document.getElementById('tr_fax_detection').style.display = 'none'; }\n"; - //echo " document.getElementById('tr_cid_name_prefix').style.display = 'none';\n"; - //echo " if (document.getElementById('tr_sell')) { document.getElementById('tr_sell').style.display = 'none'; }\n"; - //echo " if (document.getElementById('tr_buy')) { document.getElementById('tr_buy').style.display = 'none'; }\n"; - //echo " if (document.getElementById('tr_carrier')) { document.getElementById('tr_carrier').style.display = 'none'; }\n"; - //echo " document.getElementById('tr_account_code').style.display = '';\n"; + echo " else if (dir == 'local') {\n"; + echo " if (document.getElementById('tr_caller_id_name')) { document.getElementById('tr_caller_id_name').style.display = 'none'; }\n"; + echo " if (document.getElementById('tr_caller_id_number')) { document.getElementById('tr_caller_id_number').style.display = 'none'; }\n"; + echo " document.getElementById('tr_actions').style.display = '';\n"; + echo " if (document.getElementById('tr_fax_detection')) { document.getElementById('tr_fax_detection').style.display = 'none'; }\n"; + echo " document.getElementById('tr_cid_name_prefix').style.display = 'none';\n"; + echo " if (document.getElementById('tr_sell')) { document.getElementById('tr_sell').style.display = 'none'; }\n"; + echo " if (document.getElementById('tr_buy')) { document.getElementById('tr_buy').style.display = 'none'; }\n"; + echo " if (document.getElementById('tr_carrier')) { document.getElementById('tr_carrier').style.display = 'none'; }\n"; + echo " document.getElementById('tr_account_code').style.display = '';\n"; //echo " document.getElementById('destination_context').value = '".$destination_context."'"; - //echo " }\n"; + echo " }\n"; echo " "; echo " }\n"; echo " \n"; @@ -940,11 +940,11 @@ switch ($destination_type) { case "inbound" : $selected[0] = "selected='selected'"; break; case "outbound" : $selected[1] = "selected='selected'"; break; - //case "local" : $selected[2] = "selected='selected'"; break; + case "local" : $selected[2] = "selected='selected'"; break; } echo " \n"; echo " \n"; - //echo " \n"; + echo " \n"; unset($selected); echo " \n"; echo "
\n"; From b0b788427e2925025b28ba459013f71478cfc27a Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Mon, 13 Jul 2020 14:46:57 -0400 Subject: [PATCH 282/621] remove CDR Statistics from default menu for users (#5347) * Remove CDR stattistics from user group menu users don't have CDR statistics vier permission no need to have it in the menu * remove status from user group menu No need to have it in the default menu for the user group --- app/xml_cdr/app_menu.php | 1 - core/menu/app_menu.php | 1 - 2 files changed, 2 deletions(-) diff --git a/app/xml_cdr/app_menu.php b/app/xml_cdr/app_menu.php index c56d64dfa9..4136f15cb3 100644 --- a/app/xml_cdr/app_menu.php +++ b/app/xml_cdr/app_menu.php @@ -50,7 +50,6 @@ $apps[$x]['menu'][$y]['parent_uuid'] = "0438b504-8613-7887-c420-c837ffb20cb1"; $apps[$x]['menu'][$y]['category'] = "internal"; $apps[$x]['menu'][$y]['path'] = "/app/xml_cdr/xml_cdr_statistics.php"; - $apps[$x]['menu'][$y]['groups'][] = "user"; $apps[$x]['menu'][$y]['groups'][] = "admin"; $apps[$x]['menu'][$y]['groups'][] = "superadmin"; $y++; diff --git a/core/menu/app_menu.php b/core/menu/app_menu.php index 9ab62937c2..333336b7a3 100644 --- a/core/menu/app_menu.php +++ b/core/menu/app_menu.php @@ -142,7 +142,6 @@ $apps[$x]['menu'][$y]['icon'] = "fa-chart-bar"; $apps[$x]['menu'][$y]['path'] = ""; $apps[$x]['menu'][$y]['order'] = "25"; - $apps[$x]['menu'][$y]['groups'][] = "user"; $apps[$x]['menu'][$y]['groups'][] = "admin"; $apps[$x]['menu'][$y]['groups'][] = "superadmin"; $y++; From 5b35a041d36d2d253bb64ea5134388fc259f8552 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Mon, 13 Jul 2020 19:09:09 -0400 Subject: [PATCH 283/621] Conference recordings: remove hard-coded path (#5348) --- app/conference_centers/conference_sessions.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/app/conference_centers/conference_sessions.php b/app/conference_centers/conference_sessions.php index 0f4a9443b8..efb14e0e7f 100644 --- a/app/conference_centers/conference_sessions.php +++ b/app/conference_centers/conference_sessions.php @@ -208,16 +208,9 @@ echo " ".$end_date." \n"; echo " ".$time_difference." \n"; echo " ".escape($row['profile'])." \n"; - $tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day; - $tmp_name = ''; - if (file_exists($tmp_dir.'/'.$row['conference_session_uuid'].'.mp3')) { - $tmp_name = $row['conference_session_uuid'].".mp3"; - } - elseif (file_exists($tmp_dir.'/'.$row['conference_session_uuid'].'.wav')) { - $tmp_name = $row['conference_session_uuid'].".wav"; - } + $recording_name = $row['recording']; echo " \n"; - if (strlen($tmp_name) > 0 && file_exists($tmp_dir.'/'.$tmp_name)) { + if (strlen($recording_name) > 0 && file_exists($recording_name)) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $talking_icon = ""; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; From 22c7c4711c5635ed578e26b8836f40155e0de992 Mon Sep 17 00:00:00 2001 From: markjcrane Date: Thu, 23 Jul 2020 19:31:43 +0000 Subject: [PATCH 306/621] Modernize Access Controls --- app/access_controls/access_control_edit.php | 406 ++++++++++++------ .../access_control_node_edit.php | 279 ------------ app/access_controls/access_control_nodes.php | 197 --------- app/access_controls/access_controls.php | 139 +++--- app/access_controls/app_languages.php | 46 +- 5 files changed, 386 insertions(+), 681 deletions(-) delete mode 100644 app/access_controls/access_control_node_edit.php delete mode 100644 app/access_controls/access_control_nodes.php diff --git a/app/access_controls/access_control_edit.php b/app/access_controls/access_control_edit.php index a187cd119d..2aff1720eb 100644 --- a/app/access_controls/access_control_edit.php +++ b/app/access_controls/access_control_edit.php @@ -2,21 +2,23 @@ /* FusionPBX Version: MPL 1.1 + The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. + The Original Code is FusionPBX + The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2018 + Portions created by the Initial Developer are Copyright (C) 2018 - 2020 the Initial Developer. All Rights Reserved. - Contributor(s): - Mark J Crane */ //includes @@ -25,8 +27,12 @@ require_once "resources/check_auth.php"; //check permissions - if (!permission_exists('access_control_add') && !permission_exists('access_control_edit')) { - echo "access denied"; exit; + if (permission_exists('access_control_add') || permission_exists('access_control_edit')) { + //access granted + } + else { + echo "access denied"; + exit; } //add multi-lingual support @@ -37,131 +43,180 @@ if (is_uuid($_REQUEST["id"])) { $action = "update"; $access_control_uuid = $_REQUEST["id"]; + $id = $_REQUEST["id"]; } else { $action = "add"; } //get http post variables and set them to php variables - if (count($_POST)>0) { + if (is_array($_POST) && is_uuid($access_control_uuid)) { $access_control_name = $_POST["access_control_name"]; $access_control_default = $_POST["access_control_default"]; + $access_control_nodes = $_POST["access_control_nodes"]; $access_control_description = $_POST["access_control_description"]; } -if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { +//process the user data and save it to the database + if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { - //delete the access control - if (permission_exists('access_control_delete')) { - if ($_POST['action'] == 'delete' && is_uuid($access_control_uuid)) { - //prepare - $array[0]['checked'] = 'true'; - $array[0]['uuid'] = $access_control_uuid; - //delete - $obj = new access_controls; - $obj->delete($array); - //redirect - header('Location: access_controls.php'); + //validate the token + $token = new token; + if (!$token->validate($_SERVER['PHP_SELF'])) { + message::add($text['message-invalid_token'],'negative'); + header('Location: access_controls.php'); + exit; + } + + //process the http post data by submitted action + if ($_POST['action'] != '' && strlen($_POST['action']) > 0) { + + //prepare the array(s) + $x = 0; + foreach ($_POST['access_control_nodes'] as $row) { + if (is_uuid($row['access_control_uuid']) && $row['checked'] === 'true') { + $array['access_controls'][$x]['checked'] = $row['checked']; + $array['access_controls'][$x]['access_control_nodes'][]['access_control_node_uuid'] = $row['access_control_node_uuid']; + $x++; + } + } + + //send the array to the database class + switch ($_POST['action']) { + case 'copy': + if (permission_exists('access_control_add')) { + $obj = new database; + $obj->copy($array); + } + break; + case 'delete': + if (permission_exists('access_control_delete')) { + $obj = new database; + $obj->delete($array); + } + break; + case 'toggle': + if (permission_exists('access_control_update')) { + $obj = new database; + $obj->toggle($array); + } + break; + } + + //redirect the user + if (in_array($_POST['action'], array('copy', 'delete', 'toggle'))) { + header('Location: access_control_edit.php?id='.$id); exit; + } } - } - //get the primary key - if ($action == "update") { - $access_control_uuid = $_POST["access_control_uuid"]; - } + //check for all required data + $msg = ''; + if (strlen($access_control_name) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_name']."
\n"; } + if (strlen($access_control_default) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_default']."
\n"; } + //if (strlen($access_control_nodes) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_nodes']."
\n"; } + //if (strlen($access_control_description) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_description']."
\n"; } + if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { + require_once "resources/header.php"; + require_once "resources/persist_form_var.php"; + echo "
\n"; + echo "
\n"; From f4250bf622ff57cfc5df217100cf438ff0089109 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 13 Jul 2020 17:13:33 -0600 Subject: [PATCH 284/621] Change the description. --- app/provision/app_config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/provision/app_config.php b/app/provision/app_config.php index 8a6267c591..248bd849a3 100644 --- a/app/provision/app_config.php +++ b/app/provision/app_config.php @@ -277,7 +277,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "allow extensions to be provisioned as contacts as $extensions in provision templates"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "allow extensions to be provisioned as contacts in provision templates"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "d157078e-b363-4f34-a6d4-8a86990a40b7"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; From b88c29592e3308a2fbead61f477af1f9083d54f4 Mon Sep 17 00:00:00 2001 From: Len Date: Tue, 14 Jul 2020 11:40:15 -0400 Subject: [PATCH 285/621] Create {$mac}.xml (#5346) * Create {$mac}.xml New ATA template. Works on SPA191 and SPA192. * Rename resources/templates/provision/cisco/spa19x/{$mac}.xml to resources/templates/provision/cisco/spa194/{$mac}.xml Co-authored-by: FusionPBX --- .../provision/cisco/spa194/{$mac}.xml | 965 ++++++++++++++++++ 1 file changed, 965 insertions(+) create mode 100644 resources/templates/provision/cisco/spa194/{$mac}.xml diff --git a/resources/templates/provision/cisco/spa194/{$mac}.xml b/resources/templates/provision/cisco/spa194/{$mac}.xml new file mode 100644 index 0000000000..7638a0506f --- /dev/null +++ b/resources/templates/provision/cisco/spa194/{$mac}.xml @@ -0,0 +1,965 @@ + + + + + + + +3 + + +No + +Parametersfor ProvisioningTab + +Yes +Yes +2 + +0 +0 +30 +20 +Yes +Yes + + +Yes + +[--uid {$http_auth_username} --pwd {$http_auth_password}]http://{$domain_name}{$project_path}/app/provision/?mac=$MA +{else} +http://{$domain_name}{$project_path}/app/provision/?mac=$MA +{/if} + + + + +HTTP +$PN $MAC -- Requesting resync $SCHEME://$SERVIP:$PORT$PATH +$PN $MAC -- Successful resync $SCHEME://$SERVIP:$PORT$PATH +$PN $MAC -- Resync failed: $ERR + + + + +Yes +3600 + + +$PN $MAC -- Requesting upgrade $SCHEME://$SERVIP:$PORT$PATH +$PN $MAC -- Successful upgrade $SCHEME://$SERVIP:$PORT$PATH -- $ERR +$PN $MAC -- Upgrade failed: $ERR + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +70 +5 +2 +$VERSION +$VERSION + + + +application/dtmf-relay +application/hook-flash +Yes +No +No +Yes +Yes +ptime +5060 +5090 +No +No +PAID-RPID-FROM + + +.5 +4 +5 +32 +16 +32 +32 +32 +240 +30 +1 +7200 +30 +1200 +0 +0 +0 + + + + + + + + + + +16384 +32768 +0.020 +Yes +0 +0 +No +Yes + + +100 +101 + +2 +112 +113 +G711u +NSE +telephone-event +PCMU +PCMA +G726-32 +G729a +encaprtp + + +No +No +No +No +No +No +No +No + + + +15 +No + + + +Yes + + +No +30 + + + +Yes +Yes +$NOTIFY +$PROXY + + +0x68 +3 +0xb8 +6 +high +Yes + + +UDP +5060 +No + +Yes + +Yes +No +0 +No +4 +0 +0 +No +No +No +No +Yes +No +No + + +No + +Yes + +3 +No + + +No + + +{$domain_name} +{$account.1.outbound_proxy_primary} +{if isset ($account.1.outbound_proxy_primary)}Yes{else}No{/if} +Yes + +Yes +No +{$account.1.register_expires} +No +Yes +Yes +3600 +Normal + + +No + + +{$account.1.display_name} +{$account.1.user_id} +{$account.1.password} +No + + + + + +{$spa_call_waiting} +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +No +Yes +Yes + + +G711u +Unspecified +Unspecified +Yes +Default +Yes +No +Yes +medium +Yes +Yes +Yes +G711u +Yes +Yes +ReINVITE +Yes +Yes +Auto +No +Strict +70 +Yes +None +1 +Yes +caller or callee +No +No +No +No + + +{$spa_dial_plan} + + +Forward +Forward +Forward + + + + +Yes + + +No +30 + + + +Yes +Yes +$NOTIFY +$PROXY + + +0x68 +3 +0xb8 +6 +high +Yes + + +UDP +5061 +No + +Yes + +Yes +No +0 +No +4 +0 +0 +No +No +No +No +Yes +No +No + + +No + +Yes + +3 +No + + +No + + +{$domain_name} +{$account.2.outbound_proxy_primary} +{if isset ($account.2.outbound_proxy_primary)}Yes{else}No{/if} +Yes + +Yes +No +{$account.2.register_expires} +No +Yes +Yes +3600 +Normal + + +No + + +{$account.2.display_name} +{$account.2.user_id} +{$account.2.password} +No + + + + + +{$spa_call_waiting} +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +No +Yes +Yes + + +G711u +Unspecified +Unspecified +Yes +Default +Yes +No +Yes +medium +Yes +Yes +Yes +G711u +Yes +Yes +ReINVITE +Yes +Yes +Auto +No +Strict +70 +Yes +None +1 +Yes +caller or callee +No +No +No +No + + +{$spa_dial_plan} + + +Forward +Forward +Forward + + + + + + + +20 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Yes +No +No +No +Yes +Yes +Yes +No +No +automatic +source +media +Yes + + + + + + + + + + + + +1 +1 +8 +7 +0 +0 +New VM Available +0 +No + + + + + + +20 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Yes +No +No +No +Yes +Yes +Yes +No +No +automatic +source +media +Yes + + + + + + + + + + + + +1 +1 +8 +7 +0 +0 +New VM Available +0 +No + + + +350@-19,440@-19;10(*/0/1+2) +420@-19,520@-19;10(*/0/1+2) +420@-16;10(*/0/1) +520@-19,620@-19;10(*/0/1+2) +480@-19,620@-19;10(.5/.5/1+2) +480@-19,620@-19;10(.25/.25/1+2) +480@-10,620@0;10(.125/.125/1+2) +440@-19,480@-19;*(2/4/1+2) +440@-19,480@-19;*(1/1/1+2) +600@-16;1(.25/.25/1) +985@-16,1428@-16,1777@-16;20(.380/0/1,.380/0/2,.380/0/3,0/4/0) +914@-16,1371@-16,1777@-16;20(.274/0/1,.274/0/2,.380/0/3,0/4/0) +914@-16,1371@-16,1777@-16;20(.380/0/1,.380/0/2,.380/0/3,0/4/0) +985@-16,1371@-16,1777@-16;20(.380/0/1,.274/0/2,.380/0/3,0/4/0) +350@-19,440@-19;2(.1/.1/1+2);10(*/0/1+2) +350@-19,440@-19;2(.2/.2/1+2);10(*/0/1+2) +600@-19;*(.1/.1/1,.1/.1/1,.1/9.5/1) +350@-19;20(.1/.1/1,.1/9.7/1) +397@-19,507@-19;15(0/2/0,.2/.1/1,.1/2.1/2) +350@-16;*(.1/.1/1) + + + +60(2/4) +60(.8/.4,.8/4) +60(.4/.2,.4/.2,.8/4) +60(.3/.2,1/.2,.3/4) +1(.5/.5) +60(.2/.4,.2/.4,.2/4) +60(.4/.2,.4/.2,.4/4) +60(0.25/9.75) + + +*(.3/9.7) +30(.1/.1,.1/9.7) +30(.1/.1,.1/.1,.1/9.7) +30(.1/.1,.3/.1,.1/9.3) +1(.5/.5) +30(.1/.1,.3/.2,.3/9.1) +30(.3/.1,.3/.1,.1/9.1) +2.3(.3/2) + + +Bellcore-r1 +Bellcore-r2 +Bellcore-r3 +Bellcore-r4 +Bellcore-r5 +Bellcore-r6 +Bellcore-r7 +Bellcore-r8 + + +Trapezoid +20 +85 +440@-10 +No + + +.1 +.9 +0 +5 +1800 +30 +.5 +0 +10 +3 +2 +.5 + + +*69 +*07 +*98 +*66 +*86 +*05 +*72 +*73 +*90 +*91 +*92 +*93 +*63 +*83 +*60 +*80 +*64 +*84 +*56 +*57 +*71 +*70 +*67 +*68 +*81 +*82 +*77 +*87 +*78 +*79 +*65 +*85 +*25 +*45 +*26 +*46 +*74 +*96 +*16 +*17 +*18 +*19 + + +*99 +#99 +*03 + + + + + + + + +*017110 +*027110 +*017111 +*027111 +*0172632 +*0272632 +*01729 +*02729 + + +600 +-3 +-3 +-16 +2 +.1 +Yes +Yes +Bellcore(N.Amer,China) +bell 202 +Default + + + + +No +2 + + +0 +0 +0 + + +dh +0 +0 +0.0.0.0:0.0.0.0:0.0.0.0 +0 +0 + + + +0:5:30 +0 +0 + + +1 +0 + +64 + + + +1 +auto + + +0 + + + +ATA192-MPP + +2 + +2 + + + + +1 +192.168.15.1 +255.255.255.0 + +0 +0.0.0.0 + + + +1 +192.168.15.100 +50 +0 +8.8.4.4 +192.168.15.1 + + + +0 +0 +2001:: + + +0 +3 + + +1 +1 +0 + + + + + + + + +0 +0.0.0.0/0.0.0.0 +:: +0 +public +private +0 +v3rwuser +MD5 + +DES + +192.168.15.100 +162 +v1 + + +{$spa_time_zone} +1 +auto +0.ca.pool.ntp.org +3600 +0 +1 + + + + +0 +0.0.0.0 + +1 + +1 +1 +1 +0 + +1 +1 +1 + + +1 +1 +0 +0 +0 +0 +1 +0.0.0.0 +80 + + +0 + + + + + + +86400 +1 +0 + + +0 +200 + + +514 + +514 +15 + +0 +0 + +admin + +cisco + + +0 + + + + + From cb1b59712f533bca24e3a1b9cea91e2e53199412 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 14 Jul 2020 09:43:17 -0600 Subject: [PATCH 286/621] Rename resources/templates/provision/cisco/spa194/{$mac}.xml to resources/templates/provision/cisco/spa192/{$mac}.xml --- resources/templates/provision/cisco/{spa194 => spa192}/{$mac}.xml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename resources/templates/provision/cisco/{spa194 => spa192}/{$mac}.xml (100%) diff --git a/resources/templates/provision/cisco/spa194/{$mac}.xml b/resources/templates/provision/cisco/spa192/{$mac}.xml similarity index 100% rename from resources/templates/provision/cisco/spa194/{$mac}.xml rename to resources/templates/provision/cisco/spa192/{$mac}.xml From da6e471c2836abd58b3e22b3ed29d411ae78b583 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 14 Jul 2020 10:10:31 -0600 Subject: [PATCH 287/621] Add Cisco SPA191 template. --- .../provision/cisco/spa191/{$mac}.xml | 965 ++++++++++++++++++ 1 file changed, 965 insertions(+) create mode 100644 resources/templates/provision/cisco/spa191/{$mac}.xml diff --git a/resources/templates/provision/cisco/spa191/{$mac}.xml b/resources/templates/provision/cisco/spa191/{$mac}.xml new file mode 100644 index 0000000000..7638a0506f --- /dev/null +++ b/resources/templates/provision/cisco/spa191/{$mac}.xml @@ -0,0 +1,965 @@ + + + + + + + +3 + + +No + +Parametersfor ProvisioningTab + +Yes +Yes +2 + +0 +0 +30 +20 +Yes +Yes + + +Yes + +[--uid {$http_auth_username} --pwd {$http_auth_password}]http://{$domain_name}{$project_path}/app/provision/?mac=$MA +{else} +http://{$domain_name}{$project_path}/app/provision/?mac=$MA +{/if} + + + + +HTTP +$PN $MAC -- Requesting resync $SCHEME://$SERVIP:$PORT$PATH +$PN $MAC -- Successful resync $SCHEME://$SERVIP:$PORT$PATH +$PN $MAC -- Resync failed: $ERR + + + + +Yes +3600 + + +$PN $MAC -- Requesting upgrade $SCHEME://$SERVIP:$PORT$PATH +$PN $MAC -- Successful upgrade $SCHEME://$SERVIP:$PORT$PATH -- $ERR +$PN $MAC -- Upgrade failed: $ERR + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +70 +5 +2 +$VERSION +$VERSION + + + +application/dtmf-relay +application/hook-flash +Yes +No +No +Yes +Yes +ptime +5060 +5090 +No +No +PAID-RPID-FROM + + +.5 +4 +5 +32 +16 +32 +32 +32 +240 +30 +1 +7200 +30 +1200 +0 +0 +0 + + + + + + + + + + +16384 +32768 +0.020 +Yes +0 +0 +No +Yes + + +100 +101 + +2 +112 +113 +G711u +NSE +telephone-event +PCMU +PCMA +G726-32 +G729a +encaprtp + + +No +No +No +No +No +No +No +No + + + +15 +No + + + +Yes + + +No +30 + + + +Yes +Yes +$NOTIFY +$PROXY + + +0x68 +3 +0xb8 +6 +high +Yes + + +UDP +5060 +No + +Yes + +Yes +No +0 +No +4 +0 +0 +No +No +No +No +Yes +No +No + + +No + +Yes + +3 +No + + +No + + +{$domain_name} +{$account.1.outbound_proxy_primary} +{if isset ($account.1.outbound_proxy_primary)}Yes{else}No{/if} +Yes + +Yes +No +{$account.1.register_expires} +No +Yes +Yes +3600 +Normal + + +No + + +{$account.1.display_name} +{$account.1.user_id} +{$account.1.password} +No + + + + + +{$spa_call_waiting} +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +No +Yes +Yes + + +G711u +Unspecified +Unspecified +Yes +Default +Yes +No +Yes +medium +Yes +Yes +Yes +G711u +Yes +Yes +ReINVITE +Yes +Yes +Auto +No +Strict +70 +Yes +None +1 +Yes +caller or callee +No +No +No +No + + +{$spa_dial_plan} + + +Forward +Forward +Forward + + + + +Yes + + +No +30 + + + +Yes +Yes +$NOTIFY +$PROXY + + +0x68 +3 +0xb8 +6 +high +Yes + + +UDP +5061 +No + +Yes + +Yes +No +0 +No +4 +0 +0 +No +No +No +No +Yes +No +No + + +No + +Yes + +3 +No + + +No + + +{$domain_name} +{$account.2.outbound_proxy_primary} +{if isset ($account.2.outbound_proxy_primary)}Yes{else}No{/if} +Yes + +Yes +No +{$account.2.register_expires} +No +Yes +Yes +3600 +Normal + + +No + + +{$account.2.display_name} +{$account.2.user_id} +{$account.2.password} +No + + + + + +{$spa_call_waiting} +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +Yes +No +Yes +Yes + + +G711u +Unspecified +Unspecified +Yes +Default +Yes +No +Yes +medium +Yes +Yes +Yes +G711u +Yes +Yes +ReINVITE +Yes +Yes +Auto +No +Strict +70 +Yes +None +1 +Yes +caller or callee +No +No +No +No + + +{$spa_dial_plan} + + +Forward +Forward +Forward + + + + + + + +20 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Yes +No +No +No +Yes +Yes +Yes +No +No +automatic +source +media +Yes + + + + + + + + + + + + +1 +1 +8 +7 +0 +0 +New VM Available +0 +No + + + + + + +20 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Yes +No +No +No +Yes +Yes +Yes +No +No +automatic +source +media +Yes + + + + + + + + + + + + +1 +1 +8 +7 +0 +0 +New VM Available +0 +No + + + +350@-19,440@-19;10(*/0/1+2) +420@-19,520@-19;10(*/0/1+2) +420@-16;10(*/0/1) +520@-19,620@-19;10(*/0/1+2) +480@-19,620@-19;10(.5/.5/1+2) +480@-19,620@-19;10(.25/.25/1+2) +480@-10,620@0;10(.125/.125/1+2) +440@-19,480@-19;*(2/4/1+2) +440@-19,480@-19;*(1/1/1+2) +600@-16;1(.25/.25/1) +985@-16,1428@-16,1777@-16;20(.380/0/1,.380/0/2,.380/0/3,0/4/0) +914@-16,1371@-16,1777@-16;20(.274/0/1,.274/0/2,.380/0/3,0/4/0) +914@-16,1371@-16,1777@-16;20(.380/0/1,.380/0/2,.380/0/3,0/4/0) +985@-16,1371@-16,1777@-16;20(.380/0/1,.274/0/2,.380/0/3,0/4/0) +350@-19,440@-19;2(.1/.1/1+2);10(*/0/1+2) +350@-19,440@-19;2(.2/.2/1+2);10(*/0/1+2) +600@-19;*(.1/.1/1,.1/.1/1,.1/9.5/1) +350@-19;20(.1/.1/1,.1/9.7/1) +397@-19,507@-19;15(0/2/0,.2/.1/1,.1/2.1/2) +350@-16;*(.1/.1/1) + + + +60(2/4) +60(.8/.4,.8/4) +60(.4/.2,.4/.2,.8/4) +60(.3/.2,1/.2,.3/4) +1(.5/.5) +60(.2/.4,.2/.4,.2/4) +60(.4/.2,.4/.2,.4/4) +60(0.25/9.75) + + +*(.3/9.7) +30(.1/.1,.1/9.7) +30(.1/.1,.1/.1,.1/9.7) +30(.1/.1,.3/.1,.1/9.3) +1(.5/.5) +30(.1/.1,.3/.2,.3/9.1) +30(.3/.1,.3/.1,.1/9.1) +2.3(.3/2) + + +Bellcore-r1 +Bellcore-r2 +Bellcore-r3 +Bellcore-r4 +Bellcore-r5 +Bellcore-r6 +Bellcore-r7 +Bellcore-r8 + + +Trapezoid +20 +85 +440@-10 +No + + +.1 +.9 +0 +5 +1800 +30 +.5 +0 +10 +3 +2 +.5 + + +*69 +*07 +*98 +*66 +*86 +*05 +*72 +*73 +*90 +*91 +*92 +*93 +*63 +*83 +*60 +*80 +*64 +*84 +*56 +*57 +*71 +*70 +*67 +*68 +*81 +*82 +*77 +*87 +*78 +*79 +*65 +*85 +*25 +*45 +*26 +*46 +*74 +*96 +*16 +*17 +*18 +*19 + + +*99 +#99 +*03 + + + + + + + + +*017110 +*027110 +*017111 +*027111 +*0172632 +*0272632 +*01729 +*02729 + + +600 +-3 +-3 +-16 +2 +.1 +Yes +Yes +Bellcore(N.Amer,China) +bell 202 +Default + + + + +No +2 + + +0 +0 +0 + + +dh +0 +0 +0.0.0.0:0.0.0.0:0.0.0.0 +0 +0 + + + +0:5:30 +0 +0 + + +1 +0 + +64 + + + +1 +auto + + +0 + + + +ATA192-MPP + +2 + +2 + + + + +1 +192.168.15.1 +255.255.255.0 + +0 +0.0.0.0 + + + +1 +192.168.15.100 +50 +0 +8.8.4.4 +192.168.15.1 + + + +0 +0 +2001:: + + +0 +3 + + +1 +1 +0 + + + + + + + + +0 +0.0.0.0/0.0.0.0 +:: +0 +public +private +0 +v3rwuser +MD5 + +DES + +192.168.15.100 +162 +v1 + + +{$spa_time_zone} +1 +auto +0.ca.pool.ntp.org +3600 +0 +1 + + + + +0 +0.0.0.0 + +1 + +1 +1 +1 +0 + +1 +1 +1 + + +1 +1 +0 +0 +0 +0 +1 +0.0.0.0 +80 + + +0 + + + + + + +86400 +1 +0 + + +0 +200 + + +514 + +514 +15 + +0 +0 + +admin + +cisco + + +0 + + + + + From 3d0df8b27113f447ac47f023705b81436b7aaf6b Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Tue, 14 Jul 2020 18:24:51 -0400 Subject: [PATCH 288/621] Add voicamail_domain permission (#5349) --- app/voicemails/app_config.php | 4 ++++ app/voicemails/voicemails.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/voicemails/app_config.php b/app/voicemails/app_config.php index 1eb036b7e9..a188f20d43 100644 --- a/app/voicemails/app_config.php +++ b/app/voicemails/app_config.php @@ -63,6 +63,10 @@ $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "voicemail_domain"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $y++; $apps[$x]['permissions'][$y]['name'] = "voicemail_import"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; diff --git a/app/voicemails/voicemails.php b/app/voicemails/voicemails.php index 75b0a1f3f5..17e1c6e838 100644 --- a/app/voicemails/voicemails.php +++ b/app/voicemails/voicemails.php @@ -100,7 +100,7 @@ //prepare to page the results $sql = "select count(voicemail_uuid) from v_voicemails "; $sql .= "where domain_uuid = :domain_uuid "; - if (!permission_exists('voicemail_delete')) { + if (!permission_exists('voicemail_domain')) { if (is_array($voicemail_uuids) && @sizeof($voicemail_uuids) != 0) { $sql .= "and ("; foreach ($voicemail_uuids as $x => $row) { From 90dc96d1340ab9c9f6ed621005163615378e9138 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 14 Jul 2020 19:32:01 -0600 Subject: [PATCH 289/621] Fix the device profile key vendor for Yealink --- app/devices/device_profile_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/devices/device_profile_edit.php b/app/devices/device_profile_edit.php index 8d16ef0a5e..bbb255a263 100644 --- a/app/devices/device_profile_edit.php +++ b/app/devices/device_profile_edit.php @@ -503,7 +503,7 @@ echo " \n"; } else { - if (strtolower($row['profile_key_vendor']) == "cisco" || strtolower($row['device_key_vendor']) == "yealink") { + if (strtolower($row['profile_key_vendor']) == "cisco" || strtolower($row['profile_key_vendor']) == "yealink") { echo " \n"; echo " \n"; echo " \n"; From f357131e53853d856219eb819439d7ca7761839f Mon Sep 17 00:00:00 2001 From: chansizzle <14916599+chansizzle@users.noreply.github.com> Date: Wed, 15 Jul 2020 16:52:41 -0600 Subject: [PATCH 290/621] Update user_imports.php (#5357) start data on row 2 --- core/users/user_imports.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/users/user_imports.php b/core/users/user_imports.php index 486457b4c2..4cefe880e7 100644 --- a/core/users/user_imports.php +++ b/core/users/user_imports.php @@ -433,7 +433,7 @@ echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " ".escape($caller_id_name).$talking_icon."".escape($caller_id_number)."".escape(urldecode($caller_id_name)).$talking_icon."".escape(urldecode($caller_id_number))."".escape($join_time_formatted)."".escape($last_talking_formatted)."".$text['label-'.(($flag_has_floor == "true") ? 'yes' : 'no')]."
\n"; + echo $msg."
"; + echo "
\n"; + persistformvar($_POST); + echo "
\n"; + require_once "resources/footer.php"; + return; + } - //validate the token - $token = new token; - if (!$token->validate($_SERVER['PHP_SELF'])) { - message::add($text['message-invalid_token'],'negative'); - header('Location: access_controls.php'); - exit; - } - - //check for all required data - $msg = ''; - if (strlen($access_control_name) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_name']."
\n"; } - if (strlen($access_control_default) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_default']."
\n"; } - //if (strlen($access_control_description) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_description']."
\n"; } - if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { - require_once "resources/header.php"; - require_once "resources/persist_form_var.php"; - echo "
\n"; - echo "
\n"; - echo $msg."
"; - echo "
\n"; - persistformvar($_POST); - echo "
\n"; - require_once "resources/footer.php"; - return; - } - - //add or update the database - if ($_POST["persistformvar"] != "true") { - $execute = false; - - if ($action == "add" && permission_exists('access_control_add')) { - $execute = true; + //add the access_control_uuid + if (!is_uuid($_POST["access_control_uuid"])) { $access_control_uuid = uuid(); - - //set the message - message::add($text['message-add']); - - //set redirect url - $redirect_url = 'access_control_edit.php?id='.$access_control_uuid; } - if ($action == "update" && permission_exists('access_control_edit')) { - $execute = true; - - //set the message - message::add($text['message-update']); + //prepare the array + $array['access_controls'][0]['access_control_uuid'] = $access_control_uuid; + $array['access_controls'][0]['access_control_name'] = $access_control_name; + $array['access_controls'][0]['access_control_default'] = $access_control_default; + $array['access_controls'][0]['access_control_description'] = $access_control_description; + $y = 0; + if (is_array($access_control_nodes)) { + foreach ($access_control_nodes as $row) { + if (strlen($row['node_type']) > 0) { + $array['access_controls'][0]['access_control_nodes'][$y]['access_control_node_uuid'] = $row["access_control_node_uuid"]; + $array['access_controls'][0]['access_control_nodes'][$y]['node_type'] = $row["node_type"]; + $array['access_controls'][0]['access_control_nodes'][$y]['node_cidr'] = $row["node_cidr"]; + $array['access_controls'][0]['access_control_nodes'][$y]['node_domain'] = $row["node_domain"]; + $array['access_controls'][0]['access_control_nodes'][$y]['node_description'] = $row["node_description"]; + if (isset($row["checked"])) { + $array['access_controls'][0]['access_control_nodes'][$y]['checked'] = $row["checked"]; + } + $y++; + } + } } - if ($execute) { - $array['access_controls'][0]['access_control_uuid'] = $access_control_uuid; - $array['access_controls'][0]['access_control_name'] = $access_control_name; - $array['access_controls'][0]['access_control_default'] = $access_control_default; - $array['access_controls'][0]['access_control_description'] = $access_control_description; - $database = new database; - $database->app_name = 'access_control'; - $database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd'; - $database->save($array); - unset($array); + //save the data + $database = new database; + $database->app_name = 'access controls'; + $database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd'; + $database->save($array); - //clear the cache - $cache = new cache; - $cache->delete("configuration:acl.conf"); - - //create the event socket connection - $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); - if ($fp) { event_socket_request($fp, "api reloadacl"); } + //redirect the user + if (isset($action)) { + if ($action == "add") { + $_SESSION["message"] = $text['message-add']; + } + if ($action == "update") { + $_SESSION["message"] = $text['message-update']; + } + //header('Location: access_controls.php'); + header('Location: access_control_edit.php?id='.urlencode($access_control_uuid)); + return; } - - //redirect the user - header('Location: '.($redirect_url ? $redirect_url : 'access_controls.php')); - exit; - } - -} + } //pre-populate the form - if (count($_GET) > 0 && $_POST["persistformvar"] != "true" && is_uuid($_GET["id"])) { - $access_control_uuid = $_GET["id"]; + if (is_array($_GET) && $_POST["persistformvar"] != "true") { $sql = "select * from v_access_controls "; $sql .= "where access_control_uuid = :access_control_uuid "; $parameters['access_control_uuid'] = $access_control_uuid; $database = new database; $row = $database->select($sql, $parameters, 'row'); - if (is_array($row) && sizeof($row)) { + if (is_array($row) && @sizeof($row) != 0) { $access_control_name = $row["access_control_name"]; $access_control_default = $row["access_control_default"]; + $access_control_nodes = $row["access_control_nodes"]; $access_control_description = $row["access_control_description"]; } - unset ($sql, $parameters, $row); + unset($sql, $parameters, $row); } +//get the child data + if (is_uuid($access_control_uuid)) { + $sql = "select * from v_access_control_nodes "; + $sql .= "where access_control_uuid = :access_control_uuid "; + $sql .= "order by node_cidr asc"; + $parameters['access_control_uuid'] = $access_control_uuid; + $database = new database; + $access_control_nodes = $database->select($sql, $parameters, 'all'); + unset ($sql, $parameters); + } + +//add the $access_control_node_uuid + if (!is_uuid($access_control_node_uuid)) { + $access_control_node_uuid = uuid(); + } + +//add an empty row + $x = is_array($access_control_nodes) ? count($access_control_nodes) : 0; + $access_control_nodes[$x]['access_control_uuid'] = $access_control_uuid; + $access_control_nodes[$x]['access_control_node_uuid'] = uuid(); + $access_control_nodes[$x]['node_type'] = ''; + $access_control_nodes[$x]['node_cidr'] = ''; + $access_control_nodes[$x]['node_domain'] = ''; + $access_control_nodes[$x]['node_description'] = ''; + //create token $object = new token; $token = $object->create($_SERVER['PHP_SELF']); @@ -171,67 +226,162 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { require_once "resources/header.php"; //show the content - echo "
\n"; + echo "\n"; + echo "\n"; echo "
\n"; echo "
".$text['title-access_control']."
\n"; echo "
\n"; - echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','collapse'=>'hide-xs','link'=>'access_controls.php']); - if ($action == 'update' && permission_exists('access_control_delete')) { - echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete_access_control','collapse'=>'hide-xs','style'=>'margin-right: 15px;','onclick'=>"modal_open('modal-delete-access-control','btn_delete_access_control');"]); + echo " \n"; + if ($action == 'update') { + if (permission_exists('access_control_node_add')) { + echo " \n"; + } + if (permission_exists('access_control_node_delete')) { + echo " \n"; + } } - echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','collapse'=>'hide-xs']); + echo " \n"; + echo "

\n"; echo "
\n"; - echo "
\n"; echo "
\n"; - if ($action == 'update' && permission_exists('access_control_delete')) { - echo modal::create(['id'=>'modal-delete-access-control','type'=>'delete','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete_access_control','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'delete','onclick'=>"modal_close();"])]); + echo "
".$text['description-access_controls']."
\n"; + echo "
\n"; + + if ($action == 'update') { + if (permission_exists('access_control_add')) { + echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'copy','onclick'=>"modal_close();"])]); + } + if (permission_exists('access_control_delete')) { + echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'delete','onclick'=>"modal_close();"])]); + } } - echo "\n"; + echo "
\n"; echo "\n"; - echo "\n"; - echo "\n"; echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; - echo "\n"; @@ -240,18 +390,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; + echo "\n"; echo " ".$text['label-access_control_name']."\n"; echo "\n"; - echo " \n"; + echo "\n"; + echo " \n"; echo "
\n"; echo $text['description-access_control_name']."\n"; echo "
\n"; + echo "\n"; echo " ".$text['label-access_control_default']."\n"; echo "\n"; - echo " \n"; + echo "\n"; + echo " \n"; echo "
\n"; echo $text['description-access_control_default']."\n"; echo "
\n"; + echo " ".$text['label-access_control_nodes']."\n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + if (is_array($access_control_nodes) && @sizeof($access_control_nodes) > 1 && permission_exists('access_control_node_delete')) { + echo " \n"; + } + echo " \n"; + $x = 0; + foreach($access_control_nodes as $row) { + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + if (is_array($access_control_nodes) && @sizeof($access_control_nodes) > 1 && permission_exists('access_control_node_delete')) { + if (is_uuid($row['access_control_node_uuid'])) { + echo " \n"; + } + else { + echo " \n"; + } + } + echo " \n"; + $x++; + } + echo "
".$text['label-node_type']."".$text['label-node_cidr']."".$text['label-node_domain']."".$text['label-node_description']."\n"; + echo " ".$text['label-action']."\n"; + echo " \n"; + echo "
\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo "
\n"; + echo $text['description-node_description']."\n"; + echo "
\n"; echo " ".$text['label-access_control_description']."\n"; echo "\n"; - echo " \n"; + echo "\n"; + echo " \n"; echo "
\n"; echo $text['description-access_control_description']."\n"; echo "
"; echo "

"; - if ($action == "update") { - echo "\n"; - } echo "\n"; echo "
"; - if ($action == "update") { - require "access_control_nodes.php"; - echo "

"; - } - //include the footer require_once "resources/footer.php"; diff --git a/app/access_controls/access_control_node_edit.php b/app/access_controls/access_control_node_edit.php deleted file mode 100644 index 277df3fb18..0000000000 --- a/app/access_controls/access_control_node_edit.php +++ /dev/null @@ -1,279 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2018 - the Initial Developer. All Rights Reserved. - Contributor(s): - Mark J Crane -*/ - -//includes - require_once "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (!permission_exists('access_control_node_add') && !permission_exists('access_control_node_edit')) { - echo "access denied"; exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//action add or update - if (is_uuid($_REQUEST["id"])) { - $action = "update"; - $access_control_node_uuid = $_REQUEST["id"]; - } - else { - $action = "add"; - } - -//set the parent uuid - if (is_uuid($_GET["access_control_uuid"])) { - $access_control_uuid = $_GET["access_control_uuid"]; - } - -//get http post variables and set them to php variables - if (count($_POST)>0) { - $node_type = $_POST["node_type"]; - $node_cidr = $_POST["node_cidr"]; - $node_domain = $_POST["node_domain"]; - $node_description = $_POST["node_description"]; - } - -if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { - - //get the uuid - if ($action == "update" && is_uuid($_POST["access_control_node_uuid"])) { - $access_control_node_uuid = $_POST["access_control_node_uuid"]; - } - - //validate the token - $token = new token; - if (!$token->validate($_SERVER['PHP_SELF'])) { - message::add($text['message-invalid_token'],'negative'); - header('Location: access_controls.php'); - exit; - } - - //check for all required data - $msg = ''; - if (strlen($node_type) == 0) { $msg .= $text['message-required']." ".$text['label-node_type']."
\n"; } - //if (strlen($node_cidr) == 0) { $msg .= $text['message-required']." ".$text['label-node_cidr']."
\n"; } - //if (strlen($node_domain) == 0) { $msg .= $text['message-required']." ".$text['label-node_domain']."
\n"; } - //if (strlen($node_description) == 0) { $msg .= $text['message-required']." ".$text['label-node_description']."
\n"; } - - // check IPv4 and IPv6 CIDR notation - $pattern4 = '/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$/'; - $pattern6 = '/^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*(\/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))$/'; - - if ($node_cidr != '' && (preg_match($pattern4, $node_cidr) == 0) && (preg_match($pattern6, $node_cidr) == 0)) { - $msg .= $text['message-required']." ".$text['label-node_cidr']."
\n"; - } - - if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { - require_once "resources/header.php"; - require_once "resources/persist_form_var.php"; - echo "
\n"; - echo "
\n"; - echo $msg."
"; - echo "
\n"; - persistformvar($_POST); - echo "
\n"; - require_once "resources/footer.php"; - return; - } - - //add or update the database - if ($_POST["persistformvar"] != "true") { - if ($action == "add" && permission_exists('access_control_node_add')) { - - //insert - $array['access_control_nodes'][0]['access_control_node_uuid'] = uuid(); - $array['access_control_nodes'][0]['access_control_uuid'] = $access_control_uuid; - $array['access_control_nodes'][0]['node_type'] = $node_type; - $array['access_control_nodes'][0]['node_cidr'] = $node_cidr; - $array['access_control_nodes'][0]['node_domain'] = $node_domain; - $array['access_control_nodes'][0]['node_description'] = $node_description; - $database = new database; - $database->app_name = 'access_controls'; - $database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd'; - $database->save($array); - unset($array); - - //clear the cache - $cache = new cache; - $cache->delete("configuration:acl.conf"); - - //create the event socket connection - $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); - if ($fp) { event_socket_request($fp, "api reloadacl"); } - - //add the message - message::add($text['message-add']); - - //redirect the browser - header('Location: access_control_edit.php?id='.escape($access_control_uuid)); - return; - - } //if ($action == "add") - - if ($action == "update" && permission_exists('access_control_node_edit')) { - - //update - $array['access_control_nodes'][0]['access_control_node_uuid'] = $access_control_node_uuid; - $array['access_control_nodes'][0]['access_control_uuid'] = $access_control_uuid; - $array['access_control_nodes'][0]['node_type'] = $node_type; - $array['access_control_nodes'][0]['node_cidr'] = $node_cidr; - $array['access_control_nodes'][0]['node_domain'] = $node_domain; - $array['access_control_nodes'][0]['node_description'] = $node_description; - $database = new database; - $database->app_name = 'access_controls'; - $database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd'; - $database->save($array); - unset($array); - - //clear the cache - $cache = new cache; - $cache->delete("configuration:acl.conf"); - - //create the event socket connection - $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); - if ($fp) { event_socket_request($fp, "api reloadacl"); } - - //add the message - message::add($text['message-update']); - - //redirect the browser - header('Location: access_control_edit.php?id='.escape($access_control_uuid)); - return; - - } //if ($action == "update") - } //if ($_POST["persistformvar"] != "true") -} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) - -//pre-populate the form - if (count($_GET) > 0 && $_POST["persistformvar"] != "true" && is_uuid($_GET["id"])) { - $access_control_node_uuid = $_GET["id"]; - $sql = "select * from v_access_control_nodes "; - $sql .= "where access_control_node_uuid = :access_control_node_uuid "; - $parameters['access_control_node_uuid'] = $access_control_node_uuid; - $database = new database; - $row = $database->select($sql, $parameters, 'row'); - if (is_array($row) && sizeof($row) != 0) { - $node_type = $row["node_type"]; - $node_cidr = $row["node_cidr"]; - $node_domain = $row["node_domain"]; - $node_description = $row["node_description"]; - } - unset($sql, $parameters, $row); - } - -//create token - $object = new token; - $token = $object->create($_SERVER['PHP_SELF']); - -//show the header - $document['title'] = $text['title-access_control_node']; - require_once "resources/header.php"; - -//show the content - echo "
\n"; - - echo "
\n"; - echo "
".$text['title-access_control_node']."
\n"; - echo "
\n"; - echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'access_control_edit.php?id='.urlencode($access_control_uuid)]); - echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save']); - echo "
\n"; - echo "
\n"; - echo "
\n"; - - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "
\n"; - echo " ".$text['label-node_type']."\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-node_type']."\n"; - echo "
\n"; - echo " ".$text['label-node_cidr']."\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-node_cidr']."\n"; - echo "
\n"; - echo " ".$text['label-node_domain']."\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-node_domain']."\n"; - echo "
\n"; - echo " ".$text['label-node_description']."\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-node_description']."\n"; - echo "
"; - echo "

"; - - echo "\n"; - if ($action == "update") { - echo "\n"; - } - echo "\n"; - - echo "
"; - -//include the footer - require_once "resources/footer.php"; - -?> \ No newline at end of file diff --git a/app/access_controls/access_control_nodes.php b/app/access_controls/access_control_nodes.php deleted file mode 100644 index 364dbc4180..0000000000 --- a/app/access_controls/access_control_nodes.php +++ /dev/null @@ -1,197 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2019 - the Initial Developer. All Rights Reserved. - Contributor(s): - Mark J Crane -*/ - -//includes - require_once "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - require_once "resources/paging.php"; - -//check permissions - if (!permission_exists('access_control_node_view')) { - echo "access denied"; - exit; - } - -//get the http post data - if ($_POST['action'] != '') { - $action = $_POST['action']; - $access_control_uuid = $_POST['access_control_uuid']; - $access_control_nodes = $_POST['access_control_nodes']; - - //process the http post data by action - if (is_array($access_control_nodes) && @sizeof($access_control_nodes) != 0) { - switch ($action) { - case 'delete': - if (permission_exists('access_control_node_delete')) { - $obj = new access_controls; - $obj->delete_nodes($access_control_nodes); - } - break; - } - } - - //redirect - header('Location: access_control_edit.php?id='.urlencode($access_control_uuid)); - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//get variables used to control the order - $order_by = $_GET["order_by"]; - $order = $_GET["order"]; - -//prepare to page the results - $sql = "select count(*) from v_access_control_nodes "; - $sql .= "where access_control_uuid = :access_control_uuid "; - $parameters['access_control_uuid'] = $access_control_uuid; - $database = new database; - $num_rows = $database->select($sql, $parameters, 'column'); - -//prepare to page the results - $rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; - $param = "&id=".escape($access_control_uuid); - if (isset($_GET['page'])) { - $page = $_GET['page']; - if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } - list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page); - $offset = $rows_per_page * $page; - } - -//get the list - $sql = "select * from v_access_control_nodes "; - $sql .= "where access_control_uuid = :access_control_uuid "; - $sql .= order_by($order_by, $order); - $sql .= limit_offset($rows_per_page, $offset); - $parameters['access_control_uuid'] = $access_control_uuid; - $database = new database; - $access_control_nodes = $database->select($sql, $parameters); - -//create token - $object = new token; - $token = $object->create('/app/access_controls/access_control_nodes.php'); - -//show the content - echo "
\n"; - echo "\n"; - echo "\n"; - - echo "
\n"; - echo "
".$text['title-access_control_nodes']." (".$num_rows.")
\n"; - echo "
\n"; - echo button::create(['type'=>'button','id'=>'action_bar_sub_button_back','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'collapse'=>'hide-xs','style'=>'margin-right: 15px; display: none;','link'=>'access_controls.php']); - if (permission_exists('access_control_node_add')) { - echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','collapse'=>'hide-xs','link'=>'access_control_node_edit.php?access_control_uuid='.urlencode($_GET['id'])]); - } - if (permission_exists('access_control_node_delete') && $access_control_nodes) { - echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','collapse'=>'hide-xs','onclick'=>"modal_open('modal-delete-access-control-node','btn_delete_access_control_node');"]); - } - echo "
\n"; - echo "
\n"; - echo "
\n"; - - if (permission_exists('access_control_node_delete') && $access_control_nodes) { - echo modal::create(['id'=>'modal-delete-access-control-node','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete_access_control_node','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]); - } - - echo "\n"; - echo "\n"; - if (permission_exists('access_control_node_delete')) { - echo " \n"; - } - echo th_order_by('node_type', $text['label-node_type'], $order_by, $order); - echo th_order_by('node_cidr', $text['label-node_cidr'], $order_by, $order); - echo th_order_by('node_domain', $text['label-node_domain'], $order_by, $order); - echo th_order_by('node_description', $text['label-node_description'], $order_by, $order, null, "class='hide-sm-dn'"); - if (permission_exists('access_control_node_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { - echo " \n"; - } - echo "\n"; - - if (is_array($access_control_nodes) && @sizeof($access_control_nodes) != 0) { - $x = 0; - foreach ($access_control_nodes as $row) { - if (permission_exists('access_control_node_edit')) { - $list_row_url = 'access_control_node_edit.php?access_control_uuid='.urlencode($row['access_control_uuid'])."&id=".urlencode($row['access_control_node_uuid']); - } - echo "\n"; - if (permission_exists('access_control_node_delete')) { - echo " \n"; - } - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - if (permission_exists('access_control_node_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { - echo " \n"; - } - echo "\n"; - $x++; - } - unset($access_control_nodes); - } - - echo "
\n"; - echo " \n"; - echo "  
\n"; - echo " \n"; - echo " \n"; - echo " ".escape($row['node_type'])." \n"; - if (permission_exists('access_control_node_edit')) { - echo " ".escape($row['node_cidr'])."\n"; - } - else { - echo " ".escape($row['node_cidr']); - } - echo " ".escape($row['node_domain'])." ".escape($row['node_description'])." \n"; - echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]); - echo "
\n"; - echo "
\n"; - - echo "\n"; - echo "
\n"; - -//make sub action bar sticky - echo "\n"; - -//include the footer - require_once "resources/footer.php"; - -?> \ No newline at end of file diff --git a/app/access_controls/access_controls.php b/app/access_controls/access_controls.php index 9784ab4449..e5b3fceb07 100644 --- a/app/access_controls/access_controls.php +++ b/app/access_controls/access_controls.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2018 + Portions created by the Initial Developer are Copyright (C) 2018 - 2020 the Initial Developer. All Rights Reserved. Contributor(s): @@ -28,18 +28,21 @@ require_once "root.php"; require_once "resources/require.php"; require_once "resources/check_auth.php"; - require_once "resources/paging.php"; //check permissions - if (!permission_exists('access_control_view')) { - echo "access denied"; exit; + if (permission_exists('access_control_view')) { + //access granted + } + else { + echo "access denied"; + exit; } //add multi-lingual support $language = new text; $text = $language->get(); -//get posted data +//get the http post data if (is_array($_POST['access_controls'])) { $action = $_POST['action']; $search = $_POST['search']; @@ -48,60 +51,89 @@ //process the http post data by action if ($action != '' && is_array($access_controls) && @sizeof($access_controls) != 0) { + + //validate the token + $token = new token; + if (!$token->validate($_SERVER['PHP_SELF'])) { + message::add($text['message-invalid_token'],'negative'); + header('Location: access_controls.php'); + exit; + } + + //prepare the array + foreach($access_controls as $row) { + $array['access_controls'][$x]['checked'] = $row['checked']; + $array['access_controls'][$x]['access_control_uuid'] = $row['access_control_uuid']; + $x++; + } + + //prepare the database object + $database = new database; + $database->app_name = 'access_controls'; + $database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd'; + + //send the array to the database class switch ($action) { case 'copy': if (permission_exists('access_control_add')) { - $obj = new access_controls; - $obj->copy($access_controls); + $database->copy($array); + } + break; + case 'toggle': + if (permission_exists('access_control_edit')) { + $database->toggle($array); } break; case 'delete': if (permission_exists('access_control_delete')) { - $obj = new access_controls; - $obj->delete($access_controls); + $database->delete($array); } break; } + //redirect the user header('Location: access_controls.php'.($search != '' ? '?search='.urlencode($search) : null)); exit; } -//get variables used to control the order +//get order and order by $order_by = $_GET["order_by"]; $order = $_GET["order"]; -//add the search term - $search = strtolower($_GET["search"]); - if (strlen($search) > 0) { - $sql_search = " ("; - $sql_search .= "lower(access_control_name) like :search "; - $sql_search .= "or lower(access_control_default) like :search "; - $sql_search .= "or lower(access_control_description) like :search "; - $sql_search .= ") "; +//add the search + if (isset($_GET["search"])) { + $search = strtolower($_GET["search"]); $parameters['search'] = '%'.$search.'%'; } -//prepare to page the results - $sql = "select count(*) from v_access_controls "; - if (isset($sql_search)) { - $sql .= "where ".$sql_search; +//get the count + $sql = "select count(access_control_uuid) "; + $sql .= "from v_access_controls "; + if (isset($_GET["search"])) { + $sql .= "where ("; + $sql .= " lower(access_control_name) like :search "; + $sql .= " or lower(access_control_default) like :search "; + $sql .= " or lower(access_control_description) like :search "; + $sql .= ") "; } $database = new database; $num_rows = $database->select($sql, $parameters, 'column'); -//prepare to page the results - $rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; - $param = "&search=".$search; - $page = $_GET['page']; - if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } - list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page); - list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true); - $offset = $rows_per_page * $page; - //get the list - $sql = str_replace('count(*)', '*', $sql); - $sql .= order_by($order_by, $order); + $sql = "select "; + $sql .= "access_control_uuid, "; + $sql .= "access_control_name, "; + $sql .= "access_control_default, "; + $sql .= "access_control_description "; + $sql .= "from v_access_controls "; + if (isset($_GET["search"])) { + $sql .= "where ("; + $sql .= " lower(access_control_name) like :search "; + $sql .= " or lower(access_control_default) like :search "; + $sql .= " or lower(access_control_description) like :search "; + $sql .= ") "; + } + $sql .= order_by($order_by, $order, 'access_control_name', 'asc'); $sql .= limit_offset($rows_per_page, $offset); $database = new database; $access_controls = $database->select($sql, $parameters, 'all'); @@ -111,7 +143,7 @@ $object = new token; $token = $object->create($_SERVER['PHP_SELF']); -//include the header +//additional includes $document['title'] = $text['title-access_controls']; require_once "resources/header.php"; @@ -120,20 +152,20 @@ echo "
".$text['title-access_controls']." (".$num_rows.")
\n"; echo "
\n"; if (permission_exists('access_control_add')) { - echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','link'=>'access_control_edit.php']); + echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','name'=>'btn_add','link'=>'access_control_edit.php']); } if (permission_exists('access_control_add') && $access_controls) { - echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'name'=>'btn_copy','onclick'=>"modal_open('modal-copy','btn_copy');"]); + echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','name'=>'btn_copy','style'=>'display:none;','onclick'=>"modal_open('modal-copy','btn_copy');"]); } if (permission_exists('access_control_delete') && $access_controls) { - echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','onclick'=>"modal_open('modal-delete','btn_delete');"]); + echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'display:none;','onclick'=>"modal_open('modal-delete','btn_delete');"]); } echo "\n"; echo "
\n"; @@ -147,7 +179,7 @@ echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]); } - echo $text['description-access_control']."\n"; + echo $text['description-access_controls']."\n"; echo "

\n"; echo "
\n"; @@ -156,37 +188,44 @@ echo "\n"; echo "\n"; - if (permission_exists('access_control_add') || permission_exists('access_control_delete')) { + if (permission_exists('access_control_add') || permission_exists('access_control_edit') || permission_exists('access_control_delete')) { echo " \n"; } echo th_order_by('access_control_name', $text['label-access_control_name'], $order_by, $order); echo th_order_by('access_control_default', $text['label-access_control_default'], $order_by, $order); - echo th_order_by('access_control_description', $text['label-access_control_description'], $order_by, $order, null, "class='hide-xs'"); + echo " \n"; if (permission_exists('access_control_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { echo " \n"; } echo "\n"; - if (is_array($access_controls)) { + if (is_array($access_controls) && @sizeof($access_controls) != 0) { $x = 0; - foreach($access_controls as $row) { + foreach ($access_controls as $row) { if (permission_exists('access_control_edit')) { $list_row_url = "access_control_edit.php?id=".urlencode($row['access_control_uuid']); } echo "\n"; - if (permission_exists('access_control_add') || permission_exists('access_control_delete')) { + if (permission_exists('access_control_add') || permission_exists('access_control_edit') || permission_exists('access_control_delete')) { echo " \n"; } - echo " \n"; + echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; if (permission_exists('access_control_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { - echo " \n"; } diff --git a/app/access_controls/app_languages.php b/app/access_controls/app_languages.php index f8e868b695..7392d7be2c 100644 --- a/app/access_controls/app_languages.php +++ b/app/access_controls/app_languages.php @@ -85,6 +85,27 @@ $text['title-access_control']['ru-ru'] = "Управление доступом" $text['title-access_control']['sv-se'] = "Åtkomstkontroll"; $text['title-access_control']['uk-ua'] = "Управління доступом"; +$text['description-access_controls']['en-us'] = "Access control list can allow or deny ranges of IP addresses."; +$text['description-access_controls']['en-gb'] = "Access control list can allow or deny ranges of IP addresses."; +$text['description-access_controls']['ar-eg'] = "قائمة التحكم بالوصول يمكن السماح أو الرفض نطاقات العناوين."; +$text['description-access_controls']['de-at'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; //copied from de-de +$text['description-access_controls']['de-ch'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; //copied from de-de +$text['description-access_controls']['de-de'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; +$text['description-access_controls']['es-cl'] = " Lista de control de acceso puede permitir o denegar los rangos de direcciones IP."; +$text['description-access_controls']['es-mx'] = " Lista de control de acceso puede permitir o denegar los rangos de direcciones IP."; //copied from es-cl +$text['description-access_controls']['fr-ca'] = " Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP."; //copied from fr-fr +$text['description-access_controls']['fr-fr'] = " Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP."; +$text['description-access_controls']['he-il'] = " רשימת בקרת גישה יכולה לאפשר או למנוע טווחים של כתובות IP."; +$text['description-access_controls']['it-it'] = "Le liste per il controllo di accesso permettono o negano l'accesso a range di IP."; +$text['description-access_controls']['nl-nl'] = "Toegang Controle lijst kan IP adres reeks toestaan of verbieden."; +$text['description-access_controls']['pl-pl'] = "Lista kontroli dostępu może umożliwić lub zablokować zakresy adresów IP."; +$text['description-access_controls']['pt-br'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP."; //copied from pt-pt +$text['description-access_controls']['pt-pt'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP."; +$text['description-access_controls']['ro-ro'] = "Lista de control al accesului poate permite sau refuza intervale de adrese IP."; +$text['description-access_controls']['ru-ru'] = "Контроль доступа может разрешить или запретить диапазоны IP адресов."; +$text['description-access_controls']['sv-se'] = "Åtkomstkontrollista kan tillåta eller neka intervall av IP-adresser."; +$text['description-access_controls']['uk-ua'] = "Список контролю доступу може дозволити або заборонити діапазони IP-адрес."; + $text['label-node_type']['en-us'] = "Type"; $text['label-node_type']['en-gb'] = "Type"; $text['label-node_type']['ar-eg'] = "اكتب"; @@ -419,27 +440,6 @@ $text['description-access_control_default']['pt-pt'] = "Selecione o tipo de padr $text['description-access_control_default']['ro-ro'] = "Selectați tipul implicit."; $text['description-access_control_default']['ru-ru'] = "Выберите тип по умолчанию."; $text['description-access_control_default']['sv-se'] = "Välj standardtypen."; -$text['description-access_control_default']['uk-ua'] = "Вибір типу за замовчуванням."; +$text['description-access_control_default']['uk-ua'] = "Вибір типу за замовчуванням.";= -$text['description-access_control']['en-us'] = "Access control list can allow or deny ranges of IP addresses."; -$text['description-access_control']['en-gb'] = "Access control list can allow or deny ranges of IP addresses."; -$text['description-access_control']['ar-eg'] = "قائمة التحكم بالوصول يمكن السماح أو الرفض نطاقات العناوين."; -$text['description-access_control']['de-at'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; //copied from de-de -$text['description-access_control']['de-ch'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; //copied from de-de -$text['description-access_control']['de-de'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; -$text['description-access_control']['es-cl'] = " Lista de control de acceso puede permitir o denegar los rangos de direcciones IP."; -$text['description-access_control']['es-mx'] = " Lista de control de acceso puede permitir o denegar los rangos de direcciones IP."; //copied from es-cl -$text['description-access_control']['fr-ca'] = " Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP."; //copied from fr-fr -$text['description-access_control']['fr-fr'] = " Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP."; -$text['description-access_control']['he-il'] = " רשימת בקרת גישה יכולה לאפשר או למנוע טווחים של כתובות IP."; -$text['description-access_control']['it-it'] = "Le liste per il controllo di accesso permettono o negano l'accesso a range di IP."; -$text['description-access_control']['nl-nl'] = "Toegang Controle lijst kan IP adres reeks toestaan of verbieden."; -$text['description-access_control']['pl-pl'] = "Lista kontroli dostępu może umożliwić lub zablokować zakresy adresów IP."; -$text['description-access_control']['pt-br'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP."; //copied from pt-pt -$text['description-access_control']['pt-pt'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP."; -$text['description-access_control']['ro-ro'] = "Lista de control al accesului poate permite sau refuza intervale de adrese IP."; -$text['description-access_control']['ru-ru'] = "Контроль доступа может разрешить или запретить диапазоны IP адресов."; -$text['description-access_control']['sv-se'] = "Åtkomstkontrollista kan tillåta eller neka intervall av IP-adresser."; -$text['description-access_control']['uk-ua'] = "Список контролю доступу може дозволити або заборонити діапазони IP-адрес."; - -?> +?> \ No newline at end of file From 3076142659793277c2ddac35915b2df10a976030 Mon Sep 17 00:00:00 2001 From: markjcrane Date: Thu, 23 Jul 2020 19:36:42 +0000 Subject: [PATCH 307/621] Fix the syntax --- app/access_controls/app_languages.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/access_controls/app_languages.php b/app/access_controls/app_languages.php index 7392d7be2c..e943cbb722 100644 --- a/app/access_controls/app_languages.php +++ b/app/access_controls/app_languages.php @@ -440,6 +440,6 @@ $text['description-access_control_default']['pt-pt'] = "Selecione o tipo de padr $text['description-access_control_default']['ro-ro'] = "Selectați tipul implicit."; $text['description-access_control_default']['ru-ru'] = "Выберите тип по умолчанию."; $text['description-access_control_default']['sv-se'] = "Välj standardtypen."; -$text['description-access_control_default']['uk-ua'] = "Вибір типу за замовчуванням.";= +$text['description-access_control_default']['uk-ua'] = "Вибір типу за замовчуванням."; ?> \ No newline at end of file From c3e2b0bbbb8f141ef640ed143922b3c065e416dd Mon Sep 17 00:00:00 2001 From: markjcrane Date: Thu, 23 Jul 2020 19:46:39 +0000 Subject: [PATCH 308/621] Disable the copy button for now --- app/access_controls/access_control_edit.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/access_controls/access_control_edit.php b/app/access_controls/access_control_edit.php index 2aff1720eb..46930cc1a6 100644 --- a/app/access_controls/access_control_edit.php +++ b/app/access_controls/access_control_edit.php @@ -237,12 +237,14 @@ echo " ".$text['button-back']."\n"; echo " \n"; if ($action == 'update') { - if (permission_exists('access_control_node_add')) { - echo " \n"; - } + //if (permission_exists('access_control_node_add')) { + // echo " \n"; + //} if (permission_exists('access_control_node_delete')) { echo " \n"; if ($action == 'update') { //if (permission_exists('access_control_node_add')) { - // echo " \n"; //} From 8c8d07f10cc049cdee271beaee5e2b5a5add9192 Mon Sep 17 00:00:00 2001 From: markjcrane Date: Thu, 23 Jul 2020 19:57:07 +0000 Subject: [PATCH 310/621] Add reloadacl and flush cache --- app/access_controls/access_control_edit.php | 23 ++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/app/access_controls/access_control_edit.php b/app/access_controls/access_control_edit.php index 3dc34d36d2..69d8c41853 100644 --- a/app/access_controls/access_control_edit.php +++ b/app/access_controls/access_control_edit.php @@ -103,8 +103,19 @@ break; } - //redirect the user + //clear the cache, reloadacl and redirect the user if (in_array($_POST['action'], array('copy', 'delete', 'toggle'))) { + //clear the cache + $cache = new cache; + $cache->delete("configuration:acl.conf"); + + //create the event socket connection + $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); + if ($fp) { + event_socket_request($fp, "api reloadacl"); + } + + //redirect the user header('Location: access_control_edit.php?id='.$id); exit; } @@ -162,6 +173,16 @@ $database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd'; $database->save($array); + //clear the cache + $cache = new cache; + $cache->delete("configuration:acl.conf"); + + //create the event socket connection + $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); + if ($fp) { + event_socket_request($fp, "api reloadacl"); + } + //redirect the user if (isset($action)) { if ($action == "add") { From c7554ad41f6d40c293bbf2fa509c285b5abd8a37 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 23 Jul 2020 18:41:22 -0600 Subject: [PATCH 311/621] Access Control - Edit: Fix header. --- app/access_controls/access_control_edit.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/access_controls/access_control_edit.php b/app/access_controls/access_control_edit.php index 69d8c41853..52003dc798 100644 --- a/app/access_controls/access_control_edit.php +++ b/app/access_controls/access_control_edit.php @@ -247,7 +247,7 @@ require_once "resources/header.php"; //show the content - echo "\n"; + echo "\n"; echo "\n"; echo "
\n"; @@ -275,12 +275,12 @@ echo " \n"; echo " ".$text['button-save']."\n"; echo " \n"; - echo "

\n"; echo "
\n"; + echo "
\n"; echo "\n"; - echo "
".$text['description-access_controls']."
\n"; - echo "
\n"; + echo $text['description-access_controls']."\n"; + echo "

\n"; if ($action == 'update') { if (permission_exists('access_control_add')) { @@ -291,7 +291,7 @@ } } - echo "
\n"; - echo " \n"; + echo " \n"; echo " ".$text['label-access_control_description']." 
\n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; echo " ".escape($row['access_control_name'])."\n"; + if (permission_exists('access_control_edit')) { + echo " ".escape($row['access_control_name'])."\n"; + } + else { + echo " ".escape($row['access_control_name']); + } + echo " ".escape($row['access_control_default'])."".escape($row['access_control_description'])."".escape($row['access_control_description']).""; + echo " \n"; echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]); echo "
\n"; + echo "
\n"; echo "\n"; echo "\n"; if (permission_exists('number_translation_add') || permission_exists('number_translation_edit') || permission_exists('number_translation_delete')) { echo " \n"; } echo th_order_by('number_translation_name', $text['label-number_translation_name'], $order_by, $order); echo th_order_by('number_translation_enabled', $text['label-number_translation_enabled'], $order_by, $order, null, "class='center'"); - echo th_order_by('number_translation_description', $text['label-number_translation_description'], $order_by, $order, null, "class='hide-sm-dn' style='min-width: 50%;'"); + echo " \n"; if (permission_exists('number_translation_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { echo " \n"; } @@ -184,48 +224,47 @@ echo "\n"; if (permission_exists('number_translation_add') || permission_exists('number_translation_edit') || permission_exists('number_translation_delete')) { echo " \n"; } - echo " \n"; if (permission_exists('number_translation_edit')) { - echo " \n"; - echo " \n"; + echo " \n"; if (permission_exists('number_translation_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { - echo " \n"; } echo "\n"; $x++; } + unset($number_translations); } - unset($number_translations, $row); echo "
\n"; From ec65ab905de42fe90a567e0fe961aaa4265ba34f Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 24 Jul 2020 10:15:30 -0600 Subject: [PATCH 312/621] Fix the database copy method. --- resources/classes/database.php | 37 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/resources/classes/database.php b/resources/classes/database.php index 0b0ce81a7c..31fad75c1b 100644 --- a/resources/classes/database.php +++ b/resources/classes/database.php @@ -1314,36 +1314,36 @@ include "root.php"; $checked = true; //copy the child data - $copy_array[$parent_name][$x][$parent_key_name] = $row[$parent_key_name]; + if (is_uuid($row[$parent_key_name])) { + $copy_array[$parent_name][$x][$parent_key_name] = $row[$parent_key_name]; + } //remove the row from the main array unset($array[$parent_name][$x]); - } - //loop through the fields - foreach($row as $field_name => $field_value) { + //loop through the fields - //find the child tables - $y = 0; - if (is_array($field_value)) { - //prepare the variables - $child_name = preg_replace('#[^a-zA-Z0-9_\-]#', '', $field_name); - $child_key_name = $this->singular($child_name)."_uuid"; + foreach($row as $field_name => $field_value) { + //find the child tables + if (is_array($field_value)) { - //loop through the child rows - foreach ($field_value as $sub_row) { + //prepare the variables + $child_name = preg_replace('#[^a-zA-Z0-9_\-]#', '', $field_name); + $child_key_name = $this->singular($child_name)."_uuid"; + + //loop through the child rows + $y = 0; + foreach ($field_value as $sub_row) { - //build the delete array - if ($sub_row['checked'] == 'true') { //delete the child data - $copy_array[$child_name][$y][$child_key_name] = $sub_row[$child_key_name]; + $copy_array[$child_name][][$child_key_name] = $sub_row[$child_key_name]; //remove the row from the main array unset($array[$parent_name][$x][$child_name][$y]); - } - //increment the value - $y++; + //increment the value + $y++; + } } } } @@ -1358,6 +1358,7 @@ include "root.php"; //get the current data if (is_array($copy_array) && count($copy_array) > 0) { + //build an array of tables, fields, and values foreach($copy_array as $table_name => $rows) { foreach($rows as $row) { From 0c3b5a0137bf91502fbaafe2c83dcd2777556436 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 24 Jul 2020 10:43:06 -0600 Subject: [PATCH 313/621] Re-enable the copy button. --- app/access_controls/access_control_edit.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/access_controls/access_control_edit.php b/app/access_controls/access_control_edit.php index 52003dc798..359bdc872e 100644 --- a/app/access_controls/access_control_edit.php +++ b/app/access_controls/access_control_edit.php @@ -258,12 +258,12 @@ echo " ".$text['button-back']."\n"; echo " \n"; if ($action == 'update') { - //if (permission_exists('access_control_node_add')) { - // echo " \n"; - //} + if (permission_exists('access_control_node_add')) { + echo " \n"; + } if (permission_exists('access_control_node_delete')) { echo "
\n"; - echo " \n"; + echo " \n"; echo " ".$text['label-number_translation_description']." 
\n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; echo " "; + echo " \n"; if (permission_exists('number_translation_edit')) { - echo "".escape($row['number_translation_name']).""; + echo " ".escape($row['number_translation_name'])."\n"; } else { - echo escape($row['number_translation_name']); + echo " ".escape($row['number_translation_name']); } echo " "; + echo " \n"; echo $text['label-'.$row['number_translation_enabled']]; } echo " ".escape($row['number_translation_description'])." ".escape($row['number_translation_description']).""; + echo " \n"; echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]); echo "
\n"; echo "
\n"; echo "
".$paging_controls."
\n"; - echo "\n"; - echo "\n"; //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> From 0239da7e09decf48b17e4d1436772ad91dd95713 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 25 Jul 2020 13:18:22 -0600 Subject: [PATCH 316/621] Update number_translation_edit.php --- .../number_translation_edit.php | 191 ++++++++++-------- 1 file changed, 109 insertions(+), 82 deletions(-) diff --git a/app/number_translations/number_translation_edit.php b/app/number_translations/number_translation_edit.php index 4cda3e1c0f..98f93a94fd 100644 --- a/app/number_translations/number_translation_edit.php +++ b/app/number_translations/number_translation_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2017-2019 + Portions created by the Initial Developer are Copyright (C) 2018 - 2020 the Initial Developer. All Rights Reserved. */ @@ -50,42 +50,16 @@ } //get http post variables and set them to php variables - if (is_array($_POST)) { - $number_translation_uuid = $_POST["number_translation_uuid"]; + if (is_array($_POST) && is_uuid($number_translation_uuid)) { $number_translation_name = $_POST["number_translation_name"]; $number_translation_details = $_POST["number_translation_details"]; $number_translation_enabled = $_POST["number_translation_enabled"]; $number_translation_description = $_POST["number_translation_description"]; - $number_translation_details_delete = $_POST["number_translation_details_delete"]; } //process the user data and save it to the database if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { - //process the http post data by submitted action - if ($_POST['action'] != '' && is_uuid($number_translation_uuid)) { - $array[0]['checked'] = 'true'; - $array[0]['uuid'] = $number_translation_uuid; - - switch ($_POST['action']) { - case 'copy': - if (permission_exists('number_translation_add')) { - $obj = new number_translations; - $obj->copy($array); - } - break; - case 'delete': - if (permission_exists('number_translation_delete')) { - $obj = new number_translations; - $obj->delete($array); - } - break; - } - - header('Location: number_translations.php'); - exit; - } - //validate the token $token = new token; if (!$token->validate($_SERVER['PHP_SELF'])) { @@ -94,6 +68,48 @@ exit; } + //process the http post data by submitted action + if ($_POST['action'] != '' && strlen($_POST['action']) > 0) { + + //prepare the array(s) + $x = 0; + foreach ($_POST['number_translation_details'] as $row) { + if (is_uuid($row['number_translation_uuid']) && $row['checked'] === 'true') { + $array['number_translations'][$x]['checked'] = $row['checked']; + $array['number_translations'][$x]['number_translation_details'][]['number_translation_detail_uuid'] = $row['number_translation_detail_uuid']; + $x++; + } + } + + //send the array to the database class + switch ($_POST['action']) { + case 'copy': + if (permission_exists('number_translation_add')) { + $obj = new database; + $obj->copy($array); + } + break; + case 'delete': + if (permission_exists('number_translation_delete')) { + $obj = new database; + $obj->delete($array); + } + break; + case 'toggle': + if (permission_exists('number_translation_update')) { + $obj = new database; + $obj->toggle($array); + } + break; + } + + //redirect the user + if (in_array($_POST['action'], array('copy', 'delete', 'toggle'))) { + header('Location: number_translation_edit.php?id='.$id); + exit; + } + } + //check for all required data $msg = ''; if (strlen($number_translation_name) == 0) { $msg .= $text['message-required']." ".$text['label-number_translation_name']."
\n"; } @@ -119,39 +135,32 @@ } //prepare the array - $array['number_translations'][0]["number_translation_uuid"] = $number_translation_uuid; - $array['number_translations'][0]["number_translation_name"] = $number_translation_name; - $array['number_translations'][0]["number_translation_enabled"] = $number_translation_enabled; - $array['number_translations'][0]["number_translation_description"] = $number_translation_description; + $array['number_translations'][0]['number_translation_uuid'] = $number_translation_uuid; + $array['number_translations'][0]['number_translation_name'] = $number_translation_name; + $array['number_translations'][0]['number_translation_enabled'] = $number_translation_enabled; + $array['number_translations'][0]['number_translation_description'] = $number_translation_description; $y = 0; - foreach ($number_translation_details as $row) { - if (strlen($row['number_translation_detail_regex']) > 0) { - $array['number_translations'][0]['number_translation_details'][$y]["number_translation_detail_uuid"] = $row["number_translation_detail_uuid"]; - $array['number_translations'][0]['number_translation_details'][$y]["number_translation_detail_regex"] = $row["number_translation_detail_regex"]; - $array['number_translations'][0]['number_translation_details'][$y]["number_translation_detail_replace"] = $row["number_translation_detail_replace"]; - $array['number_translations'][0]['number_translation_details'][$y]["number_translation_detail_order"] = $row["number_translation_detail_order"]; - $y++; + if (is_array($number_translation_details)) { + foreach ($number_translation_details as $row) { + if (strlen($row['number_translation_detail_regex']) > 0) { + $array['number_translations'][0]['number_translation_details'][$y]['number_translation_detail_uuid'] = $row["number_translation_detail_uuid"]; + $array['number_translations'][0]['number_translation_details'][$y]['number_translation_detail_regex'] = $row["number_translation_detail_regex"]; + $array['number_translations'][0]['number_translation_details'][$y]['number_translation_detail_replace'] = $row["number_translation_detail_replace"]; + $array['number_translations'][0]['number_translation_details'][$y]['number_translation_detail_order'] = $row["number_translation_detail_order"]; + if (isset($row["checked"])) { + $array['number_translations'][0]['number_translation_details'][$y]['checked'] = $row["checked"]; + } + $y++; + } } } - //save to the data + //save the data $database = new database; - $database->app_name = 'Number Translations'; + $database->app_name = 'number translations'; $database->app_uuid = '6ad54de6-4909-11e7-a919-92ebcb67fe33'; $database->save($array); - //remove checked details - if ( - $action == 'update' - && permission_exists('number_translation_detail_delete') - && is_array($number_translation_details_delete) - && @sizeof($number_translation_details_delete) != 0 - ) { - $obj = new number_translations; - $obj->number_translation_uuid = $number_translation_uuid; - $obj->delete_details($number_translation_details_delete); - } - //redirect the user if (isset($action)) { if ($action == "add") { @@ -160,14 +169,14 @@ if ($action == "update") { $_SESSION["message"] = $text['message-update']; } + //header('Location: number_translations.php'); header('Location: number_translation_edit.php?id='.urlencode($number_translation_uuid)); return; } - } //(is_array($_POST) && strlen($_POST["persistformvar"]) == 0) + } //pre-populate the form if (is_array($_GET) && $_POST["persistformvar"] != "true") { - $number_translation_uuid = $_GET["id"]; $sql = "select * from v_number_translations "; $sql .= "where number_translation_uuid = :number_translation_uuid "; $parameters['number_translation_uuid'] = $number_translation_uuid; @@ -179,14 +188,14 @@ $number_translation_enabled = $row["number_translation_enabled"]; $number_translation_description = $row["number_translation_description"]; } - unset ($sql, $parameters, $row); + unset($sql, $parameters, $row); } //get the child data if (is_uuid($number_translation_uuid)) { $sql = "select * from v_number_translation_details "; $sql .= "where number_translation_uuid = :number_translation_uuid "; - $sql .= "order by cast(number_translation_detail_order as integer) asc"; + $sql .= "order by number_translation_detail_order asc"; $parameters['number_translation_uuid'] = $number_translation_uuid; $database = new database; $number_translation_details = $database->select($sql, $parameters, 'all'); @@ -201,7 +210,7 @@ //add an empty row $x = is_array($number_translation_details) ? count($number_translation_details) : 0; $number_translation_details[$x]['number_translation_uuid'] = $number_translation_uuid; - $number_translation_details[$x]['number_translation_detail_uuid'] = ''; + $number_translation_details[$x]['number_translation_detail_uuid'] = uuid(); $number_translation_details[$x]['number_translation_detail_regex'] = ''; $number_translation_details[$x]['number_translation_detail_replace'] = ''; $number_translation_details[$x]['number_translation_detail_order'] = ''; @@ -216,40 +225,56 @@ //show the content echo "
\n"; + echo "\n"; echo "
\n"; echo "
".$text['title-number_translation']."
\n"; echo "
\n"; - echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','collapse'=>'hide-xs','style'=>'margin-right: 15px;','link'=>'number_translations.php']); - if ($action == "update") { - if (permission_exists('number_translation_add')) { - echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'name'=>'btn_copy','onclick'=>"modal_open('modal-copy','btn_copy');"]); + echo " \n"; + if ($action == 'update') { + if (permission_exists('number_translation_detail_add')) { + echo " \n"; } - if (permission_exists('number_translation_delete') || permission_exists('number_translation_detail_delete')) { - echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','style'=>'margin-right: 15px;','onclick'=>"modal_open('modal-delete','btn_delete');"]); + if (permission_exists('number_translation_detail_delete')) { + echo " \n"; } } - echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','collapse'=>'hide-xs']); + echo " \n"; echo "
\n"; echo "
\n"; echo "
\n"; - if ($action == "update") { + echo $text['title_description-number_translations']."\n"; + echo "

\n"; + + if ($action == 'update') { if (permission_exists('number_translation_add')) { echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'copy','onclick'=>"modal_close();"])]); } - if (permission_exists('number_translation_delete') || permission_exists('number_translation_detail_delete')) { + if (permission_exists('number_translation_delete')) { echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'delete','onclick'=>"modal_close();"])]); } } - echo "\n"; + echo "
\n"; echo "\n"; - echo "\n"; - echo "\n"; if (is_array($number_translation_details) && @sizeof($number_translation_details) > 1 && permission_exists('number_translation_detail_delete')) { echo " \n"; } echo " \n"; @@ -277,9 +302,13 @@ foreach($number_translation_details as $row) { echo " \n"; echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; echo " \n"; if (is_array($number_translation_details) && @sizeof($number_translation_details) > 1 && permission_exists('number_translation_detail_delete')) { if (is_uuid($row['number_translation_detail_uuid'])) { - echo " \n"; } else { - echo " \n"; } - echo " \n"; } echo " \n"; $x++; @@ -356,7 +384,6 @@ echo "
\n"; + echo "\n"; echo " ".$text['label-number_translation_name']."\n"; echo "\n"; + echo "\n"; echo " \n"; echo "
\n"; echo $text['description-number_translation_name']."\n"; @@ -268,8 +293,8 @@ echo "
".$text['label-number_translation_detail_order']."\n"; - echo " ".$text['label-delete']."\n"; - echo " \n"; + echo " ".$text['label-action']."\n"; + echo " \n"; echo "
\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; echo " "; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
"; echo "

"; - echo "\n"; echo "\n"; echo "
"; @@ -364,4 +391,4 @@ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> From 1f1ccd9a2dfb7fe39689ab063da822993ba80a93 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 25 Jul 2020 13:20:06 -0600 Subject: [PATCH 317/621] Update app_languages.php --- app/number_translations/app_languages.php | 40 +++++++++++------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/app/number_translations/app_languages.php b/app/number_translations/app_languages.php index f339dba620..1da12978d2 100644 --- a/app/number_translations/app_languages.php +++ b/app/number_translations/app_languages.php @@ -43,26 +43,26 @@ $text['title-number_translation']['ru-ru'] = 'Преобразование но $text['title-number_translation']['sv-se'] = ''; $text['title-number_translation']['uk-ua'] = ''; -$text['title_description-number_translation']['en-us'] = 'Use this to translate numbers from the original number to a new number using regular expressions.'; -$text['title_description-number_translation']['en-gb'] = 'Use this to translate numbers from the original number to a new number using regular expressions.'; -$text['title_description-number_translation']['ar-eg'] = ''; -$text['title_description-number_translation']['de-at'] = ''; -$text['title_description-number_translation']['de-ch'] = ''; -$text['title_description-number_translation']['de-de'] = ''; -$text['title_description-number_translation']['es-cl'] = ''; -$text['title_description-number_translation']['es-mx'] = ''; -$text['title_description-number_translation']['fr-ca'] = "Utilisez ceci pour traduire les nombres du numéro d'origine en un nouveau nombre à l'aide d'expressions régulières"; -$text['title_description-number_translation']['fr-fr'] = "Utilisez ceci pour traduire les nombres du numéro d'origine en un nouveau nombre à l'aide d'expressions régulières"; -$text['title_description-number_translation']['he-il'] = ''; -$text['title_description-number_translation']['it-it'] = ''; -$text['title_description-number_translation']['nl-nl'] = 'Gebruik dit om nummers van het orginele nummer naar een nieuw nummer om te zetten m.b.v. reguliere uitdrukkingen.'; -$text['title_description-number_translation']['pl-pl'] = ''; -$text['title_description-number_translation']['pt-br'] = ''; -$text['title_description-number_translation']['pt-pt'] = ''; -$text['title_description-number_translation']['ro-ro'] = ''; -$text['title_description-number_translation']['ru-ru'] = 'Используйте для преобразования номера из одного вида в другой используя регулярные выражения'; -$text['title_description-number_translation']['sv-se'] = ''; -$text['title_description-number_translation']['uk-ua'] = ''; +$text['title_description-number_translations']['en-us'] = 'Use this to translate numbers from the original number to a new number using regular expressions.'; +$text['title_description-number_translations']['en-gb'] = 'Use this to translate numbers from the original number to a new number using regular expressions.'; +$text['title_description-number_translations']['ar-eg'] = ''; +$text['title_description-number_translations']['de-at'] = ''; +$text['title_description-number_translations']['de-ch'] = ''; +$text['title_description-number_translations']['de-de'] = ''; +$text['title_description-number_translations']['es-cl'] = ''; +$text['title_description-number_translations']['es-mx'] = ''; +$text['title_description-number_translations']['fr-ca'] = "Utilisez ceci pour traduire les nombres du numéro d'origine en un nouveau nombre à l'aide d'expressions régulières"; +$text['title_description-number_translations']['fr-fr'] = "Utilisez ceci pour traduire les nombres du numéro d'origine en un nouveau nombre à l'aide d'expressions régulières"; +$text['title_description-number_translations']['he-il'] = ''; +$text['title_description-number_translations']['it-it'] = ''; +$text['title_description-number_translations']['nl-nl'] = 'Gebruik dit om nummers van het orginele nummer naar een nieuw nummer om te zetten m.b.v. reguliere uitdrukkingen.'; +$text['title_description-number_translations']['pl-pl'] = ''; +$text['title_description-number_translations']['pt-br'] = ''; +$text['title_description-number_translations']['pt-pt'] = ''; +$text['title_description-number_translations']['ro-ro'] = ''; +$text['title_description-number_translations']['ru-ru'] = 'Используйте для преобразования номера из одного вида в другой используя регулярные выражения'; +$text['title_description-number_translations']['sv-se'] = ''; +$text['title_description-number_translations']['uk-ua'] = ''; $text['label-number_translation_detail_regex']['en-us'] = 'Regular Expression'; $text['label-number_translation_detail_regex']['en-gb'] = 'Regular Expression'; From 930f2c00499d910bc4bff220141479dfec5c3d59 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 25 Jul 2020 16:47:42 -0600 Subject: [PATCH 318/621] Use the button class. --- .../number_translation_edit.php | 23 ++++--------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/app/number_translations/number_translation_edit.php b/app/number_translations/number_translation_edit.php index 98f93a94fd..174c2b3ef0 100644 --- a/app/number_translations/number_translation_edit.php +++ b/app/number_translations/number_translation_edit.php @@ -147,9 +147,6 @@ $array['number_translations'][0]['number_translation_details'][$y]['number_translation_detail_regex'] = $row["number_translation_detail_regex"]; $array['number_translations'][0]['number_translation_details'][$y]['number_translation_detail_replace'] = $row["number_translation_detail_replace"]; $array['number_translations'][0]['number_translation_details'][$y]['number_translation_detail_order'] = $row["number_translation_detail_order"]; - if (isset($row["checked"])) { - $array['number_translations'][0]['number_translation_details'][$y]['checked'] = $row["checked"]; - } $y++; } } @@ -230,28 +227,16 @@ echo "
\n"; echo "
".$text['title-number_translation']."
\n"; echo "
\n"; - echo " \n"; + echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','collapse'=>'hide-xs','style'=>'margin-right: 15px;','link'=>'number_translations.php']); if ($action == 'update') { if (permission_exists('number_translation_detail_add')) { - echo " \n"; + echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','name'=>'btn_copy','onclick'=>"modal_open('modal-copy','btn_copy');"]); } if (permission_exists('number_translation_detail_delete')) { - echo " \n"; + echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'margin-right: 15px;','onclick'=>"modal_open('modal-delete','btn_delete');"]); } } - echo " \n"; + echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','collapse'=>'hide-xs']); echo "
\n"; echo "
\n"; echo "
\n"; From fd72fd682fdac860a5955196b623b4478baab8c3 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 25 Jul 2020 18:10:12 -0600 Subject: [PATCH 319/621] Use button create class --- app/access_controls/access_control_edit.php | 31 ++++++++++----------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/app/access_controls/access_control_edit.php b/app/access_controls/access_control_edit.php index 359bdc872e..7fd357e47a 100644 --- a/app/access_controls/access_control_edit.php +++ b/app/access_controls/access_control_edit.php @@ -253,33 +253,21 @@ echo "
\n"; echo "
".$text['title-access_control']."
\n"; echo "
\n"; - echo " \n"; + echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','collapse'=>'hide-xs','style'=>'margin-right: 15px;','link'=>'access_controls.php']); if ($action == 'update') { if (permission_exists('access_control_node_add')) { - echo " \n"; + echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','name'=>'btn_copy','style'=>'display: none;','onclick'=>"modal_open('modal-copy','btn_copy');"]); } if (permission_exists('access_control_node_delete')) { - echo " \n"; + echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'display: none; margin-right: 15px;','onclick'=>"modal_open('modal-delete','btn_delete');"]); } } - echo " \n"; + echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','collapse'=>'hide-xs']); echo "
\n"; echo "
\n"; echo "
\n"; - echo $text['description-access_controls']."\n"; + echo $text['title_description-access_controls']."\n"; echo "

\n"; if ($action == 'update') { @@ -291,6 +279,15 @@ } } + if ($action == 'update') { + if (permission_exists('access_control_add')) { + echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'copy','onclick'=>"modal_close();"])]); + } + if (permission_exists('access_control_delete')) { + echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'delete','onclick'=>"modal_close();"])]); + } + } + echo "\n"; echo "\n"; From d8bcacbbf4fab46886073d846ebb3d81ee563276 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 25 Jul 2020 18:10:53 -0600 Subject: [PATCH 320/621] Update access_control_edit.php --- app/access_controls/access_control_edit.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/access_controls/access_control_edit.php b/app/access_controls/access_control_edit.php index 7fd357e47a..73f23f2e1a 100644 --- a/app/access_controls/access_control_edit.php +++ b/app/access_controls/access_control_edit.php @@ -159,9 +159,6 @@ $array['access_controls'][0]['access_control_nodes'][$y]['node_cidr'] = $row["node_cidr"]; $array['access_controls'][0]['access_control_nodes'][$y]['node_domain'] = $row["node_domain"]; $array['access_controls'][0]['access_control_nodes'][$y]['node_description'] = $row["node_description"]; - if (isset($row["checked"])) { - $array['access_controls'][0]['access_control_nodes'][$y]['checked'] = $row["checked"]; - } $y++; } } From 8e6b41499493c9698f162a58b5bdc87b59ea5981 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 25 Jul 2020 18:19:35 -0600 Subject: [PATCH 321/621] Add display none to hide copy and delete on load. --- app/number_translations/number_translation_edit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/number_translations/number_translation_edit.php b/app/number_translations/number_translation_edit.php index 174c2b3ef0..58e75c39ee 100644 --- a/app/number_translations/number_translation_edit.php +++ b/app/number_translations/number_translation_edit.php @@ -230,10 +230,10 @@ echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','collapse'=>'hide-xs','style'=>'margin-right: 15px;','link'=>'number_translations.php']); if ($action == 'update') { if (permission_exists('number_translation_detail_add')) { - echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','name'=>'btn_copy','onclick'=>"modal_open('modal-copy','btn_copy');"]); + echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','name'=>'btn_copy','style'=>'display: none;','onclick'=>"modal_open('modal-copy','btn_copy');"]); } if (permission_exists('number_translation_detail_delete')) { - echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'margin-right: 15px;','onclick'=>"modal_open('modal-delete','btn_delete');"]); + echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'display: none; margin-right: 15px;','onclick'=>"modal_open('modal-delete','btn_delete');"]); } } echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','collapse'=>'hide-xs']); From 233b184120b45a485c9a22a60211803f24a44b51 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 25 Jul 2020 18:24:07 -0600 Subject: [PATCH 322/621] Update app_languages.php --- app/access_controls/app_languages.php | 42 +++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/app/access_controls/app_languages.php b/app/access_controls/app_languages.php index e943cbb722..27fb0ec666 100644 --- a/app/access_controls/app_languages.php +++ b/app/access_controls/app_languages.php @@ -85,26 +85,26 @@ $text['title-access_control']['ru-ru'] = "Управление доступом" $text['title-access_control']['sv-se'] = "Åtkomstkontroll"; $text['title-access_control']['uk-ua'] = "Управління доступом"; -$text['description-access_controls']['en-us'] = "Access control list can allow or deny ranges of IP addresses."; -$text['description-access_controls']['en-gb'] = "Access control list can allow or deny ranges of IP addresses."; -$text['description-access_controls']['ar-eg'] = "قائمة التحكم بالوصول يمكن السماح أو الرفض نطاقات العناوين."; -$text['description-access_controls']['de-at'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; //copied from de-de -$text['description-access_controls']['de-ch'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; //copied from de-de -$text['description-access_controls']['de-de'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; -$text['description-access_controls']['es-cl'] = " Lista de control de acceso puede permitir o denegar los rangos de direcciones IP."; -$text['description-access_controls']['es-mx'] = " Lista de control de acceso puede permitir o denegar los rangos de direcciones IP."; //copied from es-cl -$text['description-access_controls']['fr-ca'] = " Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP."; //copied from fr-fr -$text['description-access_controls']['fr-fr'] = " Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP."; -$text['description-access_controls']['he-il'] = " רשימת בקרת גישה יכולה לאפשר או למנוע טווחים של כתובות IP."; -$text['description-access_controls']['it-it'] = "Le liste per il controllo di accesso permettono o negano l'accesso a range di IP."; -$text['description-access_controls']['nl-nl'] = "Toegang Controle lijst kan IP adres reeks toestaan of verbieden."; -$text['description-access_controls']['pl-pl'] = "Lista kontroli dostępu może umożliwić lub zablokować zakresy adresów IP."; -$text['description-access_controls']['pt-br'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP."; //copied from pt-pt -$text['description-access_controls']['pt-pt'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP."; -$text['description-access_controls']['ro-ro'] = "Lista de control al accesului poate permite sau refuza intervale de adrese IP."; -$text['description-access_controls']['ru-ru'] = "Контроль доступа может разрешить или запретить диапазоны IP адресов."; -$text['description-access_controls']['sv-se'] = "Åtkomstkontrollista kan tillåta eller neka intervall av IP-adresser."; -$text['description-access_controls']['uk-ua'] = "Список контролю доступу може дозволити або заборонити діапазони IP-адрес."; +$text['title_description-access_controls']['en-us'] = "Access control list can allow or deny ranges of IP addresses."; +$text['title_description-access_controls']['en-gb'] = "Access control list can allow or deny ranges of IP addresses."; +$text['title_description-access_controls']['ar-eg'] = "قائمة التحكم بالوصول يمكن السماح أو الرفض نطاقات العناوين."; +$text['title_description-access_controls']['de-at'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; //copied from de-de +$text['title_description-access_controls']['de-ch'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; //copied from de-de +$text['title_description-access_controls']['de-de'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; +$text['title_description-access_controls']['es-cl'] = " Lista de control de acceso puede permitir o denegar los rangos de direcciones IP."; +$text['title_description-access_controls']['es-mx'] = " Lista de control de acceso puede permitir o denegar los rangos de direcciones IP."; //copied from es-cl +$text['title_description-access_controls']['fr-ca'] = " Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP."; //copied from fr-fr +$text['title_description-access_controls']['fr-fr'] = " Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP."; +$text['title_description-access_controls']['he-il'] = " רשימת בקרת גישה יכולה לאפשר או למנוע טווחים של כתובות IP."; +$text['title_description-access_controls']['it-it'] = "Le liste per il controllo di accesso permettono o negano l'accesso a range di IP."; +$text['title_description-access_controls']['nl-nl'] = "Toegang Controle lijst kan IP adres reeks toestaan of verbieden."; +$text['title_description-access_controls']['pl-pl'] = "Lista kontroli dostępu może umożliwić lub zablokować zakresy adresów IP."; +$text['title_description-access_controls']['pt-br'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP."; //copied from pt-pt +$text['title_description-access_controls']['pt-pt'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP."; +$text['title_description-access_controls']['ro-ro'] = "Lista de control al accesului poate permite sau refuza intervale de adrese IP."; +$text['title_description-access_controls']['ru-ru'] = "Контроль доступа может разрешить или запретить диапазоны IP адресов."; +$text['title_description-access_controls']['sv-se'] = "Åtkomstkontrollista kan tillåta eller neka intervall av IP-adresser."; +$text['title_description-access_controls']['uk-ua'] = "Список контролю доступу може дозволити або заборонити діапазони IP-адрес."; $text['label-node_type']['en-us'] = "Type"; $text['label-node_type']['en-gb'] = "Type"; @@ -442,4 +442,4 @@ $text['description-access_control_default']['ru-ru'] = "Выберите тип $text['description-access_control_default']['sv-se'] = "Välj standardtypen."; $text['description-access_control_default']['uk-ua'] = "Вибір типу за замовчуванням."; -?> \ No newline at end of file +?> From cd78d77d6ffe33ac7e35669c4315b377d7bea242 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 25 Jul 2020 18:25:05 -0600 Subject: [PATCH 323/621] Update access_controls.php --- app/access_controls/access_controls.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/access_controls/access_controls.php b/app/access_controls/access_controls.php index e5b3fceb07..0df2caa638 100644 --- a/app/access_controls/access_controls.php +++ b/app/access_controls/access_controls.php @@ -179,7 +179,7 @@ echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]); } - echo $text['description-access_controls']."\n"; + echo $text['title_description-access_controls']."\n"; echo "

\n"; echo "
\n"; @@ -246,4 +246,4 @@ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> From b9f2f3ba6f08843c2229412e47f1b2c3f79b1b51 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sun, 26 Jul 2020 18:58:12 -0600 Subject: [PATCH 324/621] Change internal_sip_port to 5060 internal_tls_port to 5061 --- resources/templates/conf/sip_profiles/internal.xml.noload | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/templates/conf/sip_profiles/internal.xml.noload b/resources/templates/conf/sip_profiles/internal.xml.noload index 96b60b5538..560acc671d 100644 --- a/resources/templates/conf/sip_profiles/internal.xml.noload +++ b/resources/templates/conf/sip_profiles/internal.xml.noload @@ -79,7 +79,7 @@ - + @@ -176,7 +176,7 @@ - + From c5a36e9bb36137f19d91e9160daf63237746f63b Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sun, 26 Jul 2020 19:00:11 -0600 Subject: [PATCH 325/621] Change internal_sip_port to 5080 internal_tls_port to 5081 --- resources/templates/conf/sip_profiles/external.xml.noload | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/templates/conf/sip_profiles/external.xml.noload b/resources/templates/conf/sip_profiles/external.xml.noload index 0fc85450bc..23f80d382e 100644 --- a/resources/templates/conf/sip_profiles/external.xml.noload +++ b/resources/templates/conf/sip_profiles/external.xml.noload @@ -26,7 +26,7 @@ - + @@ -84,7 +84,7 @@ - + From cd8b60813edf14c9b930acd7cc623e1abd839a1d Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sun, 26 Jul 2020 19:01:21 -0600 Subject: [PATCH 326/621] Remove and extra $ --- resources/templates/provision/htek/uc926/{$mac}.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/htek/uc926/{$mac}.cfg b/resources/templates/provision/htek/uc926/{$mac}.cfg index 4f6597b335..9935d1a9b1 100644 --- a/resources/templates/provision/htek/uc926/{$mac}.cfg +++ b/resources/templates/provision/htek/uc926/{$mac}.cfg @@ -2311,7 +2311,7 @@ 0 {$htek_dststarttime-month} {$htek_dststarttime-day} - {$$htek_dststarttime-hour} + {$htek_dststarttime-hour} {$htek_dstendttime-month} {$htek_dstsendtime-day} {$htek_dstsendtime-hour} From 1a25c8932eb4fe090d74dda17e824c42b249bc54 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 27 Jul 2020 14:50:14 -0600 Subject: [PATCH 327/621] Put the each column name on its own row. --- core/domains/domain_edit.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/domains/domain_edit.php b/core/domains/domain_edit.php index 4c99d3ef57..ec5fbac535 100644 --- a/core/domains/domain_edit.php +++ b/core/domains/domain_edit.php @@ -528,7 +528,11 @@ //pre-populate the form (admin won't have domain_add permissions, but domain_uuid will already be set above) if ((count($_GET) > 0 || (!permission_exists('domain_add') && $domain_uuid != '')) && $_POST["persistformvar"] != "true") { - $sql = "select domain_uuid, domain_name, cast(domain_enabled as text), domain_description "; + $sql = "select "; + $sql .= "domain_uuid, "; + $sql .= "domain_name, "; + $sql .= "cast(domain_enabled as text), "; + $sql .= "domain_description "; $sql .= "from v_domains "; $sql .= "where domain_uuid = :domain_uuid "; $parameters['domain_uuid'] = $domain_uuid; From d3a65f1db442879a82703cafe1e73252734802db Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 28 Jul 2020 15:47:36 -0600 Subject: [PATCH 328/621] Update indentation and line spacing. --- resources/check_auth.php | 51 +++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/resources/check_auth.php b/resources/check_auth.php index 82ff6090b6..462b43abc9 100644 --- a/resources/check_auth.php +++ b/resources/check_auth.php @@ -23,6 +23,7 @@ Contributor(s): Mark J Crane */ + //includes require_once "resources/require.php"; @@ -157,6 +158,11 @@ unset($sql, $parameters, $result, $row); } + //get the domains + if (file_exists($_SERVER["PROJECT_ROOT"]."/app/domains/app_config.php") && !is_cli()){ + require_once "app/domains/resources/domains.php"; + } + //get the user settings $sql = "select * from v_user_settings "; $sql .= "where domain_uuid = :domain_uuid "; @@ -197,13 +203,8 @@ //get the extensions that are assigned to this user if (file_exists($_SERVER["PROJECT_ROOT"]."/app/extensions/app_config.php")) { - if ( - isset($_SESSION["user"]) && - is_uuid($_SESSION["user_uuid"]) && - is_uuid($_SESSION["domain_uuid"]) && - !isset($_SESSION['user']['extension']) - ) { - //get the user extension list + if (isset($_SESSION["user"]) && is_uuid($_SESSION["user_uuid"]) && is_uuid($_SESSION["domain_uuid"]) && !isset($_SESSION['user']['extension'])) { + //get the user extension list $_SESSION['user']['extension'] = null; $sql = "select "; $sql .= "e.extension_uuid, "; @@ -230,22 +231,24 @@ if (is_array($result) && @sizeof($result) != 0) { foreach($result as $x => $row) { //set the destination - $destination = $row['extension']; - if (strlen($row['number_alias']) > 0) { - $destination = $row['number_alias']; - } + $destination = $row['extension']; + if (strlen($row['number_alias']) > 0) { + $destination = $row['number_alias']; + } + //build the user array - $_SESSION['user']['extension'][$x]['user'] = $row['extension']; - $_SESSION['user']['extension'][$x]['number_alias'] = $row['number_alias']; - $_SESSION['user']['extension'][$x]['destination'] = $destination; - $_SESSION['user']['extension'][$x]['extension_uuid'] = $row['extension_uuid']; - $_SESSION['user']['extension'][$x]['outbound_caller_id_name'] = $row['outbound_caller_id_name']; - $_SESSION['user']['extension'][$x]['outbound_caller_id_number'] = $row['outbound_caller_id_number']; - $_SESSION['user']['extension'][$x]['user_context'] = $row['user_context']; - $_SESSION['user']['extension'][$x]['description'] = $row['description']; + $_SESSION['user']['extension'][$x]['user'] = $row['extension']; + $_SESSION['user']['extension'][$x]['number_alias'] = $row['number_alias']; + $_SESSION['user']['extension'][$x]['destination'] = $destination; + $_SESSION['user']['extension'][$x]['extension_uuid'] = $row['extension_uuid']; + $_SESSION['user']['extension'][$x]['outbound_caller_id_name'] = $row['outbound_caller_id_name']; + $_SESSION['user']['extension'][$x]['outbound_caller_id_number'] = $row['outbound_caller_id_number']; + $_SESSION['user']['extension'][$x]['user_context'] = $row['user_context']; + $_SESSION['user']['extension'][$x]['description'] = $row['description']; + //set the user context - $_SESSION['user']['user_context'] = $row["user_context"]; - $_SESSION['user_context'] = $row["user_context"]; + $_SESSION['user']['user_context'] = $row["user_context"]; + $_SESSION['user_context'] = $row["user_context"]; } } unset($sql, $parameters, $result, $row); @@ -260,12 +263,6 @@ exit(); } } - - //get the domains - if (file_exists($_SERVER["PROJECT_ROOT"]."/app/domains/app_config.php") && !is_cli()){ - require_once "app/domains/resources/domains.php"; - } - } //set the time zone From 5014e8a1e17c55ef9c0b27a836c87d7a3f900e39 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 28 Jul 2020 19:33:53 -0600 Subject: [PATCH 329/621] Add label-settings --- resources/app_languages.php | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/resources/app_languages.php b/resources/app_languages.php index 5606259d01..151a6a2a34 100644 --- a/resources/app_languages.php +++ b/resources/app_languages.php @@ -2900,6 +2900,29 @@ $text['label-global']['sv-se'] = "Global"; $text['label-global']['uk-ua'] = "Global"; $text['label-global']['tr-tr'] = "Global"; +$text['label-settings']['en-us'] = "Settings"; +$text['label-settings']['en-gb'] = "Settings"; +$text['label-settings']['ar-eg'] = "Global"; +$text['label-settings']['de-at'] = "Einstellungen"; //copied from de-de +$text['label-settings']['de-ch'] = "Global"; //copied from de-de +$text['label-settings']['de-de'] = "Einstellungen"; +$text['label-settings']['el-gr'] = "Global"; +$text['label-settings']['es-cl'] = "Global"; +$text['label-settings']['es-mx'] = "Global"; //copied from es-cl +$text['label-settings']['fr-ca'] = "Global"; //copied from fr-fr +$text['label-settings']['fr-fr'] = "Configuration"; +$text['label-settings']['he-il'] = "Global"; +$text['label-settings']['it-it'] = "Parametri"; +$text['label-settings']['nl-nl'] = "Instellingen"; +$text['label-settings']['pl-pl'] = "Ustawienia"; +$text['label-settings']['pt-br'] = "Definições"; //copied from pt-pt +$text['label-settings']['pt-pt'] = "Definições"; +$text['label-settings']['ro-ro'] = "Global"; +$text['label-settings']['ru-ru'] = "Конфигурация"; +$text['label-settings']['sv-se'] = "Inställningar"; +$text['label-settings']['uk-ua'] = "Налаштування"; +$text['label-settings']['tr-tr'] = "Global"; + $text['label-none']['en-us'] = "None"; $text['label-none']['en-gb'] = "None"; $text['label-none']['ar-eg'] = ""; @@ -4564,4 +4587,4 @@ $text['option-fixed']['sv-se'] = "Fixed"; $text['option-fixed']['uk-ua'] = "Fixed"; $text['option-fixed']['tr-tr'] = "Fixed"; -?> \ No newline at end of file +?> From df7436694545f3612c591647c16181577795f72e Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 28 Jul 2020 19:38:38 -0600 Subject: [PATCH 330/621] Add button-settings --- resources/app_languages.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/resources/app_languages.php b/resources/app_languages.php index 151a6a2a34..3245a3b52d 100644 --- a/resources/app_languages.php +++ b/resources/app_languages.php @@ -4177,6 +4177,29 @@ $text['button-cdr']['ru-ru'] = ""; $text['button-cdr']['sv-se'] = ""; $text['button-cdr']['uk-ua'] = ""; +$text['button-settings']['en-us'] = "Settings"; +$text['button-settings']['en-gb'] = "Settings"; +$text['button-settings']['ar-eg'] = "Global"; +$text['button-settings']['de-at'] = "Einstellungen"; //copied from de-de +$text['button-settings']['de-ch'] = "Global"; //copied from de-de +$text['button-settings']['de-de'] = "Einstellungen"; +$text['button-settings']['el-gr'] = "Global"; +$text['button-settings']['es-cl'] = "Global"; +$text['button-settings']['es-mx'] = "Global"; //copied from es-cl +$text['button-settings']['fr-ca'] = "Global"; //copied from fr-fr +$text['button-settings']['fr-fr'] = "Configuration"; +$text['button-settings']['he-il'] = "Global"; +$text['button-settings']['it-it'] = "Parametri"; +$text['button-settings']['nl-nl'] = "Instellingen"; +$text['button-settings']['pl-pl'] = "Ustawienia"; +$text['button-settings']['pt-br'] = "Definições"; //copied from pt-pt +$text['button-settings']['pt-pt'] = "Definições"; +$text['button-settings']['ro-ro'] = "Global"; +$text['button-settings']['ru-ru'] = "Конфигурация"; +$text['button-settings']['sv-se'] = "Inställningar"; +$text['button-settings']['uk-ua'] = "Налаштування"; +$text['button-settings']['tr-tr'] = "Global"; + $text['description-greeting']['en-us'] = "Select the desired Greeting."; $text['description-greeting']['en-gb'] = "Select the desired Greeting."; $text['description-greeting']['ar-eg'] = ""; From 262d57d4b66838e515c9dd6f978fe21b2b893317 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 28 Jul 2020 20:15:49 -0600 Subject: [PATCH 331/621] Add button icon settings --- themes/default/app_config.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/themes/default/app_config.php b/themes/default/app_config.php index 8478b22ade..041f0c60c4 100644 --- a/themes/default/app_config.php +++ b/themes/default/app_config.php @@ -2199,6 +2199,14 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = ""; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "314a7107-7d00-4f61-8442-16323fb7f91d"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "button_icon_settings"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "fas fa-cog"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = ""; + $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "814ed631-a315-4bde-a822-4038432ae2a6"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "keyboard_shortcut_check_all_enabled"; @@ -2415,4 +2423,4 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; $apps[$x]['default_settings'][$y]['default_setting_description'] = ""; -?> \ No newline at end of file +?> From cf7c918b0c9153657df5013a0d8bbfb60d1cb522 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 28 Jul 2020 21:13:34 -0600 Subject: [PATCH 332/621] Add a Settings button. --- core/domains/domain_edit.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/core/domains/domain_edit.php b/core/domains/domain_edit.php index ec5fbac535..a3735f64ca 100644 --- a/core/domains/domain_edit.php +++ b/core/domains/domain_edit.php @@ -613,9 +613,13 @@ } echo " \n"; echo "
\n"; + if (permission_exists('domain_add')) { echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'domains.php']); } + if ($action == "update" && permission_exists('domain_setting_view')) { + echo button::create(['type'=>'button','label'=>$text['button-settings'],'icon'=>$_SESSION['theme']['button_icon_settings'],'id'=>'btn_back','style'=>'margin-right: 2px;','link'=>PROJECT_PATH.'/core/domain_settings/domain_settings.php?id='.escape($domain_uuid)]); + } if (permission_exists('domain_delete') && is_array($_SESSION['domains']) && @sizeof($_SESSION['domains']) > 1 && $domain_uuid != $_SESSION['domain_uuid']) { echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'onclick'=>"modal_open('modal-delete-domain','btn_delete_domain');"]); } @@ -630,7 +634,7 @@ if (permission_exists('domain_export')) { echo button::create(['type'=>'button','label'=>$text['button-export'],'icon'=>$_SESSION['theme']['button_icon_export'],'link'=>PROJECT_PATH."/app/domain_export/index.php?id=".escape($domain_uuid)]); } - echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 15px;']); + echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 3px;']); echo "
\n"; echo "
\n"; echo "\n"; @@ -695,11 +699,6 @@ echo ""; - if ($action == "update" && permission_exists('domain_setting_view')) { - require $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/core/domain_settings/domain_settings.php"; - echo "

\n"; - } - //include the footer require_once "resources/footer.php"; From ecb8d919ce33ff8b44e40541befb90719698e1af Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 28 Jul 2020 21:14:23 -0600 Subject: [PATCH 333/621] Remove header_description-domain_settings --- core/domains/app_languages.php | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/core/domains/app_languages.php b/core/domains/app_languages.php index 7be369027d..0091c7bb0f 100644 --- a/core/domains/app_languages.php +++ b/core/domains/app_languages.php @@ -826,27 +826,6 @@ $text['header-domain_settings']['ru-ru'] = "Настройки домена"; $text['header-domain_settings']['sv-se'] = "Domän Inställning"; $text['header-domain_settings']['uk-ua'] = "Налаштування домену"; -$text['header_description-domain_settings']['en-us'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['en-gb'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['ar-eg'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['de-at'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['de-ch'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['de-de'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['es-cl'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['es-mx'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['fr-ca'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['fr-fr'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['he-il'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['it-it'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['nl-nl'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['pl-pl'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['pt-br'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['pt-pt'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['ro-ro'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['ru-ru'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['sv-se'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['uk-ua'] = "Settings for this domain that should override those defined in Default Settings."; - $text['header-domain_setting-edit']['en-us'] = "Domain Setting"; $text['header-domain_setting-edit']['en-gb'] = "Domain Setting"; $text['header-domain_setting-edit']['ar-eg'] = ""; From 4222978c76c7267e284ac20641de2ad0c0dedf76 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 28 Jul 2020 21:15:58 -0600 Subject: [PATCH 334/621] Add header domain settings and a description. --- core/domain_settings/app_languages.php | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/core/domain_settings/app_languages.php b/core/domain_settings/app_languages.php index 67fe042c86..382a4ba9a9 100644 --- a/core/domain_settings/app_languages.php +++ b/core/domain_settings/app_languages.php @@ -22,6 +22,27 @@ $text['title-domains']['ru-ru'] = "Домены"; $text['title-domains']['sv-se'] = "Domäner"; $text['title-domains']['uk-ua'] = "Домени"; +$text['title-domain_settings']['en-us'] = "Domain Setting"; +$text['title-domain_settings']['en-gb'] = "Domain Setting"; +$text['title-domain_settings']['ar-eg'] = ""; +$text['title-domain_settings']['de-at'] = "Domain Einstellungen"; //copied from de-de +$text['title-domain_settings']['de-ch'] = "Domain Einstellungen"; //copied from de-de +$text['title-domain_settings']['de-de'] = "Domain Einstellungen"; +$text['title-domain_settings']['es-cl'] = "Configuraciones de dominio."; +$text['title-domain_settings']['es-mx'] = "Configuraciones de dominio."; //copied from es-cl +$text['title-domain_settings']['fr-ca'] = "Paramètres du domaine"; //copied from fr-fr +$text['title-domain_settings']['fr-fr'] = "Paramètres du domaine"; +$text['title-domain_settings']['he-il'] = ""; +$text['title-domain_settings']['it-it'] = "Parametri di Dominio"; +$text['title-domain_settings']['nl-nl'] = ""; +$text['title-domain_settings']['pl-pl'] = "Ustawienia domen"; +$text['title-domain_settings']['pt-br'] = "Configurações do dominio"; +$text['title-domain_settings']['pt-pt'] = "Definições do Domínio"; +$text['title-domain_settings']['ro-ro'] = ""; +$text['title-domain_settings']['ru-ru'] = "Настройки домена"; +$text['title-domain_settings']['sv-se'] = "Domän Inställning"; +$text['title-domain_settings']['uk-ua'] = "Налаштування доменів"; + $text['title-domain_setting-edit']['en-us'] = "Domain Setting"; $text['title-domain_setting-edit']['en-gb'] = "Domain Setting"; $text['title-domain_setting-edit']['ar-eg'] = ""; @@ -106,6 +127,27 @@ $text['title-domain-add']['ru-ru'] = "Добавить домен"; $text['title-domain-add']['sv-se'] = "Lägg Till Domän"; $text['title-domain-add']['uk-ua'] = "Новий домен"; +$text['header_description-domain_settings']['en-us'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['en-gb'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['ar-eg'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['de-at'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['de-ch'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['de-de'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['es-cl'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['es-mx'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['fr-ca'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['fr-fr'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['he-il'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['it-it'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['nl-nl'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['pl-pl'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['pt-br'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['pt-pt'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['ro-ro'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['ru-ru'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['sv-se'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['uk-ua'] = "Settings for this domain that should override those defined in Default Settings."; + $text['message-delete_failed']['en-us'] = "No Settings Checked"; $text['message-delete_failed']['en-gb'] = "No Settings Checked"; $text['message-delete_failed']['ar-eg'] = ""; From 11416d89a46e144abc08546b2c3118f91d0378c7 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 28 Jul 2020 21:18:01 -0600 Subject: [PATCH 335/621] Make domain settings independent. --- core/domain_settings/domain_settings.php | 33 ++++++++++++++++++++---- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/core/domain_settings/domain_settings.php b/core/domain_settings/domain_settings.php index 7b760b4f25..530af44112 100644 --- a/core/domain_settings/domain_settings.php +++ b/core/domain_settings/domain_settings.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2019 + Portions created by the Initial Developer are Copyright (C) 2008-2020 the Initial Developer. All Rights Reserved. Contributor(s): @@ -38,6 +38,15 @@ exit; } +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//get the domain_uuid + if (is_uuid($_GET['id'])) { + $domain_uuid = $_GET['id']; + } + //get the http post data if ($_POST['action'] != '') { $action = $_POST['action']; @@ -74,7 +83,7 @@ } //redirect - header('Location: '.PROJECT_PATH.'/core/domains/domain_edit.php?id='.urlencode($_REQUEST['domain_uuid'])); + header('Location: '.PROJECT_PATH.'/core/domain_settings/domain_settings.php?id='.urlencode($_REQUEST['domain_uuid'])); exit; } @@ -82,6 +91,13 @@ $order_by = $_GET["order_by"]; $order = $_GET["order"]; +//get the domain_name + $sql = "select domain_name from v_domains "; + $sql .= "where domain_uuid = :domain_uuid "; + $parameters['domain_uuid'] = $domain_uuid; + $database = new database; + $domain_name = $database->select($sql, $parameters, 'column'); + //prepare to page the results $sql = "select count(domain_setting_uuid) from v_domain_settings "; $sql .= "where domain_uuid = :domain_uuid "; @@ -109,6 +125,10 @@ $object = new token; $token = $object->create('/core/domain_settings/domain_settings.php'); +//include the header + $document['title'] = $text['title-domain_settings']; + require_once "resources/header.php"; + //copy settings javascript if ( permission_exists("domain_select") && @@ -140,9 +160,9 @@ //show the content echo "
\n"; - echo "
".$text['header-domain_settings']." (".$num_rows.")
\n"; + echo "
".$domain_name." (".$num_rows.")
\n"; //$text['title-domain_settings'] echo "
\n"; - echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'action_bar_sub_button_back','style'=>'margin-right: 15px; display: none;','link'=>'domains.php']); + echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'action_bar_sub_button_back','style'=>'','link'=>PROJECT_PATH.'/core/domains/domains.php']); if (permission_exists('default_setting_view') && $num_rows) { echo button::create(['type'=>'button','label'=>$text['button-reload'],'icon'=>$_SESSION['theme']['button_icon_reload'],'style'=>'margin-right: 15px;','link'=>PROJECT_PATH.'/core/default_settings/default_settings_reload.php?id='.$domain_uuid]); } @@ -238,7 +258,7 @@ echo "
\n"; } if (permission_exists('domain_setting_edit')) { - $list_row_url = PROJECT_PATH."/core/domain_settings/domain_setting_edit.php?domain_uuid=".escape($row['domain_uuid'])."&id=".escape($row['domain_setting_uuid']); + $list_row_url = PROJECT_PATH."/core/domain_settings/domain_setting_edit.php?domain_uuid=".escape($domain_uuid)."&id=".escape($row['domain_setting_uuid']); } echo "\n"; if (permission_exists('domain_setting_add') || permission_exists('domain_setting_edit') || permission_exists('domain_setting_delete')) { @@ -365,4 +385,7 @@ echo "\n"; +//include the footer + require_once "resources/footer.php"; + ?> From d459d06e383fa825acbd72ac1c45d89ecd88f956 Mon Sep 17 00:00:00 2001 From: emaktech Date: Wed, 29 Jul 2020 00:41:06 -0400 Subject: [PATCH 336/621] Order SIP Profiles by Name by Default (#5365) SIP profiles were unordered unless $_GET["order_by"] was set. Now if unset, it will order by sip_profile_name by default for nicer ordering. --- app/sip_profiles/sip_profiles.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/sip_profiles/sip_profiles.php b/app/sip_profiles/sip_profiles.php index 7ea2f1c426..36df51a828 100644 --- a/app/sip_profiles/sip_profiles.php +++ b/app/sip_profiles/sip_profiles.php @@ -71,7 +71,12 @@ } //get order and order by - $order_by = $_GET["order_by"]; + if (isset($_GET["order_by"])) { + $order_by = $_GET["order_by"]; + } + else { + $order_by = 'sip_profile_name'; + } $order = $_GET["order"]; //add the search string @@ -222,4 +227,4 @@ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> From 6ec28b1cdd97ec8150321c3c34f912cf4da22ef7 Mon Sep 17 00:00:00 2001 From: chansizzle <14916599+chansizzle@users.noreply.github.com> Date: Wed, 29 Jul 2020 12:01:40 -0600 Subject: [PATCH 337/621] Update index.php (#5367) increased scan-ability on dark backgrounds --- app/gswave/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/gswave/index.php b/app/gswave/index.php index c00ecd007b..45671754d7 100644 --- a/app/gswave/index.php +++ b/app/gswave/index.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2019 + Portions created by the Initial Developer are Copyright (C) 2008-2020 the Initial Developer. All Rights Reserved. Contributor(s): @@ -175,7 +175,7 @@ //html image if (is_uuid($extension_uuid)) { - echo "\n"; + echo "\n"; } echo "\n"; @@ -183,4 +183,4 @@ //add the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> From e70261932c48697f59248040b762a405ff299e35 Mon Sep 17 00:00:00 2001 From: jrmcclean <68025295+jrmcclean@users.noreply.github.com> Date: Wed, 29 Jul 2020 14:02:03 -0400 Subject: [PATCH 338/621] Update functions.php (#5366) Updated the Windows UUID function. The current code PHP_OS === 'Windows' is limited to non servers. New code factors in Server and non servers. --- resources/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/functions.php b/resources/functions.php index 66f14a97e2..1f71d7316f 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -131,7 +131,7 @@ } } } - if (PHP_OS === 'Windows' && function_exists('com_create_guid')) { + if ((strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') && function_exists('com_create_guid')) { $uuid = trim(com_create_guid(), '{}'); if (is_uuid($uuid)) { return $uuid; From 3d9e249cc9fde1e0d82c251f9420bd3198a1296a Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Wed, 29 Jul 2020 14:29:41 -0400 Subject: [PATCH 339/621] Conference recording missing ext (#5368) --- app/scripts/resources/scripts/app/conference_center/index.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/resources/scripts/app/conference_center/index.lua b/app/scripts/resources/scripts/app/conference_center/index.lua index 3c4b980904..faf6b427d0 100644 --- a/app/scripts/resources/scripts/app/conference_center/index.lua +++ b/app/scripts/resources/scripts/app/conference_center/index.lua @@ -309,7 +309,7 @@ --freeswitch.consoleLog("notice", "[conference center] sql: " .. sql .. "; params:" .. json.encode(params) .. "\n"); --set the conference_recording - conference_recording = recordings_dir.."/archive/"..os.date("%Y", start_epoch).."/"..os.date("%b", start_epoch).."/"..os.date("%d", start_epoch) .."/"..conference_session_uuid; + conference_recording = recordings_dir.."/archive/"..os.date("%Y", start_epoch).."/"..os.date("%b", start_epoch).."/"..os.date("%d", start_epoch) .."/"..conference_session_uuid .. "." .. record_ext; freeswitch.consoleLog("notice", "[conference center] conference_recording: "..conference_recording.."\n"); --conference has ended set the end_epoch local sql = {} From 472e1bf85ac7910566465cf19794ef831d3a4546 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 29 Jul 2020 13:37:30 -0600 Subject: [PATCH 340/621] Add a new button. --- app/extensions/extension_edit.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php index 3df5b0cb86..6d3b649d69 100644 --- a/app/extensions/extension_edit.php +++ b/app/extensions/extension_edit.php @@ -887,6 +887,9 @@ if (permission_exists('extension_copy')) { echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','style'=>'margin-left: 15px;','onclick'=>"copy_extension();"]); } + if (permission_exists('domain_setting_view')) { + echo button::create(['type'=>'button','label'=>$text['button-settings'],'icon'=>$_SESSION['theme']['button_icon_settings'],'id'=>'btn_settings','style'=>'','link'=>PROJECT_PATH.'/core/extension_settings/extension_settings.php?id='.urlencode($extension_uuid)]); + } } echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 15px;','onclick'=>'submit_form();']); echo " \n"; From e4b72206b3d99e8162603697a9ea7ca683f3f297 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 29 Jul 2020 13:41:33 -0600 Subject: [PATCH 341/621] On button replace escape with urlencode --- core/domains/domain_edit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/domains/domain_edit.php b/core/domains/domain_edit.php index a3735f64ca..12a07d3a02 100644 --- a/core/domains/domain_edit.php +++ b/core/domains/domain_edit.php @@ -618,7 +618,7 @@ echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'domains.php']); } if ($action == "update" && permission_exists('domain_setting_view')) { - echo button::create(['type'=>'button','label'=>$text['button-settings'],'icon'=>$_SESSION['theme']['button_icon_settings'],'id'=>'btn_back','style'=>'margin-right: 2px;','link'=>PROJECT_PATH.'/core/domain_settings/domain_settings.php?id='.escape($domain_uuid)]); + echo button::create(['type'=>'button','label'=>$text['button-settings'],'icon'=>$_SESSION['theme']['button_icon_settings'],'id'=>'btn_back','style'=>'margin-right: 2px;','link'=>PROJECT_PATH.'/core/domain_settings/domain_settings.php?id='.urlencode($domain_uuid)]); } if (permission_exists('domain_delete') && is_array($_SESSION['domains']) && @sizeof($_SESSION['domains']) > 1 && $domain_uuid != $_SESSION['domain_uuid']) { echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'onclick'=>"modal_open('modal-delete-domain','btn_delete_domain');"]); @@ -632,7 +632,7 @@ echo ""; } if (permission_exists('domain_export')) { - echo button::create(['type'=>'button','label'=>$text['button-export'],'icon'=>$_SESSION['theme']['button_icon_export'],'link'=>PROJECT_PATH."/app/domain_export/index.php?id=".escape($domain_uuid)]); + echo button::create(['type'=>'button','label'=>$text['button-export'],'icon'=>$_SESSION['theme']['button_icon_export'],'link'=>PROJECT_PATH."/app/domain_export/index.php?id=".urlencode($domain_uuid)]); } echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 3px;']); echo " \n"; From 8589febfba6b4ab6805afb2869f657c367220fff Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 29 Jul 2020 14:19:18 -0600 Subject: [PATCH 342/621] Update extension_edit.php --- app/extensions/extension_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php index 6d3b649d69..fc67f07c56 100644 --- a/app/extensions/extension_edit.php +++ b/app/extensions/extension_edit.php @@ -888,7 +888,7 @@ echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','style'=>'margin-left: 15px;','onclick'=>"copy_extension();"]); } if (permission_exists('domain_setting_view')) { - echo button::create(['type'=>'button','label'=>$text['button-settings'],'icon'=>$_SESSION['theme']['button_icon_settings'],'id'=>'btn_settings','style'=>'','link'=>PROJECT_PATH.'/core/extension_settings/extension_settings.php?id='.urlencode($extension_uuid)]); + echo button::create(['type'=>'button','label'=>$text['button-settings'],'icon'=>$_SESSION['theme']['button_icon_settings'],'id'=>'btn_settings','style'=>'','link'=>PROJECT_PATH.'/app/extension_settings/extension_settings.php?id='.urlencode($extension_uuid)]); } } echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 15px;','onclick'=>'submit_form();']); From a4f312af0466a4bccfa24fe6d0361548d770127b Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 30 Jul 2020 07:59:45 -0600 Subject: [PATCH 343/621] After saving go back to the domain settings list. --- core/domain_settings/domain_setting_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/domain_settings/domain_setting_edit.php b/core/domain_settings/domain_setting_edit.php index 52fa697580..22b8a3c122 100644 --- a/core/domain_settings/domain_setting_edit.php +++ b/core/domain_settings/domain_setting_edit.php @@ -317,7 +317,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { if ($action == "add") { message::add($text['message-add']); } - header("Location: ".PROJECT_PATH."/core/domains/domain_edit.php?id=".$domain_uuid); + header("Location: ".PROJECT_PATH."/core/domain_settings/domain_settings.php?id=".$domain_uuid); exit; } } From 10a69d5965324f86b1a9fef100bd9493f76cb0ae Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 30 Jul 2020 08:02:54 -0600 Subject: [PATCH 344/621] Improve the domain settings description. --- core/domain_settings/app_languages.php | 40 +++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/core/domain_settings/app_languages.php b/core/domain_settings/app_languages.php index 382a4ba9a9..ce58731acf 100644 --- a/core/domain_settings/app_languages.php +++ b/core/domain_settings/app_languages.php @@ -127,26 +127,26 @@ $text['title-domain-add']['ru-ru'] = "Добавить домен"; $text['title-domain-add']['sv-se'] = "Lägg Till Domän"; $text['title-domain-add']['uk-ua'] = "Новий домен"; -$text['header_description-domain_settings']['en-us'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['en-gb'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['ar-eg'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['de-at'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['de-ch'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['de-de'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['es-cl'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['es-mx'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['fr-ca'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['fr-fr'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['he-il'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['it-it'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['nl-nl'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['pl-pl'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['pt-br'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['pt-pt'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['ro-ro'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['ru-ru'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['sv-se'] = "Settings for this domain that should override those defined in Default Settings."; -$text['header_description-domain_settings']['uk-ua'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['en-us'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['en-gb'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['ar-eg'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['de-at'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['de-ch'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['de-de'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['es-cl'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['es-mx'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['fr-ca'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['fr-fr'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['he-il'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['it-it'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['nl-nl'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['pl-pl'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['pt-br'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['pt-pt'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['ro-ro'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['ru-ru'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['sv-se'] = "Settings for this domain override those defined in Default Settings."; +$text['header_description-domain_settings']['uk-ua'] = "Settings for this domain override those defined in Default Settings."; $text['message-delete_failed']['en-us'] = "No Settings Checked"; $text['message-delete_failed']['en-gb'] = "No Settings Checked"; From f765cefb5197a862a389600d553933999c6d5bb1 Mon Sep 17 00:00:00 2001 From: benwiesner1 <42681729+benwiesner1@users.noreply.github.com> Date: Thu, 30 Jul 2020 08:34:06 -0700 Subject: [PATCH 345/621] Update app_languages.php (#5370) desc changes make more sense especially for non superadmin / customers who are admins --- app/music_on_hold/app_languages.php | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/app/music_on_hold/app_languages.php b/app/music_on_hold/app_languages.php index 67d55de919..6ea9d8f2cc 100644 --- a/app/music_on_hold/app_languages.php +++ b/app/music_on_hold/app_languages.php @@ -326,7 +326,7 @@ $text['label-shuffle']['es-cl'] = "Barajar"; $text['label-shuffle']['es-mx'] = "Barajar"; //copied from es-cl $text['label-shuffle']['fr-ca'] = "battage"; //copied from fr-fr $text['label-shuffle']['fr-fr'] = "battage"; -$text['label-shuffle']['he-il'] = "לְעַרְבֵּב"; +$text['label-shuffle']['he-il'] = "לְעַרְבֵּב"; $text['label-shuffle']['it-it'] = "Mischia"; $text['label-shuffle']['nl-nl'] = "Wisselen"; $text['label-shuffle']['pl-pl'] = "Człapać"; @@ -820,26 +820,26 @@ $text['header-music_on_hold_settings']['ru-ru'] = "Музыка на удерж $text['header-music_on_hold_settings']['sv-se'] = "Väntmusik inställningar"; $text['header-music_on_hold_settings']['uk-ua'] = "Музика на утриманні настройки"; -$text['title_description-music_on_hold']['en-us'] = "Music on hold can be in WAV or MP3 format. To play an MP3 file you must have mod_shout enabled on the 'Modules' tab. You can adjust the volume of the MP3 audio from the 'Settings' tab. For best performance upload 16 bit, 8/16/32/48 kHz mono WAV files."; -$text['title_description-music_on_hold']['en-gb'] = "Music on hold can be in WAV or MP3 format. To play an MP3 file you must have mod_shout enabled on the 'Modules' tab. You can adjust the volume of the MP3 audio from the 'Settings' tab. For best performance upload 16 bit, 8/16/32/48 kHz mono WAV files."; +$text['title_description-music_on_hold']['en-us'] = "Music on hold can be in WAV or MP3 format. For best performance upload 16 bit, 8/16/32/48 kHz mono WAV files."; +$text['title_description-music_on_hold']['en-gb'] = "Music on hold can be in WAV or MP3 format. For best performance upload 16 bit, 8/16/32/48 kHz mono WAV files."; $text['title_description-music_on_hold']['ar-eg'] = ""; -$text['title_description-music_on_hold']['de-at'] = "Haltemusik können Dateien im WAV oder MP3 Format sein. Um MP3 Dateien abzuspielen zu können, muss mod_shout installiert und aktiviert sein. Sie können die Lautstärke der MP3 Dateien in den Einstellungen verändern. Für beste Funktionalität laden Sie 16bit, 8/16/32/48 kHz mono WAV Dateien hoch."; //copied from de-de -$text['title_description-music_on_hold']['de-ch'] = "Haltemusik können Dateien im WAV oder MP3 Format sein. Um MP3 Dateien abzuspielen zu können, muss mod_shout installiert und aktiviert sein. Sie können die Lautstärke der MP3 Dateien in den Einstellungen verändern. Für beste Funktionalität laden Sie 16bit, 8/16/32/48 kHz mono WAV Dateien hoch."; //copied from de-de -$text['title_description-music_on_hold']['de-de'] = "Haltemusik können Dateien im WAV oder MP3 Format sein. Um MP3 Dateien abzuspielen zu können, muss mod_shout installiert und aktiviert sein. Sie können die Lautstärke der MP3 Dateien in den Einstellungen verändern. Für beste Funktionalität laden Sie 16bit, 8/16/32/48 kHz mono WAV Dateien hoch."; -$text['title_description-music_on_hold']['es-cl'] = "La música en espera puede estar en formato WAV o MP3. Para reproducir un archivo en frmato MP3 debe tener activado el módulo mod_shout. Puede ajustar el volumen del MP3 desde la pestaña 'Configuraciones'. Para el mejor rendimiento se recomienda utilizar archivos en formato WAV 16 bit, 8/16/32/48 kHz mono."; -$text['title_description-music_on_hold']['es-mx'] = "La música en espera puede estar en formato WAV o MP3. Para reproducir un archivo en frmato MP3 debe tener activado el módulo mod_shout. Puede ajustar el volumen del MP3 desde la pestaña 'Configuraciones'. Para el mejor rendimiento se recomienda utilizar archivos en formato WAV 16 bit, 8/16/32/48 kHz mono."; //copied from es-cl -$text['title_description-music_on_hold']['fr-ca'] = "La Musique d'attente peut être en WAV ou en MP3. Pour le MP3, mod_shout doit être activé dans la section modules. Le volume peut être réglé dans la partie configuration. Pour de meilleures performances, utiliser des fichiers WAV 16 bit, 8/16/32/48 kHz mono."; //copied from fr-fr -$text['title_description-music_on_hold']['fr-fr'] = "La Musique d'attente peut être en WAV ou en MP3. Pour le MP3, mod_shout doit être activé dans la section modules. Le volume peut être réglé dans la partie configuration. Pour de meilleures performances, utiliser des fichiers WAV 16 bit, 8/16/32/48 kHz mono."; +$text['title_description-music_on_hold']['de-at'] = "Haltemusik können Dateien im WAV oder MP3 Format sein. Für beste Funktionalität laden Sie 16bit, 8/16/32/48 kHz mono WAV Dateien hoch."; //copied from de-de +$text['title_description-music_on_hold']['de-ch'] = "Haltemusik können Dateien im WAV oder MP3 Format sein. Für beste Funktionalität laden Sie 16bit, 8/16/32/48 kHz mono WAV Dateien hoch."; //copied from de-de +$text['title_description-music_on_hold']['de-de'] = "Haltemusik können Dateien im WAV oder MP3 Format sein. Für beste Funktionalität laden Sie 16bit, 8/16/32/48 kHz mono WAV Dateien hoch."; +$text['title_description-music_on_hold']['es-cl'] = "La música en espera puede estar en formato WAV o MP3. Para el mejor rendimiento se recomienda utilizar archivos en formato WAV 16 bit, 8/16/32/48 kHz mono."; +$text['title_description-music_on_hold']['es-mx'] = "La música en espera puede estar en formato WAV o MP3. Para el mejor rendimiento se recomienda utilizar archivos en formato WAV 16 bit, 8/16/32/48 kHz mono."; //copied from es-cl +$text['title_description-music_on_hold']['fr-ca'] = "La Musique d'attente peut être en WAV ou en MP3. Le volume peut être réglé dans la partie configuration. Pour de meilleures performances, utiliser des fichiers WAV 16 bit, 8/16/32/48 kHz mono."; //copied from fr-fr +$text['title_description-music_on_hold']['fr-fr'] = "La Musique d'attente peut être en WAV ou en MP3. Pour de meilleures performances, utiliser des fichiers WAV 16 bit, 8/16/32/48 kHz mono."; $text['title_description-music_on_hold']['he-il'] = ""; -$text['title_description-music_on_hold']['it-it'] = "La musica di attesa può essere in formato WAV o MP3. Per suonare i file MP3 è necessario avere mod_shout abilitato nella sezione 'Moduli'. Si può regolare il volume dei file MP3 dalla sezione Parametri. Per una migliore qualità caricare file 16 bit, 8/16/32/48 kHz mono WAV files."; -$text['title_description-music_on_hold']['nl-nl'] = "Wachtmuziek mag in WAV of MP3 formaat zijn. Om een MP3 bestand te spelen moet mod_shout aan staan bij de Modulen tab. Het volume van de MP3 audio kan op de instellingen tab ingevoerd worden. Voor de beste prestaties gebruik 16 bit, 8/16/32/48 kHz mono WAV files."; -$text['title_description-music_on_hold']['pl-pl'] = "Muzyka na czekanie może być w formacie wav lub mp3. Aby odtwarzać mp3 konieczne jest zainstalowanie modułu mod_shout (można to zrobić w zakładce Moduły). Można także zmienić głośność formatu mp3 w zakładce Ustawienia. W celu osiągniecia najlepszej jakości prześlij pliki w formacie wav o następującej specyfikacji: 16 bit, 8/16/32/48 kHz mono."; -$text['title_description-music_on_hold']['pt-br'] = "Música em espera pode ser com base em arquivos com o formato WAV ou MP3. Para ouvir um ficheiro MP3 deverá ter o mod_shout activado na tab 'Módulos'. Pode ajustar o volume do áudio MP3 a partir da tab 'Definições'. Para um melhor desempenho carregue ficheiros WAV de 16 bit, 8/16/32/48 kHz mono."; -$text['title_description-music_on_hold']['pt-pt'] = "Música em espera pode ser com base em ficheiros com o formato WAV ou MP3. Para ouvir um ficheiro MP3 deverá ter o mod_shout activado na tab 'Módulos'. Pode ajustar o volume do áudio MP3 a partir da tab 'Definições'. Para um melhor desempenho carregue ficheiros WAV de 16 bit, 8/16/32/48 kHz mono."; +$text['title_description-music_on_hold']['it-it'] = "La musica di attesa può essere in formato WAV o MP3. Per una migliore qualità caricare file 16 bit, 8/16/32/48 kHz mono WAV files."; +$text['title_description-music_on_hold']['nl-nl'] = "Wachtmuziek mag in WAV of MP3 formaat zijn. Voor de beste prestaties gebruik 16 bit, 8/16/32/48 kHz mono WAV files."; +$text['title_description-music_on_hold']['pl-pl'] = "Muzyka na czekanie może być w formacie wav lub mp3. W celu osiągniecia najlepszej jakości prześlij pliki w formacie wav o następującej specyfikacji: 16 bit, 8/16/32/48 kHz mono."; +$text['title_description-music_on_hold']['pt-br'] = "Música em espera pode ser com base em arquivos com o formato WAV ou MP3. Pode ajustar o volume do áudio MP3 a partir da tab 'Definições'. Para um melhor desempenho carregue ficheiros WAV de 16 bit, 8/16/32/48 kHz mono."; +$text['title_description-music_on_hold']['pt-pt'] = "Música em espera pode ser com base em ficheiros com o formato WAV ou MP3. Para um melhor desempenho carregue ficheiros WAV de 16 bit, 8/16/32/48 kHz mono."; $text['title_description-music_on_hold']['ro-ro'] = ""; -$text['title_description-music_on_hold']['ru-ru'] = "Музыка на удержании может быть в формате WAV или MP3. Чтобы воспроизвести файл MP3, на вкладке «Модули» необходимо включить mod_shout. Вы можете отрегулировать громкость звука MP3 на вкладке «Настройки». Для лучшей производительности загружайте 16-битные, 8/16/32/48 кГц моно файлы WAV."; -$text['title_description-music_on_hold']['sv-se'] = "Väntmusik kan vara i formaten WAV eller MP3. För att spela upp en MP3 fil så måste 'mod_shout' vara aktiverat i 'moduler' fliken. Du kan justera volymen på MP3 filerna genom inställnings fliken. För bästa prestanda, ladda upp 16 bit, 8/16/32/48 kHz mono WAV filer."; -$text['title_description-music_on_hold']['uk-ua'] = "Музика на утриманні може бути в WAV або MP3 формат. Для відтворення файлів MP3 ви повинні включити mod_shout на вкладці 'модулі'. Ви можете налаштувати гучність MP3-аудіо на вкладці «Налаштування». Для кращої продуктивності завантаження 16 біт, моно 8/16/32/48 кГц WAV файлів."; +$text['title_description-music_on_hold']['ru-ru'] = "Музыка на удержании может быть в формате WAV или MP3. Для лучшей производительности загружайте 16-битные, 8/16/32/48 кГц моно файлы WAV."; +$text['title_description-music_on_hold']['sv-se'] = "Väntmusik kan vara i formaten WAV eller MP3. För bästa prestanda, ladda upp 16 bit, 8/16/32/48 kHz mono WAV filer."; +$text['title_description-music_on_hold']['uk-ua'] = "Музика на утриманні може бути в WAV або MP3 формат. Для кращої продуктивності завантаження 16 біт, моно 8/16/32/48 кГц WAV файлів."; $text['button-upload']['en-us'] = "Upload"; $text['button-upload']['en-gb'] = "Upload"; From e22b1fc4e2678dc1a5d41f34c299295c21837d21 Mon Sep 17 00:00:00 2001 From: jrmcclean <68025295+jrmcclean@users.noreply.github.com> Date: Thu, 30 Jul 2020 11:36:27 -0400 Subject: [PATCH 346/621] Update system.php (#5369) * Update system.php PHP version info is not displaying when FreeSWITCH is off. Line 169 corrects this issue and the information is displayed regardless if FreeSWITCH is on or off. Added Windows support to display System Memory. --- app/system/system.php | 43 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/app/system/system.php b/app/system/system.php index 510f09d2a8..2888f554b2 100644 --- a/app/system/system.php +++ b/app/system/system.php @@ -166,14 +166,15 @@ echo " \n"; echo "\n"; } - echo "\n"; - echo " \n"; - echo " \n"; - echo "\n"; } + echo "\n"; + echo " \n"; + echo " \n"; + echo "\n"; + echo "\n"; echo " \n"; echo "\n"; @@ -308,6 +309,36 @@ echo "

"; } } + + //Windows + if (stristr(PHP_OS, 'WIN')) { + echo "\n"; + if (strlen($shell_result) > 0) { + echo "
$switch_git_info
\n"; - echo " ".$text['label-php']." ".$text['label-version']."\n"; - echo " ".phpversion()."
\n"; + echo " ".$text['label-php']." ".$text['label-version']."\n"; + echo " ".phpversion()."
".$text['title-os-info']."
\n"; + echo "\n"; + echo " \n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo "\n"; + echo "
".$text['Physical Memory']."
\n"; + echo " ".$text['label-mem']." \n"; + echo " \n"; + echo " $shell_result mb\n"; + echo "
\n"; + echo "

"; + + } + } } //cpu information From e2988f25a4086ef1ab0428c0af57bd9988c1a43e Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Thu, 30 Jul 2020 17:07:52 +0100 Subject: [PATCH 347/621] Update {$mac}.xml (#5364) add Lcd_Contrast to display screen better --- resources/templates/provision/linksys/spa921/{$mac}.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/templates/provision/linksys/spa921/{$mac}.xml b/resources/templates/provision/linksys/spa921/{$mac}.xml index 96ad90c5e2..0ec683b886 100644 --- a/resources/templates/provision/linksys/spa921/{$mac}.xml +++ b/resources/templates/provision/linksys/spa921/{$mac}.xml @@ -32,4 +32,5 @@ 6 {$spa_time_format} {$spa_date_format} +0 From 303d417d5ecd493fd6715e0cb08cab3d9b14df44 Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Thu, 30 Jul 2020 17:09:36 +0100 Subject: [PATCH 348/621] Update {$mac}.xml (#5363) * Update {$mac}.xml fix lcd_contrast in spa941 --- resources/templates/provision/linksys/spa941/{$mac}.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/linksys/spa941/{$mac}.xml b/resources/templates/provision/linksys/spa941/{$mac}.xml index 1acbc2fc2d..8bbe3e2dac 100644 --- a/resources/templates/provision/linksys/spa941/{$mac}.xml +++ b/resources/templates/provision/linksys/spa941/{$mac}.xml @@ -729,6 +729,6 @@ 8 12 10 -8 10 s +0 From 8427d22939edde9314cf4673a2a604f84382bcf1 Mon Sep 17 00:00:00 2001 From: Len Date: Thu, 30 Jul 2020 12:24:35 -0400 Subject: [PATCH 349/621] Update version to 4.5.16 (#5371) --- core/software/resources/classes/software.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/software/resources/classes/software.php b/core/software/resources/classes/software.php index 05b80c7300..fd6230e703 100644 --- a/core/software/resources/classes/software.php +++ b/core/software/resources/classes/software.php @@ -12,7 +12,7 @@ if (!class_exists('software')) { * version */ public static function version() { - return '4.5.15'; + return '4.5.16'; } /** From d19e81bb224d677b694c1d9c6c80f59ba4116fb8 Mon Sep 17 00:00:00 2001 From: Gill Abada Date: Fri, 31 Jul 2020 12:01:36 -0400 Subject: [PATCH 350/621] feature add mask/unmask recordings in real time. white space cleanup. (#5373) Co-authored-by: Gill Abada --- .../switch/conf/dialplan/050_user_record.xml | 2 ++ .../resources/scripts/app/ring_groups/index.lua | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/dialplans/resources/switch/conf/dialplan/050_user_record.xml b/app/dialplans/resources/switch/conf/dialplan/050_user_record.xml index 85f0552787..0c3234a51c 100644 --- a/app/dialplans/resources/switch/conf/dialplan/050_user_record.xml +++ b/app/dialplans/resources/switch/conf/dialplan/050_user_record.xml @@ -46,6 +46,8 @@ + + diff --git a/app/scripts/resources/scripts/app/ring_groups/index.lua b/app/scripts/resources/scripts/app/ring_groups/index.lua index 343743c280..e8977d1300 100644 --- a/app/scripts/resources/scripts/app/ring_groups/index.lua +++ b/app/scripts/resources/scripts/app/ring_groups/index.lua @@ -25,6 +25,7 @@ -- -- Contributor(s): -- Mark J Crane +-- Gill Abada --include the log log = require "resources.functions.log".ring_group @@ -580,7 +581,7 @@ --Calculate the destination_timeout for follow-me destinations. --The call should honor ring group timeouts with rg delays, follow-me timeouts and follow-me delays factored in. - --Destinations with a timeout of 0 or negative numbers should be ignored. + --Destinations with a timeout of 0 or negative numbers should be ignored. if (tonumber(field.destination_timeout) < (tonumber(row.destination_timeout) - tonumber(field.destination_delay))) then new_destination_timeout = field.destination_timeout; else @@ -879,12 +880,14 @@ -- end --set bind digit action - local bind_target = 'peer' + local bind_target = 'local' if session:getVariable("sip_authorized") == "true" then - bind_target = 'both'; + bind_target = 'peer'; end local bindings = { "local,*2,exec:record_session," .. record_path .. "/" .. record_name, + "local,*5,api:uuid_record," .. uuid .. " mask " .. record_path .. "/" .. record_name, + "local,*6,api:uuid_record," .. uuid .. " unmask " .. record_path .. "/" .. record_name, -- "local,*0,exec:execute_extension,conf_xfer_from_dialplan XML conf-xfer@" .. context } for _, str in ipairs(bindings) do @@ -920,7 +923,7 @@ --if the timeout was reached exit the loop and go to the timeout action if (tonumber(ring_group_call_timeout) == timeout) then - break; + break; end --send the call to the destination From d23073f9255b6f693a24ab2c66dff13a6f0a98ef Mon Sep 17 00:00:00 2001 From: chansizzle <14916599+chansizzle@users.noreply.github.com> Date: Fri, 31 Jul 2020 18:16:07 -0600 Subject: [PATCH 351/621] Update 045_call_recording_on_demand.xml (#5376) mask/unmask on demand recordings --- .../switch/conf/dialplan/045_call_recording_on_demand.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/dialplans/resources/switch/conf/dialplan/045_call_recording_on_demand.xml b/app/dialplans/resources/switch/conf/dialplan/045_call_recording_on_demand.xml index bb84aff1d6..1d62e10365 100644 --- a/app/dialplans/resources/switch/conf/dialplan/045_call_recording_on_demand.xml +++ b/app/dialplans/resources/switch/conf/dialplan/045_call_recording_on_demand.xml @@ -8,6 +8,8 @@ + + From 4ddaaf0b1f2cb7d4c0a86b5cb5a4a4a92f824107 Mon Sep 17 00:00:00 2001 From: benwiesner1 <42681729+benwiesner1@users.noreply.github.com> Date: Fri, 31 Jul 2020 20:44:26 -0700 Subject: [PATCH 352/621] Update css.php (#5375) remove underline on hover i think is a bit cleaner --- themes/default/css.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/default/css.php b/themes/default/css.php index d4a8cff03e..c0646ce129 100644 --- a/themes/default/css.php +++ b/themes/default/css.php @@ -1197,7 +1197,7 @@ header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600).' GMT'); a.login_link:hover { color: !important; cursor: pointer; - text-decoration: underline; + text-decoration: none; } ; - text-decoration: underline; + text-decoration: none; } button.btn { @@ -1675,7 +1675,7 @@ header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600).' GMT'); th a:hover { color: ; - text-decoration: underline; + text-decoration: none; } td { From 1956ff5f6123dac2a775fe745d66dd93718d6779 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 3 Aug 2020 08:31:17 -0600 Subject: [PATCH 353/621] Correct the conference description. --- app/conferences/app_languages.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/conferences/app_languages.php b/app/conferences/app_languages.php index 3d1275b2ff..712f3d98ca 100644 --- a/app/conferences/app_languages.php +++ b/app/conferences/app_languages.php @@ -43,8 +43,8 @@ $text['title-conference']['ru-ru'] = "Конференции"; $text['title-conference']['sv-se'] = "Konferenser"; $text['title-conference']['uk-ua'] = ""; -$text['description']['en-us'] = "Conferences is used to setup conference rooms with a name, description, and optional pin number."; -$text['description']['en-gb'] = "Conferences is used to setup conference rooms with a name, description, and optional pin number."; +$text['description']['en-us'] = "Conference is used to setup conference rooms with a name, description, and optional pin number."; +$text['description']['en-gb'] = "Conference is used to setup conference rooms with a name, description, and optional pin number."; $text['description']['ar-eg'] = ""; $text['description']['de-at'] = "Konferenzen wird verwendet, um Konferenzräume mit einem Namen, Beschreibung und optionaler PIN zu erstellen."; //copied from de-de $text['description']['de-ch'] = "Konferenzen wird verwendet, um Konferenzräume mit einem Namen, Beschreibung und optionaler PIN zu erstellen."; //copied from de-de From 95e9901e3320b8b481329c60310439a00c993bac Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 3 Aug 2020 08:32:18 -0600 Subject: [PATCH 354/621] Change the conference edit title. --- app/conferences/conference_edit.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/conferences/conference_edit.php b/app/conferences/conference_edit.php index e01f704122..e7ebc033d7 100644 --- a/app/conferences/conference_edit.php +++ b/app/conferences/conference_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2018 + Portions created by the Initial Developer are Copyright (C) 2008-2020 the Initial Developer. All Rights Reserved. Contributor(s): @@ -321,12 +321,7 @@ echo "
\n"; echo "
"; - if ($action == "add") { - echo "".$text['label-conference-add'].""; - } - if ($action == "update") { - echo "".$text['label-conference-edit'].""; - } + echo " ".$text['title-conference'].""; echo "
\n"; echo "
\n"; echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'conferences.php']); From 2b7c938f4993314b1465222728d44789a9ec1978 Mon Sep 17 00:00:00 2001 From: Luis Daniel Lucio Quiroz Date: Mon, 3 Aug 2020 15:12:19 -0400 Subject: [PATCH 355/621] Add digium support to get_vendor_by_agent() (#5380) Missing this brand --- app/devices/resources/classes/device.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/devices/resources/classes/device.php b/app/devices/resources/classes/device.php index bf63889f7a..3629450c0b 100644 --- a/app/devices/resources/classes/device.php +++ b/app/devices/resources/classes/device.php @@ -175,6 +175,9 @@ include "root.php"; if (preg_replace('/^.*?(cisco\/spa).*$/i', '$1', $agent) == "cisco/spa") { return "cisco-spa"; } + if (preg_replace('/^.*?(digium).*$/i', '$1', $agent) == "digium") { + return "digium"; + } if (preg_replace('/^.*?(grandstream).*$/i', '$1', $agent) == "grandstream") { return "grandstream"; } @@ -1223,4 +1226,4 @@ include "root.php"; } //class -?> \ No newline at end of file +?> From 1f05ee8a869f43630f161b4ed752bc4e0dc6b5ba Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 4 Aug 2020 20:28:33 -0600 Subject: [PATCH 356/621] Always remove unrelated domains by default. --- .../resources/classes/registrations.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/registrations/resources/classes/registrations.php b/app/registrations/resources/classes/registrations.php index 9631123964..0791c919bb 100644 --- a/app/registrations/resources/classes/registrations.php +++ b/app/registrations/resources/classes/registrations.php @@ -170,13 +170,11 @@ if (!class_exists('registrations')) { } //remove unrelated domains - if (count($_SESSION["domains"]) > 1) { - if (!permission_exists('registration_all') || $this->show != 'all') { - if ($registrations[$id]['sip-auth-realm'] == $_SESSION['domain_name']) {} - else if ($user_array[1] == $_SESSION['domain_name']) {} - else { - unset($registrations[$id]); - } + if (!permission_exists('registration_all') || $this->show != 'all') { + if ($registrations[$id]['sip-auth-realm'] == $_SESSION['domain_name']) {} + else if ($user_array[1] == $_SESSION['domain_name']) {} + else { + unset($registrations[$id]); } } From f5d5886b9d1b74b1ad71621c9323401413c958e4 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 5 Aug 2020 10:45:59 -0600 Subject: [PATCH 357/621] Rename Calls to Call Forward --- app/calls/app_config.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/calls/app_config.php b/app/calls/app_config.php index 9224e54d59..157c972801 100644 --- a/app/calls/app_config.php +++ b/app/calls/app_config.php @@ -1,7 +1,7 @@ Date: Wed, 5 Aug 2020 10:47:03 -0600 Subject: [PATCH 358/621] Change call routing to call forward. --- app/calls/app_languages.php | 162 ++++++++++++++++++------------------ 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/app/calls/app_languages.php b/app/calls/app_languages.php index fa87abd5d6..37836ac971 100644 --- a/app/calls/app_languages.php +++ b/app/calls/app_languages.php @@ -1,26 +1,47 @@ Date: Wed, 5 Aug 2020 10:48:33 -0600 Subject: [PATCH 359/621] Change Call Routing to Call Forward --- app/calls/app_menu.php | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/app/calls/app_menu.php b/app/calls/app_menu.php index 3b2659ce58..5322964730 100644 --- a/app/calls/app_menu.php +++ b/app/calls/app_menu.php @@ -1,26 +1,26 @@ Date: Wed, 5 Aug 2020 10:50:37 -0600 Subject: [PATCH 360/621] Add show all. --- app/calls/calls.php | 90 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 70 insertions(+), 20 deletions(-) diff --git a/app/calls/calls.php b/app/calls/calls.php index 26d6f14102..cbfe56b6df 100644 --- a/app/calls/calls.php +++ b/app/calls/calls.php @@ -81,19 +81,25 @@ $order_by = $_GET["order_by"]; $order = $_GET["order"]; -//handle search term +//get the search $search = strtolower($_GET["search"]); - if (strlen($search) > 0) { - $sql_search = "and ( "; - $sql_search .= "extension like :search "; - $sql_search .= "or lower(description) like :search "; - $sql_search .= ") "; - $parameters['search'] = '%'.$search.'%'; - } //define select count query $sql = "select count(*) from v_extensions "; - $sql .= "where domain_uuid = :domain_uuid "; + if ($_GET['show'] == "all" && permission_exists('call_forward_all')) { + $sql .= "where true "; + } + else { + $sql .= "where domain_uuid = :domain_uuid "; + $parameters['domain_uuid'] = $_SESSION['domain_uuid']; + } + if (strlen($search) > 0) { + $sql .= "and ( "; + $sql .= "extension like :search "; + $sql .= "or lower(description) like :search "; + $sql .= ") "; + $parameters['search'] = '%'.$search.'%'; + } $sql .= "and enabled = 'true' "; if (!permission_exists('extension_edit')) { if (is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) { @@ -112,18 +118,26 @@ } } $sql .= $sql_search; - $parameters['domain_uuid'] = $_SESSION['domain_uuid']; $database = new database; $num_rows = $database->select($sql, $parameters, 'column'); + unset($parameters); -//prepare to page the results +//prepare the paging if ($is_included) { $rows_per_page = 10; } else { $rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; } - $param = "&search=".$search; + $params[] = "app_uuid=".$app_uuid; + if ($search) { $params[] = "search=".$search; } + if ($order_by) { $params[] = "order_by=".$order_by; } + if ($order) { $params[] = "order=".$order; } + if ($_GET['show'] == "all" && permission_exists('call_forward_all')) { + $params[] .= "show=all"; + } + $param = $params ? implode('&', $params) : null; + unset($params); $page = $_GET['page']; if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page); @@ -132,7 +146,20 @@ //get the list $sql = "select * from v_extensions "; - $sql .= "where domain_uuid = :domain_uuid "; + if ($_GET['show'] == "all" && permission_exists('call_forward_all')) { + $sql .= "where true "; + } + else { + $sql .= "where domain_uuid = :domain_uuid "; + $parameters['domain_uuid'] = $_SESSION['domain_uuid']; + } + if (strlen($search) > 0) { + $sql .= "and ( "; + $sql .= "extension like :search "; + $sql .= "or lower(description) like :search "; + $sql .= ") "; + $parameters['search'] = '%'.$search.'%'; + } $sql .= "and enabled = 'true' "; if (!permission_exists('extension_edit')) { if (is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) { @@ -163,7 +190,7 @@ //include header if (!$is_included) { - $document['title'] = $text['title-call_routing']; + $document['title'] = $text['title-call_forward']; } require_once "resources/header.php"; @@ -180,7 +207,7 @@ //show the content if ($is_included) { echo "
\n"; - echo "
".$text['header-call_routing']."
\n"; + echo "
".$text['header-call_forward']."
\n"; echo "
\n"; if ($num_rows > 10) { echo button::create(['type'=>'button','label'=>$text['button-view_all'],'icon'=>'project-diagram','collapse'=>false,'link'=>PROJECT_PATH.'/app/calls/calls.php']); @@ -191,24 +218,31 @@ } else { echo "
\n"; - echo "
".$text['header-call_routing']." (".$num_rows.")
\n"; + echo "
".$text['header-call_forward']." (".$num_rows.")
\n"; echo "
\n"; + if ($extensions) { echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'name'=>'btn_toggle','onclick'=>"toggle_select(); this.blur();"]); } echo ""; + if ($_GET['show'] !== 'all' && permission_exists('call_forward_all')) { + echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?show=all'.($params ? '&'.implode('&', $params) : null)]); + } echo "