[Serdev] TCP connection reuse
John Bildøy
johnb at sipinfo.no
Thu Dec 14 11:26:14 UTC 2006
Works like a charm.
Thx for the feedback.
John
> In SER stable version you are forced to change the define and
> recompile the server to modify the connection lifetime.
>
> New SER version (ottendorf/ 2.0 ;) ) has a new configuration parameter
> so you can modify the TCP behaviour without having to recompile SER:
>
> tcp_connection_lifetime=20
>
>
> Hope it helps,
>
> Samuel.
> 2006/12/14, John Bildøy <johnb at sipinfo.no>:
>> 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
>>
>> _______________________________________________
>> Serdev mailing list
>> Serdev at lists.iptel.org
>> http://lists.iptel.org/mailman/listinfo/serdev
>>
>
More information about the Serdev
mailing list