Sfoglia il codice sorgente

sipcapture: documentation for event_callback parameter

Daniel-Constantin Mierla 7 anni fa
parent
commit
872ef07aec
1 ha cambiato i file con 34 aggiunte e 1 eliminazioni
  1. 34 1
      src/modules/sipcapture/doc/sipcapture_admin.xml

+ 34 - 1
src/modules/sipcapture/doc/sipcapture_admin.xml

@@ -513,7 +513,40 @@ modparam("sipcapture", "nonsip_hook", 1)
 		</example>
 	</section>
 
-</section>	
+	<section id="sipcapture.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 can be: 'sipcapture: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("sipcapture", "event_callback", "ksr_sipcapture_event")
+...
+-- event callback function implemented in Lua
+function ksr_sipcapture_event(evname)
+	KSR.info("===== sipcapture module triggered event: " .. evname .. "\n");
+	return 1;
+end
+...
+</programlisting>
+		</example>
+	</section>
+
+</section>
+
 <section>
 	<title>Functions</title>
 	<section id="sipcapture.f.sip_capture">