toly wrote:
Thank you guys for clearing it out.
On the tcp transport question: When softphone registers, does openser opens blocking connection and keeps it up to the duration of the registration? If so would proxy run out of the connections pretty soon?
Kamailio keeps up TCP conenctions until either: - the client closes it (a client behind NAT/FW should never close the TCP connection) - the TCP connection times out. Therefore are two parameters to configure this behavior:
- the default timeout is configured with tcp_connection_lifetime http://www.kamailio.net/dokuwiki/doku.php/core-cookbook:1.4.x#tcp_connection...
- tcp_persistent_flag of registrar modul http://www.kamailio.net/docs/modules/1.4.x/registrar.html#id2453000
Kamailio opens the TCP socket "blocking". This means the writing into to socket blocks until the data is successfully sent or an error happens. In times were no data is sent via TCP, the processes are of course free to do other things. Thus, you can handle hundreds of TCP clients with 1 tcp children. But if one of the clients died, and Kamailio tries to send to this client, then thc TCP process is waiting for the tcp_send_timeout. If that happens, and there are no other TCP processes left, then Kamailio itself blocks completely. (if the message was received via UDP and then forwarded via TCP and this TCP connection fails, then the corresponding UDP process which handled the message blocks).
regards klaus