快速启动asterisk
文档说明:只记录关键地方;
试验环境: linux debian 11
安装asterisk
#!/bin/bash set -eux set -o pipefail # https://www.ruanyifeng.com/blog/2017/11/bash-set.html __DIR__=$(cd "$(dirname "$0")";pwd) cd ${__DIR__} && apt install -y bzip2 wget pigz cmake make gcc g++ gcc git autoconf automake libtool file test -f asterisk-19-current.tar.gz || wget https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-19-current.tar.gz test -f libpri-1.6.0.tar.gz || wget https://downloads.asterisk.org/pub/telephony/libpri/releases/libpri-1.6.0.tar.gz test -f dahdi-linux-complete-3.1.0.tar.gz || wget https://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-3.1.0-rc1+3.1.0-rc1.tar.gz test -f asterisk-19-current.tar.gz && mkdir -p asterisk-19-current && tar -zxvf asterisk-19-current.tar.gz -C ./asterisk-19-current --strip-components 1 test -f libpri-1.6.0.tar.gz && tar -zxvf libpri-1.6.0.tar.gz # 路径里包含 + ;去除 test -f "dahdi-linux-complete-3.1.0-rc1+3.1.0-rc1.tar.gz" && mv "dahdi-linux-complete-3.1.0-rc1+3.1.0-rc1.tar.gz" dahdi-linux-complete-3.1.0.tar.gz test -f dahdi-linux-complete-3.1.0.tar.gz && tar -zxvf dahdi-linux-complete-3.1.0.tar.gz test -d dahdi-linux-complete-3.1.0 && rm -rf dahdi-linux-complete-3.1.0 test -d 'dahdi-linux-complete-3.1.0-rc1+3.1.0-rc1' && mv 'dahdi-linux-complete-3.1.0-rc1+3.1.0-rc1' dahdi-linux-complete-3.1.0 # cpu 核数 make -j 需要 并行编译 cpu_nums=`grep "processor" /proc/cpuinfo | sort -u | wc -l` cd ${__DIR__}/soft/dahdi-linux-complete-3.1.0 # make all -j $cpu_nums && make install && make config cd ${__DIR__}/soft/libpri-1.6.0 make && make install -j $cpu_nums cd ${__DIR__}/soft/asterisk-19-current ls -lha . ./contrib/scripts/install_prereq install ./configure --with-jansson-bundled --with-pjproject-bundled make install -j $cpu_nums make samples make config make install-logrotate make basic-pbx asterisk -cvvvvv
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 提示词工程——AI应用必不可少的技术