【ASTERISK】在centos7上安装asterisk 16

2021-01-20  本文已影响0人  安安爸Chris

步骤如下:

  1. 更新yum
sudo yum -y update
  1. 修改hostname
sudo hostnamectl set-hostname asterisk.com
  1. 添加源
sudo yum  -y install epel-release
  1. 修改LINUX配置
sudo setenforce 0
sudo sed -i 's/\(^SELINUX=\).*/\SELINUX=permissive/' /etc/selinux/config
  1. 安装依赖
sudo yum -y install wget vim  net-tools

sudo yum -y groupinstall "Development Tools"

sudo yum -y install libedit-devel sqlite-devel psmisc gmime-devel ncurses-devel libtermcap-devel sox newt-devel libxml2-devel libtiff-devel audiofile-devel gtk2-devel uuid-devel libtool libuuid-devel subversion kernel-devel kernel-devel-$(uname -r) git subversion kernel-devel crontabs cronie cronie-anacron wget vim
  1. 安装Jansson库
git clone https://github.com/akheron/jansson.git
cd jansson
autoreconf  -i
./configure --prefix=/usr/
make && make install

如果不安装master分支,可以切换到指定的分支。 本人选用的是2.11(最低版本要求2.11)

  1. 安装PJSIP库
export VER="2.10"
wget https://github.com/pjsip/pjproject/archive/${VER}.tar.gz
tar -xvf ${VER}.tar.gz
cd pjproject-${VER}
./configure CFLAGS="-DNDEBUG -DPJ_HAS_IPV6=1" --prefix=/usr --libdir=/usr/lib64 --enable-shared --disable-video --disable-sound --disable-opencore-amr
make dep
make
make install
ldconfig

选装srtp

wget https://downloads.sourceforge.net/project/srtp/srtp/1.4.4/srtp-1.4.4.tgz
tar zxvf srtp-1.4.4.tgz
cd srtp
./configure CFLAGS=-fPIC --prefix=/usr
make && make install

8.安装asterisk 16
pjsip之前我们已经单独安装过了,这里可以不需要在附带安装,所以configure时可以把它去掉,
如果需要srtp能力,可以单独安装,并且在configure时加上参数--with-srtp=/root/srtp

wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-16-current.tar.gz
tar xvfz asterisk-16-current.tar.gz
rm -f asterisk-16-current.tar.gz
cd asterisk-*
./configure --libdir=/usr/lib64 --with-pjproject=n

  1. menu
make menuselect
Add-ons
  1. 下载MP3编解码
sudo contrib/scripts/get_mp3_source.sh
  1. 安装
make
make install
make samples
make config
ldconfig

参考 https://computingforgeeks.com/how-to-install-asterisk-16-centos-7-linux/

上一篇下一篇

猜你喜欢

热点阅读