[SR-Users] Kamailio Geoip

Ian French fretec at gmail.com
Mon Mar 4 11:48:47 CET 2013


Hey List,
              I'm looking at an article by Daniel,

http://by-miconda.blogspot.ie/2010/10/best-of-new-in-kamailio-310-5-geoip-api.html.

In it he's uses the below to block source IP addresses by country, How
could this be used to block multiple country sources?? I've tried a couple
of things aleardy but have failed

geoip_match("$si", "src");
if($gip(src=>cc)=="CA") {
  xlog("SIP message from Canada (ip: $si) - drop it\n");
  send_reply("403", "Forbidden");
  exit;
}


Thanks in advance
Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130304/47a3a202/attachment.htm>


More information about the sr-users mailing list