Browse code

modules: readme files regenerated - acc_json ... [skip ci]

Kamailio Dev authored on 01/04/2021 15:01:14
Showing 1 changed files
... ...
@@ -34,37 +34,41 @@ Julien Chavanton
34 34
               3.1. acc_flag (integer)
35 35
               3.2. acc_missed_flag (integer)
36 36
               3.3. acc_extra (string)
37
-              3.4. acc_time_mode (integer)
38
-              3.5. acc_time_format (str)
39
-              3.6. acc_output_mqueue (integer)
40
-              3.7. acc_output_syslog (integer)
41
-              3.8. acc_log_facility (integer)
42
-              3.9. acc_log_level (integer)
43
-              3.10. cdr_enable (str)
44
-              3.11. cdr_extra (str)
45
-              3.12. cdr_expired_dlg_enable (str)
46
-              3.13. cdr_output_mqueue (integer)
47
-              3.14. cdr_output_syslog (integer)
48
-              3.15. cdr_log_facility (integer)
49
-              3.16. cdr_log_level (integer)
37
+              3.4. acc_json_pre_encoded_prefix (string)
38
+              3.5. acc_time_mode (integer)
39
+              3.6. acc_time_format (str)
40
+              3.7. acc_output_mqueue (integer)
41
+              3.8. acc_output_syslog (integer)
42
+              3.9. acc_log_facility (integer)
43
+              3.10. acc_log_level (integer)
44
+              3.11. cdr_enable (str)
45
+              3.12. cdr_extra (str)
46
+              3.13. cdr_json_pre_encoded_prefix (string)
47
+              3.14. cdr_expired_dlg_enable (str)
48
+              3.15. cdr_output_mqueue (integer)
49
+              3.16. cdr_output_syslog (integer)
50
+              3.17. cdr_log_facility (integer)
51
+              3.18. cdr_log_level (integer)
50 52
 
51 53
    List of Examples
52 54
 
53 55
    1.1. acc_flag example
54 56
    1.2. acc_missed_flag example
55 57
    1.3. acc_extra example
56
-   1.4. acc_time_mode example
57
-   1.5. acc_time_format example
58
-   1.6. acc_output_mqueue usage example
59
-   1.7. acc_output_syslog example
60
-   1.8. acc_log_facility example
61
-   1.9. acc_log_level example
62
-   1.10. cdr_enable example
63
-   1.11. cdr_extra example
64
-   1.12. cdr_expired_dlg_enable example
65
-   1.13. cdr_output_mqueue usage example
66
-   1.14. cdr_log_facility example
67
-   1.15. cdr_log_level example
58
+   1.4. acc_json_pre_encoded_prefix example
59
+   1.5. acc_time_mode example
60
+   1.6. acc_time_format example
61
+   1.7. acc_output_mqueue usage example
62
+   1.8. acc_output_syslog example
63
+   1.9. acc_log_facility example
64
+   1.10. acc_log_level example
65
+   1.11. cdr_enable example
66
+   1.12. cdr_extra example
67
+   1.13. cdr_json_pre_encoded_prefix example
68
+   1.14. cdr_expired_dlg_enable example
69
+   1.15. cdr_output_mqueue usage example
70
+   1.16. cdr_log_facility example
71
+   1.17. cdr_log_level example
68 72
 
69 73
 Chapter 1. Admin Guide
70 74
 
... ...
@@ -81,19 +85,21 @@ Chapter 1. Admin Guide
81 85
         3.1. acc_flag (integer)
82 86
         3.2. acc_missed_flag (integer)
83 87
         3.3. acc_extra (string)
