From caacf5b82ca664029def7a72cbd0c20ede265806 Mon Sep 17 00:00:00 2001 From: Darren Williams <9353544+PBXForums@users.noreply.github.com> Date: Wed, 28 Oct 2020 18:55:26 +0000 Subject: [PATCH] Update dialplan_outbound_add.php Make the gateway select order the gateways with the current domain first --- 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 b33f058583..f0cfa99e5f 100644 --- a/app/dialplan_outbound/dialplan_outbound_add.php +++ b/app/dialplan_outbound/dialplan_outbound_add.php @@ -729,7 +729,7 @@ $sql = "select * from v_gateways "; $sql .= "where enabled = 'true' "; if (permission_exists('outbound_route_any_gateway')) { - $sql .= "order by domain_uuid, gateway "; + $sql .= "order by domain_uuid = '$domain_uuid' DESC, gateway "; } else { $sql .= "and domain_uuid = :domain_uuid ";