Browse Source

macro/runtime for keepalive failed loglevel

update-rsyslog-config
lazedo 7 years ago
parent
commit
e388dd30c0
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      kamailio/keepalive.cfg

+ 3
- 1
kamailio/keepalive.cfg View File

@ -8,6 +8,7 @@
#!trydef KEEPALIVE_FAILED_THRESHOLD 2
#!trydef KEEPALIVE_EXPIRE_SUBSCRIPTIONS 1
#!trydef KEEPALIVE_EXPIRE_REGISTRATIONS 1
#!trydef KEEPALIVE_FAILED_LOG_LEVEL 0
#!substdef "!KEEPALIVE_S_FROM_URI!sip:keepalive@MY_HOSTNAME!g"
#!substdef "!KEEPALIVE_S_TIMERS!$def(KEEPALIVE_TIMERS)!g"
@ -18,6 +19,7 @@ kazoo.keepalive_timeout = KEEPALIVE_TIMEOUT descr "timeout in ms for keepalive t
kazoo.keepalive_failed_threshold = KEEPALIVE_FAILED_THRESHOLD descr "how many times can a device fail to respond to OPTIONS"
kazoo.keepalive_expire_subscriptions = KEEPALIVE_EXPIRE_SUBSCRIPTIONS descr "expires subscriptions that do not respond to OPTIONS"
kazoo.keepalive_expire_registrations = KEEPALIVE_EXPIRE_REGISTRATIONS descr "expires registrations that do not respond to OPTIONS"
kazoo.keepalive_failed_log_level = KEEPALIVE_FAILED_LOG_LEVEL descr "loglevel for keepalive failed reply"
modparam("rtimer", "timer", "name=keepalive_timer;interval=1;mode=KEEPALIVE_S_TIMERS;")
modparam("rtimer", "exec", "timer=keepalive_timer;route=KEEPALIVE_TIMER")
@ -135,7 +137,7 @@ onreply_route[KEEPALIVE_REPLY]
failure_route[KEEPALIVE_FAULT]
{
xlog("L_WARNING", "$ci|keepalive|received error $T_reply_code $T_reply_reason from $(tu{nameaddr.uri})\n");
xlog("$(sel(cfg_get.kazoo.keepalive_failed_log_level){s.int})", "$ci|keepalive|received error $T_reply_code $T_reply_reason from $(tu{nameaddr.uri})\n");
$var(Query) = $_s(UPDATE keepalive SET selected = 0, failed = failed + 1, time_sent = datetime('now') WHERE id = $(fu{uri.param,nat_id}););
xlog("L_DEBUG", "$ci|keepalive|KEEPALIVE REMOVE SQL => '$var(Query)'\n");
mq_add("keepalive_db_queue", "$uuid(g)", "$var(Query)");


Loading…
Cancel
Save