Hi Folks
We use two 'core' instances and two 'registrar' instances.
The pairs sync their information (Dialogues + Locations) via DMQ.
But I noticed that they record the Via and Record-Routes by IP addresses. So I guess if one fails, signaling would not automatically switch to the remaining host as the IP of the failed one is in the header, right?
So, is there a way to put a DNS resolvable host-name in the Via and Record-Route header, so that DNS round-robin would make sure requests reach the available server if one of the pairs fails?
Mit freundlichen Grüssen
-Benoît Panizzon-
Hi Rick
Add the fqdn as the alias after the listen.
listen=tcp:127.0.0.1:5060 advertise "sip.dns.example.com":5060
Thank you for pointing me the right direction.
I just also read: http://www.kamailio.org/wiki/cookbooks/devel/core#listen
But I don't get the hostname added.
I attempted (x.x.x.x of course with real IP and real domain names)
listen = udp:x.x.x.x:5060 advertise "sip.dns.example.com":5060
=> x.x.x.x is put in Via and Record-Route header.
listen = udp:x.x.x.x:5060 advertise "sip.dns.example.com"; # as per cookbook, without port
=> x.x.x.x is put in Via and Record-Route header.
listen = udp:x.x.x.x:5060 advertise 11.11.11.11:5060; # as per cookbook
=> 11.11.11.11 is put in Via and Record-Route header.
So this does not seem to take a hostname as parameter. Am I missing something? Like could an alias= line cause this not to work?
Mit freundlichen Grüssen
-Benoît Panizzon-
Hi Rick
A quick update. Now it works. I guess the newly added DNS hostname was not yet fully propagated to all DNS caches.
Mit freundlichen Grüssen
-Benoît Panizzon-
Hello World and Rick
A quick update. Now it works. I guess the newly added DNS hostname was not yet fully propagated to all DNS caches.
I start doubting, this was a clever idea...
I wonder what solutions other have come up to.
After some testing I noticed: SIP ALG on NAT devices do work by IP, not by hostname. So getting traffic from the kamailio instance they were not talking too before (or did not register to) breaks on NAT situations.
Also SBC do not seem to respect the Via header and always sending traffic back to the IP it received traffic from.
How do other build redundant, high available platforms with kamailio avoiding those pitfalls?
Mit freundlichen Grüssen
-Benoît Panizzon-
Hello,
yes, User Agents or ALGs can make this approach difficult unfortunately.
If you can handle it technically and also from a complexity point of view, an IP anycast setup could be used. Some people use that, especially for larger platforms. The usual IP failover approach can be also used for smaller platforms.
Cheers,
Henning