Browse code

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

Kamailio Dev authored on 09/02/2021 09:16:59
Showing 4 changed files
... ...
@@ -91,7 +91,7 @@ Hugh Waite
91 91
 
92 92
    2. Developer Guide
93 93
 
94
-        1.
94
+        1. Introduction
95 95
         2. Available Functions
96 96
 
97 97
               2.1. int http_connect(msg, connection, url, result,
... ...
@@ -872,7 +872,7 @@ Chapter 2. Developer Guide
872 872
 
873 873
    Table of Contents
874 874
 
875
-   1.
875
+   1. Introduction
876 876
    2. Available Functions
877 877
 
878 878
         2.1. int http_connect(msg, connection, url, result, content_type,
... ...
@@ -882,6 +882,8 @@ Chapter 2. Developer Guide
882 882
         2.3. int http_query(msg, url, dest, post)
883 883
         2.4. http_get_content_type(str connection)
884 884
 
885
+1. Introduction
886
+
885 887
    This module provides a set of API functions that other modules can use
886 888
    in order to integrate with HTTP services.
887 889
 
... ...
@@ -70,10 +70,12 @@ Chapter 1. Admin Guide
70 70
 
71 71
 1. Overview
72 72
 
73
-   The module implements secure SIP identity specifications - STIR and
74
-   SHAKEN IETF extensions for SIP (RFC8224, RFC 8588).
73
+   The module implements secure SIP identity specifications - STIR (Secure
74
+   Telephony Identity Revisited) and SHAKEN (Signature-based Handling of
75
+   Asserted information using toKENs) IETF extensions for SIP (RFC8224,
76
+   RFC8588).
75 77
 
76
-   It exports the functions to check and generate Identity header.
78
+   It exports the functions to check and generate SIP Identity header.
77 79
 
78 80
 2. Dependencies
79 81
 
... ...
@@ -173,7 +175,7 @@ request_route {
173 175
 request_route {
174 176
     ...
175 177
     secsipid_add_identity("$fU", "$rU", "A", "",
176
-        "http://kamailio.org/stir/$rd/cert.pem", "/secsipid/$rd/key.pem");
178
+        "https://kamailio.org/stir/$rd/cert.pem", "/secsipid/$rd/key.pem");
177 179
     ...
178 180
 }
179 181
 ...
... ...
@@ -514,7 +514,7 @@ modparam("siptrace", "trace_init_mode", 1)
514 514
      * 0 - no automatic mirroring or storing of SIP traffic.
515 515
      * 1 (1st bit set) - mirror the traffic to HEP server.
516 516
      * 2 (2nd bit set) - store the traffic to database server.
517
-     * 4 (3rd bit set) - mirro the traffic to the SIP URI specified by
517
+     * 4 (3rd bit set) - mirror the traffic to the SIP URI specified by
518 518
        duplicate_uri.
519 519
 
520 520
    The trace_on parameter still has to be set, allowing also to control
... ...
@@ -77,6 +77,7 @@ Daniel-Constantin Mierla
77 77
               3.48. relay_100 (str)
78 78
               3.49. rich_redirect (int)
79 79
               3.50. exec_time_check (int)
80
+              3.51. reply_relay_mode (int)
80 81
 
81 82
         4. Functions
82 83
 
... ...
@@ -143,12 +144,13 @@ Daniel-Constantin Mierla
143 144
               5.1. tm.list
144 145
               5.2. tm.t_uac_start
145 146
               5.3. tm.t_uac_wait
146
-              5.4. tm.cancel
147
-              5.5. tm.hash_stats
148
-              5.6. tm.reply
149
-              5.7. tm.reply_callid
150
-              5.8. tm.clean
151
-              5.9. tm.stats
147
+              5.4. tm.t_uac_wait
148
+              5.5. tm.cancel
149
+              5.6. tm.hash_stats
150
+              5.7. tm.reply
151
+              5.8. tm.reply_callid
152
+              5.9. tm.clean
153
+              5.10. tm.stats
152 154
 
153 155
         6. Event Routes
154 156
 
... ...
@@ -226,57 +228,58 @@ Daniel-Constantin Mierla
226 228
    1.48. Set relay_100 parameter
227 229
    1.49. rich_redirect example
228 230
    1.50. Set exec_time_check parameter
229
-   1.51. t_relay usage
230
-   1.52. t_relay_to_udp usage
231
-   1.53. t_on_failure usage
232
-   1.54. t_on_branch_failure usage
233
-   1.55. t_on_reply usage
234
-   1.56. t_on_branch usage
235
-   1.57. t_newtran usage
236
-   1.58. t_reply usage
237
-   1.59. t_send_reply usage
238
-   1.60. t_lookup_request usage
239
-   1.61. t_retransmit_reply usage
240
-   1.62. t_release usage
241
-   1.63. t_forward_nonack usage
242
-   1.64. t_set_fr usage
243
-   1.65. t_reset_fr usage
244
-   1.66. t_set_max_lifetime usage
245
-   1.67. t_reset_max_lifetime usage
246
-   1.68. t_set_retr usage
247
-   1.69. t_reset_retr usage
248
-   1.70. t_set_auto_inv_100 usage
249
-   1.71. t_branch_timeout usage
250
-   1.72. t_branch_replied usage
251
-   1.73. t_any_timeout usage
252
-   1.74. t_any_replied usage
253
-   1.75. t_grep_status usage
254
-   1.76. t_is_canceled usage
255
-   1.77. t_is_expired usage
256
-   1.78. t_relay_cancel usage
257
-   1.79. t_lookup_cancel usage
258
-   1.80. t_drop_replies() usage
259
-   1.81. t_save_lumps() usage
260
-   1.82. t_load_contacts usage
261
-   1.83. t_next_contacts usage
262
-   1.84. t_next_contact_flow usage
263
-   1.85. t_check_status usage
264
-   1.86. t_check_trans usage
265
-   1.87. t_set_disable_6xx usage
266
-   1.88. t_set_disable_failover usage
267
-   1.89. t_set_disable_internal_reply usage
268
-   1.90. t_replicate usage
269
-   1.91. t_relay_to usage
270
-   1.92. t_set_no_e2e_cancel_reason usage
271
-   1.93. t_replicate usage
272
-   1.94. t_use_uac_headers usage
273
-   1.95. t_is_retr_async_reply usage
274
-   1.96. t_uac_send usage
275
-   1.97. t_get_status_code usage
276
-   1.98. t_clean usage
277
-   1.99. event_route[tm:branch-failure:id] usage
278
-   1.100. event_route[tm:local-request] usage
279
-   1.101. event_route[tm:local-response] usage
231
+   1.51. Set reply_relay_mode parameter
232
+   1.52. t_relay usage
233
+   1.53. t_relay_to_udp usage
234
+   1.54. t_on_failure usage
235
+   1.55. t_on_branch_failure usage
236
+   1.56. t_on_reply usage
237
+   1.57. t_on_branch usage
238
+   1.58. t_newtran usage
239
+   1.59. t_reply usage
240
+   1.60. t_send_reply usage
241
+   1.61. t_lookup_request usage
242
+   1.62. t_retransmit_reply usage
243
+   1.63. t_release usage
244
+   1.64. t_forward_nonack usage
245
+   1.65. t_set_fr usage
246
+   1.66. t_reset_fr usage
247
+   1.67. t_set_max_lifetime usage
248
+   1.68. t_reset_max_lifetime usage
249
+   1.69. t_set_retr usage
250
+   1.70. t_reset_retr usage
251
+   1.71. t_set_auto_inv_100 usage
252
+   1.72. t_branch_timeout usage
253
+   1.73. t_branch_replied usage
254
+   1.74. t_any_timeout usage
255
+   1.75. t_any_replied usage
256
+   1.76. t_grep_status usage
257
+   1.77. t_is_canceled usage
258
+   1.78. t_is_expired usage
259
+   1.79. t_relay_cancel usage
260
+   1.80. t_lookup_cancel usage
261
+   1.81. t_drop_replies() usage
262
+   1.82. t_save_lumps() usage
263
+   1.83. t_load_contacts usage
264
+   1.84. t_next_contacts usage
265
+   1.85. t_next_contact_flow usage
266
+   1.86. t_check_status usage
267
+   1.87. t_check_trans usage
268
+   1.88. t_set_disable_6xx usage
269
+   1.89. t_set_disable_failover usage
270
+   1.90. t_set_disable_internal_reply usage
271
+   1.91. t_replicate usage
272
+   1.92. t_relay_to usage
273
+   1.93. t_set_no_e2e_cancel_reason usage
274
+   1.94. t_replicate usage
275
+   1.95. t_use_uac_headers usage
276
+   1.96. t_is_retr_async_reply usage
277
+   1.97. t_uac_send usage
278
+   1.98. t_get_status_code usage
279
+   1.99. t_clean usage
280
+   1.100. event_route[tm:branch-failure:id] usage
281
+   1.101. event_route[tm:local-request] usage
282
+   1.102. event_route[tm:local-response] usage
280 283
 
281 284
 Chapter 1. Admin Guide
282 285
 
... ...
@@ -336,6 +339,7 @@ Chapter 1. Admin Guide
336 339
         3.48. relay_100 (str)
337 340
         3.49. rich_redirect (int)
338 341
         3.50. exec_time_check (int)
342
+        3.51. reply_relay_mode (int)
339 343
 
340 344
    4. Functions
341 345
 
... ...
@@ -400,12 +404,13 @@ Chapter 1. Admin Guide
400 404
         5.1. tm.list
401 405
         5.2. tm.t_uac_start
402 406
         5.3. tm.t_uac_wait
403
-        5.4. tm.cancel
404
-        5.5. tm.hash_stats
405
-        5.6. tm.reply
406
-        5.7. tm.reply_callid
407
-        5.8. tm.clean
408
-        5.9. tm.stats
407
+        5.4. tm.t_uac_wait
408
+        5.5. tm.cancel
409
+        5.6. tm.hash_stats
410
+        5.7. tm.reply
411
+        5.8. tm.reply_callid
412
+        5.9. tm.clean
413
+        5.10. tm.stats
409 414
 
410 415
    6. Event Routes
411 416
 
... ...
@@ -710,6 +715,7 @@ failure_route["serial"]
710 715
    3.48. relay_100 (str)
711 716
    3.49. rich_redirect (int)
712 717
    3.50. exec_time_check (int)
718
+   3.51. reply_relay_mode (int)
713 719
 
714 720
 3.1. fr_timer (integer)
715 721
 
... ...
@@ -1706,6 +1712,25 @@ modparam("tm", "rich_redirect", 3)
1706 1712
 modparam("tm", "exec_time_check", 0)
1707 1713
 ...
1708 1714
 
1715
+3.51. reply_relay_mode (int)
1716
+
1717
+   If set to 1, a received 200ok response that was suspeneded is no longer
1718
+   forwarded in the transactional context if another final response was
1719
+   forward while 200ok was suspended. Forwarding the 200ok, even it was
1720
+   received first, results in overwritting the transaction response buffer
1721
+   that can impact matching of incoming ACKs.
1722
+
1723
+   Set it to 0 in order to disable this behaviour and attempt to forward
1724
+   suspended 200ok in the transaction context. This was the behaviour
1725
+   before the commit 18410da0.
1726
+
1727
+   Default value is 1.
1728
+
1729
+   Example 1.51. Set reply_relay_mode parameter
1730
+...
1731
+modparam("tm", "reply_relay_mode", 0)
1732
+...
1733
+
1709 1734
 4. Functions
1710 1735
 
1711 1736
    4.1. t_relay([host, port])
... ...
@@ -1783,7 +1808,7 @@ modparam("tm", "exec_time_check", 0)
1783 1808
    Returns a negative value on failure -- you may still want to send a
1784 1809
    negative reply upstream statelessly not to leave upstream UAC in lurch.
1785 1810
 
1786
-   Example 1.51. t_relay usage
1811
+   Example 1.52. t_relay usage
1787 1812
 ...
1788 1813
 if (!t_relay())
1789 1814
 {
... ...
@@ -1810,7 +1835,7 @@ if (!t_relay())
1810 1835
    derived from the message uri (using sip specific DNS lookups), but with
1811 1836
    the protocol corresponding to the function name.
1812 1837
 
1813
-   Example 1.52. t_relay_to_udp usage
1838
+   Example 1.53. t_relay_to_udp usage
1814 1839
 ...
1815 1840
 if (src_ip==10.0.0.0/8)
1816 1841
         t_relay_to_udp("1.2.3.4", "5060"); # sent to 1.2.3.4:5060 over udp
... ...
@@ -1850,7 +1875,7 @@ else
1850 1875
    Meaning of the parameters is as follows:
1851 1876
      * failure_route - Failure route block to be called.
1852 1877
 
1853
-   Example 1.53. t_on_failure usage
1878
+   Example 1.54. t_on_failure usage
1854 1879
 ...
1855 1880
 route {
1856 1881
     t_on_failure("1");
... ...
@@ -1886,7 +1911,7 @@ failure_route[1] {
1886 1911
      * branch_failure_route - Name of the branch_failure route block to be
1887 1912
        called (it is prefixed internally with 'tm:branch-failure:').
1888 1913
 
1889
-   Example 1.54. t_on_branch_failure usage
1914
+   Example 1.55. t_on_branch_failure usage
1890 1915
 ...
1891 1916
 route {
1892 1917
     t_on_branch_failure("myroute");
... ...
@@ -1909,7 +1934,7 @@ event_route[tm:branch-failure:myroute] {
1909 1934
    Meaning of the parameters is as follows:
1910 1935
      * onreply_route - Onreply route block to be called.
1911 1936
 
1912
-   Example 1.55. t_on_reply usage
1937
+   Example 1.56. t_on_reply usage
1913 1938
 ...
1914 1939
 loadmodule "/usr/local/lib/ser/modules/nathelper.so"
1915 1940
 ...
... ...
@@ -1941,7 +1966,7 @@ es');
1941 1966
    Meaning of the parameters is as follows:
1942 1967
      * branch_route - branch route block to be called.
1943 1968
 
1944
-   Example 1.56. t_on_branch usage
1969
+   Example 1.57. t_on_branch usage
1945 1970
 ...
1946 1971
 route {
1947 1972
         t_on_branch("1");
... ...
@@ -1966,7 +1991,7 @@ branch_route[1] {
1966 1991
    structure. Use the tmx module function t_flush_flags() to synchronize
1967 1992
    the modified message flags to the already created transaction.
1968 1993
 
1969
-   Example 1.57. t_newtran usage
1994
+   Example 1.58. t_newtran usage
1970 1995
 ...
1971 1996
 if (t_newtran()) {
1972 1997
     xlog("the transaction has been created\n");
... ...
@@ -1998,7 +2023,7 @@ if (t_newtran()) {
1998 2023
      * code - Reply code number.
1999 2024
      * reason_phrase - Reason string.
2000 2025
 
2001
-   Example 1.58. t_reply usage
2026
+   Example 1.59. t_reply usage
2002 2027
 ...
2003 2028
 t_reply("404", "Not found");
2004 2029
 ...
... ...
@@ -2016,7 +2041,7 @@ t_reply("404", "Not found");
2016 2041
      * code - Reply code number.
2017 2042
      * reason - Reason string.
2018 2043
 
2019
-   Example 1.59. t_send_reply usage
2044
+   Example 1.60. t_send_reply usage
2020 2045
 ...
2021 2046
 t_send_reply("404", "Not found");
2022 2047
 ...
... ...
@@ -2029,7 +2054,7 @@ t_send_reply("404", "Not found");
2029 2054
    none was found. However this is safely (atomically) done using
2030 2055
    t_newtran.
2031 2056
 
2032
-   Example 1.60. t_lookup_request usage
2057
+   Example 1.61. t_lookup_request usage
2033 2058
 ...
2034 2059
 if (t_lookup_request()) {
2035 2060
     ...
... ...
@@ -2040,7 +2065,7 @@ if (t_lookup_request()) {
2040 2065
 
2041 2066
    Retransmits a reply sent previously by UAS transaction.
2042 2067
 
2043
-   Example 1.61. t_retransmit_reply usage
2068
+   Example 1.62. t_retransmit_reply usage
2044 2069
 ...
2045 2070
 t_retransmit_reply();
2046 2071
 ...
... ...
@@ -2050,7 +2075,7 @@ t_retransmit_reply();
2050 2075
    Remove transaction from memory (it will be first put on a wait timer to
2051 2076
    absorb delayed messages).
2052 2077
 
2053
-   Example 1.62. t_release usage
2078
+   Example 1.63. t_release usage
2054 2079
 ...
2055 2080
 t_release();
2056 2081
 ...
... ...
@@ -2064,7 +2089,7 @@ t_release();
2064 2089
      * ip - IP address where the message should be sent.
2065 2090
      * port - Port number.
2066 2091
 
2067
-   Example 1.63. t_forward_nonack usage
2092
+   Example 1.64. t_forward_nonack usage
2068 2093
 ...
2069 2094
 t_forward_nonack("1.2.3.4", "5060");
2070 2095
 ...
... ...
@@ -2103,7 +2128,7 @@ t_forward_nonack("1.2.3.4", "5060");
2103 2128
 
2104 2129
    See also: fr_timer, fr_inv_timer, t_reset_fr().
2105 2130
 
2106
-   Example 1.64. t_set_fr usage
2131
+   Example 1.65. t_set_fr usage
2107 2132
 ...
2108 2133
 route {
2109 2134
         t_set_fr(10000); # set only fr invite timeout to 10s
... ...
@@ -2130,7 +2155,7 @@ branch_route[1] {
2130 2155
 
2131 2156
    See also: fr_timer, fr_inv_timer, t_set_fr.
2132 2157
 
2133
-   Example 1.65. t_reset_fr usage
2158
+   Example 1.66. t_reset_fr usage
2134 2159
 ...
2135 2160
 route {
2136 2161
 ...
... ...
@@ -2156,7 +2181,7 @@ route {
2156 2181
 
2157 2182
    See also: max_inv_lifetime, max_noninv_lifetime, t_reset_max_lifetime.
2158 2183
 
2159
-   Example 1.66. t_set_max_lifetime usage
2184
+   Example 1.67. t_set_max_lifetime usage
2160 2185
 ...
2161 2186
 route {
2162 2187
     if (src_ip=1.2.3.4)
... ...
@@ -2178,7 +2203,7 @@ route {
2178 2203
 
2179 2204
    See also: max_inv_lifetime, max_noninv_lifetime, t_set_max_lifetime.
2180 2205
 
2181
-   Example 1.67. t_reset_max_lifetime usage
2206
+   Example 1.68. t_reset_max_lifetime usage
2182 2207
 ...
2183 2208
 route {
2184 2209
 ...
... ...
@@ -2213,7 +2238,7 @@ route {
2213 2238
 
2214 2239
    See also: retr_timer1, retr_timer2, t_reset_retr().
2215 2240
 
2216
-   Example 1.68. t_set_retr usage
2241
+   Example 1.69. t_set_retr usage
2217 2242
 ...
2218 2243
 route {
2219 2244
         t_set_retr(250, 0); # set only T1 to 250 ms
... ...
@@ -2240,7 +2265,7 @@ branch_route[1] {
2240 2265
 
2241 2266
    See also: retr_timer1, retr_timer2, t_set_retr.
2242 2267
 
2243
-   Example 1.69. t_reset_retr usage
2268
+   Example 1.70. t_reset_retr usage
2244 2269
 ...
2245 2270
 route {
2246 2271
 ...
... ...
@@ -2256,7 +2281,7 @@ route {
2256 2281
 
2257 2282
    See also: auto_inv_100.
2258 2283
 
2259
-   Example 1.70. t_set_auto_inv_100 usage
2284
+   Example 1.71. t_set_auto_inv_100 usage
2260 2285
 ...
2261 2286
 route {
2262 2287
 ...
... ...
@@ -2271,7 +2296,7 @@ route {
2271 2296
    timeout. It can be used from FAILURE_ROUTE and BRANCH_FAILURE_ROUTE
2272 2297
    event route.
2273 2298
 
2274
-   Example 1.71. t_branch_timeout usage
2299
+   Example 1.72. t_branch_timeout usage
2275 2300
 ...
2276 2301
 failure_route[0]{
2277 2302
         if (t_branch_timeout()){
... ...
@@ -2287,7 +2312,7 @@ failure_route[0]{
2287 2312
    taken into account). It can be used from failure_route and
2288 2313
    branch-failure event route.
2289 2314
 
2290
-   Example 1.72. t_branch_replied usage
2315
+   Example 1.73. t_branch_replied usage
2291 2316
 ...
2292 2317
 failure_route[0]{
2293 2318
         if (t_branch_timeout()){
... ...
@@ -2304,7 +2329,7 @@ failure_route[0]{
2304 2329
    Returns true if at least one of the current transactions branches did
2305 2330
    timeout.
2306 2331
 
2307
-   Example 1.73. t_any_timeout usage
2332
+   Example 1.74. t_any_timeout usage
2308 2333
 ...
2309 2334
 failure_route[0]{
2310 2335
         if (!t_branch_timeout()){
... ...
@@ -2321,7 +2346,7 @@ failure_route[0]{
2321 2346
    receive some reply in the past. If called from a failure or onreply
2322 2347
    route, the "current" reply is not taken into account.
2323 2348
 
2324
-   Example 1.74. t_any_replied usage
2349
+   Example 1.75. t_any_replied usage
2325 2350
 ...
2326 2351
 onreply_route[0]{
2327 2352
         if (!t_any_replied()){
... ...
@@ -2335,7 +2360,7 @@ onreply_route[0]{
2335 2360
    Returns true if "code" is the final reply received (or locally
2336 2361
    generated) in at least one of the current transactions branches.
2337 2362
 
2338
-   Example 1.75. t_grep_status usage
2363
+   Example 1.76. t_grep_status usage
2339 2364
 ...
2340 2365
 onreply_route[0]{
2341 2366
         if (t_grep_status("486")){
... ...
@@ -2348,7 +2373,7 @@ onreply_route[0]{
2348 2373
 
2349 2374
    Returns true if the current transaction was canceled.
2350 2375
 
2351
-   Example 1.76. t_is_canceled usage
2376
+   Example 1.77. t_is_canceled usage
2352 2377
 ...
2353 2378
 failure_route[0]{
2354 2379
         if (t_is_canceled()){
... ...
@@ -2362,7 +2387,7 @@ failure_route[0]{
2362 2387
    Returns true if the current transaction has already been expired, i.e.
2363 2388
    the max_inv_lifetime/max_noninv_lifetime interval has already elapsed.
2364 2389
 
2365
-   Example 1.77. t_is_expired usage
2390
+   Example 1.78. t_is_expired usage
2366 2391
 ...
2367 2392
 failure_route[0]{
2368 2393
         if (t_is_expired()){
... ...
@@ -2383,7 +2408,7 @@ failure_route[0]{
2383 2408
    CANCELs were successfully sent to the pending branches, true if the
2384 2409
    INVITE was not found, and false in case of any error.
2385 2410
 
2386
-   Example 1.78. t_relay_cancel usage
2411
+   Example 1.79. t_relay_cancel usage
2387 2412
 if (method == CANCEL) {
2388 2413
         if (!t_relay_cancel()) {  # implicit drop if relaying was successful,
2389 2414
                                   # nothing to do
... ...
@@ -2410,7 +2435,7 @@ if (method == CANCEL) {
2410 2435
    overwritten with the flags of the INVITE. isflagset() can be used to
2411 2436
    check the flags of the previously forwarded INVITE in this case.
2412 2437
 
2413
-   Example 1.79. t_lookup_cancel usage
2438
+   Example 1.80. t_lookup_cancel usage
2414 2439
 if (method == CANCEL) {
2415 2440
         if (t_lookup_cancel()) {
2416 2441
                 log("INVITE transaction exists");
... ...
@@ -2440,7 +2465,7 @@ if (method == CANCEL) {
2440 2465
    Dropping replies works only if a new branch is added to the
2441 2466
    transaction, or it is explicitly replied in the script!
2442 2467
 
2443
-   Example 1.80. t_drop_replies() usage
2468
+   Example 1.81. t_drop_replies() usage
2444 2469
 ...
2445 2470
 failure_route[0]{
2446 2471
         if (t_check_status("5[0-9][0-9]")){
... ...
@@ -2471,7 +2496,7 @@ failure_route[0]{
2471 2496
    The transaction must be created by t_newtran() before calling
2472 2497
    t_save_lumps().
2473 2498
 
2474
-   Example 1.81. t_save_lumps() usage
2499
+   Example 1.82. t_save_lumps() usage
2475 2500
 route {
2476 2501
         ...
2477 2502
         t_newtran();
... ...
@@ -2545,7 +2570,7 @@ failure_route[1] {
2545 2570
 
2546 2571
    This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.
2547 2572
 
2548
-   Example 1.82. t_load_contacts usage
2573
+   Example 1.83. t_load_contacts usage
2549 2574
 ...
2550 2575
 if (!t_load_contacts()) {
2551 2576
         sl_send_reply("500", "Server Internal Error - Cannot load contacts");
... ...
@@ -2586,7 +2611,7 @@ if (!t_load_contacts()) {
2586 2611
    contact_flows_avp are not anymore set. Based on that test, you can then
2587 2612
    use t_set_fr() function to set timers according to your needs.
2588 2613
 
2589
-   Example 1.83. t_next_contacts usage
2614
+   Example 1.84. t_next_contacts usage
2590 2615
 ...
2591 2616
 # First call after t_load_contacts() when transaction does not exist yet
2592 2617
 # and contacts should be available
... ...
@@ -2624,7 +2649,7 @@ if (!t_next_contacts()) {
2624 2649
    syslog). This function can be used from a BRANCH_FAILURE_ROUTE event
2625 2650
    route.
2626 2651
 
2627
-   Example 1.84. t_next_contact_flow usage
2652
+   Example 1.85. t_next_contact_flow usage
2628 2653
 ...
2629 2654
 event_route[tm:branch-failure:outbound]
2630 2655
 {
... ...
@@ -2647,7 +2672,7 @@ event_route[tm:branch-failure:outbound]
2647 2672
 
2648 2673
    This function can be used from ANY_ROUTE .
2649 2674
 
2650
-   Example 1.85. t_check_status usage
2675
+   Example 1.86. t_check_status usage
2651 2676
 ...
2652 2677
 if (t_check_status("(487)|(408)")) {
2653 2678
     log("487 or 408 negative reply\n");
... ...
@@ -2701,7 +2726,7 @@ Note
2701 2726
 
2702 2727
    See also: t_lookup_request(), t_lookup_cancel().
2703 2728
 
2704
-   Example 1.86. t_check_trans usage
2729
+   Example 1.87. t_check_trans usage
2705 2730
 if ( method == "CANCEL" && !t_check_trans())
2706 2731
         sl_reply("403", "cancel out of the blue forbidden");
2707 2732
 # note: in this example t_check_trans() can be replaced by t_lookup_cancel()
... ...
@@ -2716,7 +2741,7 @@ if ( method == "CANCEL" && !t_check_trans())
2716 2741
 
2717 2742
    See also: disable_6xx_block.
2718 2743
 
2719
-   Example 1.87. t_set_disable_6xx usage
2744
+   Example 1.88. t_set_disable_6xx usage
2720 2745
 ...
2721 2746
 route {
2722 2747
 ...
... ...
@@ -2731,7 +2756,7 @@ route {
2731 2756
 
2732 2757
    See also: use_dns_failover.
2733 2758
 
2734
-   Example 1.88. t_set_disable_failover usage
2759
+   Example 1.89. t_set_disable_failover usage
2735 2760
 ...
2736 2761
 route {
2737 2762
 ...
... ...
@@ -2744,7 +2769,7 @@ route {
2744 2769
 
2745 2770
    Turn off/on sending internally a SIP reply in case of relay errors.
2746 2771
 
2747
-   Example 1.89. t_set_disable_internal_reply usage
2772
+   Example 1.90. t_set_disable_internal_reply usage
2748 2773
 ...
2749 2774
 t_set_disable_internal_reply(1); # turn off sending internal reply on error
2750 2775
 if(!t_relay()) {
... ...
@@ -2777,7 +2802,7 @@ if(!t_relay()) {
2777 2802
      * hostport - address in "host:port" format. It can be given via an
2778 2803
        AVP.
2779 2804
 
2780
-   Example 1.90. t_replicate usage
2805
+   Example 1.91. t_replicate usage
2781 2806
 ...
2782 2807
 # sent to 1.2.3.4:5060 over tcp
2783 2808
 t_replicate("sip:1.2.3.4:5060;transport=tcp");
... ...
@@ -2811,7 +2836,7 @@ t_replicate_to_udp("1.2.3.4", "5060");
2811 2836
           + 0x02 - do not generate reply on internal error.
2812 2837
           + 0x04 - disable dns failover.
2813 2838
 
2814
-   Example 1.91. t_relay_to usage
2839
+   Example 1.92. t_relay_to usage
2815 2840
 ...
2816 2841
 # sent to 1.2.3.4:5060 over tcp
2817 2842
 t_relay_to("tcp:1.2.3.4:5060");
... ...
@@ -2837,7 +2862,7 @@ t_relay_to("0x01");
2837 2862
 
2838 2863
    See also: e2e_cancel_reason.
2839 2864
 
2840
-   Example 1.92. t_set_no_e2e_cancel_reason usage
2865
+   Example 1.93. t_set_no_e2e_cancel_reason usage
2841 2866
 ...
2842 2867
 route {
2843 2868
 ...
... ...
@@ -2860,7 +2885,7 @@ opying
2860 2885
      * onreply_route - the function returns true if an onreply route is
2861 2886
        set to be executed.
2862 2887
 
2863
-   Example 1.93. t_replicate usage
2888
+   Example 1.94. t_replicate usage
2864 2889
 ...
2865 2890
 if(!t_is_set("failure_route"))
2866 2891
     LM_DBG("no failure route will be executed for current transaction\n");
... ...
@@ -2874,7 +2899,7 @@ if(!t_is_set("failure_route"))
2874 2899
 
2875 2900
    It returns true.
2876 2901
 
2877
-   Example 1.94. t_use_uac_headers usage
2902
+   Example 1.95. t_use_uac_headers usage
2878 2903
 ...
2879 2904
 t_use_uac_headers();
2880 2905
 ...
... ...
@@ -2893,7 +2918,7 @@ t_use_uac_headers();
2893 2918
    returns true if the transaction is currently reply suspended or false
2894 2919
    if not.
2895 2920
 
2896
-   Example 1.95. t_is_retr_async_reply usage
2921
+   Example 1.96. t_is_retr_async_reply usage
2897 2922
 ...
2898 2923
 if (t_is_retr_async_reply()) {
2899 2924
         xlog("L_DBG", "Dropping retransmitted reply which is still currently sus
... ...
@@ -2918,7 +2943,7 @@ pended\n");
2918 2943
        Content-Type header must exist.
2919 2944
      * body - SIP message body (can be empty).
2920 2945
 
2921
-   Example 1.96. t_uac_send usage
2946
+   Example 1.97. t_uac_send usage
2922 2947
 ...
2923 2948
 t_uac_send("OPTIONS", "sip:alice@kamailio.org", "", "",
2924 2949
     "From: bob@kamailio.org;tag=2w3e\r\nTo: bob@kamailio.org", "");
... ...
@@ -2929,7 +2954,7 @@ t_uac_send("OPTIONS", "sip:alice@kamailio.org", "", "",
2929 2954
    Return the status code for transaction - the most relevant SIP reply
2930 2955
    status code, or -1 in case of error or no status code was set.
2931 2956
 
2932
-   Example 1.97. t_get_status_code usage
2957
+   Example 1.98. t_get_status_code usage
2933 2958
 ...
2934 2959
 $var(ts) = t_get_status_code();
2935 2960
 if($var(ts) == 500) { ... }
... ...
@@ -2940,7 +2965,7 @@ if($var(ts) == 500) { ... }
2940 2965
    Cleans active but very old transactions. Returns true (1). Can be
2941 2966
    called from any route.
2942 2967
 
2943
-   Example 1.98. t_clean usage
2968
+   Example 1.99. t_clean usage
2944 2969
 ...
2945 2970
 t_clean();
2946 2971
 ...
... ...
@@ -2950,12 +2975,13 @@ t_clean();
2950 2975
    5.1. tm.list
2951 2976
    5.2. tm.t_uac_start
2952 2977
    5.3. tm.t_uac_wait
2953
-   5.4. tm.cancel
2954
-   5.5. tm.hash_stats
2955
-   5.6. tm.reply
2956
-   5.7. tm.reply_callid
2957
-   5.8. tm.clean
2958
-   5.9. tm.stats
2978
+   5.4. tm.t_uac_wait
2979
+   5.5. tm.cancel
2980
+   5.6. tm.hash_stats
2981
+   5.7. tm.reply
2982
+   5.8. tm.reply_callid
2983
+   5.9. tm.clean
2984
+   5.10. tm.stats
2959 2985
 
2960 2986
 5.1.  tm.list
2961 2987
 
... ...
@@ -2981,10 +3007,17 @@ t_clean();
2981 3007
 
2982 3008
 5.3.  tm.t_uac_wait
2983 3009
 
2984
-   Similar to tm.t_uac_start, but waits for the SIP response and tries to
2985
-   provide its details via RPC response.
3010
+   Similar to tm.t_uac_start, but waits asynchronously for the SIP
3011
+   response and tries to provide its details via RPC response.
3012
+
3013
+5.4.  tm.t_uac_wait
3014
+
3015
+   Similar to tm.t_uac_start, but blocks waiting for the SIP response and
3016
+   returns the SIP reply code and reason text via RPC response. It waits
3017
+   up to 80 seconds, if no reply is received, it returns a RPC fault 500
3018
+   code. While waiting, the RPC process cannot handle other RPC commands.
2986 3019
 
2987
-5.4.  tm.cancel
3020
+5.5.  tm.cancel
2988 3021
 
2989 3022
    Generates and sends a CANCEL for an existing local SIP request.
2990 3023
 
... ...
@@ -2992,14 +3025,14 @@ t_clean();
2992 3025
      * callid - callid of the INVITE request to be cancelled.
2993 3026
      * cseq - cseq of the INVITE request to be cancelled.
2994 3027
 
2995
-5.5.  tm.hash_stats
3028
+5.6.  tm.hash_stats
2996 3029
 
2997 3030
    Gets information about the load of TM internal hash table.
2998 3031
 
2999 3032
    Parameters:
3000 3033
      * none
3001 3034
 
3002
-5.6.  tm.reply
3035
+5.7.  tm.reply
3003 3036
 
3004 3037
    Generates and sends a reply for an existing inbound SIP transaction.
3005 3038
 
... ...
@@ -3013,7 +3046,7 @@ t_clean();
3013 3046
      * body - (optional, may not be present) reply body (if present,
3014 3047
        requires the “Content-Type” and “Content-length” headers)
3015 3048
 
3016
-5.7.  tm.reply_callid
3049
+5.8.  tm.reply_callid
3017 3050
 
3018 3051
    Generates and sends a reply for an existing inbound SIP transaction.
3019 3052
 
... ...
@@ -3028,14 +3061,14 @@ t_clean();
3028 3061
      * body - (optional, may not be present) reply body (if present,
3029 3062
        requires the “Content-Type” and “Content-length” headers)
3030 3063
 
3031
-5.8.  tm.clean
3064
+5.9.  tm.clean
3032 3065
 
3033 3066
    Trigger an hard clean of expired transactions.
3034 3067
 
3035 3068
    Parameters:
3036 3069
      * none
3037 3070
 
3038
-5.9.  tm.stats
3071
+5.10.  tm.stats
3039 3072
 
3040 3073
    Gets information about current and past TM transaction handling.
3041 3074
 
... ...
@@ -3058,7 +3091,7 @@ t_clean();
3058 3091
    enabled with the t_on_branch_failure function. This event_route uses
3059 3092
    the BRANCH_FAILURE_ROUTE route type.
3060 3093
 
3061
-   Example 1.99. event_route[tm:branch-failure:id] usage
3094
+   Example 1.100. event_route[tm:branch-failure:id] usage
3062 3095
 ...
3063 3096
 request_route {
3064 3097
     ...
... ...
@@ -3084,7 +3117,7 @@ event_route[tm:branch-failure:myroute] {
3084 3117
    The request can still be updated, i.e., changes are possible to R-URI
3085 3118
    ($ru), destination URI ($du) or the send socket ($fs).
3086 3119
 
3087
-   Example 1.100. event_route[tm:local-request] usage
3120
+   Example 1.101. event_route[tm:local-request] usage
3088 3121
 ...
3089 3122
 event_route [tm:local-request] {
3090 3123
     xlog("L_INFO", "Routing locally generated $rm to $ru\n");
... ...
@@ -3097,7 +3130,7 @@ event_route [tm:local-request] {
3097 3130
    Executed after the tm module sent a local generated, transaction
3098 3131
    stateful response.
3099 3132
 
3100
-   Example 1.101. event_route[tm:local-response] usage
3133
+   Example 1.102. event_route[tm:local-response] usage
3101 3134
 ...
3102 3135
 event_route[tm:local-response] {
3103 3136
     xlog("tm:local-response replied locally\n");