Browse code

kazoo: docbook files space formating

for formating used oXygen XML Editor 13.2

Sergey Safarov authored on 16/09/2021 08:01:23
Showing 1 changed files
... ...
@@ -14,79 +14,65 @@
14 14
 
15 15
 <chapter xmlns:xi="http://www.w3.org/2001/XInclude">
16 16
 	<title>&adminguide;</title>
17
+	<section>
18
+		<title>Overview</title>
19
+		<para>The Kazoo is a general purpose AMQP connector (tested with rabbitmq-server). It
20
+			exposes publish/consume capabilities into Kamailio.</para>
21
+		<para>From a high-level, the purpose of the module might be for things like: <itemizedlist>
22
+				<listitem>
23
+					<para>Integrate to an AMQP application to make real-time routing decisions
24
+						(instead of using, say, a SQL database)</para>
25
+				</listitem>
26
+				<listitem>
27
+					<para>Provide a real-time integration into your program, instead of your
28
+						database, so you can overlay additional logic in your preferred language
29
+						while also utilizing a message bus</para>
30
+				</listitem>
31
+				<listitem>
32
+					<para>Utilize messaging to have a distributed messaging layer, such that
33
+						machines processing requests/responses/events can go up/down or share the
34
+						workload and your Kamailio node will still be happy</para>
35
+				</listitem>
36
+			</itemizedlist>
37
+		</para>
38
+
17 39
 
18
-    
19
-    <section>
20
-    <title>Overview</title>
21
-    <para> The Kazoo is a general purpose AMQP connector (tested with rabbitmq-server). It exposes publish/consume capabilities into Kamailio.
22
-    </para>
23
-<para>
24
-From a high-level, the purpose of the module might be for things like:
25
-<itemizedlist>
26
-<listitem>
27
-<para>
28
-Integrate to an AMQP application to make real-time routing decisions (instead of using, say, a SQL database)
29
-</para>
30
-</listitem>
31
-<listitem>
32
-<para>
33
-Provide a real-time integration into your program, instead of your database, so you can overlay additional logic in your preferred language while also utilizing a message bus
34
-</para>
35
-</listitem>
36
-<listitem>
37
-<para>
38
-Utilize messaging to have a distributed messaging layer, such that machines processing requests/responses/events can go up/down or share the workload and your Kamailio node will still be happy
39
-</para>
40
-</listitem>
41
-</itemizedlist>
42
-</para>
43
-
44
-
45
-<para>
46
-supported operations are:
47
-<itemizedlist>
48
-<listitem>
49
-<para>
50
-publish json payloads to rabbitmq
51
-</para>
52
-</listitem>
53
-<listitem>
54
-<para>
55
-publish json payloads to rabbitmq and wait for correlated response message
56
-</para>
57
-</listitem>
58
-<listitem>
59
-<para>
60
-subscribe to an exchange with a routing key
61
-</para>
62
-</listitem>
63
-</itemizedlist>
64
-</para>
65
-<para>
66
-The Kazoo module also has support to publish updates to presence module thru the kazoo_pua_publish function
67
-</para>
68
-
69
-</section>
70
-    <section>
71
-    <title>How it works</title>
72
-<para>  
73
-The module works with a main forked process that does the communication with rabbitmq for issuing publishes, waiting for replies and consuming messages. When it consumes a message it defers the process to a worker process so that it doesn't block this main process.
74
-</para>
75
-    <section>
76
-    <title>event routes</title>
77
-    <para>
78
-The worker process issues an event-route where we can act on the received payload. The name of the event-route is composed by values extracted from the payload.
79
-    </para>
80
-    <para>
81
-    Kazoo module will try to execute the event route from most significant to less significant. 
82
-    define the event route like event_route[kazoo:consumer-event[-payload_key_value[-payload_subkey_value]]]
83
-    </para>
84
-    <para>
85
-    we can set the key/subkey pair on a subscription base. check the payload on subscribe.
86
-    </para>
87
-        <example>
88
-        <title>define the event route</title>
89
-        <programlisting format="linespecific">
40
+		<para>supported operations are: <itemizedlist>
41
+				<listitem>
42
+					<para>publish json payloads to rabbitmq</para>
43
+				</listitem>
44
+				<listitem>
45
+					<para>publish json payloads to rabbitmq and wait for correlated response
46
+						message</para>
47
+				</listitem>
48
+				<listitem>
49
+					<para>subscribe to an exchange with a routing key</para>
50
+				</listitem>
51
+			</itemizedlist>
52
+		</para>
53
+		<para>The Kazoo module also has support to publish updates to presence module thru the
54
+			kazoo_pua_publish function</para>
55
+
56
+	</section>
57
+	<section>
58
+		<title>How it works</title>
59
+		<para>The module works with a main forked process that does the communication with rabbitmq
60
+			for issuing publishes, waiting for replies and consuming messages. When it consumes a
61
+			message it defers the process to a worker process so that it doesn't block this main
62
+			process.</para>
63
+		<section>
64
+			<title>event routes</title>
65
+			<para>The worker process issues an event-route where we can act on the received
66
+				payload. The name of the event-route is composed by values extracted from the
67
+				payload.</para>
68
+			<para>Kazoo module will try to execute the event route from most significant to less
69
+				significant. define the event route like
70
+				event_route[kazoo:consumer-event[-payload_key_value[-payload_subkey_value]]]</para>
71
+			<para>we can set the key/subkey pair on a subscription base. check the payload on
72
+				subscribe.</para>
73
+			<example>
74
+				<title>define the event route</title>
75
+				<programlisting format="linespecific">
90 76
 ...
91 77
 modparam("kazoo", "amqp_consumer_event_key", "Event-Category")
92 78
 modparam("kazoo", "amqp_consumer_event_subkey", "Event-Name")
... ...
@@ -128,402 +114,367 @@ event_route[kazoo:consumer-event]
128 114
 }
129 115
 
130 116
 </programlisting>
