Simon, Jamey,
Linphone only uses one socket (UDPv6:5060) to listen for incoming IPv4
and IPv6 requests.
This 'works' because when an IPv4 packet is received, it is seen by
the system as an IPv4-mapped IPv6 address. This is were it gets
complicated... The SIP session still works fine so, the RTP socket is
opened (UDPv6:7078). But the sendto/recvfrom are done with the address
taken from the SIP exchange which was an IPv4 address... you see the
picture? Internally the packets receive on the RTP socket are seen as
having an IPv6 address (something like 0:0:0:0:0:FFFF:192.168.1.1)
which really do not match the parameter given to sendto/recvfrom... so
that the RTP session do not work.
2 fixes are possible for this situation:
1- Add logic to deal with IPv4-mapped addresses
2- Open 2 SIP sockets (one V4 and one V6)
Solution '2' is usually seen as better and is more portable because
the default behavior in Kame (BSD) is to disable IPv4-mapped addresses
support (V6 only socket option) on IPv6 socket.