[sr-dev] Playing with TCP

Olle E. Johansson oej at edvina.net
Thu Oct 25 17:00:53 CEST 2012


Setup: 

One kamailio behind a NAT, one on public IP.

I register a client using the inside Kamailio as an outbound proxy. It adds a path header and forwards over TCP to the public server. This server saves the registration with the path header and send a response, which reaches the client fine.

Calling from the client to it's own number, the INVITE is sent over the inside proxy to the outside, it looks up the location database then drops the request. It doesn't realize that it has a TCP connection it can reuse open. The error message - a timeout - is sent back over the connection.

In my dream world, the server would reuse the open TCP connection to get back across the NAT. If we can get the response across, we should be able to get a  new request back.

Now, I don't know the inner workings of TCP connection handling here. I guess I should test having the client open a connection directly to the outside proxy and see if that works.

Would it be possible with the current architecture to get Kamailio to reuse an existing TCP connection like this? 

I started digging down the TCP code, but lost attention because of the complexity and fixed speling erors in other parts instead... Will try again.

/O


More information about the sr-dev mailing list