<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
<div class="moz-cite-prefix">On 3/4/13 11:48 AM, Ian French wrote:<br>
</div>
<blockquote
cite="mid:CAOAGGZTuyLigB8dfs+pWABQF1WXvkxY31HKSOogN4rE5+Sgs7w@mail.gmail.com"
type="cite"><font><span style="font-family:times new roman,serif">Hey
List,<br>
I'm looking at an article by Daniel, <br>
<br>
<a moz-do-not-send="true"
href="http://by-miconda.blogspot.ie/2010/10/best-of-new-in-kamailio-310-5-geoip-api.htm">http://by-miconda.blogspot.ie/2010/10/best-of-new-in-kamailio-310-5-geoip-api.htm</a><font>l.
</font></span></font><br>
<font><span style="font-family:times new roman,serif"><font><font><span
style="font-family:times new roman,serif">In it he's
uses the below to block source IP addresses by country,<font>
H<font>ow could <font>this be used to <font>block
multiple cou<font>ntry sources?? I've <font>tried
a couple of things aleardy bu<font>t have
failed</font></font></font></font></font></font></font></span></font><br>
</font></span></font><br>
<pre><font><span style="font-family:times new roman,serif">geoip_match("$si", "src");
if($gip(src=>cc)=="CA") {
xlog("SIP message from Canada (ip: $si) - drop it\n");
send_reply("403", "Forbidden");
exit;
}</span></font></pre>
<font><span style="font-family:times new roman,serif"><br>
</span></font></blockquote>
just make an OR expression:<font><span style="font-family:times new
roman,serif"><br>
<br>
if($gip(src=>cc)=="CA" || </span></font><font><span
style="font-family:times new roman,serif"><font><span
style="font-family:times new roman,serif">$gip(src=>cc)=="DE"</span></font>
</span></font><font><span style="font-family:times new
roman,serif"><font><span style="font-family:times new
roman,serif">|| $gip(src=>cc)=="FR"</span></font>) {</span></font>
<br>
<br>
Just as an alternative example, you can use sqlops to make a db
query and check againts a list stored in a database table.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, April 16-17, 2013, Berlin
- <a class="moz-txt-link-freetext" href="http://conference.kamailio.com">http://conference.kamailio.com</a> -</pre>
</body>
</html>