From 9dec9943abc8367fb9d835e8228ce019264d69e8 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 21 Oct 2025 12:18:14 -0600 Subject: [PATCH] Update destination_context type inbound use public by default Update the destination_context if the type is inbound and context is empty, then use public. --- app/destinations/app_defaults.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/destinations/app_defaults.php b/app/destinations/app_defaults.php index 02f255d69f..7d6fa9a635 100644 --- a/app/destinations/app_defaults.php +++ b/app/destinations/app_defaults.php @@ -50,6 +50,20 @@ if ($domains_processed == 1) { } unset($extensions, $row, $array); + //update destination_context if type is inbound and context is empty then use public + $sql = "select count(destination_uuid) as count from v_destinations "; + $sql .= "where destination_context is null "; + $sql .= "and destination_type = 'inbound' "; + $destination_count = $database->select($sql, null, 'column'); + if ($destination_count > 0) { + $sql = "update v_destinations "; + $sql .= "set destination_context = 'public' "; + $sql .= "where destination_context is null "; + $sql .= "and destination_type = 'inbound' "; + $database->execute($sql, null); + unset($sql, $parameters); + } + //update destinations actions $sql = "select * from v_destinations "; $sql .= "where destination_actions is null ";