From 1a82cb2fa938d207ff12928f055e102da8802ebe Mon Sep 17 00:00:00 2001 From: lazedo Date: Mon, 11 Mar 2019 15:14:14 +0000 Subject: [PATCH] add KEEPALIVE_ON_EXPIRED_REGISTRATION --- kamailio/presence-notify.cfg | 4 +--- kamailio/registrar-role.cfg | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/kamailio/presence-notify.cfg b/kamailio/presence-notify.cfg index cfef4e7..cf0edb6 100644 --- a/kamailio/presence-notify.cfg +++ b/kamailio/presence-notify.cfg @@ -1,4 +1,4 @@ -#!trydef KZ_PRESENCE_REMOVE_WATCHER_ON_EXPIRED_REGISTRATION 1 +#!trydef KZ_PRESENCE_REMOVE_WATCHER_ON_EXPIRED_REGISTRATION 0 kazoo.presence_notify = 1 descr "enable/disable sending notify callback to omnipresence" kazoo.presence_notify_timeout = 5000 descr "timeout in ms waiting for notify reply" @@ -202,8 +202,6 @@ route[PRESENCE_EXPIRED_REGISTRATION] $var(watcher) = $_s(sip:$ulc(exp=>aor)); $var(watcher_username) = $(var(watcher){uri.user}); $var(watcher_domain) = $(var(watcher){uri.host}); - $var(Query) = $_s(DELETE FROM presence_nat where contact in(select distinct contact from active_watchers WHERE watcher_username = "$var(watcher_username)" and watcher_domain = "$var(watcher_domain)");); - mq_add("presence_last_notity", "$uuid(g)", "$var(Query)"); $var(Query) = $_s(DELETE FROM active_watchers WHERE watcher_username = "$var(watcher_username)" and watcher_domain = "$var(watcher_domain)";); mq_add("presence_last_notity", "$uuid(g)", "$var(Query)"); } diff --git a/kamailio/registrar-role.cfg b/kamailio/registrar-role.cfg index 299234a..fd54ae1 100644 --- a/kamailio/registrar-role.cfg +++ b/kamailio/registrar-role.cfg @@ -462,6 +462,12 @@ event_route[usrloc:contact-expired] route(PRESENCE_EXPIRED_REGISTRATION); #!endif + #!ifdef NAT_TRAVERSAL_ROLE + #!ifndef KEEPALIVE_USE_NATHELPER + route(KEEPALIVE_ON_EXPIRED_REGISTRATION); + #!endif + #!endif + ## return until we handle this in ecallmr xlog("L_INFO", "$ulc(exp=>callid)|expired|removed registration for $ulc(exp=>aor) with contact : $ulc(exp=>addr)\n"); return;