[SR-Users] Kamailio and Geoip
Ian French
fretec at gmail.com
Tue Feb 26 23:41:37 CET 2013
Hi list,
I've been trying to get Kamailio using the geoip module to deny
traffic from countries not matching certain sources, but I'm unsure of how
to achieve this I've tried the below which failed. I'm trying to drop
requests outside say 2 countries "AA" or "BB"
geoip_match("$si", "src");
if($gip(src=>cc)!="AA" || $gip(src=>cc)!="BB") {
xlog("L_INFO","SIP message from prohibited source
$gip(src=>cc) (ip: $si)\n");
send_reply("403", "Forbidden");
exit;
} else {
xlog("L_INFO","SIP message from unprohibited source
$gip(src=>cc) (ip: $si)\n");
}
Can you tell me where I am wrong or how I can achieve this
Thanks in advance
Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130226/9487e4f9/attachment.htm>
More information about the sr-users
mailing list