[sr-dev] git:master:22e4167e: modules: readme files regenerated - tcpops ... [skip ci]

Kamailio Dev kamailio.dev at kamailio.org
Mon Jan 15 13:01:36 CET 2018


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

Author: Kamailio Dev <kamailio.dev at kamailio.org>
Committer: Kamailio Dev <kamailio.dev at kamailio.org>
Date: 2018-01-15T13:01:30+01:00

modules: readme files regenerated - tcpops ... [skip ci]

---

Modified: src/modules/tcpops/README

---

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

---

diff --git a/src/modules/tcpops/README b/src/modules/tcpops/README
index b0a0c3b9e1..896eed34a6 100644
--- a/src/modules/tcpops/README
+++ b/src/modules/tcpops/README
@@ -30,6 +30,7 @@ Olle E. Johansson
               3.4. tcp_keepalive_disable([conid])
               3.5. tcp_set_connection_lifetime([conid], lifetime)
               3.6. tcp_enable_closed_event([conid])
+              3.7. tcp_get_conid(hostport, pvname)
 
         4. Event routes
 
@@ -47,6 +48,7 @@ Olle E. Johansson
    1.5. tcp_keepalive_disable usage
    1.6. tcp_set_connection_lifetime usage
    1.7. tcp_set_closed_event usage
+   1.8. tcp_get_conid usage
 
 Chapter 1. Admin Guide
 
@@ -65,6 +67,7 @@ Chapter 1. Admin Guide
         3.4. tcp_keepalive_disable([conid])
         3.5. tcp_set_connection_lifetime([conid], lifetime)
         3.6. tcp_enable_closed_event([conid])
+        3.7. tcp_get_conid(hostport, pvname)
 
    4. Event routes
 
@@ -114,6 +117,7 @@ modparam("tcpops", "closed_event", 0)
    3.4. tcp_keepalive_disable([conid])
    3.5. tcp_set_connection_lifetime([conid], lifetime)
    3.6. tcp_enable_closed_event([conid])
+   3.7. tcp_get_conid(hostport, pvname)
 
 3.1.  tcp_conid_alive(conid)
 
@@ -292,6 +296,29 @@ event_route[tcp:closed] {
         xlog("connection $conid was closed");
 }
 
+3.7.  tcp_get_conid(hostport, pvname)
+
+   Get the connection id based on target host:port. The connection id is
+   set in the variable named by pvname parameter.
+
+   Meaning of the parameters is as follows:
+     * hostport - target "host:port" address, the port can be ommited
+       (default to 5060) and the parameter can contain variables.
+     * pvname - target variable name.
+
+   Return values:
+
+   1: connection was found
+
+   -1: connection was not found or an error occured
+
+   Example 1.8. tcp_get_conid usage
+...
+        if(tcp_conid_alive("127.0.0.1:5060", "$var(conid)")) {
+                xlog("connection id is: $var(conid)\n");
+        }
+...
+
 4. Event routes
 
    4.1. tcp:closed




More information about the sr-dev mailing list