[SR-Users] Problem on multiple interfaces and conversion between UDP and TCP

David sip-router.org at spam.lublink.net
Wed Mar 16 15:06:14 CET 2011


Hello,

I have a Kamailio 3.0 server with two interfaces. 192.168.x.x and a 
public interface.

I send PUBLISH out on the private interface to my presence server.

Everything else happens on the public address.

I did not use the "listen=" option in the config, so Kamailio was 
automatically detecting my interfaces to bind to.

Last night I had a provider sending packets in on TCP and Kamailio was 
sending out on UDP. Unfortunately, it kept using the private interface 
despite that the IP was unreachable on this interface.

It looks like Kamailio uses the first interface it finds when converting 
between TCP and UDP, and I believe that on the server, the private 
interface was being listed first.

I finally added listen= in kamailio with all 4 interfaces ( tcp/udp 
public and tcp/udp private ). I listed the public UDP interface first, 
restarted and the packets started going out on the public interface.

Is this a feature or a bug ?

How does Kamailio decide which interface to use ? What if I sent a 
packet to an IP that is only reachable on one interface?

At the very least, I think that a note about this difficulty should be 
included in the default config so that future users don't have the same 
issue I did.

Thanks,

David



More information about the sr-users mailing list