Browse code

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

Kamailio Dev authored on 04/12/2019 11:11:33
Showing 9 changed files
... ...
@@ -38,8 +38,14 @@ Julien Chavanton
38 38
               3.5. acc_time_format (str)
39 39
               3.6. output_mqueue (integer)
40 40
               3.7. output_syslog (integer)
41
-              3.8. log_facility (integer)
42
-              3.9. log_level (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_log_facility (integer)
48
+              3.15. cdr_log_level (integer)
43 49
 
44 50
    List of Examples
45 51
 
... ...
@@ -50,8 +56,14 @@ Julien Chavanton
50 56
    1.5. acc_time_format example
51 57
    1.6. output_mqueue usage example
52 58
    1.7. output_syslog example
53
-   1.8. log_facility example
54
-   1.9. log_level example
59
+   1.8. acc_log_facility example
60
+   1.9. acc_log_level example
61
+   1.10. cdr_enable example
62
+   1.11. cdr_extra example
63
+   1.12. cdr_expired_dlg_enable example
64
+   1.13. cdr_output_mqueue usage example
65
+   1.14. cdr_log_facility example
66
+   1.15. cdr_log_level example
55 67
 
56 68
 Chapter 1. Admin Guide
57 69
 
... ...
@@ -72,8 +84,14 @@ Chapter 1. Admin Guide
72 84
         3.5. acc_time_format (str)
73 85
         3.6. output_mqueue (integer)
74 86
         3.7. output_syslog (integer)
75
-        3.8. log_facility (integer)
76
-        3.9. log_level (integer)
87
+        3.8. acc_log_facility (integer)
88
+        3.9. acc_log_level (integer)
89
+        3.10. cdr_enable (str)
90
+        3.11. cdr_extra (str)
91
+        3.12. cdr_expired_dlg_enable (str)
92
+        3.13. cdr_output_mqueue (integer)
93
+        3.14. cdr_log_facility (integer)
94
+        3.15. cdr_log_level (integer)
77 95
 
78 96
 1. Overview
79 97
 
... ...
@@ -113,8 +131,14 @@ Chapter 1. Admin Guide
113 131
    3.5. acc_time_format (str)
114 132
    3.6. output_mqueue (integer)
115 133
    3.7. output_syslog (integer)
116
-   3.8. log_facility (integer)
117
-   3.9. log_level (integer)
134
+   3.8. acc_log_facility (integer)
135
+   3.9. acc_log_level (integer)
136
+   3.10. cdr_enable (str)
137
+   3.11. cdr_extra (str)
138
+   3.12. cdr_expired_dlg_enable (str)
139
+   3.13. cdr_output_mqueue (integer)
140
+   3.14. cdr_log_facility (integer)
141
+   3.15. cdr_log_level (integer)
118 142
 
119 143
 3.1. acc_flag (integer)
120 144
 
... ...
@@ -240,11 +264,11 @@ ts), "$var(nsq_res)");
240 264
    Example 1.7. output_syslog example
241 265
 ...
242 266
 modparam("acc_json", "output_syslog", 1)
243
-modparam("acc_json", "log_level", 2)
244
-modparam("acc_json", "log_facility", "LOG_DAEMON")
267
+modparam("acc_json", "acc_log_level", 2)
268
+modparam("acc_json", "acc_log_facility", "LOG_DAEMON")
245 269
 ...
246 270
 
247
-3.8. log_facility (integer)
271
+3.8. acc_log_facility (integer)
248 272
 
249 273
    Log facility to which accounting messages are issued to syslog. This
250 274
    allows to easily separate the accounting specific logging from the
... ...
@@ -252,9 +276,9 @@ modparam("acc_json", "log_facility", "LOG_DAEMON")
252 276
 
253 277
    Default value is LOG_DAEMON.
254 278
 
255
-   Example 1.8. log_facility example
279
+   Example 1.8. acc_log_facility example
256 280
 ...
257
-modparam("acc_json", "log_facility", "LOG_LOCAL0")
281
+modparam("acc_json", "acc_log_facility", "LOG_LOCAL0")
258 282
 
259 283
 # modify you syslog/rsyslog config
260 284
 # /etc/rsyslog.d/default.conf
... ...
@@ -264,13 +288,124 @@ modparam("acc_json", "log_facility", "LOG_LOCAL0")
264 288
 # local0.*                      /var/log/json_acc.log
265 289
 ...
266 290
 
267
-3.9. log_level (integer)
291
+3.9. acc_log_level (integer)
268 292
 
269 293
    Log level at which accounting messages are issued to syslog.
270 294
 