84
-        3.4. acc_time_mode (integer)
85
-        3.5. acc_time_format (str)
86
-        3.6. acc_output_mqueue (integer)
87
-        3.7. acc_output_syslog (integer)
88
-        3.8. acc_log_facility (integer)
89
-        3.9. acc_log_level (integer)
90
-        3.10. cdr_enable (str)
91
-        3.11. cdr_extra (str)
92
-        3.12. cdr_expired_dlg_enable (str)
93
-        3.13. cdr_output_mqueue (integer)
94
-        3.14. cdr_output_syslog (integer)
95
-        3.15. cdr_log_facility (integer)
96
-        3.16. cdr_log_level (integer)
88
+        3.4. acc_json_pre_encoded_prefix (string)
89
+        3.5. acc_time_mode (integer)
90
+        3.6. acc_time_format (str)
91
+        3.7. acc_output_mqueue (integer)
92
+        3.8. acc_output_syslog (integer)
93
+        3.9. acc_log_facility (integer)
94
+        3.10. acc_log_level (integer)
95
+        3.11. cdr_enable (str)
96
+        3.12. cdr_extra (str)
97
+        3.13. cdr_json_pre_encoded_prefix (string)
98
+        3.14. cdr_expired_dlg_enable (str)
99
+        3.15. cdr_output_mqueue (integer)
100
+        3.16. cdr_output_syslog (integer)
101
+        3.17. cdr_log_facility (integer)
102
+        3.18. cdr_log_level (integer)
97 103
 
98 104
 1. Overview
99 105
 
... ...
@@ -129,19 +135,21 @@ Chapter 1. Admin Guide
129 135
    3.1. acc_flag (integer)
130 136
    3.2. acc_missed_flag (integer)
131 137
    3.3. acc_extra (string)
132
-   3.4. acc_time_mode (integer)
133
-   3.5. acc_time_format (str)
134
-   3.6. acc_output_mqueue (integer)
135
-   3.7. acc_output_syslog (integer)
136
-   3.8. acc_log_facility (integer)
137
-   3.9. acc_log_level (integer)
138
-   3.10. cdr_enable (str)
139
-   3.11. cdr_extra (str)
140
-   3.12. cdr_expired_dlg_enable (str)
141
-   3.13. cdr_output_mqueue (integer)
142
-   3.14. cdr_output_syslog (integer)
143
-   3.15. cdr_log_facility (integer)
144
-   3.16. cdr_log_level (integer)
138
+   3.4. acc_json_pre_encoded_prefix (string)
139
+   3.5. acc_time_mode (integer)
140
+   3.6. acc_time_format (str)
141
+   3.7. acc_output_mqueue (integer)
142
+   3.8. acc_output_syslog (integer)
143
+   3.9. acc_log_facility (integer)
144
+   3.10. acc_log_level (integer)
145
+   3.11. cdr_enable (str)
146
+   3.12. cdr_extra (str)
147
+   3.13. cdr_json_pre_encoded_prefix (string)
148
+   3.14. cdr_expired_dlg_enable (str)
149
+   3.15. cdr_output_mqueue (integer)
150
+   3.16. cdr_output_syslog (integer)
151
+   3.17. cdr_log_facility (integer)
152
+   3.18. cdr_log_level (integer)
145 153
 
146 154
 3.1. acc_flag (integer)
147 155
 
... ...
@@ -178,7 +186,22 @@ modparam("acc_json", "acc_missed_flag", 3)
178 186
 modparam("acc_json", "acc_extra", "via=$hdr(Via[*]); email=$avp(s:email)")
179 187
 ...
180 188
 
181
-3.4. acc_time_mode (integer)
189
+3.4. acc_json_pre_encoded_prefix (string)
190
+
191
+   Prefix to identify values that will be considered to be already json
192
+   encoded.
193
+
194
+   Default value is NULL.
195
+
196
+   Example 1.4. acc_json_pre_encoded_prefix example
197
+...
198
+modparam("acc_json", "acc_extra", "json_data=$avp(json_data);")
199
+modparam("acc_json", "acc_json_pre_encoded_prefix", "json_")
200
+...
201
+$avp(json_data) = '{"b":2, "c":3}';
202
+...
203
+
204
+3.5. acc_time_mode (integer)
182 205
 
183 206
    Store additional value related to the time of event.
184 207
 
... ...
@@ -192,23 +215,23 @@ modparam("acc_json", "acc_extra", "via=$hdr(Via[*]); email=$avp(s:email)")
192 215
      * 4 - save formatted time according to time_format parameter, using
193 216
        the output of gmtime(). Used for cdr entries too.
194 217
 
195
-   Example 1.4. acc_time_mode example
218
+   Example 1.5. acc_time_mode example
196 219
 ...