131
-        </example>
132
-</section>
133
-    <section>
134
-    <title>acknowledge messages</title>
135
-<para>
136
-Consumed messages have the option of being acknowledge in two ways:
137
-<itemizedlist>
138
-<listitem>
139
-<para>
140
-immediately when received 
141
-</para>
142
-</listitem>
143
-<listitem>
144
-<para>
145
-after processing by the worker 
146
-</para>
147
-</listitem>
148
-</itemizedlist>
149
-
150
-    </para>
151
-    
152
-</section>
153
-    </section>
154
-
155
-    <section>
156
-    <title>Dependencies</title>
157
-    <section>
158
-        <title>&kamailio; Modules</title>
159
-        <para>
160
-        The following modules must be loaded before this module:
161
-            <itemizedlist>
162
-            <listitem>
163
-            <para>
164
-                <emphasis>none</emphasis>.
165
-            </para>
166
-            </listitem>
167
-            </itemizedlist>
168
-        </para>
169
-    </section>
170
-    <section>
171
-        <title>External Libraries or Applications</title>
172
-        <itemizedlist>
173
-            <listitem>
174
-            <para>
175
-                <emphasis>librabbitmq</emphasis>.
176
-            </para>
177
-            </listitem>
178
-            <listitem>
179
-            <para>
180
-                <emphasis>libjson</emphasis>.
181
-            </para>
182
-            </listitem>
183
-            <listitem>
184
-            <para>
185
-                <emphasis>libuuid</emphasis>.
186
-            </para>
187
-            </listitem>
188
-        </itemizedlist>
189
-
190
-        </section>
191
-    </section>
192
-    
193
-    
194
-    <section>
195
-    <title>Parameters</title>
196
-    <section>
197
-    <title>amqp related</title>
198
-    <section>
199
-        <title><varname>node_hostname</varname>(str)</title>
200
-        <para>
201
-        The name of this host to register in rabbitmq.
202
-        </para>
203
-        <para>
204
-        <emphasis>Default value is NULL. you must set this parameter value for the module to work</emphasis>
205
-        </para>
206
-        <example>
207
-        <title>Set <varname>node_hostname</varname> parameter</title>
208
-        <programlisting format="linespecific">
117
+			</example>
118
+		</section>
119
+		<section>
120
+			<title>acknowledge messages</title>
121
+			<para>Consumed messages have the option of being acknowledge in two ways: <itemizedlist>
122
+					<listitem>
123
+						<para>immediately when received</para>
124
+					</listitem>
125
+					<listitem>
126
+						<para>after processing by the worker</para>
127
+					</listitem>
128
+				</itemizedlist>
129
+			</para>
130
+
131
+		</section>
132
+	</section>
133
+
134
+	<section>
135
+		<title>Dependencies</title>
136
+		<section>
137
+			<title>&kamailio; Modules</title>
138
+			<para>The following modules must be loaded before this module: <itemizedlist>
139
+					<listitem>
140
+						<para>
141
+							<emphasis>none</emphasis>.</para>
142
+					</listitem>
143
+				</itemizedlist>
144
+			</para>
145
+		</section>
146
+		<section>
147
+			<title>External Libraries or Applications</title>
148
+			<itemizedlist>
149
+				<listitem>
150
+					<para>
151
+						<emphasis>librabbitmq</emphasis>.</para>
152
+				</listitem>
153
+				<listitem>
154
+					<para>
155
+						<emphasis>libjson</emphasis>.</para>
156
+				</listitem>
157
+				<listitem>
158
+					<para>
159
+						<emphasis>libuuid</emphasis>.</para>
160
+				</listitem>
161
+			</itemizedlist>
162
+
163
+		</section>
164
+	</section>
165
+
166
+
167
+	<section>
168
+		<title>Parameters</title>
169
+		<section>
170
+			<title>amqp related</title>
171
+			<section>
172
+				<title><varname>node_hostname</varname>(str)</title>
173
+				<para>The name of this host to register in rabbitmq.</para>
174
+				<para>
175
+					<emphasis>Default value is NULL. you must set this parameter value for the
176
+						module to work</emphasis>
177
+				</para>
178
+				<example>
179
+					<title>Set <varname>node_hostname</varname> parameter</title>
180
+					<programlisting format="linespecific">
209 181
 ...
210 182
 modparam("kazoo", "node_hostname", "sipproxy.mydomain.com")
211 183
 ...
212 184
 </programlisting>
213
-        </example>
214
-    </section>
215
-    <section>
216
-        <title><varname>amqp_consumer_processes</varname>(int)</title>
217
-        <para>
218
-        The number of worker processes to handle messages consumption.
219
-        </para>
220
-        <para>
221
-        <emphasis>Default value is 4.</emphasis>
222
-        </para>
223
-        <example>
224
-        <title>Set <varname>amqp_consumer_processes</varname> parameter</title>
225
-        <programlisting format="linespecific">
185
+				</example>
186
+			</section>
187
+			<section>
188
+				<title><varname>amqp_consumer_processes</varname>(int)</title>
189
+				<para>The number of worker processes to handle messages consumption.</para>
190
+				<para>
191
+					<emphasis>Default value is 4.</emphasis>
192
+				</para>
193
+				<example>
194
+					<title>Set <varname>amqp_consumer_processes</varname> parameter</title>
195
+					<programlisting format="linespecific">
226 196
 ...
227 197
 modparam("kazoo", "amqp_consumer_processes", 10)
228 198
 ...
229 199
 </programlisting>
230
-        </example>
231
-    </section>
232
-
233
-    <section>
234
-        <title><varname>amqp_consumer_event_key</varname>(str)</title>
235
-        <para>
236
-        The default name of the field in json payload to compose the event name 1st part
237
-        </para>
238
-        <para>
239
-        <emphasis>Default value is <quote>Event-Category</quote>.</emphasis>
240
-        </para>
241
-        <example>
242
-        <title>Set <varname>amqp_consumer_event_key</varname> parameter</title>
243
-        <programlisting format="linespecific">
200
+				</example>
201
+			</section>
202
+
203
+			<section>
204
+				<title><varname>amqp_consumer_event_key</varname>(str)</title>
205
+				<para>The default name of the field in json payload to compose the event name 1st
206
+					part</para>
207
+				<para>
208
+					<emphasis>Default value is <quote>Event-Category</quote>.</emphasis>
209
+				</para>
210
+				<example>
211
+					<title>Set <varname>amqp_consumer_event_key</varname> parameter</title>
212
+					<programlisting format="linespecific">
244 213
 ...
245 214
 modparam("kazoo", "amqp_consumer_event_key", "My-JSON-Field-Name")
246 215
 ...
247 216
 </programlisting>
