From 9bb40cd05113c8ecfa6d093a402f9ccdcb59f974 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Sat, 10 May 2014 20:20:22 +0000 Subject: [PATCH] Fix the dialplan default.xml for the debian package install --- app/dialplan/resources/classes/dialplan.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/dialplan/resources/classes/dialplan.php b/app/dialplan/resources/classes/dialplan.php index 0a04cae95e..47f466b9d0 100644 --- a/app/dialplan/resources/classes/dialplan.php +++ b/app/dialplan/resources/classes/dialplan.php @@ -181,8 +181,15 @@ include "root.php"; public function restore_advanced_xml() { $switch_dialplan_dir = $this->switch_dialplan_dir; if (is_dir($switch_dialplan_dir)) { + //copy resources/templates/conf to the freeswitch conf dir + if (file_exists('/usr/share/fusionpbx/resources/templates/conf')){ + $src_dir = "/usr/share/fusionpbx/resources/templates/conf"; + } + else { + $src_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/conf"; + } //get the contents of the dialplan/default.xml - $file_default_path = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/templates/conf/dialplan/default.xml'; + $file_default_path = $src_dir."/dialplan/default.xml'; $file_default_contents = file_get_contents($file_default_path); //prepare the file contents and the path if (count($_SESSION['domains']) < 2) {