呼叫效果
一、Asterisk20编译和环境搭建
1.1、启动debain容器
docker run --name as --network host -t -d debian:bullseye
1.2.进入到容器
docker exec -it as bash
1.3、设置apt源
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free" >> /etc/apt/sources.list
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free" >> /etc/apt/sources.list
cat /etc/apt/sources.list
apt update
1.4、安装依赖环境:
apt install vim wget -y
apt-get install build-essential libssl-dev libncurses5-dev libnewt-dev libxml2-dev linux-headers-$(uname -r) libsqlite3-dev uuid-dev
apt-get install gcc g++ make
apt install openssl=1.1.1*
apt-get install libcurl4-gnutls-dev ncurses-dev libssl-dev zlib1g-dev
apt-get install autotools-dev unixodbc-dev libltdl3-dev
apt-get install autotools-dev libltdl3-dev
apt-get install tdsodbc
apt-get install unixodbc
apt install python2.7
apt-get install libedit-dev
apt-get install uuid-dev
apt-get install libjansson-dev
apt-get install libxml2-dev
apt-get install libsqlite3-dev
apt-get install libmariadb-dev
apt install procps
apt install libopus-dev
apt install libcurl4
apt install libsrtp2-dev
apt install libmariadb-dev-compat
apt-get install xmlstarlet
apt install sngrep
1.5、下载源码
1.5.1下载asterisk源码
Index of /pub/telephony/asterisk/
网页下面的:
https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20.6.0.tar.gz
1.5.2 *下载pjproject:
手动下载
的pjproject-2.13.1.tar.bz2
放入到 /tmp/下面,不然./configure 会一直失败。
1.5.3 下载res_srtp源代码
下载在/usr/local/src/
wget Download srtp-1.4.4.tgz (libsrtp)
tar -xvf srtp-1.4.4.tgz
进入 srtp目录
执行配置
./configure
make && make install
1.6检查依赖:
./configure --with-opus --with-res_srtp
出现这个就意味着成功了
make menuselect
1.7、编译
make
这样编译成功
1.8 安装
make install
1.9 安装配置
make samples