197 220
 modparam("acc_json", "acc_time_mode", 1)
198 221
 ...
199 222
 
200
-3.5. acc_time_format (str)
223
+3.6. acc_time_format (str)
201 224
 
202 225
    Specify the format to print the time for time_mode 3 or 4.
203 226
 
204 227
    Default value is %Y-%m-%d %H:%M:%S".
205 228
 
206
-   Example 1.5. acc_time_format example
229
+   Example 1.6. acc_time_format example
207 230
 ...
208 231
 modparam("acc_json", "acc_time_format", "%Y/%m/%d %H:%M:%S")
209 232
 ...
210 233
 
211
-3.6. acc_output_mqueue (integer)
234
+3.7. acc_output_mqueue (integer)
212 235
 
213 236
    Requires the mqueue module. The acc module will queue json acc events
214 237
    in the specified mqueue. Using a rtimer module exec you can access the
... ...
@@ -218,7 +241,7 @@ modparam("acc_json", "acc_time_format", "%Y/%m/%d %H:%M:%S")
218 241
 
219 242
    Default value is not-set mqueue will not be required.
220 243
 
221
-   Example 1.6. acc_output_mqueue usage example
244
+   Example 1.7. acc_output_mqueue usage example
222 245
 ...
223 246
 # example using json_mqueue/http_client to publish to NSQD
224 247
 max_while_loops=100000
... ...
@@ -256,7 +279,7 @@ ts), "$var(nsq_res)");
256 279
 }
257 280
 ...
258 281
 
259
-3.7. acc_output_syslog (integer)
282
+3.8. acc_output_syslog (integer)
260 283
 
261 284
    Control if the output of acc json should be sent to syslog. This is not
262 285
    dependent on Kamailio global logging settings, we can use syslog even
... ...
@@ -264,14 +287,14 @@ ts), "$var(nsq_res)");
264 287
 
265 288
    Default value is not-set (no flag).
266 289
 
267
-   Example 1.7. acc_output_syslog example
290
+   Example 1.8. acc_output_syslog example
268 291
 ...
269 292
 modparam("acc_json", "acc_output_syslog", 1)
270 293
 modparam("acc_json", "acc_log_level", 2)
271 294
 modparam("acc_json", "acc_log_facility", "LOG_DAEMON")
272 295
 ...
273 296
 
274
-3.8. acc_log_facility (integer)
297
+3.9. acc_log_facility (integer)
275 298
 
276 299
    Log facility to which accounting messages are issued to syslog. This
277 300
    allows to easily separate the accounting specific logging from the
... ...
@@ -279,7 +302,7 @@ modparam("acc_json", "acc_log_facility", "LOG_DAEMON")
279 302
 
280 303
    Default value is LOG_DAEMON.
281 304
 
282
-   Example 1.8. acc_log_facility example
305
+   Example 1.9. acc_log_facility example
283 306
 ...
284 307
 modparam("acc_json", "acc_log_facility", "LOG_LOCAL0")
285 308
 
... ...
@@ -291,51 +314,66 @@ modparam("acc_json", "acc_log_facility", "LOG_LOCAL0")
291 314
 # local0.*                      /var/log/json_acc.log
292 315
 ...
293 316
 
294
-3.9. acc_log_level (integer)
317
+3.10. acc_log_level (integer)
295 318
 
296 319
    Log level at which accounting messages are issued to syslog.
297 320
 
298 321
    Default value is 1 (L_NOTICE).
299 322
 
300
-   Example 1.9. acc_log_level example
323
+   Example 1.10. acc_log_level example
301 324
 ...
302 325
 modparam("acc_json", "acc_log_level", 2) # Set acc_log_level to 2 (L_INFO)
303 326
 ...
304 327
 
305
-3.10. cdr_enable (str)
328
+3.11. cdr_enable (str)
306 329
 
307 330
    Enable Call Data Record generation.
308 331
 
309 332
    Default value is 0 (disabled).
310 333
 
311
-   Example 1.10. cdr_enable example
334
+   Example 1.11. cdr_enable example
312 335
 ...
313 336
 modparam("acc_json", "cdr_enable", 1)
314 337
 ...
