1、准备环境
- Debian 10.10
- 自2022年3月11日起,通过源编译源码安装signalwire,Signalwire账号登录配置TOKEN
参考:https://freeswitch.org/confluence/display/FREESWITCH/HOWTO+Create+a+SignalWire+Personal+Access+Token
2、安装依赖
apt-get update -y
apt-get install -y sngrep vim gnupg2 wget lsb-release
# pat_1X8EQXH6EvgajWaBVWSJCG51 是在Signalwire网站上注册账号配置的TOKEN
wget --http-user=signalwire --http-password=pat_1X8EQXH6EvgajWaBVWSJCG51 -O /usr/share/keyrings/signalwire-freeswitch-repo.gpg https://freeswitch.signalwire.com/repo/deb/debian-release/signalwire-freeswitch-repo.gpg
echo "machine freeswitch.signalwire.com login signalwire password pat_1X8EQXH6EvgajWaBVWSJCG51" > /etc/apt/auth.conf
echo "deb [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ `lsb_release -sc` main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb-src [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ `lsb_release -sc` main" >> /etc/apt/sources.list.d/freeswitch.list
# Install dependencies required for the build
apt-get update -y && apt-get build-dep freeswitch -y
3、编译安装freeswitch
# 下载解压源码
mkdir -p /tools/software && cd /tools/software
wget https://github.com/signalwire/freeswitch/archive/refs/tags/v1.10.5.tar.gz
tar -zxvf v1.10.5.tar.gz
cd freeswitch-1.10.5/
# 编译
./bootstrap.sh -j
./configure
# 启动需要的模块,修改源码根目录:modules.conf 文件
# 例如:将呼叫详细记录 (CDR) 直接记录到 PostgreSQL 数据库,参考:https://freeswitch.org/confluence/display/FREESWITCH/mod_cdr_pg_csv
event_handlers/mod_cdr_pg_csv
# curl获取拨号计划、ivr等配置模块
xml_int/mod_xml_curl
# 安装
make -j
make install
4、默认安装路径到
/usr/local/freeswitch
5、启动
cd /usr/local/freeswitch/bin
./freeswitch
# 生成环境后台运行
./freeswitch -rp -nc -nonat
参考:
开源的 softswitch-gateway 项目:https://github.com/Atoms-Cat/softswitch-gateway
oepnsips、freeswitch高可用实现方案部署