Delete the cache in e.164 format.

This commit is contained in:
FusionPBX 2022-08-24 16:53:31 -06:00 committed by GitHub
parent 6bb6ae6b2b
commit d62f360f77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -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);
}
}