apt update && apt upgrade
apt install gcc g++ make patch libedit-dev uuid-dev libxml2-dev libsqlite3-dev libssl-dev
cd /usr/src/ && wget https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-18-current.tar.gz
tar -xzf asterisk-18.*
cd asterisk-18.*
# contrib 可选
# 拉取 res_mp3 源码
# contrib/scripts/get_mp3_source.sh
# contrib/scripts/install_prereq install
./configure --with-jansson-bundled
make menuselect
make && make all && make install
# 可选
make samples
make progdocs
# init 脚本
make config
systemctl start asterisk
systemctl enable asterisk
asterisk -rvvv