From 134ce77d6359b0f8ce1566e7bba570bb97b1e908 Mon Sep 17 00:00:00 2001 From: graycom-git <63504189+graycom-git@users.noreply.github.com> Date: Sun, 3 Aug 2025 15:19:56 +0100 Subject: [PATCH] Update dialplan_outbound_add.php (#7444) change to row order for gateways dropdown, previous code didnt groups gateways for other domains together --- app/dialplan_outbound/dialplan_outbound_add.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/dialplan_outbound/dialplan_outbound_add.php b/app/dialplan_outbound/dialplan_outbound_add.php index 3e0e5d9429..486638d8e8 100644 --- a/app/dialplan_outbound/dialplan_outbound_add.php +++ b/app/dialplan_outbound/dialplan_outbound_add.php @@ -879,7 +879,7 @@ $sql = "select * from v_gateways "; $sql .= "where enabled = 'true' "; if (permission_exists('outbound_route_any_gateway')) { - $sql .= "order by domain_uuid = :domain_uuid DESC, gateway "; + $sql .= "order by CASE WHEN domain_uuid = :domain_uuid THEN 0 ELSE 1 END, domain_uuid DESC, gateway "; } else { $sql .= "and domain_uuid = :domain_uuid ";