Browse code

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

Kamailio Dev authored on 29/09/2020 08:46:15
Showing 2 changed files
... ...
@@ -36,10 +36,12 @@ Daniel-Constantin Mierla
36 36
               3.9. sanity_checks (integer)
37 37
               3.10. uri_prefix_checks (integer)
38 38
               3.11. event_callback (str)
39
+              3.12. event_mode (int)
39 40
 
40 41
         4. Event Routes
41 42
 
42 43
               4.1. event_route[topoh:msg-outgoing]
44
+              4.2. event_route[topoh:msg-sending]
43 45
 
44 46
    List of Examples
45 47
 
... ...
@@ -54,7 +56,9 @@ Daniel-Constantin Mierla
54 56
    1.9. Set sanity_checks parameter
55 57
    1.10. Set uri_prefix_checks parameter
56 58
    1.11. Set event_callback parameter
57
-   1.12. Usage of event_route[topoh:msg-outgoing]
59
+   1.12. Set event_mode parameter
60
+   1.13. Usage of event_route[topoh:msg-outgoing]
61
+   1.14. Usage of event_route[topoh:msg-sending]
58 62
 
59 63
 Chapter 1. Admin Guide
60 64
 
... ...
@@ -79,10 +83,12 @@ Chapter 1. Admin Guide
79 83
         3.9. sanity_checks (integer)
80 84
         3.10. uri_prefix_checks (integer)
81 85
         3.11. event_callback (str)
86
+        3.12. event_mode (int)
82 87
 
83 88
    4. Event Routes
84 89
 
85 90
         4.1. event_route[topoh:msg-outgoing]
91
+        4.2. event_route[topoh:msg-sending]
86 92
 
87 93
 1. Overview
88 94
 
... ...
@@ -130,6 +136,7 @@ Chapter 1. Admin Guide
130 136
    3.9. sanity_checks (integer)
131 137
    3.10. uri_prefix_checks (integer)
132 138
    3.11. event_callback (str)
139
+   3.12. event_mode (int)
133 140
 
134 141
 3.1. mask_key (str)
135 142
 
... ...
@@ -284,9 +291,23 @@ function ksr_topoh_event(evname)
284 291
 end
285 292
 ...
286 293
 
294
+3.12. event_mode (int)
295
+
296
+   Control what event_route blocks to be executed. It is a bitmask of: 1 -
297
+   execute event_route[topoh:msg-outgoing]; 2 - execute
298
+   event_route[topoh:msg-sending].
299
+
300
+   Default value is 3 (execute both event_route blocks).
301
+
302
+   Example 1.12. Set event_mode parameter
303
+...
304
+modparam("topoh", "event_mode", 2)
305
+...
306
+
287 307
 4. Event Routes
288 308
 
289 309
    4.1. event_route[topoh:msg-outgoing]
310
+   4.2. event_route[topoh:msg-sending]
290 311
 
291 312
 4.1. event_route[topoh:msg-outgoing]
292 313
 
... ...
@@ -300,7 +321,7 @@ end
300 321
    reparsing the outgoing SIP message for the cases when topology hiding
301 322
    is not wanted.
302 323
 
303
-   Example 1.12. Usage of event_route[topoh:msg-outgoing]
324
+   Example 1.13. Usage of event_route[topoh:msg-outgoing]
304 325
 ...
305 326
 event_route[topoh:msg-outgoing] {
306 327
   if($sndto(ip)=="10.1.1.10") {
... ...
@@ -308,3 +329,22 @@ event_route[topoh:msg-outgoing] {
308 329
   }
309 330
 }
310 331
 ...
332
+
333
+4.2. event_route[topoh:msg-sending]
334
+
335
+   It is executed before doing topology hiding processing for a SIP
336
+   message to be sent out, being executed after
337
+   event_route[topoh:msg-outgoing].
338
+
339
+   Inside the event route the variables $sndto(ip), $sndto(port) and
340
+   $sndto(proto) point to the destination. The SIP message is the one to
341
+   be sent out.
342
+
343
+   Example 1.14. Usage of event_route[topoh:msg-sending]
344
+...
345
+event_route[topoh:msg-sending] {
346
+  if(is_request() and $fU=="alice") {
347
+    drop;
348
+  }
349
+}
350
+...
... ...
@@ -265,8 +265,8 @@ end
265 265
 3.9. event_mode (int)
266 266
 
267 267
    Control what event_route blocks to be executed. It is a bitmask of: 1 -
268
-   execute event_route[topos:outgoing]; 2 - execute
269
-   event_route[topos:sending].
268
+   execute event_route[topos:msg-outgoing]; 2 - execute
269
+   event_route[topos:msg-sending].
270 270
 
271 271
    Default value is 3 (execute both event_route blocks).
272 272