From d8b6e8bf668f842929f55806a5f325210bea264a Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 16 Nov 2021 11:13:35 -0700 Subject: [PATCH] When adding a new domain make sure to make the recordings directory. --- core/domains/domain_edit.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/domains/domain_edit.php b/core/domains/domain_edit.php index c01851ba87..bba7b7ef71 100644 --- a/core/domains/domain_edit.php +++ b/core/domains/domain_edit.php @@ -153,6 +153,14 @@ $dialplans->is_empty = "dialplan_xml"; $array = $dialplans->xml(); } + + //create the recordings directory for the new domain. + if (is_array($_SESSION['switch']['recordings']) && strlen($_SESSION['switch']['recordings']['dir']."/".$domain_name) > 0) { + if (!is_readable($_SESSION['switch']['recordings']['dir']."/".$domain_name)) { + mkdir($_SESSION['switch']['recordings']['dir']."/".$domain_name, 0770); + } + } + } else { message::add($text['message-domain_exists'],'negative');