Asterisk RTP Stack fails to load with 15.4.0

Using Asterisk 15.4.0 instead of 15.3.0, res_rtp_asterisk.so fails to load, resulting in outgoing calls failing:

root@FreePBX:~# asterisk -rvvv
Asterisk 15.4.0, Copyright (C) 1999 - 2016, Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 15.4.0 currently running on FreePBX (pid = 1103)
[2018-05-06 20:22:03] ERROR[1169][C-00000003]: rtp_engine.c:447 ast_rtp_instance_new: No RTP engine was found. Do you have one loaded?
[2018-05-06 20:22:03] NOTICE[1169][C-00000003]: chan_sip.c:26419 handle_request_invite: Failed to authenticate device <sip:12@192.168.1.117>;tag=SP2fd6fbbc49ffb93fc

FreePBX*CLI> module show like rtp
Module                         Description                              Use Count  Status      Support Level
bridge_native_rtp.so           Native RTP bridging module               0          Running              core
chan_rtp.so                    RTP Media Channel                        0          Running              core
res_rtp_multicast.so           Multicast RTP Engine                     0          Running              core
res_srtp.so                    Secure RTP (SRTP)                        0          Running              core
4 modules loaded

Attempts to manually load res_rtp_asterisk.so fail:

FreePBX*CLI> module load res_rtp_asterisk.so
Unable to load module res_rtp_asterisk.so
Command 'module load res_rtp_asterisk.so' failed.
[2018-05-06 20:25:01] WARNING[12458]: loader.c:577 load_dlopen: Error loading module 'res_rtp_asterisk.so': /usr/lib/asterisk/modules/res_rtp_asterisk.so: undefined symbol: ast_pjproject_caching_pool_destroy
[2018-05-06 20:25:01] WARNING[12458]: loader.c:1176 load_resource: Module 'res_rtp_asterisk.so' could not be loaded.

Is this a bug or do I need to make a change when using Asterisk 15.4.0 instead of 15.3.0?

You need to ensure the res_pjproject.so module is also loaded, as it provides ICE/STUN/TURN functionality.

Loading res_pjproject.so allows res_rtp_asterisk.so to load (res_pjproject.so is unhappy that pjproject.conf is not present, but creating an empty pjproject.conf appears to suffice).

Upon looking at modules.conf, I found that res_pjproject.so was set to noload. Removing the entry (and creating an empty pjproject.conf) appears to have corrected the problem.

Thanks!

Excellent! Thanks for this guys!

It fixed …

ERROR[2322][C-00000021] rtp_engine.c: No RTP engine was found. Do you have one loaded?
Error loading module ‘res_rtp_asterisk.so’