I've searched through the sr users list and found a few discussions on this count.
So the way (as I think) that is more relevant for kamailio failover, is solution with DNS: NAPTR -> SRV records.
Like:
NAPTR record:
SRV records:
A records:
"kamailio1 IN A 10.0.0.1"
"kamailio2 IN A 10.0.0.2"
And I can't add to rr
sip.domain.org, because every new request (whatever it is initial or indialog) will be sent to one of the kamailio servers, but I need to send in-dialog requests to the same kamailio.
So for the goal of failover, I need to have more A records, like:
"kamailio1 IN A 10.0.0.1"
"kamailio1 IN A 10.0.0.2"
"kamailio2 IN A 10.0.0.2"
"kamailio2 IN A 10.0.0.1"
And in case when kamailio 1 goes down, uac will have two ip dst to send request: 10.0.0.1 and 10.0.0.2 (where indeed second one is kamailio2).
So as result I will have one database for userlocation and dialog module, and loadbalancing based on SRV priority/weight fields.
And as failover, A records, that give possibility to send requests first to 10.0.0.1 and second to 10.0.0.2 (if rr was bind to kamailio1).
And otherwise, if rr was defined as kamailio2, first request tries to achive kamailio1 and then kamailio2.
Am I right at this point?