Pjsip Rtp_ipv6=yes But Endpoint Registered Via Ipv4 (IP4 Contact Infor)
Dear List
I fear I stumbled over a bug in asterisk 13.14.1.
My ‘phones’ are roaming around, sometimes some are connecting from ipv6
enabled networks, another time they are not.
If a connection is ipv6 I would prefer to use ipv6 to avoid ipv4-nat problems.
I have not specified a transport in the endpoint section, so that the appropriate transport which corresponds to the registration can be used.
Now I have noticed, if an phone is registered from an ipv4 only endpoint and is performing an outgoing call, my asterisk server is answering with an IP4 RTP IPv6 address:
Example:
<--- Received SIP request (1235 bytes) from UDP:157.161.4.172:5060 --->
[…]
v=0
o=MxSIP 0 20 IN IP4 157.161.4.172
s=SIP Call c=IN IP4 157.161.4.172
t=0 0
m=audio 6018 RTP/AVP 9 8 97 91 101
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:97 CLEARMODE/8000
a=rtpmap:91 X-CLEAR-CHANNEL/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
<--- Transmitting SIP response (914 bytes) to UDP:157.161.4.172:5060
--->
[…]
v=0
o=- 0 22 IN IP4 2001:4060:dead:beef::1
s=Asterisk c=IN IP4 2001:4060:dead:beef::1
t=0 0
m=audio 16172 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
Errr… how should my client @ 157.161.4.172 send udp to
2001:4060:dead:beef::1?
Also when I compare with a real IPv6 client I notice from the client:
c=IN IP6 2001:4060:1:4133:204:13ff:fe30:2a80
from the Asterisk:
c=IN IP4 2001:4060:dead:beef::1
Shouldn’t that also be IP6 from the asterisk?
Mit freundlichen Grüssen
-Benoît Panizzon-
—
I m p r o W a r e A G – Leiter Commerce Kunden
3 thoughts on - Pjsip Rtp_ipv6=yes But Endpoint Registered Via Ipv4 (IP4 Contact Infor)
The rtp_ipv6 option is not needed, in current versions things will automatically be updated to reflect the signaling. Remove it and give it a try. The option itself actually had the bug that you are seeing.
Hi Jushua
Ok, commented out rtp_ipv6 in the config and did try again:
IPv6 Registered client.
c=IN IP6 2001:4060:1:4133:204:13ff:fe30:2a80
Reply from *
c=IN IP6 2001:4060:dead:beef::1
IPv4 registered client:
c=IN IP4 157.161.4.172
Reply from *
c=IN IP4 157.161.57.1
Perfect! It didn’t occur to me to completely comment out that option as I believed it was needed for rtp to work over ipv6.
Thank you for that exceptional quick help.
Mit freundlichen Grüssen
-Benoît Panizzon-
—
I m p r o W a r e A G – Leiter Commerce Kunden
It used to be required but as part of Asterisk 14 work was done in DNS land (failover to different targets, including between IPv6 and IPv4) and based on discussions I had with other people at SIPit I made it automatic so that media family = signaling family. To keep things better in line and to provide a better experience the change was also done in Asterisk 13.