diff --git a/kamailio/keepalive.cfg b/kamailio/keepalive.cfg index d5f68fd..a79f3ff 100644 --- a/kamailio/keepalive.cfg +++ b/kamailio/keepalive.cfg @@ -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)");