<?xml version="1.0" encoding='ISO-8859-1'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [

<!-- Include general documentation entities -->
<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
%docentities;

]>
<!--
WARNING:
This file was autogenerated from the XML source file
../../modules/userblacklist/doc/kamailio-userblacklist.xml.
It can be regenerated by running 'make dbdoc' in the db/schema
directory of the source code. You need to have xsltproc and
docbook-xsl stylesheets installed.
ALL CHANGES DONE HERE WILL BE LOST IF THE FILE IS REGENERATED
-->

<chapter>
  <title>Module parameter for database access.</title>
  <section>
    <title><varname>db_url</varname> (String)</title>
    <para>URL to the database containing the data.</para>
    <para>
      <emphasis>Default value is <quote>&defaultrodb;</quote>.</emphasis>
    </para>
    <example>
      <title>Set <varname>db_url</varname> parameter</title>
      <programlisting format="linespecific">
...
modparam("userblacklist", "db_url", "dbdriver://username:password@dbhost/dbname")
...
</programlisting>
    </example>
  </section>
  <section>
    <title><varname>userblacklist_table</varname> (String)</title>
    <para>Name of the userblacklist table for the userblacklist module.</para>
    <para>
      <emphasis>Default value is <quote>userblacklist</quote>.</emphasis>
    </para>
    <example>
      <title>Set <varname>userblacklist_table</varname> parameter</title>
      <programlisting format="linespecific">
...
modparam("userblacklist", "userblacklist_table", "userblacklist")
...
</programlisting>
    </example>
  </section>
  <section>
    <title><varname>userblacklist_id_col</varname> (string)</title>
    <para>unique ID</para>
    <example>
      <title>Set <varname>userblacklist_id_col</varname> parameter</title>
      <programlisting format="linespecific">
...
modparam("userblacklist", "userblacklist_id_col", "id")
...
</programlisting>
    </example>
  </section>
  <section>
    <title><varname>userblacklist_username_col</varname> (string)</title>
    <para>The user that is used for the blacklist lookup.</para>
    <example>
      <title>Set <varname>userblacklist_username_col</varname> parameter</title>
      <programlisting format="linespecific">
...
modparam("userblacklist", "userblacklist_username_col", "username")
...
</programlisting>
    </example>
  </section>
  <section>
    <title><varname>userblacklist_domain_col</varname> (string)</title>
    <para>The domain that is used for the blacklist lookup.</para>
    <example>
      <title>Set <varname>userblacklist_domain_col</varname> parameter</title>
      <programlisting format="linespecific">
...
modparam("userblacklist", "userblacklist_domain_col", "domain")
...
</programlisting>
    </example>
  </section>
  <section>
    <title><varname>userblacklist_prefix_col</varname> (string)</title>
    <para>The prefix that is matched for the blacklist.</para>
    <example>
      <title>Set <varname>userblacklist_prefix_col</varname> parameter</title>
      <programlisting format="linespecific">
...
modparam("userblacklist", "userblacklist_prefix_col", "prefix")
...
</programlisting>
    </example>
  </section>
  <section>
    <title><varname>userblacklist_whitelist_col</varname> (string)</title>
    <para>Specify if this a blacklist (0) or a whitelist (1) entry.</para>
    <example>
      <title>Set <varname>userblacklist_whitelist_col</varname> parameter</title>
      <programlisting format="linespecific">
...
modparam("userblacklist", "userblacklist_whitelist_col", "whitelist")
...
</programlisting>
    </example>
  </section>
  <section>
    <title><varname>globalblacklist_table</varname> (String)</title>
    <para>Name of the globalblacklist table for the userblacklist module.
    Please note that this table is used when the check_blacklist function is called with no parameters.</para>
    <para>
      <emphasis>Default value is <quote>globalblacklist</quote>.</emphasis>
    </para>
    <example>
      <title>Set <varname>globalblacklist_table</varname> parameter</title>
      <programlisting format="linespecific">
...
modparam("userblacklist", "globalblacklist_table", "globalblacklist")
...
</programlisting>
    </example>
  </section>
  <section>
    <title><varname>globalblacklist_id_col</varname> (string)</title>
    <para>unique ID</para>
    <example>
      <title>Set <varname>globalblacklist_id_col</varname> parameter</title>
      <programlisting format="linespecific">
...
modparam("userblacklist", "globalblacklist_id_col", "id")
...
</programlisting>
    </example>
  </section>
  <section>
    <title><varname>globalblacklist_prefix_col</varname> (string)</title>
    <para>The prefix that is matched for the blacklist.</para>
    <example>
      <title>Set <varname>globalblacklist_prefix_col</varname> parameter</title>
      <programlisting format="linespecific">
...
modparam("userblacklist", "globalblacklist_prefix_col", "prefix")
...
</programlisting>
    </example>
  </section>
  <section>
    <title><varname>globalblacklist_whitelist_col</varname> (string)</title>
    <para>Specify if this a blacklist (0) or a whitelist (1) entry.</para>
    <example>
      <title>Set <varname>globalblacklist_whitelist_col</varname> parameter</title>
      <programlisting format="linespecific">
...
modparam("userblacklist", "globalblacklist_whitelist_col", "whitelist")
...
</programlisting>
    </example>
  </section>
  <section>
    <title><varname>globalblacklist_description_col</varname> (string)</title>
    <para>A comment for the entry.</para>
    <example>
      <title>Set <varname>globalblacklist_description_col</varname> parameter</title>
      <programlisting format="linespecific">
...
modparam("userblacklist", "globalblacklist_description_col", "description")
...
</programlisting>
    </example>
  </section>
</chapter>
