File: xcap_client_admin.xml

package info (click to toggle)
kamailio 4.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 56,100 kB
  • sloc: ansic: 552,832; xml: 166,484; sh: 8,659; makefile: 7,676; sql: 6,235; perl: 3,487; yacc: 3,428; python: 1,457; cpp: 1,219; php: 1,047; java: 449; pascal: 194; cs: 40; awk: 27
file content (210 lines) | stat: -rw-r--r-- 5,368 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<?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;

]>
<!-- Module User's Guide -->

<chapter>
	
	<title>&adminguide;</title>
	
	<section>
	<title>Overview</title>
	<para> 
	The modules is a XCAP client for &kamailio; that can be used by other modules.
	It fetches XCAP elements, either documents or part of them, by sending 
	HTTP GET requests to an XCAP server. It also offers support for 
	conditional queries.  It uses the <emphasis>libcurl</emphasis> library as a 
	client-side HTTP transfer library.
	</para>
	<para>
	The module offers a XCAP client interface with general functions that
	allow requesting for a specific element from a XCAP server.
	In addition to that it also offers the service of storing and updating
	the documents it receives. In this case only an initial
	request to the module is required - xcapGetNewDoc - which is like a 
	request to the module to handle from that point on the referenced
	document so as to promise that the newest version will always be
	present in database.
	</para>
	<para>
	The update method is also configurable, either through periodical
	queries, applicable to any kind of XCAP server or with an management command 
	that should be sent by the server upon an update.
	</para>
	<para>
	The module is currently used by the <quote>presence_xml</quote> module, if the 
	'integrated_xcap_server' parameter is not set.
	</para>
	</section>

	<section>
	<title>Dependencies</title>
	<section>
		<title>&kamailio; Modules</title>
		<para>
			The modules is not dependent of any &kamailio; module.
		</para>
	</section>

	<section>
		<title>External Libraries or Applications</title>
		<para>
		The following libraries or applications must be installed before running
		&kamailio; with this module loaded:
			<itemizedlist>
			<listitem>
			<para>
				<emphasis>libxml</emphasis>.
			</para>
			</listitem>
			<listitem>
			<para>
				<emphasis>libcurl</emphasis>.
			</para>
			</listitem>
			</itemizedlist>
		</para>
	</section>
	</section>

	<section>
	<title>Parameters</title>
	<section>
		<title><varname>db_url</varname>(str)</title>
		<para>
		The database url.
		</para>
		<para>
		<emphasis>Default value is <quote>&defaultdb;</quote>.	
		</emphasis>
		</para>
		<example>
		<title>Set <varname>db_url</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("xcap_client", "db_url", "&exampledb;")
...
</programlisting>
		</example>
	</section>
	<section>
		<title><varname>xcap_table</varname>(str)</title>
		<para>
		The name of the db table where XCAP documents are stored.
		</para>
		<para>
		<emphasis>Default value is <quote>xcap</quote>.
		</emphasis>
		</para>
		<example>
		<title>Set <varname>xcap_table</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("xcap_client", "xcap_table", "xcaps")
...
</programlisting>
		</example>
	</section>
	<section>
		<title><varname>periodical_query</varname>(int)</title>
		<para>
		A flag to disable periodical query as an update method for
		the documents the module is responsible for. It could be
		disabled when the XCAP server is capable to send the exported
		management command when a change occurs or when another module in &kamailio;
		handles updates.
		</para>
		<para>
		To disable it set this parameter to 0.
		</para>
		<para>
		<emphasis>Default value is <quote>1</quote>.
		</emphasis>
		</para>
		<example>
		<title>Set <varname>periodical_query</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("xcap_client", "periodical_query", 0)
...
</programlisting>
		</example>
	</section>
	<section>
		<title><varname>query_period</varname>(int)</title>
		<para>
		Should be set if periodical query is not disabled. 
		Represents the time interval the XCAP servers should be 
		queried for an update.
		</para>
		<para>
		To disable it set this parameter to 0.
		</para>
		<para>
		<emphasis>Default value is <quote>100</quote>.
		</emphasis>
		</para>
		<example>
		<title>Set <varname>query_period</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("xcap_client", "query_period", 50)
...
</programlisting>
		</example>
	</section>
	</section>

<section>
	<title>Functions</title>
	<para>
	None to be used in configuration file.
	</para>
</section>

<section>
	<title>Exported Management Functions</title>
	<section>
		<title>
		<function moreinfo="none">refreshXcapDoc</function>
		</title>
		<para>
		Management command that should be sent by an XCAP server when a
		stored document changes.
		</para>
		<para>
		Name: <emphasis>refreshXcapDoc</emphasis>
		</para>
		<para>Parameters:</para>
		<itemizedlist>
			<listitem>
				<para>document uri: the uri of the document</para>
			</listitem>
			<listitem>
				<para>xcap server port: the port of the xcap server</para>
			</listitem>
		 </itemizedlist>

        <para>
		Management FIFO Command Format:
		</para>
        <programlisting  format="linespecific">
...
:refreshXcapDoc:fifo_reply
/xcap-root/resource-lists/users/eyebeam/buddies-resource-list.xml
8000
_empty_line_
...
		</programlisting>
	</section>

   	</section>

</chapter>