Created
March 26, 2017 19:14
-
-
Save troykelly/4f551017fcdb6285ad9f2e6a456348c2 to your computer and use it in GitHub Desktop.
Install free G729 and G723 codec on FreePBX running Asterisk 14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# 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 | |
# Install g723.1 codec | |
rm /usr/lib64/asterisk/modules/codec_g723.so | |
wget http://asterisk.hosting.lv/bin/codec_g723-ast140-gcc4-glibc-x86_64-core2-sse4.so | |
cp codec_g723-ast140-gcc4-glibc-x86_64-core2-sse4.so /usr/lib64/asterisk/modules/codec_g723.so | |
chmod +x /usr/lib64/asterisk/modules/codec_g723.so | |
# Install g729 codec | |
rm /usr/lib64/asterisk/modules/codec_g729.so | |
wget http://asterisk.hosting.lv/bin/codec_g729-ast140-gcc4-glibc-x86_64-core2-sse4.so | |
cp codec_g729-ast140-gcc4-glibc-x86_64-core2-sse4.so /usr/lib64/asterisk/modules/codec_g729.so | |
chmod +x /usr/lib64/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