248
-        </example>
249
-    </section>
250
-
251
-    <section>
252
-        <title><varname>amqp_consumer_event_subkey</varname>(str)</title>
253
-        <para>
254
-        The default name of the field in json payload to compose the event name 2nd part
255
-        </para>
256
-        <para>
257
-        <emphasis>Default value is <quote>Event-Name</quote>.</emphasis>
258
-        </para>
259
-        <example>
260
-        <title>Set <varname>amqp_consumer_event_subkey</varname> parameter</title>
261
-        <programlisting format="linespecific">
217
+				</example>
218
+			</section>
219
+
220
+			<section>
221
+				<title><varname>amqp_consumer_event_subkey</varname>(str)</title>
222
+				<para>The default name of the field in json payload to compose the event name 2nd
223
+					part</para>
224
+				<para>
225
+					<emphasis>Default value is <quote>Event-Name</quote>.</emphasis>
226
+				</para>
227
+				<example>
228
+					<title>Set <varname>amqp_consumer_event_subkey</varname> parameter</title>
229
+					<programlisting format="linespecific">
262 230
 ...
263 231
 modparam("kazoo", "amqp_consumer_event_subkey", "My-JSON-SubField-Name")
264 232
 ...
265 233
 </programlisting>
266
-        </example>
267
-    </section>
268
-
269
-    <section>
270
-        <title><varname>amqp_max_channels</varname>(str)</title>
271
-        <para>
272
-        The number of pre allocated channels for the connection.
273
-        </para>
274
-        <para>
275
-        <emphasis>Default value is 50.</emphasis>
276
-        </para>
277
-        <example>
278
-        <title>Set <varname>amqp_max_channels</varname> parameter</title>
279
-        <programlisting format="linespecific">
234
+				</example>
235
+			</section>
236
+
237
+			<section>
238
+				<title><varname>amqp_max_channels</varname>(str)</title>
239
+				<para>The number of pre allocated channels for the connection.</para>
240
+				<para>
241
+					<emphasis>Default value is 50.</emphasis>
242
+				</para>
243
+				<example>
244
+					<title>Set <varname>amqp_max_channels</varname> parameter</title>
245
+					<programlisting format="linespecific">
280 246
 ...
281 247
 modparam("kazoo", "amqp_max_channels", 100)
282 248
 ...
283 249
 </programlisting>
284
-        </example>
285
-    </section>
286
-
287
-    <section>
288
-        <title><varname>amqp_connection</varname>(str)</title>
289
-        <para>
290
-        The connection url to rabbitmq. can be set multiple times for failover.
291
-        </para>
292
-        <example>
293
-        <title>Set <varname>amqp_connection</varname> parameter</title>
294
-        <programlisting format="linespecific">
250
+				</example>
251
+			</section>
252
+
253
+			<section>
254
+				<title><varname>amqp_connection</varname>(str)</title>
255
+				<para>The connection url to rabbitmq. can be set multiple times for failover.</para>
256
+				<example>
257
+					<title>Set <varname>amqp_connection</varname> parameter</title>
258
+					<programlisting format="linespecific">
295 259
 ...
296 260
 modparam("kazoo", "amqp_connection", "amqp://guest:guest@localhost:5672")
297 261
 modparam("kazoo", "amqp_connection", "kazoo://guest:guest@otherhost:5672")
298 262
 ...
299 263
 </programlisting>
300
-        </example>
301
-    </section>
302
-
303
-<section>
304
-  <title><varname>event_callback</varname>(str)</title>
305
-    <para>
306
-        The name of the function in the kemi configuration file (embedded
307
-        scripting language such as Lua, Python, ...) to be executed instead
308
-        of event_route[...] blocks.
309
-    </para>
310
-    <para>
311
-        The function receives a string parameter with the name of the event,
312
-        the values can be: 'kazoo:mod-init', 'kazoo:consumer-event'.
313
-    </para>
314
-
315
-  <example>
316
-    <title>Set <varname>event_callback</varname> parameter</title>
317
-    <programlisting format="linespecific">
264
+				</example>
265
+			</section>
266
+
267
+			<section>
268
+				<title><varname>event_callback</varname>(str)</title>
269
+				<para>The name of the function in the kemi configuration file (embedded scripting
270
+					language such as Lua, Python, ...) to be executed instead of event_route[...]
271
+					blocks.</para>
272
+				<para>The function receives a string parameter with the name of the event, the
273
+					values can be: 'kazoo:mod-init', 'kazoo:consumer-event'.</para>
274
+
275
+				<example>
276
+					<title>Set <varname>event_callback</varname> parameter</title>
277
+					<programlisting format="linespecific">
318 278
     ...
319 279
     modparam("kazoo", "event_callback", "ksr_kazoo_event")
320 280
     ...
321 281
     </programlisting>
322
-  </example>
323
-</section>
282
+				</example>
283
+			</section>
284
+
285
+
324 286
 
325
-    
326 287
 
327
-    
328 288
 
329 289
 
330
-    </section>
290
+		</section>
331 291
 
332
-    <section>
333
-    <title>execution control</title>
334
-    <para>execution control of main loop can be controlled by changing the parameter values in this section.</para>
335
-    <para>The main loop has 3 sub-loops were it listen for actions to execute with a timeout. These group of parameters allow to set the maximum number of times the sub-loop is executed if it doesn't timeout.</para>
336
-    <para>On busy systems, we may have a condition where a sub-loop never times out because it always has data to process. The purpose of these parameters is to set a maximum number of times it executes before it handles control to the next sub-loop.</para>
337
-        <programlisting format="linespecific">
292
+		<section>
293
+			<title>execution control</title>
294
+			<para>execution control of main loop can be controlled by changing the parameter values
295
+				in this section.</para>
296
+			<para>The main loop has 3 sub-loops were it listen for actions to execute with a
297
+				timeout. These group of parameters allow to set the maximum number of times the
298
+				sub-loop is executed if it doesn't timeout.</para>
299
+			<para>On busy systems, we may have a condition where a sub-loop never times out because
300
+				it always has data to process. The purpose of these parameters is to set a maximum
301
+				number of times it executes before it handles control to the next sub-loop.</para>
302
+			<programlisting format="linespecific">
338 303
 ...
339 304
 while(true) // main  loop
340
- while(ACK or timeout)  // acknowledge from worker process
341
- while(SEND or timeout) // anything to send ?
342
- while(CONSUME or timeout) // any data on consumed exchanges ?
305
+while(ACK or timeout)  // acknowledge from worker process
306
+while(SEND or timeout) // anything to send ?
307
+while(CONSUME or timeout) // any data on consumed exchanges ?
343 308
 ...
344 309
 </programlisting>
345 310
 
