From d62f360f772aa57fad46ac3d26b4a8afd8c0b5f8 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 24 Aug 2022 16:53:31 -0600 Subject: [PATCH] Delete the cache in e.164 format. --- app/destinations/destination_edit.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index ab86f92c73..25e6efe7d7 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -935,11 +935,15 @@ $cache->delete("dialplan:".$destination_context); } if ($_SESSION['destinations']['dialplan_mode']['text'] == 'single') { - if (isset($destination_number) && is_numeric($destination_number)) { - $cache->delete("dialplan:".$destination_context.":".$destination_number); - } if (isset($destination_prefix) && is_numeric($destination_prefix) && isset($destination_number) && is_numeric($destination_number)) { $cache->delete("dialplan:".$destination_context.":".$destination_prefix.$destination_number); + $cache->delete("dialplan:".$destination_context.":+".$destination_prefix.$destination_number); + } + if (isset($destination_number) && substr($destination_number, 0, 1) == '+' && is_numeric(str_replace('+', '', $destination_number))) { + $cache->delete("dialplan:".$destination_context.":".$destination_number); + } + if (isset($destination_number) && is_numeric($destination_number)) { + $cache->delete("dialplan:".$destination_context.":".$destination_number); } }