[Asterisk-Dev] [Bounty] IPv6 support in Asterisk

David Woodhouse dwmw2 at infradead.org
Tue May 31 03:46:01 MST 2005


On Tue, 2005-05-31 at 08:25 +0200, Olle E. Johansson wrote:
> This issue is interesting. There are some scenarios that I don't know if
> they have been addressed in the SIP community:
> 
> I have IPv4, you have IPv6/v4 with dual stacks. My Asterisk queries DNS
> in IPv4,
> gets an IPv6 address in the first SRV record, IPv4 in the next. (You
> have a IPv6/ipv4 proxy/gw somewhere)
> Asterisk will only read the first (another bug) and fail since I haven't
> got IPv6.
> -- If we fix the SRV record issues, we should propably use the second
> one in this case, so we need to be protocol aware.

There should be a single SRV record, it will point to a hostname with
both A and AAAA records. Using getaddrinfo() on that hostname will
return the IPv4 address _first_ because you don't have a global IPv6
address.

> I have IPv4, you have only IPv6. My Asterisk queries DNS in IPv4, gets
> an IPv4 answer with an IPv6 address as the first and only SRV record.
> The call will fail.
> -- Is there a standard way of using an IPv4 to IPv6 proxy/gw in this case?

Why proxy? Anyone with a public IPv4 address automatically gets 2^96
IPv6 addresses too. See http://linux.yyz.us/ipv6-fc2-howto.html (which
also has links to non-Fedora information).

Given a host with a public IPv4 address, it's trivial to set up IPv6 for
that host or even for whole subnets attached to it.

> -- Can Asterisk be that gw?

There's no need. Even Windows can do 6to4 these days, if you're silly
enough to actually have a Windows box which is on the Internet directly.

> I have IPv6, you have IPv6 - both have dual stacks.
> I call you, get SRV records with IPv4 and IPv6. Asterisk only reads the
> IPv4 (first one ) and sets up the call on IPv4.
> -- If we fix the SRV record problem - how should we prioritize, or
> should we at all?

Again, using getaddrinfo() correctly fixes this.

-- 
dwmw2




More information about the asterisk-dev mailing list