Browse Source

Updated SQL scripts

drop_requests
Sergey Safarov 8 years ago
committed by lazedo
parent
commit
a94792e3d9
4 changed files with 4 additions and 1 deletions
  1. +1
    -0
      kamailio/db_queries_kazoo.cfg
  2. +1
    -0
      kamailio/db_queries_mysql.cfg
  3. +1
    -0
      kamailio/db_queries_postgres.cfg
  4. +1
    -1
      kamailio/presence-reset.cfg

+ 1
- 0
kamailio/db_queries_kazoo.cfg View File

@ -12,3 +12,4 @@
#!substdef "!KZQ_PRESENCE_SEARCH_DETAIL!select * from active_watchers_log where presentity_uri = \"\$var(presentity_uri)\"!g"
#!substdef "!KZQ_PRESENCE_SEARCH_SUMMARY!select * from active_watchers where watcher_domain = \"\$var(Domain)\"!g"
#!substdef "!KZQ_HAS_PRESENTITY!select count(*) as count from presentity where username = \"\$subs(to_user)\" and domain = \"\$subs(to_domain)\" and event = \"\$subs(event)\"!g"
#!substdef "!KZQ_PRESENCE_RESET!delete from presentity where sender = \"\$var(MediaUrl)\"!g"

+ 1
- 0
kamailio/db_queries_mysql.cfg View File

@ -11,3 +11,4 @@
#!substdef "!KZQ_RESET_PUBLISHER_UPDATE!update active_watchers set expires = \$TS where id in (select b.id from presentity a inner join active_watchers b on a.username = b.to_user and a.domain = b.to_domain and a.event = b.event where a.sender = \"\$var(MediaUrl)\")!g"
#!substdef "!KZQ_PRESENCE_SEARCH_DETAIL!select * from active_watchers_log where presentity_uri = \"\$var(presentity_uri)\"!g"
#!substdef "!KZQ_PRESENCE_SEARCH_SUMMARY!select * from active_watchers where watcher_domain = \"\$var(Domain)\"!g"
#!substdef "!KZQ_PRESENCE_RESET!delete from presentity where sender = \"\$var(MediaUrl)\"!g"

+ 1
- 0
kamailio/db_queries_postgres.cfg View File

@ -11,3 +11,4 @@
#!substdef "!KZQ_RESET_PUBLISHER_UPDATE!update active_watchers set expires = \$TS where id in (select b.id from presentity a inner join active_watchers b on a.username = b.to_user and a.domain = b.to_domain and a.event = b.event where a.sender = '\$var(MediaUrl)')!g"
#!substdef "!KZQ_PRESENCE_SEARCH_DETAIL!select * from active_watchers_log where presentity_uri = '\$var(presentity_uri)'!g"
#!substdef "!KZQ_PRESENCE_SEARCH_SUMMARY!select * from active_watchers where watcher_domain = '\$var(Domain)'!g"
#!substdef "!KZQ_PRESENCE_RESET!delete from presentity where sender = '\$var(MediaUrl)'!g"

+ 1
- 1
kamailio/presence-reset.cfg View File

@ -32,7 +32,7 @@ route[RESET_PUBLISHER]
$var(Query) = $_s(KZQ_RESET_PUBLISHER_UPDATE);
sql_query("exec", "$var(Query)");
}
$var(Query) = $_s(delete from presentity where sender = "$var(MediaUrl)");
$var(Query) = $_s(KZQ_PRESENCE_RESET);
sql_query("exec", "$var(Query)");
$var(presentities) = $sqlrows(exec);
xlog("L_INFO", "$var(Msg-ID)|reset|removed $var(presentities) presentities from publisher $var(MediaUrl)\n");


Loading…
Cancel
Save