db_sqlite_admin.xml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?xml version="1.0" encoding='ISO-8859-1'?>
  2. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  4. <!-- Include general documentation entities -->
  5. <!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
  6. %docentities;
  7. ]>
  8. <!-- Module User's Guide -->
  9. <chapter>
  10. <title>&adminguide;</title>
  11. <section>
  12. <title>Overview</title>
  13. <para>The module is an implementation of the internal DB API v1 connector
  14. for SQlite 3 file.</para>
  15. </section>
  16. <section>
  17. <title>Dependencies</title>
  18. <section>
  19. <title>&kamailio; Modules</title>
  20. <para>
  21. The following modules must be loaded before this module:
  22. <itemizedlist>
  23. <listitem>
  24. <para>
  25. <emphasis>No dependencies on other &kamailio; modules</emphasis>.
  26. </para>
  27. </listitem>
  28. </itemizedlist>
  29. </para>
  30. </section>
  31. <section>
  32. <title>External Libraries or Applications</title>
  33. <para>
  34. The following libraries or applications must be installed before running
  35. &kamailio; with this module loaded:
  36. <itemizedlist>
  37. <listitem>
  38. <para>
  39. <emphasis>SQlite 3 library</emphasis> - e.g., libsqlite3-0
  40. </para>
  41. </listitem>
  42. <listitem>
  43. <para>
  44. <emphasis>SQlite 3 devel library</emphasis> - to compile
  45. the module e.g. libsqlite3-dev
  46. </para>
  47. </listitem>
  48. <listitem>
  49. <para>
  50. <emphasis>SQlite 3 utilities</emphasis> - for kamdbctl
  51. e.g. sqlite3
  52. </para>
  53. </listitem>
  54. </itemizedlist>
  55. </para>
  56. </section>
  57. </section>
  58. <section>
  59. <title>Parameters</title>
  60. <para>
  61. NONE
  62. </para>
  63. </section>
  64. <section>
  65. <title>Functions</title>
  66. <para>
  67. NONE
  68. </para>
  69. </section>
  70. <section>
  71. <title>Usage</title>
  72. <para>
  73. To use the module, first you have to load it in the &kamailio;
  74. configuration file.
  75. </para>
  76. <example>
  77. <title><function>loading the module</function> usage</title>
  78. <programlisting format="linespecific">
  79. ...
  80. loadmodule "db_sqlite.so"
  81. ...
  82. </programlisting>
  83. </example>
  84. <para>
  85. Then set the db_url (or similar) parameter of modules that have to
  86. use the SQLite database to driver part 'sqlite://', followed by the
  87. path to database file. For example:
  88. </para>
  89. <example>
  90. <title><function>db_url module parameter</function> usage</title>
  91. <programlisting format="linespecific">
  92. ...
  93. modparam("auth_db", "db_url", "sqlite:///etc/kamailio/kamailio.db")
  94. ...
  95. </programlisting>
  96. </example>
  97. <para>
  98. In the default config file, defined token DBURL can be updated like:
  99. </para>
  100. <example>
  101. <title><function>DBURL define</function> usage</title>
  102. <programlisting format="linespecific">
  103. ...
  104. #!define DBURL "sqlite:///etc/kamailio/kamailio.db"
  105. ...
  106. </programlisting>
  107. </example>
  108. </section>
  109. </chapter>