2
0

xcap_client_admin.xml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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>
  14. The modules is a XCAP client for &kamailio; that can be used by other modules.
  15. It fetches XCAP elements, either documents or part of them, by sending
  16. HTTP GET requests to an XCAP server. It also offers support for
  17. conditional queries. It uses the <emphasis>libcurl</emphasis> library as a
  18. client-side HTTP transfer library.
  19. </para>
  20. <para>
  21. The module offers a XCAP client interface with general functions that
  22. allow requesting for a specific element from a XCAP server.
  23. In addition to that it also offers the service of storing and updating
  24. the documents it receives. In this case only an initial
  25. request to the module is required - xcapGetNewDoc - which is like a
  26. request to the module to handle from that point on the referenced
  27. document so as to promise that the newest version will always be
  28. present in database.
  29. </para>
  30. <para>
  31. The update method is also configurable, either through periodical
  32. queries, applicable to any kind of XCAP server or with an management command
  33. that should be sent by the server upon an update.
  34. </para>
  35. <para>
  36. The module is currently used by the <quote>presence_xml</quote> module, if the
  37. 'integrated_xcap_server' parameter is not set.
  38. </para>
  39. </section>
  40. <section>
  41. <title>Dependencies</title>
  42. <section>
  43. <title>&kamailio; Modules</title>
  44. <para>
  45. The modules is not dependent of any &kamailio; module.
  46. </para>
  47. </section>
  48. <section>
  49. <title>External Libraries or Applications</title>
  50. <para>
  51. The following libraries or applications must be installed before running
  52. &kamailio; with this module loaded:
  53. <itemizedlist>
  54. <listitem>
  55. <para>
  56. <emphasis>libxml</emphasis>.
  57. </para>
  58. </listitem>
  59. <listitem>
  60. <para>
  61. <emphasis>libcurl</emphasis>.
  62. </para>
  63. </listitem>
  64. </itemizedlist>
  65. </para>
  66. </section>
  67. </section>
  68. <section>
  69. <title>Parameters</title>
  70. <section>
  71. <title><varname>db_url</varname>(str)</title>
  72. <para>
  73. The database url.
  74. </para>
  75. <para>
  76. <emphasis>Default value is <quote>&defaultdb;</quote>.
  77. </emphasis>
  78. </para>
  79. <example>
  80. <title>Set <varname>db_url</varname> parameter</title>
  81. <programlisting format="linespecific">
  82. ...
  83. modparam("xcap_client", "db_url", "&exampledb;")
  84. ...
  85. </programlisting>
  86. </example>
  87. </section>
  88. <section>
  89. <title><varname>xcap_table</varname>(str)</title>
  90. <para>
  91. The name of the db table where XCAP documents are stored.
  92. </para>
  93. <para>
  94. <emphasis>Default value is <quote>xcap</quote>.
  95. </emphasis>
  96. </para>
  97. <example>
  98. <title>Set <varname>xcap_table</varname> parameter</title>
  99. <programlisting format="linespecific">
  100. ...
  101. modparam("xcap_client", "xcap_table", "xcaps")
  102. ...
  103. </programlisting>
  104. </example>
  105. </section>
  106. <section>
  107. <title><varname>periodical_query</varname>(int)</title>
  108. <para>
  109. A flag to disable periodical query as an update method for
  110. the documents the module is responsible for. It could be
  111. disabled when the XCAP server is capable to send the exported
  112. management command when a change occurs or when another module in &kamailio;
  113. handles updates.
  114. </para>
  115. <para>
  116. To disable it set this parameter to 0.
  117. </para>
  118. <para>
  119. <emphasis>Default value is <quote>1</quote>.
  120. </emphasis>
  121. </para>
  122. <example>
  123. <title>Set <varname>periodical_query</varname> parameter</title>
  124. <programlisting format="linespecific">
  125. ...
  126. modparam("xcap_client", "periodical_query", 0)
  127. ...
  128. </programlisting>
  129. </example>
  130. </section>
  131. <section>
  132. <title><varname>query_period</varname>(int)</title>
  133. <para>
  134. Should be set if periodical query is not disabled.
  135. Represents the time interval the XCAP servers should be
  136. queried for an update.
  137. </para>
  138. <para>
  139. To disable it set this parameter to 0.
  140. </para>
  141. <para>
  142. <emphasis>Default value is <quote>100</quote>.
  143. </emphasis>
  144. </para>
  145. <example>
  146. <title>Set <varname>query_period</varname> parameter</title>
  147. <programlisting format="linespecific">
  148. ...
  149. modparam("xcap_client", "query_period", 50)
  150. ...
  151. </programlisting>
  152. </example>
  153. </section>
  154. </section>
  155. <section>
  156. <title>Functions</title>
  157. <para>
  158. None to be used in configuration file.
  159. </para>
  160. </section>
  161. <section>
  162. <title>Exported Management Functions</title>
  163. <section>
  164. <title>
  165. <function moreinfo="none">refreshXcapDoc</function>
  166. </title>
  167. <para>
  168. Management command that should be sent by an XCAP server when a
  169. stored document changes.
  170. </para>
  171. <para>
  172. Name: <emphasis>refreshXcapDoc</emphasis>
  173. </para>
  174. <para>Parameters:</para>
  175. <itemizedlist>
  176. <listitem>
  177. <para>document uri: the uri of the document</para>
  178. </listitem>
  179. <listitem>
  180. <para>xcap server port: the port of the xcap server</para>
  181. </listitem>
  182. </itemizedlist>
  183. <para>
  184. Management FIFO Command Format:
  185. </para>
  186. <programlisting format="linespecific">
  187. ...
  188. :refreshXcapDoc:fifo_reply
  189. /xcap-root/resource-lists/users/eyebeam/buddies-resource-list.xml
  190. 8000
  191. _empty_line_
  192. ...
  193. </programlisting>
  194. </section>
  195. </section>
  196. </chapter>