if (!is_readable($switch_storage_dir . '/fax/') && $switch_scripts_dir != "/storage") { mkdir($switch_storage_dir . '/fax', 0777, true); } if (!is_readable($switch_recordings_dir . '') && $switch_scripts_dir != "/recordings") { mkdir($switch_recordings_dir . '', 0777, true); } } //copy the files and directories from resources/install require_once "resources/classes/install.php"; $install = new install(); $install->domain_uuid = $_SESSION["domain_uuid"]; $install->domain = $domain_name; $install->switch_conf_dir = $switch_conf_dir; $install->switch_scripts_dir = $switch_scripts_dir; // $install->switch_sounds_dir = $switch_sounds_dir; $install->copy_conf(); $install->copy(); //create the dialplan/default.xml for single tenant or dialplan/domain.xml if (file_exists($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/app/dialplan")) { $dialplan = new dialplan(); $dialplan->domain_uuid = $_SESSION["domain_uuid"]; $dialplan->domain = $domain_name; $dialplan->switch_dialplan_dir = $switch_dialplan_dir; $dialplan->restore_advanced_xml(); //print_r($dialplan->result); } //write the xml_cdr.conf.xml file if (file_exists($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/app/xml_cdr")) { xml_cdr_conf_xml(); } //write the switch.conf.xml file