From 142b4c4d5a8e08c93f662f71d078ecae04764577 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 29 Nov 2023 13:48:47 -0700 Subject: [PATCH] Add default value for conference_context --- app/conferences/app_defaults.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/conferences/app_defaults.php b/app/conferences/app_defaults.php index 042a90581c..de3f24d1e1 100644 --- a/app/conferences/app_defaults.php +++ b/app/conferences/app_defaults.php @@ -2,6 +2,7 @@ if ($domains_processed == 1) { + //replace - with an @ symbol $sql = "update v_dialplan_details "; $sql .= "set dialplan_detail_data = replace(dialplan_detail_data, '-','@') "; $sql .= "where dialplan_detail_type = 'conference' and dialplan_detail_data like '%-%';"; @@ -9,6 +10,17 @@ if ($domains_processed == 1) { $database->execute($sql); unset($sql); + //add the domain_name as the context + $sql = "UPDATE v_conferences as c "; + $sql .= "SET conference_context = ( "; + $sql .= " SELECT domain_name FROM v_domains as d "; + $sql .= " WHERE d.domain_uuid = c.domain_uuid "; + $sql .= ") "; + $sql .= "WHERE conference_context is null; "; + $database = new database; + $database->execute($sql); + unset($sql); + } ?>