From 6d89f947cb636598becd353dae08e2e26b78498e Mon Sep 17 00:00:00 2001 From: lazedo Date: Thu, 5 Feb 2015 01:43:58 +0000 Subject: [PATCH] flush registrar cache --- kamailio/registrar-role.cfg | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/kamailio/registrar-role.cfg b/kamailio/registrar-role.cfg index e43cf08..0dab254 100644 --- a/kamailio/registrar-role.cfg +++ b/kamailio/registrar-role.cfg @@ -154,4 +154,15 @@ route[ATTEMPT_AUTHORIZATION] exit; } +## kazoo event route , {"directory", "reg_flush") => reg-flush by kamailio limitations +## when a Event-Category or Event-Name has a underscore (_) we need to declare it with a dash (-) +event_route[kazoo:consumer-event-directory-reg-flush] +{ + $var(user) = $(kzE{kz.json,Username}) + "@" + $(kzE{kz.json,Realm}); + if ($sht(auth_cache=>$var(user)) != $null) { + xlog("L_INFO", "log|removing SIP credentials cache for $var(user)"); + $sht(auth_cache=>$var(user)) = $null; + } +} + # vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab