Module: kamailio
Branch: master
Commit: 079b84b1351a19334a478226b83f4d3193d050bb
URL:
https://github.com/kamailio/kamailio/commit/079b84b1351a19334a478226b83f4d3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-04-04T15:50:41+02:00
dialog: documented the event_callback parameter
- allow specifying the function name to be executed by kemi on event
routes
---
Modified: src/modules/dialog/doc/dialog_admin.xml
---
Diff:
https://github.com/kamailio/kamailio/commit/079b84b1351a19334a478226b83f4d3…
Patch:
https://github.com/kamailio/kamailio/commit/079b84b1351a19334a478226b83f4d3…
---
diff --git a/src/modules/dialog/doc/dialog_admin.xml
b/src/modules/dialog/doc/dialog_admin.xml
index 7b39bc9..af1443e 100644
--- a/src/modules/dialog/doc/dialog_admin.xml
+++ b/src/modules/dialog/doc/dialog_admin.xml
@@ -1443,6 +1443,39 @@ modparam("dialog", "lreq_callee_headers",
"TH: dlh\r\n")
</programlisting>
</example>
</section>
+ <section id="dialog.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.
+ </para>
+ <para>
+ The function receives a string parameter with the name of the event,
+ the values are: 'dialog:start', 'dialog:end', 'dialog:failed'.
It
+ is also executed if '$dlg_ctx(timeout_route)' is set, the callback
+ function being executed with the variable value as parameter.
+ </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("dialog", "event_callback", "ksr_dialog_event")
+...
+-- event callback function implemented in Lua
+function ksr_dialog_event(evname)
+ KSR.info("===== dialog module triggered event: " .. evname ..
"\n");
+ return 1;
+end
+...
+</programlisting>
+ </example>
+ </section>
</section>