TCP is gaining ground as a transport protocol for SIP. The limitations on the size of the UDP packet are creating challenges for applications, such as presence. Additionally, when a request traverses a large number of proxies with big SIP headers and SDP content, it is not uncommon to have overflows. To enable TCP on OpenSIPS is fairly straightforward; however, it is important to pay some attention to a few details.
TCP is now a module, so to enable TCP for use with OpenSIPS, use the following command:
loadmoduleproto_tcp.so
There are a few module parameters for TCP that deserve mention:
modparam("proto_tcp", "tcp_async", 0)
The preceding parameter sets OpenSIPS to handle the TCP connection asynchronously. The default setting is 1
(enabled). Handling the TCP connection asynchronously is key to have a good performance on SIP over TCP.
You can also define the number of child process for TCP using the following parameter:
tcp_children=4
TCP is a session-oriented protocol...