根据官网进行 FreeSWITCH 服务器环境的安装与搭建,一下流程基本来自于官方教程,地址如下:
https://freeswitch.org/confluence/display/FREESWITCH/Debian+9+Stretch

便捷安装

在网络环境正常的情况下,基本上半小时内能够安装完成

1
2
3
4
5
6
7
8
9
apt-get update && apt-get install -y gnupg2 wget
wget -O - https://files.freeswitch.org/repo/deb/debian-release/fsstretch-archive-keyring.asc | apt-key add -

echo "deb http://files.freeswitch.org/repo/deb/debian-release/ stretch main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb-src http://files.freeswitch.org/repo/deb/debian-release/ stretch main" >> /etc/apt/sources.list.d/freeswitch.list

# you may want to populate /etc/freeswitch at this point.
# if /etc/freeswitch does not exist, the standard vanilla configuration is deployed
apt-get update && apt-get install -y freeswitch-meta-all

在使用 apt-get 安装完成之后,使用下面命令可以启动 FreeSWITCH 在终端上的客户端。

1
fs_cli -rRS

在刚刚安装完就使用上面的指令,有可能与遇到启动失败的情况,大致内容如下:

1
2
3
4
5
root@freeswitch:~# fs_cli -rRS
[ERROR] fs_cli.c:1688 main() Error Connecting []
[INFO] fs_cli.c:1694 main() Retrying
[ERROR] fs_cli.c:1688 main() Error Connecting []
[INFO] fs_cli.c:1694 main() Retrying

如果是这样说连接不上的话,有很大的可能是因为刚刚安装完成,FreeSWITCH 没有自启的原因,这时候输入freeswitch -nc这条指令在后台开启 FreeSWITCH,再输入fs_cli -rRS就可以了,如果还是失败也别着急关闭,有可能是因为 FreeSWITCH 还在启动中的原因。