Browse Source

add PUSHER_ATTEMPT_REGISTRATION to registrar

drop_requests
lazedo 8 years ago
committed by GitHub
parent
commit
b4e9dac2f4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 21 deletions
  1. +17
    -21
      kamailio/registrar-role.cfg

+ 17
- 21
kamailio/registrar-role.cfg View File

@ -126,6 +126,9 @@ route[AUTHORIZATION_CHECK]
route[ATTEMPT_AUTHORIZATION] route[ATTEMPT_AUTHORIZATION]
{ {
#!ifdef PUSHER_ROLE
route(PUSHER_ATTEMPT_REGISTRATION);
#!endif
$var(nonce) = $(uuid(g){s.rm,-}); $var(nonce) = $(uuid(g){s.rm,-});
#!ifdef OPENBTS_AUTH_ROLE #!ifdef OPENBTS_AUTH_ROLE
@ -208,33 +211,27 @@ route[KAZOO_AUTHORIZATION_ERROR]
route[CHECK_AUTHORIZATION] route[CHECK_AUTHORIZATION]
{ {
if($ua =~ "OpenBTS") { if($ua =~ "OpenBTS") {
xlog("L_INFO", "$ci|end|OPENBTS attempt for $Au $si:$sp\n"); xlog("L_INFO", "$ci|end|OPENBTS attempt for $Au $si:$sp\n");
} else { } else {
if($var(password) == $null || $var(password) == "") {
auth_challenge("$fd", "0");
xlog("L_INFO", "$ci|end|issued auth challenge to registration attempt for $Au $si:$sp\n");
exit;
}
if (!pv_auth_check("$fd", "$var(password)", "0", "0")) {
#!ifdef ANTIFLOOD_ROLE
route(ANITFLOOD_FAILED_AUTH);
#!endif
if($var(password) == $null || $var(password) == "") {
auth_challenge("$fd", "0");
xlog("L_INFO", "$ci|end|issued auth challenge to registration attempt for $Au $si:$sp\n");
exit;
}
auth_challenge("$fd", "0");
xlog("L_WARNING", "$ci|end|issued auth challenge to failed registration attempt for $Au from IP $si:$sp\n");
exit;
}
if (!pv_auth_check("$fd", "$var(password)", "0", "0")) {
#!ifdef ANTIFLOOD_ROLE
route(ANITFLOOD_FAILED_AUTH);
#!endif
auth_challenge("$fd", "0");
xlog("L_WARNING", "$ci|end|issued auth challenge to failed registration attempt for $Au from IP $si:$sp\n");
exit;
}
} }
#!ifdef ANTIFLOOD_ROLE #!ifdef ANTIFLOOD_ROLE
route(ANTIFLOOD_SUCCESSFUL_AUTH); route(ANTIFLOOD_SUCCESSFUL_AUTH);
#!endif #!endif
@ -248,7 +245,6 @@ route[CHECK_AUTHORIZATION]
route[SAVE_LOCATION] route[SAVE_LOCATION]
{ {
if ($sht(auth_cache=>$Au) == $null) { if ($sht(auth_cache=>$Au) == $null) {
xlog("L_INFO", "$ci|log|caching sip credentials for $Au\n"); xlog("L_INFO", "$ci|log|caching sip credentials for $Au\n");
}; };
@ -331,7 +327,7 @@ route[SAVE_LOCATION]
#!ifdef KZ_TCP_REGISTRAR_PORT #!ifdef KZ_TCP_REGISTRAR_PORT
case "tcp": case "tcp":
$var(port) = KZ_UDP_REGISTRAR_PORT;
$var(port) = KZ_TCP_REGISTRAR_PORT;
break; break;
#!endif #!endif


Loading…
Cancel
Save