diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index 90b9b89e71..2bb18f8e69 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -153,7 +153,7 @@ //check for duplicates if ($destination_type == 'inbound' && $destination_number != $db_destination_number) { $sql = "select count(*) from v_destinations "; - $sql .= "where destination_number = :destination_number "; + $sql .= "where (destination_number = :destination_number or destination_prefix || destination_number = :destination_number) "; $sql .= "and destination_type = 'inbound' "; $parameters['destination_number'] = $destination_number; $database = new database;