Module: kamailio
Branch: master
Commit: 20af8da05513345ccb3d372e097c71a115ebe5a7
URL: https://github.com/kamailio/kamailio/commit/20af8da05513345ccb3d372e097c71a…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-08-04T15:16:23+02:00
modules: readme files regenerated - websocket ... [skip ci]
---
Modified: src/modules/websocket/README
---
Diff: https://github.com/kamailio/kamailio/commit/20af8da05513345ccb3d372e097c71a…
Patch: https://github.com/kamailio/kamailio/commit/20af8da05513345ccb3d372e097c71a…
---
diff --git a/src/modules/websocket/README b/src/modules/websocket/README
index 3541db94fb..158248654a 100644
--- a/src/modules/websocket/README
+++ b/src/modules/websocket/README
@@ -33,6 +33,7 @@ Peter Dunkley
4.6. sub_protocols (integer)
4.7. cors_mode (integer)
4.8. verbose_list (int)
+ 4.9. event_callback (str)
5. Functions
@@ -68,10 +69,11 @@ Peter Dunkley
1.8. Set sub_protocols parameter
1.9. Set cors_mode parameter
1.10. Set verbose_list parameter
- 1.11. ws_handle_handshake usage
- 1.12. ws_close usage
- 1.13. event_route[websocket:closed] usage
- 1.14. $ws_conid usage
+ 1.11. Set event_callback parameter
+ 1.12. ws_handle_handshake usage
+ 1.13. ws_close usage
+ 1.14. event_route[websocket:closed] usage
+ 1.15. $ws_conid usage
Chapter 1. Admin Guide
@@ -99,6 +101,7 @@ Chapter 1. Admin Guide
4.6. sub_protocols (integer)
4.7. cors_mode (integer)
4.8. verbose_list (int)
+ 4.9. event_callback (str)
5. Functions
@@ -341,6 +344,7 @@ onreply_route[WS_REPLY] {
4.6. sub_protocols (integer)
4.7. cors_mode (integer)
4.8. verbose_list (int)
+ 4.9. event_callback (str)
4.1. keepalive_mechanism (integer)
@@ -457,6 +461,28 @@ modparam("websocket", "cors_mode", 2)
modparam("websocket", "verbose_list", 1)
...
+4.9. event_callback (str)
+
+ The name of the function in the kemi configuration file (embedded
+ scripting language such as Lua, Python, ...) to be executed instead of
+ event_route[...] blocks specific for websocket module.
+
+ The function has one string parameter, the value is the name of the
+ event_route block, respectively "websocket:closed".
+
+ Default value is 'empty' (no function is executed for events).
+
+ Example 1.11. Set event_callback parameter
+...
+modparam("websocket", "event_callback", "ksr_websocket_event")
+...
+-- event callback function implemented in Lua
+function ksr_websocket_event(evname)
+ KSR.info("===== websocket module triggered event: " .. evname .. "\n");
+ return 1;
+end
+...
+
5. Functions
5.1. ws_handle_handshake()
@@ -476,7 +502,7 @@ Note
This function returns 0, stopping all further processing of the
request, when there is a problem.
- Example 1.11. ws_handle_handshake usage
+ Example 1.12. ws_handle_handshake usage
...
ws_handle_handshake();
...
@@ -501,7 +527,7 @@ Note
This function can be used from ANY_ROUTE.
- Example 1.12. ws_close usage
+ Example 1.13. ws_close usage
...
ws_close(4000, "Because I say so");
...
@@ -615,7 +641,7 @@ kamcmd ws.enable
connection closes. The connection may be identified using the the $si
and $sp pseudo-variables.
- Example 1.13. event_route[websocket:closed] usage
+ Example 1.14. event_route[websocket:closed] usage
...
event_route[websocket:closed] {
xlog("L_INFO", "WebSocket connection from $si:$sp has closed\n");
@@ -631,7 +657,7 @@ event_route[websocket:closed] {
Connection id of closed websocket connection. Can only be used in
websocket:closed event route.
- Example 1.14. $ws_conid usage
+ Example 1.15. $ws_conid usage
...
event_route[websocket:closed] {
xlog("L_INFO", "WebSocket connection with id $ws_conid has closed\n");
Module: kamailio
Branch: master
Commit: 921c2f6a53108ac4ddc3e262a479a46650412bce
URL: https://github.com/kamailio/kamailio/commit/921c2f6a53108ac4ddc3e262a479a46…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-08-04T15:10:50+02:00
websocket: documentation for event_callback parameter
---
Modified: src/modules/websocket/doc/websocket_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/921c2f6a53108ac4ddc3e262a479a46…
Patch: https://github.com/kamailio/kamailio/commit/921c2f6a53108ac4ddc3e262a479a46…
---
diff --git a/src/modules/websocket/doc/websocket_admin.xml b/src/modules/websocket/doc/websocket_admin.xml
index c887c05158..055498862e 100644
--- a/src/modules/websocket/doc/websocket_admin.xml
+++ b/src/modules/websocket/doc/websocket_admin.xml
@@ -445,6 +445,37 @@ modparam("websocket", "verbose_list", 1)
</programlisting>
</example>
</section>
+ <section id="websocket.p.event_callback">
+ <title><varname>event_callback</varname> (str)</title>
+ <para>
+ The name of the function in the kemi configuration file (embedded
+ scripting language such as Lua, Python, ...) to be executed instead
+ of event_route[...] blocks specific for websocket module.
+ </para>
+ <para>
+ The function has one string parameter, the value is the name of
+ the event_route block, respectively "websocket:closed".
+ </para>
+ <para>
+ <emphasis>
+ Default value is 'empty' (no function is executed for events).
+ </emphasis>
+ </para>
+ <example>
+ <title>Set <varname>event_callback</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("websocket", "event_callback", "ksr_websocket_event")
+...
+-- event callback function implemented in Lua
+function ksr_websocket_event(evname)
+ KSR.info("===== websocket module triggered event: " .. evname .. "\n");
+ return 1;
+end
+...
+</programlisting>
+ </example>
+ </section>
</section>
Module: kamailio
Branch: master
Commit: 61d72c90a1a3fe34aad3cedb87a3e68529be34ac
URL: https://github.com/kamailio/kamailio/commit/61d72c90a1a3fe34aad3cedb87a3e68…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-08-03T21:31:22+02:00
modules: readme files regenerated - dispatcher ... [skip ci]
---
Modified: src/modules/dispatcher/README
---
Diff: https://github.com/kamailio/kamailio/commit/61d72c90a1a3fe34aad3cedb87a3e68…
Patch: https://github.com/kamailio/kamailio/commit/61d72c90a1a3fe34aad3cedb87a3e68…
---
diff --git a/src/modules/dispatcher/README b/src/modules/dispatcher/README
index 4be5d66028..6c35f29858 100644
--- a/src/modules/dispatcher/README
+++ b/src/modules/dispatcher/README
@@ -911,6 +911,10 @@ end
For example, 100 calls in 3-hosts group with rweight params
1/2/1 will be distributed as 25/50/25. After third host
failing distribution will be changed to 33/67/0.
+ + “12” - dispatch to all destination in setid at once (parallel
+ forking). Note that the AVPs are no longer set with the values
+ of the destination records, no re-routing making sense in this
+ case.
+ “X” - if the algorithm is not implemented, the first entry in
set is chosen.
* limit - the maximum number of items to be stored in AVP list for
Module: kamailio
Branch: master
Commit: e84ee3becbf59a5afc63510596cd62bae36d1962
URL: https://github.com/kamailio/kamailio/commit/e84ee3becbf59a5afc63510596cd62b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-08-03T19:05:59+02:00
dispatcher: documentation for parallel dispatching algorithm
---
Modified: src/modules/dispatcher/doc/dispatcher_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/e84ee3becbf59a5afc63510596cd62b…
Patch: https://github.com/kamailio/kamailio/commit/e84ee3becbf59a5afc63510596cd62b…
---
diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml
index b5315acc2d..a0d35eec8a 100644
--- a/src/modules/dispatcher/doc/dispatcher_admin.xml
+++ b/src/modules/dispatcher/doc/dispatcher_admin.xml
@@ -1040,6 +1040,14 @@ end
</listitem>
<listitem>
<para>
+ <quote>12</quote> - dispatch to all destination in setid at
+ once (parallel forking). Note that the AVPs are no longer set
+ with the values of the destination records, no re-routing
+ making sense in this case.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
<quote>X</quote> - if the algorithm is not implemented, the
first entry in set is chosen.
</para>