Debian Codegraph @

src/modules/siprepo/doc/siprepo_admin.xml

raw
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
5 <!-- Include general documentation entities -->
6 <!ENTITY % docentities SYSTEM "../../../../doc/docbook/entities.xml">
7 %docentities;
8
9 ]>
10 <!-- Module User's Guide -->
11
12 <chapter>
13
14 <title>&adminguide;</title>
15
16 <section>
17 <title>Overview</title>
18 <para>
19 This module can store and fetch SIP message content in an in-memory
20 hash table.
21 </para>
22 </section>
23
24 <section>
25 <title>Dependencies</title>
26 <section>
27 <title>&kamailio; Modules</title>
28 <para>
29 The following modules must be loaded before this module:
30 <itemizedlist>
31 <listitem>
32 <para>
33 <emphasis>None</emphasis>.
34 </para>
35 </listitem>
36 </itemizedlist>
37 </para>
38 </section>
39 <section>
40 <title>External Libraries or Applications</title>
41 <para>
42 The following libraries or applications must be installed before running
43 &kamailio; with this module loaded:
44 <itemizedlist>
45 <listitem>
46 <para>
47 <emphasis>None</emphasis>
48 </para>
49 </listitem>
50 </itemizedlist>
51 </para>
52 </section>
53 </section>
54
55 <section>
56 <title>Parameters</title>
57 <section id="siprepo.p.hash_size">
58 <title>
59 <function moreinfo="none">hash_size (int)</function>
60 </title>
61 <para>
62 Number of slots in the hash table. It should be power of 2.
63 </para>
64 <para>
65 Default value: 256.
66 </para>
67 <example>
68 <title><function>hash_size</function> usage</title>
69 <programlisting format="linespecific">
70 ...
71 modparam("siprepo", "hash_size", 1024)
72 ...
73 </programlisting>
74 </example>
75 </section>
76 <section id="siprepo.p.expire">
77 <title>
78 <function moreinfo="none">expire (int)</function>
79 </title>
80 <para>
81 Number of seconds until the stored message content expires.
82 </para>
83 <para>
84 Default value: 180.
85 </para>
86 <example>
87 <title><function>expire</function> usage</title>
88 <programlisting format="linespecific">
89 ...
90 modparam("siprepo", "expire", 240)
91 ...
92 </programlisting>
93 </example>
94 </section>
95 <section id="siprepo.p.timer_interval">
96 <title>
97 <function moreinfo="none">timer_interval (int)</function>
98 </title>
99 <para>
100 Number of seconds to run the timer routine.
101 </para>
102 <para>
103 Default value: 10.
104 </para>
105 <example>
106 <title><function>timer_interval</function> usage</title>
107 <programlisting format="linespecific">
108 ...
109 modparam("siprepo", "timer_interval", 5)
110 ...
111 </programlisting>
112 </example>
113 </section>
114 <section id="siprepo.p.timer_procs">
115 <title>
116 <function moreinfo="none">timer_procs (int)</function>
117 </title>
118 <para>
119 Number of timer processes.
120 </para>
121 <para>
122 Default value: 1.
123 </para>
124 <example>
125 <title><function>timer_procs</function> usage</title>
126 <programlisting format="linespecific">
127 ...
128 modparam("siprepo", "timer_procs", 2)
129 ...
130 </programlisting>
131 </example>
132 </section>
133
134 </section>
135
136 <section>
137 <title>Functions</title>
138 <section id="siprepo.f.sr_msg_push">
139 <title>
140 <function moreinfo="none">sr_msg_push(msgid, rmode)</function>
141 </title>
142 <para>
143 Push the message content to hash table and associate it with
144 `msgid`. The Call-Id and msgid are needed to pull the message.
145 The rmode is reserved for repo mode, use 0.
146 </para>
147 <para>
148 This function can be used from ANY_ROUTE.
149 </para>
150 <example>
151 <title><function>sr_msg_push()</function> usage</title>
152 <programlisting format="linespecific">
153 ...
154 request_route {
155 ...
156 $var(msgid) = $sruid;
157 if(sr_msg_push("$var(msgid)", "0")) {
158 ...
159 }
160 ...
161 }
162 ...
163 </programlisting>
164 </example>
165 </section>
166 <section id="siprepo.f.sr_msg_pull">
167 <title>
168 <function moreinfo="none">sr_msg_pull(callid, msgid, rname, rmode)</function>
169 </title>
170 <para>
171 Pull the message content and execute the route block 'rname'.
172 If rmode is set to "1", the item of the message is removed from siprepo
173 storage, use "0" to keep it.
174 </para>
175 <para>
176 This function can be used from ANY_ROUTE.
177 </para>
178 <example>
179 <title><function>sr_msg_pull()</function> usage</title>
180 <programlisting format="linespecific">
181 ...
182 request_route {
183 ...
184 if(sr_msg_pull("$var(callid)", "$var(msgid)", "REPOPULL", "1")) {
185 }
186 ...
187 }
188 ...
189 </programlisting>
190 </example>
191 </section>
192 <section id="siprepo.f.sr_msg_async_pull">
193 <title>
194 <function moreinfo="none">sr_msg_async_pull(callid, msgid, gname, rname, rmode)</function>
195 </title>
196 <para>
197 Pull the message content and execute the route block 'rname' via
198 async group 'gname'. If rmode is set to "1", the item of the message
199 is removed from siprepo storage, use "0" to keep it.
200 </para>
201 <para>
202 This function can be used from ANY_ROUTE.
203 </para>
204 <example>
205 <title><function>sr_msg_async_pull()</function> usage</title>
206 <programlisting format="linespecific">
207 ...
208 request_route {
209 ...
210 if(sr_msg_async_pull("$var(callid)", "$var(msgid)", "WG01", "REPOPULL", "1")) {
211 }
212 ...
213 }
214 ...
215 </programlisting>
216 </example>
217 </section>
218 <section id="siprepo.f.sr_msg_rm">
219 <title>
220 <function moreinfo="none">sr_msg_rm(callid, msgid)</function>
221 </title>
222 <para>
223 Remove the item of the message from the siprepo storage.
224 </para>
225 <para>
226 This function can be used from ANY_ROUTE.
227 </para>
228 <example>
229 <title><function>sr_msg_rm()</function> usage</title>
230 <programlisting format="linespecific">
231 ...
232 request_route {
233 ...
234 if(sr_msg_rm("$var(callid)", "$var(msgid)")) {
235 }
236 ...
237 }
238 ...
239 </programlisting>
240 </example>
241 </section>
242 <section id="siprepo.f.sr_msg_check">
243 <title>
244 <function moreinfo="none">sr_msg_check()</function>
245 </title>
246 <para>
247 Check if the message is stored.
248 </para>
249 <para>
250 This function can be used from ANY_ROUTE.
251 </para>
252 <example>
253 <title><function>sr_msg_check()</function> usage</title>
254 <programlisting format="linespecific">
255 ...
256 request_route {
257 ...
258 if(sr_msg_check()) {
259 }
260 ...
261 }
262 ...
263 </programlisting>
264 </example>
265 </section>
266
267 </section>
268 </chapter>