I would like to exclusively use IPv6 on my Asterisk server. Clients will all be Android devices connecting via mobile phone networks that provide IPv6 service.
So, this is the only transport I defined in pjsip.conf
[transport-udp-ipv6]
type=transport
protocol=udp
bind=::
Clients connect successfully and all the SIP traffic goes over IPv6 with no NAT problems etc. So, far so good. When I make a call which should connect to an endpoint on the server - e.g. playing a recorded message, RTP audio from the android device to asterisk goes over IPv6 but RTP audio from asterisk to the android devices goes over IPv4.
I looked at the SIP traffic with wireshark and I can see why this is happening: when the android device requests an INVITE it lists three different candidate IP addresses for receiving RTP audio. The first candidate is a NAT based IPv4 address 192.0.0.N, the second candidate is the native IPv6 address of the device and the third candidate is the IPv4 address of the mobile carrier’s NAT router.
Here’s question 1:
Can I configure asterisk to always choose an IPv6 candidate if there is one, even if it isn’t at the top of the list?
Here’s question 2:
Are there any decent voip apps for android that provide an option to disable or deprecate IPv4? I’m currently using Linphone which allows the user to disable IPv6 but you cannot make it preferred over IPv4.
Is there any other advice that might help me? My general aim is avoid having to deal with NAT and all that IPv4 nonsense. (I have thought of configuring the host computer to have no IPv4 address but that seems a bit extreme.)