Browse code

tcpops: README update

Camille Oudot authored on 20/02/2015 13:27:41
Showing 1 changed files
... ...
@@ -17,11 +17,13 @@ Camille Oudot
17 17
 
18 18
               3.1. tcp_keepalive_enable([conid], idle, count, interval)
19 19
               3.2. tcp_keepalive_disable([conid])
20
+              3.3. set_connection_lifetime([conid], lifetime)
20 21
 
21 22
    List of Examples
22 23
 
23 24
    1.1. tcp_keepalive_enable usage
24 25
    1.2. tcp_keepalive_disable usage
26
+   1.3. set_connection_lifetime usage
25 27
 
26 28
 Chapter 1. Admin Guide
27 29
 
... ...
@@ -33,6 +35,7 @@ Chapter 1. Admin Guide
33 35
 
34 36
         3.1. tcp_keepalive_enable([conid], idle, count, interval)
35 37
         3.2. tcp_keepalive_disable([conid])
38
+        3.3. set_connection_lifetime([conid], lifetime)
36 39
 
37 40
 1. Overview
38 41
 
... ...
@@ -49,6 +52,7 @@ Chapter 1. Admin Guide
49 52
 
50 53
    3.1. tcp_keepalive_enable([conid], idle, count, interval)
51 54
    3.2. tcp_keepalive_disable([conid])
55
+   3.3. set_connection_lifetime([conid], lifetime)
52 56
 
53 57
 3.1.  tcp_keepalive_enable([conid], idle, count, interval)
54 58
 
... ...
@@ -113,3 +117,30 @@ onreply_route {
113 117
         }
114 118
         ...
115 119
 }
120
+
121
+3.3.  set_connection_lifetime([conid], lifetime)
122
+
123
+   Sets the connection lifetime of a connection (TCP).
124
+
125
+   Meaning of the parameters is as follows:
126
+     * conid (optionnal): the kamailio internal connection id on which to
127
+       set the new lifetime. If no parameter is given, it will be set on
128
+       the current message source connection.
129
+     * lifetime (seconds): the new connection lifetime.
130
+
131
+   Retuns 1 on success, -1 on failure.
132
+
133
+   Example 1.3. set_connection_lifetime usage
134
+...
135
+# use 10s as default lifetime
136
+tcp_connection_lifetime=10
137
+...
138
+
139
+request_route {
140
+        ...
141
+        if (is_method("REGISTER") && pv_www_authenticate("$td", "xxx", "0")) {
142
+                # raise the TCP lifetime to a bigger value
143
+                set_connection_lifetime("3605");
144
+        }
145
+        ...
146
+}