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