Browse Source

add KEEPALIVE_ON_EXPIRED_REGISTRATION

4.3
lazedo 7 years ago
committed by Luis Azedo
parent
commit
1a82cb2fa9
2 changed files with 7 additions and 3 deletions
  1. +1
    -3
      kamailio/presence-notify.cfg
  2. +6
    -0
      kamailio/registrar-role.cfg

+ 1
- 3
kamailio/presence-notify.cfg View File

@ -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 = 1 descr "enable/disable sending notify callback to omnipresence"
kazoo.presence_notify_timeout = 5000 descr "timeout in ms waiting for notify reply" 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) = $_s(sip:$ulc(exp=>aor));
$var(watcher_username) = $(var(watcher){uri.user}); $var(watcher_username) = $(var(watcher){uri.user});
$var(watcher_domain) = $(var(watcher){uri.host}); $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)";); $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)"); mq_add("presence_last_notity", "$uuid(g)", "$var(Query)");
} }


+ 6
- 0
kamailio/registrar-role.cfg View File

@ -462,6 +462,12 @@ event_route[usrloc:contact-expired]
route(PRESENCE_EXPIRED_REGISTRATION); route(PRESENCE_EXPIRED_REGISTRATION);
#!endif #!endif
#!ifdef NAT_TRAVERSAL_ROLE
#!ifndef KEEPALIVE_USE_NATHELPER
route(KEEPALIVE_ON_EXPIRED_REGISTRATION);
#!endif
#!endif
## return until we handle this in ecallmr ## 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"); xlog("L_INFO", "$ulc(exp=>callid)|expired|removed registration for $ulc(exp=>aor) with contact : $ulc(exp=>addr)\n");
return; return;


Loading…
Cancel
Save