346
-    <section>
347
-        <title><varname>amqp_consumer_loop_count</varname>(int)</title>
348
-        <para>
349
-        The consumer loop count.
350
-        </para>
351
-        <para>
352
-        <emphasis>Default value is 10.</emphasis>
353
-        </para>
354
-        <example>
355
-        <title>Set <varname>amqp_consumer_loop_count</varname> parameter</title>
356
-        <programlisting format="linespecific">
311
+			<section>
312
+				<title><varname>amqp_consumer_loop_count</varname>(int)</title>
313
+				<para>The consumer loop count.</para>
314
+				<para>
315
+					<emphasis>Default value is 10.</emphasis>
316
+				</para>
317
+				<example>
318
+					<title>Set <varname>amqp_consumer_loop_count</varname> parameter</title>
319
+					<programlisting format="linespecific">
357 320
 ...
358 321
 modparam("kazoo", "amqp_consumer_loop_count", 3)
359 322
 ...
360 323
 </programlisting>
361
-        </example>
362
-    </section>    
363
-    
364
-    <section>
365
-        <title><varname>amqp_internal_loop_count</varname>(int)</title>
366
-        <para>
367
-        The internal listen for commands loop count.
368
-        </para>
369
-        <para>
370
-        <emphasis>Default value is 5.</emphasis>
371
-        </para>
372
-        <example>
373
-        <title>Set <varname>amqp_internal_loop_count</varname> parameter</title>
374
-        <programlisting format="linespecific">
324
+				</example>
325
+			</section>
326
+
327
+			<section>
328
+				<title><varname>amqp_internal_loop_count</varname>(int)</title>
329
+				<para>The internal listen for commands loop count.</para>
330
+				<para>
331
+					<emphasis>Default value is 5.</emphasis>
332
+				</para>
333
+				<example>
334
+					<title>Set <varname>amqp_internal_loop_count</varname> parameter</title>
335
+					<programlisting format="linespecific">
375 336
 ...
376 337
 modparam("kazoo", "amqp_internal_loop_count", 1)
377 338
 ...
378 339
 </programlisting>
379
-        </example>
380
-    </section>    
381
-    
382
-    <section>
383
-        <title><varname>amqp_consumer_ack_loop_count</varname>(int)</title>
384
-        <para>
385
-        The work ack loop count.
386
-        </para>
387
-        <para>
388
-        <emphasis>Default value is 20.</emphasis>
389
-        </para>
390
-        <example>
391
-        <title>Set <varname>amqp_consumer_ack_loop_count</varname> parameter</title>
392
-        <programlisting format="linespecific">
340
+				</example>
341
+			</section>
342
+
343
+			<section>
344
+				<title><varname>amqp_consumer_ack_loop_count</varname>(int)</title>
345
+				<para>The work ack loop count.</para>
346
+				<para>
347
+					<emphasis>Default value is 20.</emphasis>
348
+				</para>
349
+				<example>
350
+					<title>Set <varname>amqp_consumer_ack_loop_count</varname> parameter</title>
351
+					<programlisting format="linespecific">
393 352
 ...
394 353
 modparam("kazoo", "amqp_consumer_ack_loop_count", 5)
395 354
 ...
396 355
 </programlisting>
397
-        </example>
398
-    </section><section>
399
-        <title><varname>consume_messages_on_reconnect</varname>(int)</title>
400
-        <para>
401
-        This parameter indicates if the module ignores the loop counters on reconnect and consumes all the pending messages ready to be consumed.
402
-        </para>
403
-        <para>
404
-        <emphasis>Default value is 1.</emphasis>
405
-        </para>
406
-        <example>
407
-        <title>Set <varname>consume_messages_on_reconnect</varname> parameter</title>
408
-        <programlisting format="linespecific">
356
+				</example>
357
+			</section>
358
+			<section>
359
+				<title><varname>consume_messages_on_reconnect</varname>(int)</title>
360
+				<para>This parameter indicates if the module ignores the loop counters on reconnect
361
+					and consumes all the pending messages ready to be consumed.</para>
362
+				<para>
363
+					<emphasis>Default value is 1.</emphasis>
364
+				</para>
365
+				<example>
366
+					<title>Set <varname>consume_messages_on_reconnect</varname> parameter</title>
367
+					<programlisting format="linespecific">
409 368
 ...
410 369
 modparam("kazoo", "consume_messages_on_reconnect", 0)
411 370
 ...
412 371
 </programlisting>
413
-        </example>
414
-    </section><section>
415
-        <title><varname>single_consumer_on_reconnect</varname>(int)</title>
416
-        <para>
417
-        When the main loop receives a message from rabbitmq it will defer the execution to a worker in a round-robin manner. this parameter allows to use the same worker when kazoo reconnects to rabbitmq.
418
-        </para>
419
-        <para>
420
-        <emphasis>Default value is 1.</emphasis>
421
-        </para>
422
-        <example>
423
-        <title>Set <varname>single_consumer_on_reconnect</varname> parameter</title>
424
-        <programlisting format="linespecific">
372
+				</example>
373
+			</section>
374
+			<section>
375
+				<title><varname>single_consumer_on_reconnect</varname>(int)</title>
376
+				<para>When the main loop receives a message from rabbitmq it will defer the
377
+					execution to a worker in a round-robin manner. this parameter allows to use the
378
+					same worker when kazoo reconnects to rabbitmq.</para>
379
+				<para>
380
+					<emphasis>Default value is 1.</emphasis>
381
+				</para>
382
+				<example>
383
+					<title>Set <varname>single_consumer_on_reconnect</varname> parameter</title>
384
+					<programlisting format="linespecific">
425 385
 ...
426 386
 modparam("kazoo", "single_consumer_on_reconnect", 0)
427 387
 ...
428 388
 </programlisting>
429
-        </example>
430
-    </section>    
431
-    
432
-    
433
-    </section>
434
-
435
-    <section>
436
-    <title>timers</title>
437
-    <para>
438
-    each functional parameter related to timers come with 2 reflected parameters. name_sec and name_micro 
439
-    </para>
440
-    <section>
441
-        <title><varname>amqp_consumer_ack_timeout</varname>(str)</title>
442
-        <para>
443
-        Timeout when checking for acknowledge from workers.
444
-        </para>
445
-        <para>
446
-        <emphasis>Default value is 100000 micro.</emphasis>
447
-        </para>
448
-        <example>
449
-        <title>Set <varname>amqp_consumer_ack_timeout</varname> parameter</title>
450
-        <programlisting format="linespecific">
389
+				</example>
390
+			</section>
391
+
392
+
393
+		</section>
394
+
395
+		<section>
396
+			<title>timers</title>
397
+			<para>each functional parameter related to timers come with 2 reflected parameters.
398
+				name_sec and name_micro</para>
399
+			<section>
400
+				<title><varname>amqp_consumer_ack_timeout</varname>(str)</title>
401
+				<para>Timeout when checking for acknowledge from workers.</para>
402
+				<para>
403
+					<emphasis>Default value is 100000 micro.</emphasis>
404
+				</para>
405
+				<example>
406
+					<title>Set <varname>amqp_consumer_ack_timeout</varname> parameter</title>
407
+					<programlisting format="linespecific">
451 408
 ...
