[sr-dev] git:master:450c9eb2: xhttp: documented event_callback parameter

Daniel-Constantin Mierla miconda at gmail.com
Tue Apr 18 14:08:40 CEST 2017


Module: kamailio
Branch: master
Commit: 450c9eb23e248c9dcd32a4a398f4585719c5bcd5
URL: https://github.com/kamailio/kamailio/commit/450c9eb23e248c9dcd32a4a398f4585719c5bcd5

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-04-17T20:27:01+02:00

xhttp: documented event_callback parameter

---

Modified: src/modules/xhttp/doc/xhttp_admin.xml

---

Diff:  https://github.com/kamailio/kamailio/commit/450c9eb23e248c9dcd32a4a398f4585719c5bcd5.diff
Patch: https://github.com/kamailio/kamailio/commit/450c9eb23e248c9dcd32a4a398f4585719c5bcd5.patch

---

diff --git a/src/modules/xhttp/doc/xhttp_admin.xml b/src/modules/xhttp/doc/xhttp_admin.xml
index 869a1d5..90708ce 100644
--- a/src/modules/xhttp/doc/xhttp_admin.xml
+++ b/src/modules/xhttp/doc/xhttp_admin.xml
@@ -156,6 +156,33 @@ modparam("xhttp", "url_match", "^/sip/")
 </programlisting>
 		</example>
 	</section>
+	<section id="xhttp.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[xhttp:request] block.
+		</para>
+		<para>
+			The function has one string parameter with the value "xhttp:request".
+		</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("xhttp", "event_callback", "ksr_xhttp_event")
+...
+-- event callback function implemented in Lua
+function ksr_xhttp_event(evname)
+	KSR.info("===== xhttp module triggered event: " .. evname .. "\n");
+	return 1;
+end
+...
 	</section>
 
 	<section>




More information about the sr-dev mailing list