diff --git a/kamailio/default.cfg b/kamailio/default.cfg index e5f1b80..c0df5a6 100644 --- a/kamailio/default.cfg +++ b/kamailio/default.cfg @@ -205,14 +205,14 @@ modparam("permissions", "db_mode", 1) ####### Routing Logic ######## route { + route(SANITY_CHECK); + # log the basic info regarding this call xlog("L_INFO", "$ci|start|recieved $pr request $rm $ou"); xlog("L_INFO", "$ci|log|source $si:$sp"); xlog("L_INFO", "$ci|log|from $fu"); xlog("L_INFO", "$ci|log|to $tu"); - route(SANITY_CHECK); - route(CLASSIFY_SOURCE); #!ifdef ANTIFLOOD-ROLE @@ -261,21 +261,21 @@ route route[SANITY_CHECK] { - if (!mf_process_maxfwd_header("10")) { - xlog("L_WARN", "$ci|end|too much hops, not enough barley"); - send_reply("483", "Too Many Hops"); + if (!sanity_check()) { + xlog("L_WARN", "$ci|end|message from $si:$sp is insane"); exit; } - if (!sanity_check()) { - xlog("L_WARN", "$ci|end|message is insane"); + if (!mf_process_maxfwd_header("10")) { + xlog("L_WARN", "$ci|end|too much hops, not enough barley from $si:$sp"); + send_reply("483", "Too Many Hops"); exit; } if ($ua == "friendly-scanner" || $ua == "sundayddr" || $ua =~ "sipcli" ) { - xlog("L_WARN", "$ci|end|dropping message with user-agent $ua"); + xlog("L_WARN", "$ci|end|dropping message with user-agent $ua from $si:$sp"); exit; } } @@ -312,6 +312,10 @@ route[HANDLE_NOTIFY] { if (is_method("NOTIFY")) { if (isflagset(FLAG_INTERNALLY_SOURCED)) { + if (registered("location")) { + lookup("location"); + xlog("L_INFO", "$ci|log|routing to $ruid"); + } route(INTERNAL_TO_EXTERNAL_RELAY); } else { #!ifdef TRAFFIC-FILTER-ROLE @@ -327,8 +331,10 @@ route[HANDLE_NOTIFY] #!endif if($hdr(Event) == "keep-alive") { + xlog("L_INFO", "$ci|stop|replying to keep alive"); sl_send_reply("405", "Stay Alive / Method Not Allowed"); } else { + xlog("L_INFO", "$ci|stop|consuming event $hdr(Event)"); sl_send_reply("200", "Rawr!!"); } } diff --git a/kamailio/registrar-role.cfg b/kamailio/registrar-role.cfg index 52eb54c..9dde564 100644 --- a/kamailio/registrar-role.cfg +++ b/kamailio/registrar-role.cfg @@ -15,7 +15,7 @@ modparam("usrloc", "db_update_as_insert", 0) modparam("usrloc", "use_domain", 1) modparam("usrloc", "nat_bflag", FLB_NATB) modparam("usrloc", "db_url", "text:///etc/kazoo/kamailio/dbtext") -modparam("usrloc", "db_mode", 1) +modparam("usrloc", "db_mode", 0) modparam("usrloc", "handle_lost_tcp", 1) modparam("usrloc", "xavp_contact", "ulattrs") modparam("usrloc", "db_check_update", 1)