Module: kamailio
Branch: master
Commit: 9cc9785cef0a8abf3fa09de1f5da4dd52133be39
URL:
https://github.com/kamailio/kamailio/commit/9cc9785cef0a8abf3fa09de1f5da4dd…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-01-15T12:57:16+01:00
tcpops: documentation for tcp_get_conid()
---
Modified: src/modules/tcpops/doc/functions.xml
---
Diff:
https://github.com/kamailio/kamailio/commit/9cc9785cef0a8abf3fa09de1f5da4dd…
Patch:
https://github.com/kamailio/kamailio/commit/9cc9785cef0a8abf3fa09de1f5da4dd…
---
diff --git a/src/modules/tcpops/doc/functions.xml b/src/modules/tcpops/doc/functions.xml
index 9f51668787..baff1bcf13 100644
--- a/src/modules/tcpops/doc/functions.xml
+++ b/src/modules/tcpops/doc/functions.xml
@@ -259,4 +259,39 @@ event_route[tcp:closed] {
]]></programlisting>
</example>
</section>
+ <section id="tcpops.f.tcp_get_conid">
+ <title>
+ <function>tcp_get_conid(hostport, pvname)</function>
+ </title>
+ <para>
+ Get the connection id based on target host:port. The connection id
+ is set in the variable named by pvname parameter.
+ </para>
+ <para>Meaning of the parameters is as follows:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>hostport</emphasis> - target "host:port"
address,
+ the port can be ommited (default to 5060) and the parameter can
+ contain variables.
+ </para>
+ </listitem>
+ <listitem>
+ <para><emphasis>pvname</emphasis> - target variable name.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>Return values:</para>
+ <para>1: connection was found</para>
+ <para>-1: connection was not found or an error occured</para>
+ <example>
+ <title><function>tcp_get_conid</function> usage</title>
+ <programlisting><![CDATA[
+...
+ if(tcp_conid_alive("127.0.0.1:5060", "$var(conid)")) {
+ xlog("connection id is: $var(conid)\n");
+ }
+...
+ ]]></programlisting>
+ </example>
+ </section>
</section>