315 338
 
316
-3.11. cdr_extra (str)
339
+3.12. cdr_extra (str)
317 340
 
318 341
    Set of pseudo-variables defining custom CDR fields.
319 342
 
320 343
    Default value is NULL.
321 344
 
322
-   Example 1.11. cdr_extra example
345
+   Example 1.12. cdr_extra example
323 346
 ...
324 347
 modparam("acc_json", "cdr_extra", "ci=$dlg_var(call_id);ft=$dlg_var(from_tag)")
325 348
 ...
326 349
 
327
-3.12. cdr_expired_dlg_enable (str)
350
+3.13. cdr_json_pre_encoded_prefix (string)
351
+
352
+   Prefix to identify values that will be considered to be already json
353
+   encoded.
354
+
355
+   Default value is NULL.
356
+
357
+   Example 1.13. cdr_json_pre_encoded_prefix example
358
+...
359
+modparam("acc_json", "cdr_extra", "json_data=$avp(json_data);")
360
+modparam("acc_json", "cdr_json_pre_encoded_prefix", "json_")
361
+...
362
+$avp(json_data) = '{"b":2, "c":3}';
363
+...
364
+
365
+3.14. cdr_expired_dlg_enable (str)
328 366
 
329 367
    Should CDR-based logging be enabled in case of expired dialogs?
330 368
 
331 369
    0 - off (default). 1 - on.
332 370
 
333
-   Example 1.12. cdr_expired_dlg_enable example
371
+   Example 1.14. cdr_expired_dlg_enable example
334 372
 ...
335 373
 modparam("acc_json", "cdr_expired_dlg_enable", 1)
336 374
 ...
337 375
 
338
-3.13. cdr_output_mqueue (integer)
376
+3.15. cdr_output_mqueue (integer)
339 377
 
340 378
    Requires the mqueue module. The acc module will queue json cdr events
341 379
    in the specified mqueue. Using a rtimer module exec you can access the
... ...
@@ -345,7 +383,7 @@ modparam("acc_json", "cdr_expired_dlg_enable", 1)
345 383
 
346 384
    Default value is not-set mqueue will not be required.
347 385
 
348
-   Example 1.13. cdr_output_mqueue usage example
386
+   Example 1.15. cdr_output_mqueue usage example
349 387
 ...
350 388
 # example using json_mqueue/http_client to publish to NSQD
351 389
 modparam("mqueue", "mqueue", "name=cdr_events;size=100000")
... ...
@@ -382,11 +420,11 @@ ts), "$var(nsq_res)");
382 420
 }
383 421
 ...
384 422
 
385
-3.14. cdr_output_syslog (integer)
423
+3.16. cdr_output_syslog (integer)
386 424
 
387 425
    The acc module will log json cdr events to syslog.
388 426
 
389
-3.15. cdr_log_facility (integer)
427
+3.17. cdr_log_facility (integer)
390 428
 
391 429
    Log facility to which accounting messages are issued to syslog. This
392 430
    allows to easily separate the accounting specific logging from the
... ...
@@ -394,7 +432,7 @@ ts), "$var(nsq_res)");
394 432
 
395 433
    Default value is LOG_DAEMON.
396 434
 
397
-   Example 1.14. cdr_log_facility example
435
+   Example 1.16. cdr_log_facility example
398 436
 ...
399 437
 modparam("acc_json", "cdr_log_facility", "LOG_LOCAL0")
400 438
 
... ...
@@ -406,13 +444,13 @@ modparam("acc_json", "cdr_log_facility", "LOG_LOCAL0")
406 444
 # local0.*                      /var/log/json_cdr.log
407 445
 ...
408 446
 
409
-3.16. cdr_log_level (integer)
447
+3.18. cdr_log_level (integer)
410 448
 
411 449
    Log level at which accounting messages are issued to syslog.
412 450
 
413 451
    Default value is 1 (L_NOTICE).
414 452
 
415
-   Example 1.15. cdr_log_level example
453
+   Example 1.17. cdr_log_level example
416 454
 ...
417 455
 modparam("acc_json", "cdr_log_level", 2) # Set cdr_log_level to 2 (L_INFO)
418 456
 ...