Browse Source

KAZOO-3343: there is not need to keep the locality in two places and we cant use NAT pings with dbtext

3.20
karl anderson 11 years ago
parent
commit
736be1329e
2 changed files with 15 additions and 9 deletions
  1. +14
    -8
      kamailio/default.cfg
  2. +1
    -1
      kamailio/registrar-role.cfg

+ 14
- 8
kamailio/default.cfg View File

@ -208,14 +208,14 @@ modparam("permissions", "db_mode", 1)
####### Routing Logic ######## ####### Routing Logic ########
route route
{ {
route(SANITY_CHECK);
# log the basic info regarding this call # log the basic info regarding this call
xlog("L_INFO", "$ci|start|recieved $pr request $rm $ou"); xlog("L_INFO", "$ci|start|recieved $pr request $rm $ou");
xlog("L_INFO", "$ci|log|source $si:$sp"); xlog("L_INFO", "$ci|log|source $si:$sp");
xlog("L_INFO", "$ci|log|from $fu"); xlog("L_INFO", "$ci|log|from $fu");
xlog("L_INFO", "$ci|log|to $tu"); xlog("L_INFO", "$ci|log|to $tu");
route(SANITY_CHECK);
route(CLASSIFY_SOURCE); route(CLASSIFY_SOURCE);
#!ifdef ANTIFLOOD-ROLE #!ifdef ANTIFLOOD-ROLE
@ -264,21 +264,21 @@ route
route[SANITY_CHECK] 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; 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; exit;
} }
if ($ua == "friendly-scanner" || if ($ua == "friendly-scanner" ||
$ua == "sundayddr" || $ua == "sundayddr" ||
$ua =~ "sipcli" ) { $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; exit;
} }
} }
@ -315,6 +315,10 @@ route[HANDLE_NOTIFY]
{ {
if (is_method("NOTIFY")) { if (is_method("NOTIFY")) {
if (isflagset(FLAG_INTERNALLY_SOURCED)) { if (isflagset(FLAG_INTERNALLY_SOURCED)) {
if (registered("location")) {
lookup("location");
xlog("L_INFO", "$ci|log|routing to $ruid");
}
route(INTERNAL_TO_EXTERNAL_RELAY); route(INTERNAL_TO_EXTERNAL_RELAY);
} else { } else {
#!ifdef TRAFFIC-FILTER-ROLE #!ifdef TRAFFIC-FILTER-ROLE
@ -330,8 +334,10 @@ route[HANDLE_NOTIFY]
#!endif #!endif
if($hdr(Event) == "keep-alive") { if($hdr(Event) == "keep-alive") {
xlog("L_INFO", "$ci|stop|replying to keep alive");
sl_send_reply("405", "Stay Alive / Method Not Allowed"); sl_send_reply("405", "Stay Alive / Method Not Allowed");
} else { } else {
xlog("L_INFO", "$ci|stop|consuming event $hdr(Event)");
sl_send_reply("200", "Rawr!!"); sl_send_reply("200", "Rawr!!");
} }
} }


+ 1
- 1
kamailio/registrar-role.cfg View File

@ -15,7 +15,7 @@ modparam("usrloc", "db_update_as_insert", 0)
modparam("usrloc", "use_domain", 1) modparam("usrloc", "use_domain", 1)
modparam("usrloc", "nat_bflag", FLB_NATB) modparam("usrloc", "nat_bflag", FLB_NATB)
modparam("usrloc", "db_url", "text:///etc/kazoo/kamailio/dbtext") 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", "handle_lost_tcp", 1)
modparam("usrloc", "xavp_contact", "ulattrs") modparam("usrloc", "xavp_contact", "ulattrs")
modparam("usrloc", "db_check_update", 1) modparam("usrloc", "db_check_update", 1)


Loading…
Cancel
Save