[Home]

Summary:ASTERISK-26625: All PJSIP calls rejected with 'Unable to allocate RTP socket: Address family not supported by protocol'
Reporter:Alexei Gradinari (alexei gradinari)Labels:
Date Opened:2016-11-25 12:27:22.000-0600Date Closed:2016-11-28 06:11:00.000-0600
Priority:CriticalRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip_sdp_rtp
Versions:13.13.0 Frequency of
Occurrence
Related
Issues:
duplicatesASTERISK-26617 res_rtp_asterisk: Can't bind on systems without IPv6
Environment:Linux 4.8.3 # CONFIG_IPV6 is not setAttachments:
Description:If the IPV6 is not supported the asterisk rejects all PJSIP calls with next errors:
{noformat}
WARNING[28163] res_rtp_asterisk.c: Unable to allocate RTP socket: Address family not supported by protocol
WARNING[28163] res_rtp_asterisk.c: Failed to create a new socket for RTP instance '0x3cfb060'
ERROR[28163] res_pjsip_sdp_rtp.c: Unable to create RTP instance using RTP engine 'asterisk'
{noformat}

The endpoint is configured with
{noformat}
bind_rtp_to_media_address          : false
media_address                      :
{noformat}

It's because the res_pjsip_sdp_rtp.c on load_module set default address to "::" which is the IPV6 address, then in a create_rtp a function 'ast_rtp_instance_new' is called with this IPV6 address.

The function ast_rtp_new in res_rtp_asterisk.c checks sockaddr type and calls a function create_new_socket with a domain AF_INET6.
The function create_new_socket calls socket with domain AF_INET6,
as the IPV6 is not supported by the system, we got "Address family not supported by protocol"
Comments:By: Asterisk Team (asteriskteam) 2016-11-25 12:27:22.498-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].