Yes. I do exactly this but with an extra step:

1.  I have the default Kamailio dispatcher pings disabled. 

2. I have the Kamailio init route check if we have the floating IP locally, if we do in startup that route will run the rpc cmd to enable pings. 

3. On floating IP switchover, keepalived (or whatever) tells Kamailio also to enable pings. 


This way, you only have pings from the active node, and you don’t have warnings in the passive node. (and yes, I also set the socket to the floating IP in the dispatcher records). 

Cheers,
Joel. 





On Tue, Oct 20, 2020 at 03:40 Yufei Tao <yufei.tao@gmail.com> wrote:
Hi Duarte,

Not sure if I understand it correctly but are you trying to set up an HA pair of dispatchers?

If so I am doing it differently in that, I use the Virtual/floating IP (VIP) as socket. This way the master node (which has got the VIP) can send OPTIONs pings out fine but the backup node won't be able to send. Functionally it is fine, but the backup node keeps logging errors because it doesn't have the VIP:
ERROR: <core> [core/udp_server.c:599]: udp_send(): sendto(sock, buf: 0x7f0e6b54e2e0, len: 372, 0, dst: (192.168.213.143:5060), tolen: 16) - err: Network is unreachable (101)
ERROR: tm [../../core/forward.h:231]: msg_send_buffer(): udp_send failed
When FO happens, the backup node becomes master and takes the VIP, and it functions correctly. But I haven't worked out how to avoid the ERROR loggings on the backup node. Maybe someone else has any better ideas/suggestions?

Cheers,
Yufei

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users