[Serdev] TCP connection reuse

John Bildøy johnb at sipinfo.no
Thu Dec 14 09:26:15 UTC 2006


Hi,

I'm currently using SER 0.10 (Ottendorf) for SIP/TCP transport.

In my configuration I added the line tcp_accept_aliases=yes, to reuse tcp
connections from UA to the proxy.

---ser.cfg---------
tcp_accept_aliases=yes
                if (method=="REGISTER") {
                        force_tcp_alias();
                };

-------------------

This works until a UA reboots/re-registers using a new TCP connection.
Until the first TCP connection times out at SER (~120 seconds), SER will
not re-use the second TCP connection. My work around for this, is to
reduce the TCP connection timeout to ~20 seconds at SER.

----My patch------

Index: tcp_conn.h
===================================================================
RCS file: /cvsroot/ser/sip_router/tcp_conn.h,v
retrieving revision 1.29
diff -u -1 -r1.29 tcp_conn.h
--- tcp_conn.h        2 Nov 2006 22:55:56 -0000        1.29
+++ tcp_conn.h        11 Dec 2006 07:53:22 -0000
@@ -48,3 +48,3 @@
 #define TCP_BUF_SIZE        4096
-#define DEFAULT_TCP_CONNECTION_LIFETIME 120 /* in  seconds */
+#define DEFAULT_TCP_CONNECTION_LIFETIME 20 /* in  seconds */
 #define DEFAULT_TCP_SEND_TIMEOUT 10 /* if a send can't write for more
then 10s,

--------------------

Does anyone have any experience using SIP/TCP with SER and made any other
solutions for this issue?


Regards,
John Bildøy



More information about the Serdev mailing list