452 409
 modparam("kazoo", "amqp_consumer_ack_timeout_sec", 1)
453 410
 modparam("kazoo", "amqp_consumer_ack_timeout_micro", 200000)
454 411
 ...
455 412
 </programlisting>
456
-        </example>
457
-    </section>    
458
-
459
-    <section>
460
-        <title><varname>amqp_interprocess_timeout</varname>(str)</title>
461
-        <para>
462
-        Timeout when checking for commands (publish/query) for sending to rabbitmq.
463
-        </para>
464
-        <para>
465
-        <emphasis>Default value is 100000 micro.</emphasis>
466
-        </para>
467
-        <example>
468
-        <title>Set <varname>amqp_interprocess_timeout</varname> parameter</title>
469
-        <programlisting format="linespecific">
413
+				</example>
414
+			</section>
415
+
416
+			<section>
417
+				<title><varname>amqp_interprocess_timeout</varname>(str)</title>
418
+				<para>Timeout when checking for commands (publish/query) for sending to rabbitmq.</para>
419
+				<para>
420
+					<emphasis>Default value is 100000 micro.</emphasis>
421
+				</para>
422
+				<example>
423
+					<title>Set <varname>amqp_interprocess_timeout</varname> parameter</title>
424
+					<programlisting format="linespecific">
470 425
 ...
471 426
 modparam("kazoo", "amqp_interprocess_timeout_sec", 1)
472 427
 modparam("kazoo", "amqp_interprocess_timeout_micro", 200000)
473 428
 ...
474 429
 </programlisting>
475
-        </example>
476
-    </section>    
477
-
478
-    <section>
479
-        <title><varname>amqp_waitframe_timeout</varname>(str)</title>
480
-        <para>
481
-        Timeout when checking for messages from rabbitmq.
482
-        </para>
483
-        <para>
484
-        <emphasis>Default value is 100000 micro.</emphasis>
485
-        </para>
486
-        <example>
487
-        <title>Set <varname>amqp_waitframe_timeout</varname> parameter</title>
488
-        <programlisting format="linespecific">
430
+				</example>
431
+			</section>
432
+
433
+			<section>
434
+				<title><varname>amqp_waitframe_timeout</varname>(str)</title>
435
+				<para>Timeout when checking for messages from rabbitmq.</para>
436
+				<para>
437
+					<emphasis>Default value is 100000 micro.</emphasis>
438
+				</para>
439
+				<example>
440
+					<title>Set <varname>amqp_waitframe_timeout</varname> parameter</title>
441
+					<programlisting format="linespecific">
489 442
 ...
490 443
 modparam("kazoo", "amqp_waitframe_timeout_sec", 1)
491 444
 modparam("kazoo", "amqp_waitframe_timeout_micro", 200000)
492 445
 ...
493 446
 </programlisting>
494
-        </example>
495
-    </section>    
496
-
497
-    <section>
498
-        <title><varname>amqp_query_timeout</varname>(str)</title>
499
-        <para>
500
-        Timeout when checking for reply messages from rabbitmq for kazoo_query commands.
501
-        </para>
502
-        <para>
503
-        <emphasis>Default value is 2 sec.</emphasis>
504
-        </para>
505
-        <example>
506
-        <title>Set <varname>amqp_query_timeout</varname> parameter</title>
507
-        <programlisting format="linespecific">
447
+				</example>
448
+			</section>
449
+
450
+			<section>
451
+				<title><varname>amqp_query_timeout</varname>(str)</title>
452
+				<para>Timeout when checking for reply messages from rabbitmq for kazoo_query
453
+					commands.</para>
454
+				<para>
455
+					<emphasis>Default value is 2 sec.</emphasis>
456
+				</para>
457
+				<example>
458
+					<title>Set <varname>amqp_query_timeout</varname> parameter</title>
459
+					<programlisting format="linespecific">
508 460
 ...
509 461
 modparam("kazoo", "amqp_query_timeout_sec", 1)
510 462
 modparam("kazoo", "amqp_query_timeout_micro", 200000)
511 463
 ...
512 464
 </programlisting>
513
-        </example>
514
-    </section>    
515
- 
516
-     <section>
517
-        <title><varname>amqp_query_timeout_avp</varname>(str)</title>
518
-        <para>
519
-        avp holding the value in seconds for Timeout when checking for reply messages from rabbitmq for kazoo_query commands.
520
-        </para>
521
-        <para>
522
-        <emphasis>Default value is NULL (no value).</emphasis>
523
-        </para>
524
-        <example>
525
-        <title>>Set <varname>amqp_query_timeout_avp</varname> parameter</title>
526
-        <programlisting format="linespecific">
465
+				</example>
466
+			</section>
467
+
468
+			<section>
469
+				<title><varname>amqp_query_timeout_avp</varname>(str)</title>
470
+				<para>avp holding the value in seconds for Timeout when checking for reply messages
471
+					from rabbitmq for kazoo_query commands.</para>
472
+				<para>
473
+					<emphasis>Default value is NULL (no value).</emphasis>
474
+				</para>
475
+				<example>
476
+					<title>>Set <varname>amqp_query_timeout_avp</varname> parameter</title>
477
+					<programlisting format="linespecific">
527 478
 ...
528 479
 modparam("kazoo", "amqp_query_timeout_avp", "$var(kz_timeout)")
529 480
 
... ...
@@ -535,121 +486,112 @@ route[SOME_ROUTE]
535 486
 
536 487
 ...
537 488
 </programlisting>
