I was recently working on a problem with connecting to ipv4 services
on ipv6 enabled hosts. I made a resolution for it but need some ipv6
and sip expert opinion on it.
can be easily seen on Linux with java.net.preferIPv6Addresses=true.
Recently a new default value was set to most Linux distributions
net.inet6.ip6.v6only=1, bind ipv6 only.
So when you try to connect to ipv4 service which has ipv6 DNS records
our behaviour is to try only using ipv6 address and at the end it
our SipRegistrarConnection gets a single address to connect to, but
I've made it to take an array of addresses and after the first timeout
it tries the second address and so on. The addresses we pass are
ordered - first the SRV records if any, after that AAAA or A records
who is first depends on the value of the system property
This way we order the connect to hosts and don't rely on the OS behaviour.
I made similar thing and to jabber protocol provider to solve the same
Anybody to test or comment it is welcome
reconnect_patch_sip.diff (16.9 KB)