Forráskód Böngészése

xhttp: documented event_callback parameter

Daniel-Constantin Mierla 8 éve
szülő
commit
450c9eb23e
1 módosított fájl, 27 hozzáadás és 0 törlés
  1. 27 0
      src/modules/xhttp/doc/xhttp_admin.xml

+ 27 - 0
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>