<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    <div class="moz-cite-prefix">On 16/09/14 16:49,
      <a class="moz-txt-link-abbreviated" href="mailto:parcerito12@gmail.com">parcerito12@gmail.com</a> wrote:<br>
    </div>
    <blockquote
cite="mid:CAJYvTjca_AccjAQd8GOBvdVFrsgsAUTkmtdc3i6ebHNJRM5v+Q@mail.gmail.com"
      type="cite">
      <div dir="ltr">Is  there any way that i can create a list of ips
        for kamailio to compare and do something, for example create an
        authorize list of ips on txt that it can read for each invite
        that i receive than check a variable against that list.
        <div><br>
        </div>
        <div>for example do a search $si on the external text file and
          if match do something if it doesn't then continue the route
          downwards.</div>
      </div>
    </blockquote>
    the permissions module has this functionality -- you need to store
    the addresses in 'address' table in database. It hsould work with
    db_text as well (or sqlite).<br>
    <br>
    Then you can have the comparison done statically in kamailio.cfg,
    but any change will require the restart.<br>
    <br>
    Another options it to add the ips in a hash table, then you can
    add/remove items in it via rpc/mi commands. See htable module.<br>
    <blockquote
cite="mid:CAJYvTjca_AccjAQd8GOBvdVFrsgsAUTkmtdc3i6ebHNJRM5v+Q@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>I am trying to create a list of banned ips but don't want
          to do it on the firewall since i want to log all the bad ips
          and added to the list and do something every time i receive a
          packed from any of the ips on the list.</div>
        <div>is that possible with kamailio , is there any module i can
          use to cook this configuration ?</div>
      </div>
    </blockquote>
    <br>
    This is possible, as said before, up to you what option -- look at
    permissions+db_text(or db_sqlite) or htable.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <blockquote
cite="mid:CAJYvTjca_AccjAQd8GOBvdVFrsgsAUTkmtdc3i6ebHNJRM5v+Q@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Thank you</div>
        <div><br>
        </div>
        <div>Julian</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://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>
Next Kamailio Advanced Trainings 2014 - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Sep 22-25, Berlin, Germany</pre>
  </body>
</html>