[asterisk-bugs] [JIRA] (ASTERISK-26784) PJSIP Problems with Reinvites when one Endpoint IPv4 and other IPv6
Peter Sokolov (JIRA)
noreply at issues.asterisk.org
Thu Feb 9 16:49:10 CST 2017
Peter Sokolov created ASTERISK-26784:
----------------------------------------
Summary: PJSIP Problems with Reinvites when one Endpoint IPv4 and other IPv6
Key: ASTERISK-26784
URL: https://issues.asterisk.org/jira/browse/ASTERISK-26784
Project: Asterisk
Issue Type: Bug
Security Level: None
Affects Versions: 14.2.1
Reporter: Peter Sokolov
When one endpoint using IPv6 for SIP requests calls another endpoint using IPv4 and both have configured direct_media=yes, Asterisk uses Reinvite to try to establish direct media path between them.
Although this is as far as I know how Asterisk worked since the beginning, I can see problems:
1.
As can be seen in the attached sip.log, Asterisk puts IPv6 address in SDP, but marks it as IP4 instead of IP6:
c=IN IP4 2002:x:x::123
2.
Using IPv4 addresses in the SDP sent to an endpoint using IPv6 for SIP requests and using IPv6 addresses in the SDP sent to an endpoint using IPv4 for SIP requests makes an assumption that the endpoint and all the infrastructure from Asterisk to the endpoint is dual-stack.
However in the real life there is still a huge amount of SIP devices which only have IPv4 connectivity. Even those devices that have IPv6, often have no IPv4 or a very limited IPv4 connectivity, like DS-lite or similar. And finally the firewalls normally have separate IPv4 and IPv6 processing which do not interchange information between them. So SDP with IPv6 address passed through IPv4 SIP connection will normally not open the required ports in the IPv6 part of the firewall. None of the two devices in my example replied to the (re) INVITE request. One is IPv4 only. The other one (dual-stack) either didn't like the IPv4 address in SDP or a firewall on the way to it dropped this INVITE request. Most of these limitations are out of control of the operator of Asterisk and can change, so that we cannot write in pjsip.conf, whether the endpoint and the path to it support different IP version in the SDP than is used for SIP requests.
Because of that in my opinion Asterisk should never try to establish direct media path between endpoints except when all of them used IPv4 for SIP requests or when all of them used IPv6 for SIP requests that established the current call.
I could not find a setting to limit Asterisk to such behavior, so the only way to prevent problems is to set direct_media=no for all endpoints.
If such a setting does not exist yet, it could be a global setting inside pjsip.conf or per endpoint setting like direct_media=yes,no,sameIPversion
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list