Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save worldadventurer/c80e4d051937db887b40f3ab0084ce06 to your computer and use it in GitHub Desktop.
Save worldadventurer/c80e4d051937db887b40f3ab0084ce06 to your computer and use it in GitHub Desktop.
FreePBX Asterisk 13 install g729 & g723.1 codecs - open source versions
# This is for x64 Intel CPU with SSSE4 instructions
# To check your CPU type, run: cat /proc/cpuinfo and look for "sse4_1" in the "flags" line then this script works
# To check x32 vs x64, run: getconf LONG_BIT
# If your CPU isnt an x64 or have sse4 support, then get your .so file version at: http://asterisk.hosting.lv/
# Tested on Centos x64 - on a FreePBX Distro 13 x64
echo -------
echo This installs the open source version of the g729 and g723.1 codecs
echo You may need to buy licenses to use these codecs - it is your responsibility.
echo -------
read -rsp $'Press any key to continue OR CTRL-c to QUIT ...\n' -n1 key
cd
# Install g723.1 codec
axel -n 8 http://asterisk.hosting.lv/bin/codec_g723-ast130-gcc4-glibc2.2-x86_64-core2-sse4.so
cp codec_g723-ast130-gcc4-glibc2.2-x86_64-core2-sse4.so /usr/lib64/asterisk/modules/codec_g723.so
#cp codec_g723-ast130-gcc4-glibc2.2-x86_64-core2-sse4.so /usr/lib/asterisk/modules/codec_g723.so
# Install g729 codec
axel -n 8 http://asterisk.hosting.lv/bin/codec_g729-ast130-gcc4-glibc2.2-x86_64-core2-sse4.so
cp codec_g729-ast130-gcc4-glibc2.2-x86_64-core2-sse4.so /usr/lib64/asterisk/modules/codec_g729.so
#cp codec_g729-ast130-gcc4-glibc2.2-x86_64-core2-sse4.so /usr/lib/asterisk/modules/codec_g729.so
echo Restarting Asterisk server
service asterisk restart
echo Checking Asterisk transcoding support - waiting for Asterisk to finish restarting:
sleep 5
asterisk -rx 'core show translation'
echo -------
echo If you see g723 and g729 above then both installed succesfully. Otherwise check the Asterisk logs.
echo -------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment