Browse code

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

Kamailio Dev authored on 07/08/2017 09:31:22
Showing 1 changed files
... ...
@@ -32,6 +32,11 @@ Daniel-Constantin Mierla
32 32
               3.5. branch_expire (int)
33 33
               3.6. dialog_expire (int)
34 34
               3.7. clean_interval (int)
35
+              3.8. event_callback (str)
36
+
37
+        4. Event Routes
38
+
39
+              4.1. event_route[topos:msg-outgoing]
35 40
 
36 41
    List of Examples
37 42
 
... ...
@@ -42,6 +47,8 @@ Daniel-Constantin Mierla
42 47
    1.5. Set branch_expire parameter
43 48
    1.6. Set dialog_expire parameter
44 49
    1.7. Set clean_interval parameter
50
+   1.8. Set event_callback parameter
51
+   1.9. Usage of event_route[topos:msg-outgoing]
45 52
 
46 53
 Chapter 1. Admin Guide
47 54
 
... ...
@@ -62,6 +69,11 @@ Chapter 1. Admin Guide
62 69
         3.5. branch_expire (int)
63 70
         3.6. dialog_expire (int)
64 71
         3.7. clean_interval (int)
72
+        3.8. event_callback (str)
73
+
74
+   4. Event Routes
75
+
76
+        4.1. event_route[topos:msg-outgoing]
65 77
 
66 78
 1. Overview
67 79
 
... ...
@@ -102,6 +114,7 @@ Chapter 1. Admin Guide
102 114
    3.5. branch_expire (int)
103 115
    3.6. dialog_expire (int)
104 116
    3.7. clean_interval (int)
117
+   3.8. event_callback (str)
105 118
 
106 119
 3.1. storage (str)
107 120
 
... ...
@@ -188,3 +201,49 @@ modparam("topos", "dialog_expire", 3600)
188 201
 ...
189 202
 modparam("topos", "clean_interval", 30)
190 203
 ...
204
+
205
+3.8. event_callback (str)
206
+
207
+   The name of the function in the KEMI configuration file (embedded
208
+   scripting language such as Lua, Python, ...) to be executed instead of
209
+   event_route[...] blocks.
210
+
211
+   The function receives a string parameter with the name of the event.
212
+
213
+   Default value is 'empty' (no function is executed for events).
214
+
215
+   Example 1.8. Set event_callback parameter
216
+...
217
+modparam("topos", "event_callback", "ksr_topos_event")
218
+...
219
+-- event callback function implemented in Lua
220
+function ksr_topos_event(evname)
221
+        KSR.info("===== topos module triggered event: " .. evname .. "\n");
222
+        return 1;
223
+end
224
+...
225
+
226
+4. Event Routes
227
+
228
+   4.1. event_route[topos:msg-outgoing]
229
+
230
+4.1. event_route[topos:msg-outgoing]
231
+
232
+   It is executed before doing topology stripping processing for an
233
+   outgoing SIP message. If 'drop' is executed inside the event route,
234
+   then the module skips doing the topology hiding.
235
+
236
+   Inside the event route the variables $sndto(ip), $sndto(port) and
237
+   $sndto(proto) point to the destination. The SIP message is not the one
238
+   to be sent out, but an internally generated one at startup, to avoid
239
+   reparsing the outgoing SIP message for the cases when topology hiding
240
+   is not wanted.
241
+
242
+   Example 1.9. Usage of event_route[topos:msg-outgoing]
243
+...
244
+event_route[topos:msg-outgoing] {
245
+  if($sndto(ip)=="10.1.1.10") {
246
+    drop;
247
+  }
248
+}
249
+...