From 68c4e2934605d3e93d13e1e472f4b6770caee5f6 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 26 Jun 2023 13:08:30 -0600 Subject: [PATCH] Update path to switch conf directory --- app/sip_profiles/app_defaults.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/sip_profiles/app_defaults.php b/app/sip_profiles/app_defaults.php index 9c9a2635ff..2849f9f95b 100644 --- a/app/sip_profiles/app_defaults.php +++ b/app/sip_profiles/app_defaults.php @@ -34,16 +34,21 @@ unset($sql); if ($num_rows == 0) { - if (file_exists('/usr/share/examples/fusionpbx/resources/templates/conf/sip_profiles')) { + if (file_exists('/usr/share/examples/fusionpbx/resources/templates/conf/sip_profiles/*.xml.noload')) { $sip_profile_dir = '/usr/share/examples/fusionpbx/resources/templates/conf/sip_profiles/*.xml.noload'; } - elseif (file_exists('/usr/local/share/fusionpbx/resources/templates/conf/sip_profiles')) { + elseif (file_exists('/usr/local/share/fusionpbx/resources/templates/conf/sip_profiles/*.xml.noload')) { $sip_profile_dir = '/usr/local/share/fusionpbx/resources/templates/conf/sip_profiles/*.xml.noload'; } + elseif (file_exists('/usr/local/www/fusionpbx/app/switch/resources/conf/sip_profiles/*.xml.noload')) { + $sip_profile_dir = '/usr/local/www/fusionpbx/app/switch/resources/conf/sip_profiles/*.xml.noload'; + } + elseif (file_exists('/var/www/fusionpbx/app/switch/resources/conf/sip_profiles/*.xml.noload')) { + $sip_profile_dir = '/var/www/fusionpbx/app/switch/resources/conf/sip_profiles/*.xml.noload'; + } else { $sip_profile_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/templates/conf/sip_profiles/*.xml.noload'; } - $xml_files = glob($sip_profile_dir); foreach ($xml_files as $x => &$xml_file) { //load the sip profile xml and save it into an array