Hello Everyone,
I am trying set hash table for geoip and put countries code which is not a customers.
Currently I have working as static for single country code.
#!ifdef WITH_GEOIP
route[GEOIP]
geoip_match("$si", "src");
if($gip(src=>cc)=="TH") {
xlog("SIP message not from allowed customer (ip: $si) - drop it\n");
send_reply("403", "Forbidden");
exit;
}
#!endif
I though replace single value on restricted countries with
modparam("htable", "geoip", "country_code=>TH;")
modparam("htable", "geoip", "country_code=>IN;")
if($gip(src=>cc)=="$sht(geoip=>country_code)");
but not sure if it good approach or which way to go. Any help thank you.
Slava.