538
-        </example>
539
-    </section>    
540
- 
541
- 
542
-    </section>
543
-        
544
-    <section>
545
-    <title>presence related</title>
546
-    <section>
547
-        <title><varname>db_url</varname>(str)</title>
548
-        <para>
549
-        The database for the presentity table.
550
-        </para>
551
-        <para>If set, the kazoo_ppua_publish function will update the presentity status in the database.
552
-        </para>
553
-        <para>
554
-        <emphasis>Default value is <quote>NULL</quote>.</emphasis>
555
-        </para>
556
-        <example>
557
-        <title>Set <varname>db_url</varname> parameter</title>
558
-        <programlisting format="linespecific">
489
+				</example>
490
+			</section>
491
+
492
+
493
+		</section>
494
+
495
+		<section>
496
+			<title>presence related</title>
497
+			<section>
498
+				<title><varname>db_url</varname>(str)</title>
499
+				<para>The database for the presentity table.</para>
500
+				<para>If set, the kazoo_ppua_publish function will update the presentity status in
501
+					the database.</para>
502
+				<para>
503
+					<emphasis>Default value is <quote>NULL</quote>.</emphasis>
504
+				</para>
505
+				<example>
506
+					<title>Set <varname>db_url</varname> parameter</title>
507
+					<programlisting format="linespecific">
559 508
 ...
560 509
 modparam("kazoo", "db_url", "&defaultdb;")
561 510
 ...
562 511
 </programlisting>
563
-        </example>
564
-    </section>
565
-
566
-    <section>
567
-        <title><varname>presentity_table</varname>(str)</title>
568
-        <para>
569
-        The name of the presentity table in the database.
570
-        </para>
571
-        <para>
572
-        <emphasis>Default value is <quote>presentity</quote>.</emphasis>
573
-        </para>
574
-        <example>
575
-        <title>Set <varname>presentity_table</varname> parameter</title>
576
-        <programlisting format="linespecific">
512
+				</example>
513
+			</section>
514
+
515
+			<section>
516
+				<title><varname>presentity_table</varname>(str)</title>
517
+				<para>The name of the presentity table in the database.</para>
518
+				<para>
519
+					<emphasis>Default value is <quote>presentity</quote>.</emphasis>
520
+				</para>
521
+				<example>
522
+					<title>Set <varname>presentity_table</varname> parameter</title>
523
+					<programlisting format="linespecific">
577 524
 ...
578 525
 modparam("kazoo", "presentity_table", "my_presentity_table")
579 526
 ...
580 527
 </programlisting>
581
-        </example>
582
-    </section>
583
-
584
-    <section id="kazoo.p.pua_mode">
585
-        <title><varname>pua_mode</varname>(int)</title>
586
-		<para>
587
-			Control if the module has to connect to presence database tables.
588
-			Set it to 0 to not connect to database.
589
-		</para>
590
-        <para>
591
-        <emphasis>Default value is <quote>1</quote>.</emphasis>
592
-        </para>
593
-        <example>
594
-        <title>Set <varname>pua_mode</varname> parameter</title>
595
-        <programlisting format="linespecific">
528
+				</example>
529
+			</section>
530
+
531
+			<section id="kazoo.p.pua_mode">
532
+				<title><varname>pua_mode</varname>(int)</title>
533
+				<para>Control if the module has to connect to presence database tables. Set it to 0
534
+					to not connect to database.</para>
535
+				<para>
536
+					<emphasis>Default value is <quote>1</quote>.</emphasis>
537
+				</para>
538
+				<example>
539
+					<title>Set <varname>pua_mode</varname> parameter</title>
540
+					<programlisting format="linespecific">
596 541
 ...
597 542
 modparam("kazoo", "pua_mode", 0)
598 543
 ...
599 544
 </programlisting>
600
-        </example>
601
-    </section>
602
-
603
-    </section>
604
-    
605
-    
606
-    
607
-
608
-
609
-</section>    
610
-<section>
611
-    <title>Functions</title>
612
-    <section>
613
-    <title>amqp related</title>
614
-
615
-    <section>
616
-        <title>
617
-        <function moreinfo="none">kazoo_publish(exchange, routing_key, json_payload)</function>
618
-        </title>
619
-        <para>
620
-        The function publishes a json payload to rabbitmq. The routing_key parameter should be encoded.
621
-        </para>
622
-        <para>
623
-        This function can be used from ANY ROUTE.
624
-        </para>
625
-
626
-        <example>
627
-        <title><function>kazoo_publish</function> usage</title>
628
-        <programlisting format="linespecific">
545
+				</example>
546
+			</section>
547
+
548
+		</section>
549
+
550
+
551
+
552
+
553
+
554
+	</section>
555
+	<section>
556
+		<title>Functions</title>
557
+		<section>
558
+			<title>amqp related</title>
559
+
560
+			<section>
561
+				<title>
562
+					<function moreinfo="none">kazoo_publish(exchange, routing_key,
563
+						json_payload)</function>
564
+				</title>
565
+				<para>The function publishes a json payload to rabbitmq. The routing_key parameter
566
+					should be encoded.</para>
567
+				<para>This function can be used from ANY ROUTE.</para>
568
+
569
+				<example>
570
+					<title><function>kazoo_publish</function> usage</title>
571
+					<programlisting format="linespecific">
629 572
 ...
630 573
 $var(amqp_payload_request) = $_s({"Event-Category" : "directory", "Event-Name" : "reg_success", "Contact" : "$(ct{s.escape.common}{s.replace,\','}{s.replace,$$,})", "Call-ID" : "$ci", "Realm" : "$fd", "Username" : "$fU", "From-User" : "$fU", "From-Host" : "$fd", "To-User" : "$tU", "To-Host" : "$td", "User-Agent" : "$(ua{s.escape.common}{s.replace,\','}{s.replace,$$,})" });
631 574
 $var(amqp_routing_key) = "registration.success." + $(fd{kz.encode}) + "." + $fU;
632 575
 kazoo_publish("callmgr", $var(amqp_routing_key), $var(amqp_payload_request)); 
633 576
 ...
634 577
 </programlisting>
635
-        </example>
636
-    </section>
637
-    
638
-    <section>
639
-        <title>
640
-        <function moreinfo="none">kazoo_query(exchange, routing_key, json_payload [, target_var])</function>
641
-        </title>
642
-        <para>
643
-        The function publishes a json payload to rabbitmq, waits for a correlated messageand puts the result in target_var. The routing_key parameter should be encoded.
644
-        target_var is optional as the function also puts the result in pseudo-variable $kzR.
645
-        </para>
646
-        <para>
647
-        This function can be used from ANY ROUTE.
648
-        </para>
649
-
650
-        <example>
651
-        <title><function>kazoo_query</function> usage</title>
652
-        <programlisting format="linespecific">
578
+				</example>
579
+			</section>
580
+
581
+			<section>
582
+				<title>
583
+					<function moreinfo="none">kazoo_query(exchange, routing_key, json_payload [,
584
+						target_var])</function>
585
+				</title>
586
+				<para>The function publishes a json payload to rabbitmq, waits for a correlated
587
+					messageand puts the result in target_var. The routing_key parameter should be
588
+					encoded. target_var is optional as the function also puts the result in
589
+					pseudo-variable $kzR.</para>
590
+				<para>This function can be used from ANY ROUTE.</para>
591
+
592
+				<example>
593
+					<title><function>kazoo_query</function> usage</title>
594
+					<programlisting format="linespecific">
653 595
 ...
