From 9ecbd54456a4a06c8e912e06a4b829b7bca5a3a8 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 28 Jan 2026 12:33:56 -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 c90cb02b0d..8a35143f81 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -204,7 +204,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 && $settings->get('destinations', 'unique', '')) { + if ($action == 'add' && $destination_type == 'inbound' && $settings->get('destinations', 'unique', false)) { $sql = "select count(*) from v_destinations "; $sql .= "where (destination_number = :destination_number or destination_prefix || destination_number = :destination_number) "; $sql .= "and destination_type = 'inbound' ";