Skip to content

Commit

Permalink
KAZOO-3343: there is not need to keep the locality in two places and …
Browse files Browse the repository at this point in the history
…we cant use NAT pings with dbtext
  • Loading branch information
k-anderson committed Feb 24, 2015
1 parent 3263389 commit 9efcddf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
22 changes: 14 additions & 8 deletions kamailio/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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
Expand All @@ -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!!");
}
}
Expand Down
2 changes: 1 addition & 1 deletion kamailio/registrar-role.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9efcddf

Please sign in to comment.