<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 22.09.2020 16:09, Alain Bieuzent
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:D8D3C09D-AD55-4711-9E74-9DC96E31D756@free.fr">
      <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">I
          need to store some data locally but accessible by opensips.<o:p></o:p></span></p>
      <p class="MsoNormal"><span
          style="font-size:11.0pt;mso-fareast-language:FR" lang="EN-US">the
          data is almost 20 records made up of a couple IP: name<o:p></o:p></span></p>
      <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">From
          opensips script I want to retrieve the name associated with
          the IP (to put in place profiling).<o:p></o:p></span></p>
      <p class="MsoNormal"><span
          style="font-size:11.0pt;mso-fareast-language:FR" lang="EN">how
          do you set up this kind of solution without accessing each
          call to an external database?</span></p>
    </blockquote>
    <p>Hi, Alain!</p>
    <p>One way would be to use the local cacheDB [1] module through the
      generic cacheDB scripting functions [2].<br>
    </p>
    <p>Alternatively, if you specifically need to load this data from an
      SQL DB, for example, the sql_cacher [3] module would be a perfect
      fit.</p>
    <p>Fun Fact:  if you decide to use any of these two modules, you
      will have to buy a guy named Vlad a beer, and they are not the
      same Vlad.<br>
    </p>
    <p>Best regards,</p>
    <p>[1]: <a class="moz-txt-link-freetext" href="https://opensips.org/docs/modules/3.2.x/cachedb_local.html">https://opensips.org/docs/modules/3.2.x/cachedb_local.html</a><br>
      [2]:
      <a class="moz-txt-link-freetext" href="https://www.opensips.org/Documentation/Script-CoreFunctions-3-2#toc4">https://www.opensips.org/Documentation/Script-CoreFunctions-3-2#toc4</a><br>
      [3]: <a class="moz-txt-link-freetext" href="https://opensips.org/docs/modules/3.2.x/sql_cacher.html">https://opensips.org/docs/modules/3.2.x/sql_cacher.html</a><br>
    </p>
    <pre class="moz-signature" cols="72">-- 
Liviu Chircu
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/liviuchircu">www.twitter.com/liviuchircu</a> | <a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
  </body>
</html>