[sr-dev] git:master:9b72c40a: dispatcher: documentation for event_callback parameter
Daniel-Constantin Mierla
miconda at gmail.com
Tue Apr 4 14:38:11 CEST 2017
Module: kamailio
Branch: master
Commit: 9b72c40ab7ddba0766961557067a969dfc3a000a
URL: https://github.com/kamailio/kamailio/commit/9b72c40ab7ddba0766961557067a969dfc3a000a
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-04-04T14:35:03+02:00
dispatcher: documentation for event_callback parameter
---
Modified: src/modules/dispatcher/doc/dispatcher_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/9b72c40ab7ddba0766961557067a969dfc3a000a.diff
Patch: https://github.com/kamailio/kamailio/commit/9b72c40ab7ddba0766961557067a969dfc3a000a.patch
---
diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml
index d0dc575..6950a2d 100644
--- a/src/modules/dispatcher/doc/dispatcher_admin.xml
+++ b/src/modules/dispatcher/doc/dispatcher_admin.xml
@@ -869,6 +869,34 @@ modparam("dispatcher", "force_dst", 1)
</programlisting>
</example>
</section>
+ <section id="dispatcher.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. The function receives a string parameter
+ with the name of the event.
+ </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("dispatcher", "event_callback", "ksr_dispatcher_event")
+...
+-- event callback function implemented in Lua
+function ksr_dispatcher_event(evname)
+ KSR.info("===== dispatcher module triggered event: " .. evname .. "\n");
+ return 1;
+end
+...
+</programlisting>
+ </example>
+ </section>
</section>
More information about the sr-dev
mailing list