I'm using a different setup.
Both servers have their own fixed ip-address and both have a virtual ip-address. pacemaker makes sure that when one server is down, its virtual ip is moved to the other node. So this is more a active-active setup.
Enabled ip_nonlocal_bind, set listening to both virtual ip-addresses and forcing the socket based on the incoming ip-address.
I don't know if this is a good solution, didn't find much usefull info on the web, but it works.
mhomed=0 listen=1.2.3.1:5060 # virtual ip-address 1 listen=1.2.3.2:5060 # virtual ip-address 2
route{
if ($Ri == "1.2.3.1") { force_send_socket(1.2.3.1:5060); } else if ($Ri == "1.2.3.2") { force_send_socket(1.2.3.2:5060); }
With kind regards, Robert Verspuy