From 570171bce0d6f87cc19eb303f118809cb192751e Mon Sep 17 00:00:00 2001 From: steve-lad <72376554+steve-lad@users.noreply.github.com> Date: Fri, 13 Aug 2021 08:05:41 +0200 Subject: [PATCH] Remove chan-sccp (null) defaults --- install.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.php b/install.php index bd0a50d..67f9eca 100644 --- a/install.php +++ b/install.php @@ -1122,7 +1122,8 @@ function cleanUpSccpSettings() { unset($settingsFromDb[$key]); } } else { - ($sysConfiguration[$key]['DefaultValue'] == '(null)') ? '' : $sysConfiguration[$key]['DefaultValue']; + dbug($sysConfiguration); + $sysConfiguration[$key]['DefaultValue'] = ($sysConfiguration[$key]['DefaultValue'] == '(null)') ? '' : $sysConfiguration[$key]['DefaultValue']; if (array_key_exists($key,$settingsFromDb)) { // Preserve sequence and type $settingsFromDb[$key]['systemdefault'] = $sysConfiguration[$key]['DefaultValue']; @@ -1130,6 +1131,7 @@ function cleanUpSccpSettings() { $settingsFromDb[$key] = array('keyword' => $key, 'seq' => 0, 'type' => 0, 'data' => '', 'systemdefault' => $sysConfiguration[$key]['DefaultValue']); } } + dbug($settingsFromDb); // Override certain chan-sccp defaults as they are based on a non-FreePbx system $settingsFromDb['context']['systemdefault'] = 'from-internal'; $settingsFromDb['directed_pickup']['systemdefault'] = 'no';