654 596
 $var(amqp_payload_request) = "{'Event-Category' : 'call_event' , 'Event-Name' : 'query_user_channels_req', 'Realm' : '" + $fd + "', 'Username' : '" + $fU + "', 'Active-Only' : false }";
655 597
 kazoo_encode("$ci", "$var(callid_encoded)");
... ...
@@ -663,23 +605,21 @@ if(kazoo_query("callevt", $var(amqp_routing_key), $var(amqp_payload_request), "$
663 605
 }
664 606
 ...
665 607
 </programlisting>
666
-        </example>
667
-    </section>
668
-    
669
-    <section>
670
-        <title>
671
-        <function moreinfo="none">kazoo_subscribe(exchange, exchange_type, queue, routing_key)</function>
672
-        </title>
673
-        <para>
674
-        The function subscribes to exchange/type on queue with routing_key. The routing_key parameter should be encoded.
675
-        </para>
676
-        <para>
677
-        This function  must be called from event_route[kazoo:mod-init].
678
-        </para>
679
-
680
-        <example>
681
-        <title><function>kazoo_subscribe</function> usage</title>
682
-        <programlisting format="linespecific">
608
+				</example>
609
+			</section>
610
+
611
+			<section>
612
+				<title>
613
+					<function moreinfo="none">kazoo_subscribe(exchange, exchange_type, queue,
614
+						routing_key)</function>
615
+				</title>
616
+				<para>The function subscribes to exchange/type on queue with routing_key. The
617
+					routing_key parameter should be encoded.</para>
618
+				<para>This function must be called from event_route[kazoo:mod-init].</para>
619
+
620
+				<example>
621
+					<title><function>kazoo_subscribe</function> usage</title>
622
+					<programlisting format="linespecific">
683 623
 ...
684 624
 event_route[kazoo:mod-init]
685 625
 {
... ...
@@ -692,57 +632,53 @@ event_route[kazoo:consumer-event]
692 632
 }
693 633
 ...
694 634
 </programlisting>
695
-        </example>
696
-    </section>
697
-
698
-    <section>
699
-        <title>
700
-        <function moreinfo="none">kazoo_subscribe(json_description)</function>
701
-        </title>
702
-        <para>
703
-        The function takes additional parameters to the subscribe function.
704
-        </para>
705
-        <para>        
706
-        <itemizedlist>
707
-            <title>json payload fields description</title>
708
-            <listitem>
709
-               <para>exchange : str, required</para> 
710
-            </listitem>
711
-            <listitem>
712
-               <para>type : str, required</para> 
713
-            </listitem>
714
-            <listitem>
715
-               <para>queue : str, required</para> 
716
-            </listitem>
717
-            <listitem>
718
-               <para>routing : str, required</para> 
719
-            </listitem>
720
-            <listitem>
721
-               <para>auto_delete : int, default 1</para> 
722
-            </listitem>
723
-            <listitem>
724
-               <para>durable : int, default 0</para> 
725
-            </listitem>
726
-            <listitem>
727
-               <para>no_ack : int, default 1</para> 
728
-            </listitem>
729
-            <listitem>
730
-               <para>wait_for_consumer_ack : int, default 0</para> 
731
-            </listitem>
732
-            <listitem>
733
-               <para>event_key : str, no default</para> 
734
-            </listitem>
735
-            <listitem>
736
-               <para>event_subkey : str, no default</para> 
737
-            </listitem>
738
-        </itemizedlist>
739
-        </para>
740
-        <para>
741
-        This function  must be called from event_route[kazoo:mod-init].
742
-        </para>
743
-        <example>
744
-        <title><function>kazoo_subscribe</function> usage</title>
745
-        <programlisting format="linespecific">
635
+				</example>
636
+			</section>
637
+
638
+			<section>
639
+				<title>
640
+					<function moreinfo="none">kazoo_subscribe(json_description)</function>
641
+				</title>
642
+				<para>The function takes additional parameters to the subscribe function.</para>
643
+				<para>
644
+					<itemizedlist>
645
+						<title>json payload fields description</title>
646
+						<listitem>
647
+							<para>exchange : str, required</para>
648
+						</listitem>
649
+						<listitem>
650
+							<para>type : str, required</para>
651
+						</listitem>
652
+						<listitem>
653
+							<para>queue : str, required</para>
654
+						</listitem>
655
+						<listitem>
656
+							<para>routing : str, required</para>
657
+						</listitem>
658
+						<listitem>
659
+							<para>auto_delete : int, default 1</para>
660
+						</listitem>
661
+						<listitem>
662
+							<para>durable : int, default 0</para>
663
+						</listitem>
664
+						<listitem>
665
+							<para>no_ack : int, default 1</para>
666
+						</listitem>
667
+						<listitem>
668
+							<para>wait_for_consumer_ack : int, default 0</para>
669
+						</listitem>
670
+						<listitem>
671
+							<para>event_key : str, no default</para>
672
+						</listitem>
673
+						<listitem>
674
+							<para>event_subkey : str, no default</para>
675
+						</listitem>
676
+					</itemizedlist>
677
+				</para>
678
+				<para>This function must be called from event_route[kazoo:mod-init].</para>
679
+				<example>
680
+					<title><function>kazoo_subscribe</function> usage</title>
681
+					<programlisting format="linespecific">
746 682
 ...
747 683
 event_route[kazoo:mod-init]
748 684
 {
... ...
@@ -756,26 +692,23 @@ event_route[kazoo:consumer-event]
756 692
 }
757 693
 ...
758 694
 </programlisting>
759
-        </example>
760
-    </section>
761
-    
762
-</section>
763
-    <section>
764
-    <title>presence related</title>
765
-    <section>
766
-        <title>
767
-        <function moreinfo="none">kazoo_pua_publish(json_payload)</function>
768
-        </title>
769
-        <para>
770
-        The function build presentity state from json_payload and updates presentity table.
771
-        </para>
772
-        <para>
773
-        This function can be used from ANY ROUTE.
774
-        </para>
775
-
776
-        <example>
777
-        <title><function>kazoo_pua_publish</function> usage</title>
778
-        <programlisting format="linespecific">
695
+				</example>
696
+			</section>
697
+
698
+		</section>
699
+		<section>
700
+			<title>presence related</title>
701
+			<section>
702
+				<title>
703
+					<function moreinfo="none">kazoo_pua_publish(json_payload)</function>
704
+				</title>
705
+				<para>The function build presentity state from json_payload and updates presentity
706
+					table.</para>
707
+				<para>This function can be used from ANY ROUTE.</para>
708
+
709
+				<example>
710
+					<title><function>kazoo_pua_publish</function> usage</title>
711
+					<programlisting format="linespecific">
779 712
 ...
780 713
 event_route[kazoo:consumer-event-presence-update]
781 714
 {
... ...
@@ -785,50 +718,43 @@ event_route[kazoo:consumer-event-presence-update]
785 718
 }    
786 719
 ...
787 720
 </programlisting>
788
-        </example>
789
-    </section>
790
-
791
-    
792
-</section>
793
-    <section>
794
-    <title>other</title>
795
-    <section>
796
-        <title>
797
-        <function moreinfo="none">kazoo_encode(to_encode, target_var)</function>
798
-        </title>
799
-        <para>
800
-        The function encodes the 1st parameter for amqp and puts the result in the 2nd parameter.
801
-        </para>
802
-        <para>
803
-        This function can be used from ANY ROUTE.
804
-        </para>
805
-
806
-        <example>
807
-        <title><function>kazoo_encode</function> usage</title>
808
-        <programlisting format="linespecific">
721
+				</example>
722
+			</section>
723
+
724
+
725
+		</section>
726
+		<section>
727
+			<title>other</title>
728
+			<section>
729
+				<title>
730
+					<function moreinfo="none">kazoo_encode(to_encode, target_var)</function>
731
+				</title>
732
+				<para>The function encodes the 1st parameter for amqp and puts the result in the
733
+					2nd parameter.</para>
734
+				<para>This function can be used from ANY ROUTE.</para>
735
+
736
+				<example>
737
+					<title><function>kazoo_encode</function> usage</title>
738
+					<programlisting format="linespecific">
809 739
 ...
810 740
 kazoo_encode("$ci", "$var(callid_encoded)");
811 741
 $var(amqp_routing_key) = "call.status_req.$var(callid_encoded)";
812 742
 ...
813 743
 </programlisting>
814
-        </example>
815
-    </section>
816
-
817
-    <section>
818
-        <title>
819
-        <function moreinfo="none">kazoo_json(json_payload, field, target_var)</function>
820
-        </title>
821
-        <para>
822
-        The function extracts the value from a json payload and puts the result in the 3rd parameter.
823
-        It can use nested values for the query part.
824
-        </para>
825
-        <para>
826
-        This function can be used from ANY ROUTE.
827
-        </para>
828
-
829
-        <example>
830
-        <title><function>kazoo_json</function> usage</title>
831
-        <programlisting format="linespecific">
744
+				</example>
745
+			</section>
746
+
747
+			<section>
748
+				<title>
749
+					<function moreinfo="none">kazoo_json(json_payload, field, target_var)</function>
750
+				</title>
751
+				<para>The function extracts the value from a json payload and puts the result in
752
+					the 3rd parameter. It can use nested values for the query part.</para>
753
+				<para>This function can be used from ANY ROUTE.</para>
754
+
755
+				<example>
756
+					<title><function>kazoo_json</function> usage</title>
757
+					<programlisting format="linespecific">
832 758
 ...
833 759
 kazoo_json("$var(amqp_result)", "Channels[0].switch_url", "$du");
834 760
 if($du != $null) {
... ...
@@ -837,40 +763,38 @@ if($du != $null) {
837 763
 }
838 764
 ...
839 765
 </programlisting>
840
-        </example>
841
-    </section>
842
-    
843
-</section>
844
-</section>
845
-    
846
-        <section>
847
-        <title>Exported pseudo-variables</title>
848
-        <itemizedlist>
849
-            <listitem>
850
-            <para>
851
-                <emphasis>$kzR</emphasis>
852
-                Contains the payload result of kazoo_query execution.
853
-            </para>
854
-            </listitem>
855
-            <listitem>
856
-            <para>
857
-                <emphasis>$kzE</emphasis>
858
-                Contains the payload of a consumed message
859
-            </para>
860
-            </listitem>
861
-        </itemizedlist>
862
-    </section>
863
-    
864
-        <section>
865
-        <title>Transformations</title>
866
-        <para>The prefix for kazoo transformations is kz.</para>
867
-        <itemizedlist>
868
-            <listitem><para>
869
-                <emphasis>json</emphasis>
870
-            </para>
871
-        <example>
872
-        <title><function>kz.json</function> usage</title>
873
-        <programlisting format="linespecific">
766
+				</example>
767
+			</section>
768
+
769
+		</section>
770
+	</section>
771
+
772
+	<section>
773
+		<title>Exported pseudo-variables</title>
774
+		<itemizedlist>
775
+			<listitem>
776
+				<para>
777
+					<emphasis>$kzR</emphasis> Contains the payload result of kazoo_query execution.
778
+				</para>
779
+			</listitem>
780
+			<listitem>
781
+				<para>
782
+					<emphasis>$kzE</emphasis> Contains the payload of a consumed message</para>
783
+			</listitem>
784
+		</itemizedlist>
785
+	</section>
786
+
787
+	<section>
788
+		<title>Transformations</title>
789
+		<para>The prefix for kazoo transformations is kz.</para>
790
+		<itemizedlist>
791
+			<listitem>
792
+				<para>
793
+					<emphasis>json</emphasis>
794
+				</para>
795
+				<example>
796
+					<title><function>kz.json</function> usage</title>
797
+					<programlisting format="linespecific">
874 798
 ...
875 799
 #kazoo_json("$var(amqp_result)", "Channels[0].switch_url", "$du");
876 800
 $du = $kzR{kz.json,Channels[0].switch_url};
... ...
@@ -880,27 +804,27 @@ if($du != $null) {
880 804
 }
881 805
 ...
882 806
 </programlisting>
883
-        </example>
884
-            
885
-            </listitem>
886
-            <listitem><para>
887
-                <emphasis>encode</emphasis>
888
-            </para>
889
-        <example>
890
-        <title><function>kz.encode</function> usage</title>
891
-        <programlisting format="linespecific">
807
+				</example>
808
+
809
+			</listitem>
810
+			<listitem>
811
+				<para>
812
+					<emphasis>encode</emphasis>
813
+				</para>
814
+				<example>