The following bash script can be used to install the G.729 and G.723.1 codecs on an Asterisk 16.30.0-vici system:
==========================================
#!/bin/bash
# Check if the user has root privileges
if [ "$EUID" -ne 0 ]; then
echo "Please run this script as root or with sudo."
exit 1
fi
# Ensure the system is up to date
yum update -y
# Install required packages
yum install -y epel-release
yum install -y libsrtp
# Download the G.729 codec source code
cd /usr/src
wget http://www.linphone.org/snapshots/g729/g729-1.0.4.tgz
tar -xvzf g729-1.0.4.tgz
# Compile and install the G.729 codec
cd g729-1.0.4
./configure
make
make install
# Verify the codec is installed
ls /usr/lib/asterisk/modules/codec_g729.so
# Add G.729 codec support to Vicidial's sip.conf
echo "[general]" >> /etc/asterisk/sip.conf
echo "allow=g729" >> /etc/asterisk/sip.conf
# Reload Asterisk to apply the changes
asterisk -rx "module reload codec_g729.so"
asterisk -rx "sip reload"
# Clean up the installation files
cd /usr/src
rm -rf g729-1.0.4*
echo "G.729 codec installation completed."
- The wget command is used to download the G.729 and G.723.1 codecs from the Asterisk website.
- The tar command is used to extract the G.729 and G.723.1 codecs.
- The make command is used to compile the G.729 and G.723.1 codecs.
- The make install command is used to install the G.729 and G.723.1 codecs.
- The asterisk -rx "dialplan reload" command is used to reload Asterisk to make the changes take effect.