I typically put that block of code in a specific routing block, and based on the default config, I put it right in the AUTH block:
route[AUTH] { #!ifdef WITH_AUTH
#!ifdef WITH_IPAUTH if((!is_method("REGISTER")) && allow_source_address()) { # source IP allowed return; } #!endif if (is_method("REGISTER") || (from_uri==myself || from_uri=='79.125.19.254')) {
#!ifdef WITH_AUTH_COUNT route(COUNT_AUTH)
….
route[COUNT_AUTH] {
if(is_present_hf("Authorization")) { if($sht(a=>$au::auth_count)==3)
{
$var (exp) = $Ts - 900;
…
Grtz, Davy
Op 30-jan.-2014, om 04:10 heeft Salvatore Nuzzo sn@IDS.GS het volgende geschreven:
hey guys.
I was trying to add the htable routing rules here:
http://preview.tinyurl.com/nomqsls
but I need some help figuring our where they should go. See, I really like how this guy bans users for 15 minutes for failing to auth 3 times in a row. Where and how should I add this to my kam config?
Any help would be greatly appreciated.
Thanks _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users