Browse Source

Added IP address logging for failed auth (#168)

KAZOO-5650
sergey-safarov 9 years ago
committed by lazedo
parent
commit
87fd001ebd
2 changed files with 3 additions and 1 deletions
  1. +2
    -0
      kamailio/default.cfg
  2. +1
    -1
      kamailio/registrar-role.cfg

+ 2
- 0
kamailio/default.cfg View File

@ -781,6 +781,8 @@ failure_route[INTERNAL_FAULT]
xlog("L_INFO", "$ci|log|failure route ignoring call barred\n"); xlog("L_INFO", "$ci|log|failure route ignoring call barred\n");
} else if (isflagset(FLAG_SESSION_PROGRESS)) { } else if (isflagset(FLAG_SESSION_PROGRESS)) {
xlog("L_INFO", "$ci|log|failure route ignoring failure after session progress\n"); xlog("L_INFO", "$ci|log|failure route ignoring failure after session progress\n");
} else if (t_check_status("403") && $var(reply_reason)=="Forbidden") {
xlog("L_WARNING", "$ci|log|failure route ignoring. Failed auth from IP $si\n");
} else if (t_check_status("(401)|(407)|(486)|(403)")) { } else if (t_check_status("(401)|(407)|(486)|(403)")) {
xlog("L_INFO", "$ci|log|failure route ignoring auth reply $T_reply_code $var(reply_reason)\n"); xlog("L_INFO", "$ci|log|failure route ignoring auth reply $T_reply_code $var(reply_reason)\n");
} else if (t_check_status("402")) { } else if (t_check_status("402")) {


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

@ -207,7 +207,7 @@ route[CHECK_AUTHORIZATION]
#!endif #!endif
auth_challenge("$fd", "0"); auth_challenge("$fd", "0");
xlog("L_INFO", "$ci|end|issued auth challenge to failed registration attempt for $Au $si:$sp\n");
xlog("L_WARNING", "$ci|end|issued auth challenge to failed registration attempt for $Au from IP $si:$sp\n");
exit; exit;
} }


Loading…
Cancel
Save