271 295
    Default value is 1 (L_NOTICE).
272 296
 
273
-   Example 1.9. log_level example
297
+   Example 1.9. acc_log_level example
274 298
 ...
275
-modparam("acc_json", "log_level", 2) # Set log_level to 2 (L_INFO)
299
+modparam("acc_json", "acc_log_level", 2) # Set acc_log_level to 2 (L_INFO)
300
+...
301
+
302
+3.10. cdr_enable (str)
303
+
304
+   Enable Call Data Record generation.
305
+
306
+   Default value is 0 (disabled).
307
+
308
+   Example 1.10. cdr_enable example
309
+...
310
+modparam("acc_json", "cdr_enable", 1)
311
+...
312
+
313
+3.11. cdr_extra (str)
314
+
315
+   Set of pseudo-variables defining custom CDR fields.
316
+
317
+   Default value is NULL.
318
+
319
+   Example 1.11. cdr_extra example
320
+...
321
+modparam("acc_json", "cdr_extra", "ci=$dlg_var(call_id);ft=$dlg_var(from_tag)")
322
+...
323
+
324
+3.12. cdr_expired_dlg_enable (str)
325
+
326
+   Should CDR-based logging be enabled in case of expired dialogs?
327
+
328
+   0 - off (default). 1 - on.
329
+
330
+   Example 1.12. cdr_expired_dlg_enable example
331
+...
332
+modparam("acc_json", "cdr_expired_dlg_enable", 1)
333
+...
334
+
335
+3.13. cdr_output_mqueue (integer)
336
+
337
+   Requires the mqueue module. The acc module will queue json cdr events
338
+   in the specified mqueue. Using a rtimer module exec you can access the
339
+   queue and process them.
340
+
341
+   You can also fetch the cdr events using mqueue.fetch over JSON-RPC.
342
+
343
+   Default value is not-set mqueue will not be required.
344
+
345
+   Example 1.13. cdr_output_mqueue usage example
346
+...
347
+# example using json_mqueue/http_client to publish to NSQD
348
+modparam("mqueue", "mqueue", "name=cdr_events;size=100000")
349
+modparam("acc_json", "cdr_enable", 1)
350
+modparam("acc_json", "cdr_output_mqueue", "cdr_events")
351
+modparam("acc_json", "cdr_extra", "ci=$dlg_var(call_id)")
352
+modparam("rtimer", "timer", "name=nsqt;interval=1;mode=1;")
353
+modparam("rtimer", "exec", "timer=nsqt;route=RUN_CDR_PUBLISH")
354
+modparam("http_client", "keep_connections", 1)
355
+modparam("http_client", "httpcon", "nsqd=>http://localhost:4151/pub?topic=acc")
356
+
357
+route[RUN_CDR_PUBLISH] {
358
+   $var(count) = 0;
359
+   while (mq_fetch("cdr_events")) {
360
+      $var(q_size) = mq_size("cdr_events");
361
+      $var(count) = $var(count) + 1;
362
+      xinfo("[RUN_CDR_PUBLISH][$var(q_size)][$var(count)][$mqk(cdr_events)][$mqv
363
+(cdr_events)]\n");
364
+      $var(res) = http_connect_raw("nsqd", "", "application/json", $mqv(cdr_even
365
+ts), "$var(nsq_res)");
366
+      if ($var(res) < 0) {
367
+         xerr("[RUN_CDR_PUBLISH][$var(res)] http_connect_raw: timeout or error !
368
+\n");
369
+         mq_add("cdr_events", "cdr_key", "$mqv(cdr_events)");
370
+      } else if ($var(res) < 200 || $var(res) > 299) {
371
+         xerr("[RUN_CDR_PUBLISH][$var(res)] http unexpected response code !\n");
372
+         mq_add("cdr_dead_letter_queue", "cdr_key", "$mqv(cdr_events)");
373
+         return;
374
+      }
375
+   }
376
+   if ($var(count) > 0 ) {
377
+      xinfo("[RUN_CDR_PUBLISH]done count[$var(count)]\n");
378
+   }
379
+}
380
+...
381
+
382
+3.14. cdr_log_facility (integer)
383
+
384
+   Log facility to which accounting messages are issued to syslog. This
385
+   allows to easily separate the accounting specific logging from the
386
+   other log messages.
387
+
388
+   Default value is LOG_DAEMON.
389
+
390
+   Example 1.14. cdr_log_facility example
391
+...
392
+modparam("acc_json", "cdr_log_facility", "LOG_LOCAL0")
393
+
394
+# modify you syslog/rsyslog config
395
+# /etc/rsyslog.d/default.conf
396
+# remove local0 from default log file
397
+# *.*;local0,auth,authpriv.none /var/log/syslog
398
+# add local0 to another log file
399
+# local0.*                      /var/log/json_cdr.log
400
+...
401
+
402
+3.15. cdr_log_level (integer)
403
+
404
+   Log level at which accounting messages are issued to syslog.
405
+
406
+   Default value is 1 (L_NOTICE).
407
+
408
+   Example 1.15. cdr_log_level example
409
+...
410
+modparam("acc_json", "cdr_log_level", 2) # Set cdr_log_level to 2 (L_INFO)
276 411
 ...
... ...
@@ -29,8 +29,12 @@ Victor Seva
29 29
               3.2. mask (int)
30 30
               3.3. callid_prefix (string)
31 31
 
32
-        4. Usage
33
-        5. Report format
32
+        4. RPC Commands
33
+
34
+              4.1. cfgt.mask
35
+
36
+        5. Usage
37
+        6. Report format
34 38
 
35 39
    List of Examples
36 40
 
... ...
@@ -54,8 +58,12 @@ Chapter 1. Admin Guide
54 58
         3.2. mask (int)
55 59
         3.3. callid_prefix (string)
56 60
 
57
-   4. Usage
58
-   5. Report format
61
+   4. RPC Commands
62
+
63
+        4.1. cfgt.mask
64
+
65
+   5. Usage
66
+   6. Report format
59 67
 
60 68
 1. Overview
61 69
 
... ...
@@ -133,7 +141,25 @@ modparam("cfgt", "mask", 12)
133 141
 modparam("cfgt", "callid_prefix", "TEST-ID%")
134 142
 ...
135 143
 
136
-4. Usage
144
+4. RPC Commands
145
+
146
+   4.1. cfgt.mask
147
+
148
+4.1.  cfgt.mask
149
+
150
+   Sets mask module parameter.
151
+
152
+   Name: cfgt.mask
153
+
154
+   Parameters:
155
+     * mask : int value
156
+
157
+   Example:
158
+...
159
+kamcmd cfgt.mask 32
160
+...
161
+
162
+5. Usage
137 163
 
138 164
    This module is used by the debugger module, so it must be loaded first.
139 165
    To enable the generation of the reports, the debugger module must be
... ...
@@ -160,7 +186,7 @@ modparam("debugger", "cfgtest", 1)
160 186
 #!endif
161 187
 ...
162 188
 
163
-5. Report format
189
+6. Report format
164 190
 
165 191
    cfgt generates a json file per request processed. The files are created
166 192
    at <basedir>/<prefix>/<message_id>.json. The “message_id” is a sequence
... ...
@@ -517,17 +517,21 @@ Note
517 517
      * grp - the set id (group id).
518 518
      * uri - the URI address.
519 519
      * sock - the socket pointer.
520
+     * socket - the socket string - it is added only if xavp_dst_mode has
521
+       bit 2 set (value 2).
520 522
      * dstid - the destination unique id (in case of call load
521 523
        distribution algorithm).
522 524
      * attrs - the attributes - they are added if xavp_dst_mode does not
523
-       have the bit 1 set.
525
+       have the bit 1 set (value 1).
524 526
 
525 527
    Default value is “0” (add all fields).
526 528
 
527 529
    Example 1.12. Set the “xavp_dst_mode” parameter
528
- ...
529
- modparam("dispatcher", "xavp_dst_mode", 1)
530
- ...
530
+...
531
+    modparam("dispatcher", "xavp_dst_mode", 1)
532
+...
533
+    modparam("dispatcher", "xavp_dst_mode", 2)
534
+...
531 535
 
532 536
 3.13. xavp_ctx (str)
533 537
 
... ...
@@ -15,8 +15,6 @@ Daniel-Constantin Mierla
15 15
 
16 16
    <miconda@gmail.com>
17 17
 
18
-Edited by
19
-
20 18
 Ovidiu Sas
21 19
 
22 20
    <osas@voipembedded.com.com>
... ...
@@ -66,7 +64,7 @@ Ovidiu Sas
66 64
               4.9. core.ps
67 65
               4.10. core.psx
68 66
               4.11. core.pwd
69
-              4.12. core.shmem
67
+              4.12. core.shmmem
70 68
               4.13. core.sockets_list
71 69
               4.14. core.tcp_info
72 70
               4.15. core.tcp_list
... ...
@@ -144,7 +142,7 @@ Chapter 1. Admin Guide
144 142
         4.9. core.ps
145 143
         4.10. core.psx
146 144
         4.11. core.pwd
147
-        4.12. core.shmem
145
+        4.12. core.shmmem
148 146
         4.13. core.sockets_list
149 147
         4.14. core.tcp_info
150 148
         4.15. core.tcp_list
... ...
@@ -446,7 +444,7 @@ resetdebug();
446 444
    4.9. core.ps
447 445
    4.10. core.psx
448 446
    4.11. core.pwd
449
-   4.12. core.shmem
447
+   4.12. core.shmmem
450 448
    4.13. core.sockets_list
451 449
    4.14. core.tcp_info
452 450
    4.15. core.tcp_list
... ...
@@ -540,7 +538,7 @@ kamcmd core.kill
540 538
 kamcmd core.pwd
541 539
 ...
542 540
 
543
-4.12.  core.shmem
541
+4.12.  core.shmmem
544 542
 
545 543
    Returns shared memory info. It has an optional parameter that specifies
546 544
    the measuring unit: b - bytes (default), k or kb, m or mb, g or gb.
... ...
@@ -67,6 +67,7 @@ Ovidiu Sas
67 67
               5.7. add_contact_alias([ip_addr, port, proto])
68 68
               5.8. handle_ruri_alias()
69 69
               5.9. set_contact_alias()
70
+              5.10. set_alias_to_pv(target_avp)
70 71
 
71 72
         6. Exported Pseudo Variables
72 73
 
... ...
@@ -109,10 +110,11 @@ Ovidiu Sas
109 110
    1.22. add_contact_alias usage
110 111
    1.23. handle_ruri_alias usage
111 112
    1.24. set_contact_alias usage
112
-   1.25. $rr_count usage
113
-   1.26. $rr_top_count usage
114
-   1.27. nathelper.enable_ping usage
115
-   1.28. @nathelper.rewrite_contact usage
113
+   1.25. set_alias_to_pv usage
114
+   1.26. $rr_count usage
115
+   1.27. $rr_top_count usage
116
+   1.28. nathelper.enable_ping usage
117
+   1.29. @nathelper.rewrite_contact usage
116 118
 
117 119
 Chapter 1. Admin Guide
118 120
 
... ...
@@ -154,6 +156,7 @@ Chapter 1. Admin Guide
154 156
         5.7. add_contact_alias([ip_addr, port, proto])
155 157
         5.8. handle_ruri_alias()
156 158
         5.9. set_contact_alias()
159
+        5.10. set_alias_to_pv(target_avp)
157 160
 
158 161
    6. Exported Pseudo Variables
159 162
 
... ...
@@ -469,6 +472,7 @@ modparam("nathelper", "filter_server_id", 1)
469 472
    5.7. add_contact_alias([ip_addr, port, proto])
470 473
    5.8. handle_ruri_alias()
471 474
    5.9. set_contact_alias()
475
+   5.10. set_alias_to_pv(target_avp)
472 476
 
473 477
 5.1.  fix_nated_contact()
474 478
 
... ...
@@ -690,6 +694,19 @@ if(is_rfc1918("$rd")) {
690 694
     };
691 695
 ...
692 696
 
697
+5.10.  set_alias_to_pv(target_avp)
698
+
699
+   Reads “;alias=ip~port~transport” from Contact header then writes to
700
+   target pseudo-variable as a sip uri.
701
+
702
+   This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
703
+   BRANCH_ROUTE, and FAILURE_ROUTE.
704
+
705
+   Example 1.25. set_alias_to_pv usage
706
+...
707
+                set_alias_to_pv("$avp(aliasuri)");
708
+...
709
+
693 710
 6. Exported Pseudo Variables
694 711
 
695 712
    6.1. $rr_count
... ...
@@ -699,7 +716,7 @@ if(is_rfc1918("$rd")) {
699 716
 
700 717
    Number of Record Routes in received SIP request or reply.
701 718
 
702
-   Example 1.25. $rr_count usage
719
+   Example 1.26. $rr_count usage
703 720
 ...
704 721
     $avp(rr_count) = $rr_count;
705 722
 ...
... ...
@@ -711,7 +728,7 @@ if(is_rfc1918("$rd")) {
711 728
    value of $rr_top_count is 1. If there is no Record Route(s), value of
712 729
    $rr_top_count is 0.
713 730
 
714
-   Example 1.26. $rr_top_count usage
731
+   Example 1.27. $rr_top_count usage
715 732
 ...
716 733
     if ($rr_count == $avp(rr_count) + $rr_top_count) {
717 734
         route(ADD_CONTACT_ALIAS);
... ...
@@ -729,7 +746,7 @@ if(is_rfc1918("$rd")) {
729 746
 
730 747
    The function takes only one parameter - a number in decimal format.
731 748
 
732
-   Example 1.27. nathelper.enable_ping usage
749
+   Example 1.28. nathelper.enable_ping usage
733 750
 ...
734 751
 $ kamcmd nathelper.enable_ping 1
735 752
 ...
... ...
@@ -744,7 +761,7 @@ $ kamcmd nathelper.enable_ping 1
744 761
    counted from 1. Only IP:port is rewritten, remaining part are left
745 762
    unchanged. Full nameaddr is supported.
746 763
 
747
-   Example 1.28. @nathelper.rewrite_contact usage
764
+   Example 1.29. @nathelper.rewrite_contact usage
748 765
 ...
749 766
 $c = @nathelper.rewrite_contact[1];
750 767
 ...
... ...
@@ -66,6 +66,7 @@ Juha Heinanen
66 66
               3.33. retrieve_order_by (str)
67 67
               3.34. sip_uri_match (int)
68 68
               3.35. enable_dmq (integer)
69
+              3.36. pres_subs_mode (integer)
69 70
 
70 71
         4. Functions
71 72
 
... ...
@@ -152,15 +153,16 @@ Juha Heinanen
152 153
    1.33. Set retrieve_order_by parameter
153 154
    1.34. Set sip_uri_match parameter
154 155
    1.35. Set enable_dmq parameter
155
-   1.36. handle_publish usage
156
-   1.37. handle_subscribe usage
157
-   1.38. pres_auth_status usage
158
-   1.39. pres_has_subscribers usage
159
-   1.40. pres_refresh_watchers usage
160
-   1.41. pres_update_watchers usage
161
-   1.42. $subs(name) usage
162
-   1.43. $notify_reply(name) usage
156
+   1.36. Set pres_subs_mode parameter
157
+   1.37. handle_publish usage
158
+   1.38. handle_subscribe usage
159
+   1.39. pres_auth_status usage
160
+   1.40. pres_has_subscribers usage
161
+   1.41. pres_refresh_watchers usage
162
+   1.42. pres_update_watchers usage
163
+   1.43. $subs(name) usage
163 164
    1.44. $notify_reply(name) usage
165
+   1.45. $notify_reply(name) usage
164 166
    2.1. presence_api_t structure
165 167
 
166 168
 Chapter 1. Admin Guide
... ...
@@ -210,6 +212,7 @@ Chapter 1. Admin Guide
210 212
         3.33. retrieve_order_by (str)
211 213
         3.34. sip_uri_match (int)
212 214
         3.35. enable_dmq (integer)
215
+        3.36. pres_subs_mode (integer)
213 216
 
214 217
    4. Functions
215 218
 
... ...
@@ -318,6 +321,7 @@ Chapter 1. Admin Guide
318 321
    3.33. retrieve_order_by (str)
319 322
    3.34. sip_uri_match (int)
320 323
    3.35. enable_dmq (integer)
324
+   3.36. pres_subs_mode (integer)
321 325
 
322 326
 3.1. db_url(str)
323 327
 
... ...
@@ -852,6 +856,19 @@ modparam("presence", "sip_uri_match", 1)
852 856
 modparam("presence", "enable_dmq", 1)
853 857
 ...
854 858
 
859
+3.36. pres_subs_mode (integer)
860
+
861
+   Allow disabling cloning subscription structure for pv $subs(...),
862
+   saving the pkg memory and copy operations for all its fields. If 1 the
863
+   cloning is done; if 0, no cloning and $subs(...) returns $null.
864
+
865
+   Default value is 1.
866
+
867
+   Example 1.36. Set pres_subs_mode parameter
868
+...
869
+modparam("presence", "pres_subs_mode", 0)
870
+...
871
+
855 872
 4. Functions
856 873
 
857 874
    4.1. handle_publish([sender_uri])
... ...
@@ -881,7 +898,7 @@ modparam("presence", "enable_dmq", 1)
881 898
 
882 899
    The module sends an appropriate stateless reply in all cases.
883 900
 
884
-   Example 1.36. handle_publish usage
901
+   Example 1.37. handle_publish usage
885 902
 ...
886 903
         if(is_method("PUBLISH"))
887 904
         {
... ...
@@ -912,7 +929,7 @@ modparam("presence", "enable_dmq", 1)
912 929
 
913 930
    The module sends an appropriate stateless reply in all cases.
914 931
 
915
-   Example 1.37. handle_subscribe usage
932
+   Example 1.38. handle_subscribe usage
916 933
 ...
917 934
 if(method=="SUBSCRIBE")
918 935
     handle_subscribe();
... ...
@@ -931,7 +948,7 @@ if(method=="SUBSCRIBE")
931 948
 
932 949
    This function can be used from REQUEST_ROUTE.
933 950
 
934
-   Example 1.38. pres_auth_status usage
951
+   Example 1.39. pres_auth_status usage
935 952
 ...
936 953
 if (method=="MESSAGE") {
937 954
     pres_auth_status("$fu", $ru");
... ...
@@ -949,7 +966,7 @@ if (method=="MESSAGE") {
949 966
 
950 967
    This function can be used from ANY_ROUTE.
951 968
 
952
-   Example 1.39. pres_has_subscribers usage
969
+   Example 1.40. pres_has_subscribers usage
953 970
 ...
954 971
 if(pres_has_subscribers($var(uri), "message-summary"))
955 972
     # do something...;
... ...
@@ -979,7 +996,7 @@ if(pres_has_subscribers($var(uri), "message-summary"))
979 996
 
980 997
    This function can be used from ANY_ROUTE.
981 998
 
982
-   Example 1.40. pres_refresh_watchers usage
999
+   Example 1.41. pres_refresh_watchers usage
983 1000
 ...
984 1001
 pres_refresh_watchers("sip:test@kamailio.org", "presence", 1);
985 1002
 ...
... ...
@@ -997,7 +1014,7 @@ pres_refresh_watchers("sip:test@kamailio.org", "presence", 1);
997 1014
 
998 1015
    This function can be used from ANY_ROUTE.
999 1016
 
1000
-   Example 1.41. pres_update_watchers usage
1017
+   Example 1.42. pres_update_watchers usage
1001 1018
 ...
1002 1019
 pres_update_watchers("sip:test@kamailio.org", "presence");
1003 1020
 ...
... ...
@@ -1106,7 +1123,7 @@ kamcmd presence.updateWatchers sip:alice@domain.com presence
1106 1123
      * flags
1107 1124
      * user_agent
1108 1125
 
1109
-   Example 1.42. $subs(name) usage
1126
+   Example 1.43. $subs(name) usage
1110 1127
 ...
1111 1128
 if(handle_subscription())
1112 1129
 {
... ...
@@ -1122,7 +1139,7 @@ if(handle_subscription())
1122 1139
 
1123 1140
    The “attr” can be any pseudo var that accesses attributes of msg
1124 1141
 
1125
-   Example 1.43. $notify_reply(name) usage
1142
+   Example 1.44. $notify_reply(name) usage
1126 1143
 ...
1127 1144
 event_route[presence:notify-reply]
1128 1145
 {
... ...
@@ -1138,7 +1155,7 @@ event_route[presence:notify-reply]
1138 1155
 
1139 1156
    Fired after notify reply is received or timeout.
1140 1157
 
1141
-   Example 1.44. $notify_reply(name) usage
1158
+   Example 1.45. $notify_reply(name) usage
1142 1159
 ...
1143 1160
 event_route[presence:notify-reply]
1144 1161
 {
... ...
@@ -142,6 +142,7 @@ Richard Fuchs
142 142
               5.15. stop_forwarding([flags])
143 143
               5.16. play_media([flags])
144 144
               5.17. stop_media([flags])
145
+              5.18. play_dtmf([flags])
145 146
 
146 147
         6. Exported Pseudo Variables
147 148
 
... ...
@@ -249,12 +250,13 @@ Richard Fuchs
249 250
    1.88. stop_forwarding usage
250 251
    1.89. play_media usage
251 252
    1.90. stop_media usage
252
-   1.91. $rtpstat Usage
253
-   1.92. rtpengine.reload usage
254
-   1.93. rtpengine.enable usage
255
-   1.94. rtpengine.show usage
256
-   1.95. rtpengine.ping usage
257
-   1.96. rtpengine.get_hash_total usage
253
+   1.91. play_dtmf usage
254
+   1.92. $rtpstat Usage
255
+   1.93. rtpengine.reload usage
256
+   1.94. rtpengine.enable usage
257
+   1.95. rtpengine.show usage
258
+   1.96. rtpengine.ping usage
259
+   1.97. rtpengine.get_hash_total usage
258 260
 
259 261
 Chapter 1. Admin Guide
260 262
 
... ...
@@ -361,6 +363,7 @@ Chapter 1. Admin Guide
361 363
         5.15. stop_forwarding([flags])
362 364
         5.16. play_media([flags])
363 365
         5.17. stop_media([flags])
366
+        5.18. play_dtmf([flags])
364 367
 
365 368
    6. Exported Pseudo Variables
366 369
 
... ...
@@ -1828,6 +1831,7 @@ modparam("rtpengine", "hash_algo", "1")
1828 1831
    5.15. stop_forwarding([flags])
1829 1832
    5.16. play_media([flags])
1830 1833
    5.17. stop_media([flags])
1834
+   5.18. play_dtmf([flags])
1831 1835
 
1832 1836
 5.1.  set_rtpengine_set(setid[, setid])
1833 1837
 
... ...
@@ -2403,6 +2407,37 @@ stop_media();
2403 2407
 stop_media("from-tag=5yqaeriguhxcikxj");
2404 2408
 ...
2405 2409
 
2410
+5.18.  play_dtmf([flags])
2411
+
2412
+   Injects a DTMF event into the media stream. Depending on which codecs
2413
+   were negotiated, this either injects an RFC 2833/4733 DTMF event, or an
2414
+   in-band PCM DTMF tone into the audio stream. The flag “inject DTMF”
2415
+   must have been present in both offer and answer messages when the call
2416
+   was established, which forces all audio to go through rtpengine's
2417
+   transcoding engine.
2418
+
2419
+   Usage is similar to “play_media” with the following exceptions. The
2420
+   selected party is not the party that will receive the DTMF event, but
2421
+   rather the party which is generating the event. This is to support DTMF
2422
+   events that are carried in SIP INFO messages. Instead of specifying a
2423
+   media file, a DTMF event code must be specified, as well as optionally
2424
+   a duration and the volume. The “code” can be a number 0 through 15, or
2425
+   a DTMF digit (0-9, A-D, *, #). The “duration” is specified in
2426
+   milliseconds and defaults to 250, within a range of 100-5000. The
2427
+   “volume” is specified in absolute decibels, with a default of -8 db.
2428
+
2429
+   Multiple consecutive DTMF events can be queued up by calling this
2430
+   function multiple times consecutively. Rtpengine will play out the DTMF
2431
+   events in sequence, separated by a default pause of 100 ms. An
2432
+   alternative pause length can be given through the “pause” option,
2433
+   between 100 and 5000 ms.
2434
+
2435
+   Example 1.91. play_dtmf usage
2436
+...
2437
+play_dtmf("from-tag=5yqaeriguhxcikxj code=#");
2438
+play_dtmf("code=1 volume=5 duration=300 pause=150");
2439
+...
2440
+
2406 2441
 6. Exported Pseudo Variables
2407 2442
 
2408 2443
    6.1. $rtpstat
... ...
@@ -2414,7 +2449,7 @@ stop_media("from-tag=5yqaeriguhxcikxj");
2414 2449
    packet counters. The statistics must be retrieved before the session is
2415 2450
    deleted (before rtpengine_delete()).
2416 2451
 
2417
-   Example 1.91. $rtpstat Usage
2452
+   Example 1.92. $rtpstat Usage
2418 2453
 ...
2419 2454
     append_hf("X-RTP-Statistics: $rtpstat\r\n");
2420 2455
 ...
... ...
@@ -2437,7 +2472,7 @@ stop_media("from-tag=5yqaeriguhxcikxj");
2437 2472
    is enabled, the sessions are still allowed to finish for the hidden old
2438 2473
    nodes.
2439 2474
 
2440
-   Example 1.92.  rtpengine.reload usage
2475
+   Example 1.93.  rtpengine.reload usage
2441 2476
 ...
2442 2477
 $ kamcmd rtpengine.reload
2443 2478
 ...
... ...
@@ -2468,7 +2503,7 @@ $ kamcmd rtpengine.reload
2468 2503
    NOTE: When specify the IPv6 RTP proxy url one must prefix it with :: to
2469 2504
    escape the :: from the IPv6 address. See the example below.
2470 2505
 
2471
-   Example 1.93.  rtpengine.enable usage
2506
+   Example 1.94.  rtpengine.enable usage
2472 2507
 ...
2473 2508
 $ kamcmd rtpengine.enable udp:192.168.2.133:8081 0
2474 2509
 $ kamcmd rtpengine.enable ::udp6:fe80::9a90:96ff:fea8:fd99:9999 1
... ...
@@ -2491,7 +2526,7 @@ $ kamcmd rtpengine.enable all 1
2491 2526
    NOTE: When specify the IPv6 RTP proxy url one must prefix it with :: to
2492 2527
    escape the :: from the IPv6 address. See the example below.
2493 2528
 
2494
-   Example 1.94.  rtpengine.show usage
2529
+   Example 1.95.  rtpengine.show usage
2495 2530
 ...
2496 2531
 $ kamcmd rtpengine.show udp:192.168.2.133:8081
2497 2532
 $ kamcmd rtpengine.show ::udp6:fe80::9a90:96ff:fea8:fd99:9999
... ...
@@ -2511,7 +2546,7 @@ $ kamcmd rtpengine.show all
2511 2546
    NOTE: When specify the IPv6 RTP proxy url one must prefix it with :: to
2512 2547
    escape the :: from the IPv6 address. See the example below.
2513 2548
 
2514
-   Example 1.95.  rtpengine.ping usage
2549
+   Example 1.96.  rtpengine.ping usage
2515 2550
 ...
2516 2551
 $ kamcmd rtpengine.ping udp:192.168.2.133:8081
2517 2552
 $ kamcmd rtpengine.ping ::udp6:fe80::9a90:96ff:fea8:fd99:9999
... ...
@@ -2523,7 +2558,7 @@ $ kamcmd rtpengine.ping all
2523 2558
    Print the total number of hash entries in the hash table at a given
2524 2559
    moment.
2525 2560
 
2526
-   Example 1.96.  rtpengine.get_hash_total usage
2561
+   Example 1.97.  rtpengine.get_hash_total usage
2527 2562
 ...
2528 2563
 $ kamcmd rtpengine.get_hash_total
2529 2564
 ...
... ...
@@ -12,20 +12,12 @@ Edited by
12 12
 
13 13
 Maxim Sobolev
14 14
 
15
-Edited by
16
-
17 15
 Bogdan-Andrei Iancu
18 16
 
19
-Edited by
20
-
21 17
 Juha Heinanen
22 18
 
23
-Edited by
24
-
25 19
 Sas Ovidiu
26 20
 
27
-Edited by
28
-
29 21
 Carsten Bock
30 22
 
31 23
    ng-voice GmbH
... ...
@@ -802,35 +794,35 @@ Chapter 2. Frequently Asked Questions
802 794
 
803 795
    2.1.
804 796
 
805
-       What happened with “rtpproxy_disable” parameter?
797
+   What happened with “rtpproxy_disable” parameter?
806 798
 
807
-       It was removed as it became obsolete - now “rtpproxy_sock” can take
808
-       empty value to disable the rtpproxy functionality.
799
+   It was removed as it became obsolete - now “rtpproxy_sock” can take
800
+   empty value to disable the rtpproxy functionality.
809 801
 
810 802
    2.2.
811 803
 
812
-       Where can I find more about Kamailio?
804
+   Where can I find more about Kamailio?
813 805
 
814
-       Take a look at https://www.kamailio.org/.
806
+   Take a look at https://www.kamailio.org/.
815 807
 
816 808
    2.3.
817 809
 
818
-       Where can I post a question about this module?
810
+   Where can I post a question about this module?
819 811
 
820
-       First at all check if your question was already answered on one of our
821
-       mailing lists:
822
-         * User Mailing List -
823
-           https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
824
-         * Developer Mailing List -
825
-           https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
812
+   First at all check if your question was already answered on one of our
813
+   mailing lists:
814
+     * User Mailing List -
815
+       https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
816
+     * Developer Mailing List -
817
+       https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
826 818
 
827
-       E-mails regarding any stable Kamailio release should be sent to
828
-       <sr-users@lists.kamailio.org> and e-mails regarding development
829
-       versions should be sent to <sr-dev@lists.kamailio.org>.
819
+   E-mails regarding any stable Kamailio release should be sent to
820
+   <sr-users@lists.kamailio.org> and e-mails regarding development
821
+   versions should be sent to <sr-dev@lists.kamailio.org>.
830 822
 
831 823
    2.4.
832 824
 
833
-       How can I report a bug?
825
+   How can I report a bug?
834 826
 
835
-       Please follow the guidelines provided at:
836
-       https://github.com/kamailio/kamailio/issues.
827
+   Please follow the guidelines provided at:
828
+   https://github.com/kamailio/kamailio/issues.
... ...
@@ -1937,6 +1937,11 @@ branch_route[1] {
1937 1937
    the only way a script can add a new transaction in an atomic way.
1938 1938
    Typically, it is used to deploy a UAS.
1939 1939
 
1940
+   Note that any flag operations (e.g. for accounting) after this function
1941
+   has been called will be ignored. You can use the the tmx module
1942
+   function t_flush_flags() to flush the altered flags to the already
1943
+   created transaction.
1944
+
1940 1945
    Example 1.56. t_newtran usage
1941 1946
 ...
1942 1947
 if (t_newtran()) {