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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2017-08-15T15:09:37+02:00

tls: docs for event_route[tls:connection-out] and event_callback param

---

Modified: src/modules/tls/doc/params.xml
Modified: src/modules/tls/doc/rpc.xml
Modified: src/modules/tls/doc/tls.xml

---

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

---

diff --git a/src/modules/tls/doc/params.xml b/src/modules/tls/doc/params.xml
index 5ab2426e7b..e3d236dea4 100644
--- a/src/modules/tls/doc/params.xml
+++ b/src/modules/tls/doc/params.xml
@@ -1164,5 +1164,36 @@ modparam("tls", "config", 
"/usr/local/etc/kamailio/tls.cfg")
            </programlisting>
        </example>
        </section>
+       <section id="tls.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 specific for tls module.
+               </para>
+               <para>
+                       The function has one string parameter, the value is the 
name of
+                       the event_route block, respectively 
"tls:connection-out".
+               </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("tls", "event_callback", "ksr_tls_event")
+...
+-- event callback function implemented in Lua
+function ksr_tls_event(evname)
+       KSR.info("===== tls module triggered event: " .. evname .. "\n");
+       return 1;
+end
+...
+</programlisting>
+           </example>
+       </section>
 
 </section>
diff --git a/src/modules/tls/doc/rpc.xml b/src/modules/tls/doc/rpc.xml
index cd432d85d9..8f3070648b 100644
--- a/src/modules/tls/doc/rpc.xml
+++ b/src/modules/tls/doc/rpc.xml
@@ -15,8 +15,8 @@
        <section id="tls.r.tls.info">
                <title><function>tls.info</function></title>
                <para>
-                       List internal information related to the TLS module in 
-                       a short list - max connections, open connections and 
the 
+                       List internal information related to the TLS module in
+                       a short list - max connections, open connections and the
                        write queue size.
                </para>
                <para>Parameters: </para>
@@ -53,7 +53,7 @@
        <section id="tls.r.tls.reload">
                <title><function>tls.reload</function></title>
                <para>
-                       Reload the external TLS configuration file (aka 
tls.cfg). It does not reload 
+                       Reload the external TLS configuration file (aka 
tls.cfg). It does not reload
                        modparam() parameters. Note that existing active TLS 
connections are not
                        terminated and they continue to use the old 
certificates. The new configuration
                        will be used for new connections.
diff --git a/src/modules/tls/doc/tls.xml b/src/modules/tls/doc/tls.xml
index 11c4aa7318..0c8fce400f 100644
--- a/src/modules/tls/doc/tls.xml
+++ b/src/modules/tls/doc/tls.xml
@@ -275,6 +275,31 @@ make -C modules/tls extra_defs="-DTLS_WR_DEBUG 
-DTLS_RD_DEBUG"
        <xi:include href="functions.xml"/>
        <xi:include href="rpc.xml"/>
        <xi:include href="history.xml"/>
+
+       <section id="tls.event_routes">
+               <title>Event Routes</title>
+               <section id="tls.evrt.connection_out">
+               <title>event_route[tls:connection-out]</title>
+               <para>
+                       Event route to be executed when a TLS connection is 
opened by
+                       &kamailio;. If drop() is executed in the event route, 
then the
+                       data is no longer sent over the connection.
+               </para>
+       <example>
+           <title>Use of 
<varname>event_route[tls:connection-out]</varname></title>
+           <programlisting>
+...
+event_route[tls:connection-out] {
+  if($sndto(ip)=="1.2.3.4") {
+    drop;
+  }
+}
+...
+           </programlisting>
+       </example>
+
+               </section>
+       </section>
        </chapter>
 </book>
 


_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to