Open Source - How do I correct the error "Command 'module load codec_g729a.so' failed"?

Open Source - How do I correct the error "Command 'module load codec_g729a.so' failed"?

If after runningasterisk -rx "module load codec_g729a.so" you see the following error:

Unable to load module codec_g729a.so
Command 'module load codec_g729a.so' failed.

 

You may need to change the ownership of the codec_g729a.so file located in /usr/lib/asterisk/modulesor for 64 bit systems/usr/lib64/asterisk/modulesto match the user asterisk runs as on your system.

To determine what user asterisk runs as, execute the following command at the linux CLI:

ps aux | grep -i asterisk

 

This should give an output showing the user and group that asterisk belongs to as shown below:

user:group

 

To change the g729a_codec.so module to match the same user and group as asterisk execute thechowncommand at the linux CLI. If you are runningchownfrom the directory that codec_g729a.so was copied to this command will work.

chown user:group codec_g729a.so 

 

If you are not in the same directory you can run the command by adding the location of codec_g729a.as seen below.

chown user:group /usr/lib64/asterisk/modules/codec_g729a.so

 

Make sure to use the output fromps aux | grep -i asterisk to replace the values inuser:group for the two previous commands.

Now run

asterisk -rx "module load codec_g729a.so" 

again and the module should load

you can check this in the asterisk CLI as well by typingG729 show licenses. You should see an output showing your:

  • Host-ID

  • License key number

  • The amount of channels your license key provides.