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
_______________________________________________
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

Reply via email to