Open Source - G.729 Software Codec Does Not Load
If Asterisk fails to load the G.729 software codec, the following message should be visible on the CLI and in the log (if logging is enabled):
WARNING[nnnn] loader.c: Module 'codec_g729a.so' could not be loaded.
This line may be preceded by another line detailing the cause of the failure.
Common causes:
The installed binary codec file may have been built for a different CPU architecture. This is indicated by the following message:
WARNING[nnnn]: loader.c:387 load_dynamic_module: Error loading module 'codec_g729a.so': /usr/lib/asterisk/modules/codec_g729a.so: wrong ELF class: ELFCLASSXX
"ELFCLASSXX" may be either ELFCLASS32 or ELFCLASS64, indicating a 32- or 64-bit codec implementation, respectively.
Solution: Install the G.729 codec build matching that of the Asterisk installation.
SELinux may prevent the G.729 codec from loading. This is indicated by the following message:
WARNING[nnnn] loader.c: Error loading module 'codec_g729a.so': /usr/lib/asterisk/modules/codec_g729a.so: cannot restore segment prot after reloc: Permission denied
Solution: Update the security context for the codec file via the following command (must be issued as root):
chcon -t texrel_shlib_t -v /usr/lib/asterisk/modules/codec_g729a.so