[SR-Users] Kamailio, Keepalived: Kamailio doesn't respond on virtual IP but real IP
Dmitry Davletbaev
ddo at mgn.ru
Wed Nov 13 06:05:22 CET 2013
Здравствуйте!
12.11 11:23, Nguyễn Đức Vinh написал(а):
> Hi all
> I want to setup IP failover for Kamailio:
> I have 2 hosts A (IP: X.X.X.32) and B (X.X.X.36), with 2 running
> kamailios.
> Using Keepalive to setup IP failover as , virtual IP is X.X.X.43.
> On host A, kamailio was binded to listen=udp:[1]0.0.0.0:5060 and host A
> is MASTER with virtual IP
> Problem is: Client send REGISTER to X.X.X.43:5060. It recieved 401
> respond from X.X.X.32:5060 (actual IP of A), not as expected from
> X.X.X.43:5060
> (To check if keepalived setting OK or not, I have nc -l 5060 on host A,
> and using nc X.X.X.43 5060 on client, wireshark show that responds is
> from X.X.X.43 -> keepalived work OK
> Is there any difference between kamailio and nc cause they both bind to
> 0.0.0.0, but repond on differ IP?В
> Thanks
> Vinh Nguyen
Do not use "listen=0.0.0.0", because in this case Kamailio inserts this IP
address (0.0.0.0) in proxy related SIP headers, which turns into errors from
UAC. This behaviour seems like a bug. It would be interesting to see response
from developers.
Just use "listen=X.X.X.X", where X.X.X.X is IP address you want Kamailio to
listen on.
--
Dmitry Davletbaev
More information about the sr-users
mailing list