From d2fe653199e8bd7c0faeba47c7792e2d3d089b20 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 28 Jan 2026 12:36:40 -0700 Subject: [PATCH] Fix the destination check for duplicates --- app/destinations/destination_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index 78127077fd..05154ed6c5 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -192,7 +192,7 @@ if (empty($destination_enabled)) { $msg .= $text['message-required']." ".$text['label-destination_enabled']."
\n"; } //check for duplicates - if ($destination_type == 'inbound' && $destination_number != $db_destination_number && $_SESSION['destinations']['unique']['boolean'] == 'true') { + if ($action == 'add' && $destination_type == 'inbound' && $_SESSION['destinations']['unique']['boolean'] == 'true') { $sql = "select count(*) from v_destinations "; $sql .= "where (destination_number = :destination_number or destination_prefix || destination_number = :destination_number) "; $sql .= "and destination_type = 'inbound' ";