<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    there is no geoip param for hatable module. If you want to put some
    values in a hash table at startup, either you configure htable to
    load records from database table or use event_route[htable:mod-init]
    to set values in hash table.<br>
    <br>
    For the later, define hatbale named blocked and then:<br>
    <br>
    event_route[htable:mod-init] {<br>
       $sht(blocked=>TH) = 1;<br>
       $sht(blocked=>IN) = 1;<br>
    }<br>
    <br>
    The check should be:<br>
    <br>
    if($sht(blocked=>$gip(src=>cc))==1) {<br>
      # blocked country<br>
      ...<br>
    }<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 20/03/14 05:57, Slava Bendersky
      wrote:<br>
    </div>
    <blockquote
cite="mid:2045064421.6401955.1395291476386.JavaMail.zimbra@skillsearch.ca"
      type="cite">
      <div style="font-family: lucida console,sans-serif; font-size:
        12pt; color: #000000">
        <div>Hello Everyone,<br>
        </div>
        <div>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.<br>
        </div>
        <div><br>
        </div>
        <div>#!ifdef WITH_GEOIP<br>
          route[GEOIP]<br>
             geoip_match("$si", "src");<br>
             if($gip(src=>cc)=="TH") {<br>
               xlog("SIP message not from allowed customer (ip: $si) -
          drop it\n");<br>
               send_reply("403", "Forbidden");<br>
               exit;<br>
          }<br>
          #!endif<br>
        </div>
        <div><br>
        </div>
        <div>I though replace single value on restricted countries with</div>
        <div><br>
        </div>
        <div>modparam("htable", "geoip", "country_code=>TH;")</div>
        <div>
          <div>modparam("htable", "geoip", "country_code=>IN;")</div>
          <div><br>
          </div>
        </div>
        <div> if($gip(src=>cc)=="$sht(geoip=>country_code)"); <br>
        </div>
        <div><br>
        </div>
        <div>but not sure if it good approach or which way to go. Any
          help thank you.<br>
        </div>
        <div><br>
        </div>
        <div>Slava.<br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <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 2-4, 2014, Berlin, Germany
<a class="moz-txt-link-freetext" href="http://www.kamailioworld.com">http://www.kamailioworld.com</a></pre>
  </body>
</html>