[SR-Users] Active/active keepalived - Kamailio includes non-local virtual IP in "myself" which breaks DMQ call routing

Rhys Hanrahan rhys at nexusone.com.au
Tue Dec 14 05:50:28 CET 2021


Hi Everyone,

I have Kamailio acting as a registrar, using DMQ to replicate usrloc between nodes. I’m relaying INVITEs to the home registrar, but skipping this if (uri == myself) is true.

In my lab I just setup my SBCs in an active/active mode, similar to the link below. So I have 2x VIPs and both SBCs listen on both, but the first VIP is only master on SBC01 and the second VIP is only master on SBC02.
https://docs.nginx.com/nginx/admin-guide/high-availability/ha-keepalived-nodes/

My issue is that now “myself” will always return true even if the virtual IP is actually not active on this node at the moment, so the invite is never relayed properly if it’s on another node. I guess “myself” is just blindly looking at the list of Ips that are configured with either listen= or alias= and doesn’t care if the IP actually exists on the server at the time, or not?

I am thinking I may have to ditch relying on “myself” entirely and come up with some other way of checking for local requests, but I am wondering if there’s a good way of approaching this? I was thinking of perhaps triggering an add/remove of listen directives (or something) when a failover of a VIP happens, though this seems kind of heavy handed. Hoping there is a better way.

Has anyone else tried doing active/active Kamailio instances like this?

Thanks!

Rhys Hanrahan | Chief Information Officer
e: rhys at nexusone.com.au<mailto:rhys at nexusone.com.au>

[www.nexusone.com.au]<http://www.nexusone.com.au/>   [signature_132622389] <http://www.fusiontech.com.au/>

NEXUS ONE | FUSION TECHNOLOGY SOLUTIONS
p: 1800 NEXUS1 (1800 639 871) or 1800 565 845 | a: Suite 12.03 Level 12, 227 Elizabeth Street, Sydney NSW 2000
www.nexusone.com.au<http://www.nexusone.com.au/> | www.fusiontech.com.au<http://www.fusiontech.com.au/>

The information in this email and any accompanying attachments may contain; a. Confidential information of Fusion Technology Solutions Pty Ltd, Nexus One Pty Ltd or third parties; b. Legally privileged information of Fusion Technology Solutions Pty Ltd, Nexus One Pty Ltd or third parties; and or c. Copyright material Fusion Technology Solutions Pty Ltd, Nexus One Pty Ltd or third parties. If you have received this email in error, please notify the sender immediately and delete this message. Fusion Technology Solutions Pty Ltd, Nexus One Pty Ltd does not accept any responsibility for loss or damage arising from the use or distribution of this email.

Please consider the environment before printing this email.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20211214/57ef8f98/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 13849 bytes
Desc: image001.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20211214/57ef8f98/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 9101 bytes
Desc: image002.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20211214/57ef8f98/attachment-0001.png>


More information about the sr-users mailing list