介绍
FreeSWITCH是个网络电话转化器,相当与网络转换器,不过这个是用于IP电话,构建公司的电话通讯系统需要用该技术,因为按照官方文档无法成功安装。
本文目的:FreeSWITCH安装步骤
官方参考:https://freeswitch.org/confluence/display/FREESWITCH/CentOS+7+and+RHEL+7
源码安装
一、安装依赖:
yum install -y http://files.freeswitch.org/freeswitch-release-1-6.noarch.rpm epel-release
yum install -y git alsa-lib-devel autoconf automake bison broadvoice-devel bzip2 curl-devel db-devel e2fsprogs-devel flite-devel g722_1-devel gcc-c++ gdbm-devel gnutls-devel ilbc2-devel ldns-devel libcodec2-devel libcurl-devel libedit-devel libidn-devel libjpeg-devel libmemcached-devel libogg-devel libsilk-devel libsndfile-devel libtheora-devel libtiff-devel libtool libuuid-devel libvorbis-devel libxml2-devel lua-devel lzo-devel mongo-c-driver-devel ncurses-devel net-snmp-devel openssl-devel opus-devel pcre-devel perl perl-ExtUtils-Embed pkgconfig portaudio-devel postgresql-devel python26-devel python-devel soundtouch-devel speex-devel sqlite-devel unbound-devel unixODBC-devel wget which yasm zlib-devel
{
假如是:缺少yasm 上安装需要安装yasm编译安装:yasm-1.3.0.tar.gz:
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar zxvf yasm-1.3.0.tar.gz
./configure
make
make install
}
二、源码下载:
mkdir -p /opt/tool/freeswitch
cd /opt/tool/freeswitch
git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git freeswitch1.6
三、安装
cd freeswitch1.6
./bootstrap.sh -j # 或者./rebootstrap.sh -j
./configure -C --enable-core-odbc-support
make
{
如果make报错,注释掉modules.conf里面的三个模块(可以根据报错提示注释,这会影响使用):
codecs/mod_opus applications/mod_enum applications/mod_spandsp
}
make install
make sounds-install
make moh-install
========================================================================
安装包安装
建议源码安装
下载地址:http://files.freeswitch.org/releases/freeswitch/
解压命令:tar zxvf freeswitch-1.6.20.tar.gz
========================================================================
使用
#创建连接文件
ln -sf /usr/local/freeswitch/bin/freeswitch /usr/bin/
ln -sf /usr/local/freeswitch/bin/fs_cli /usr/bin/
#开始运行freeswitch
freeswitch -nc
#fs_cli命令行终端登录
fs_cli
fs_cli >sofia status //查看fs
参考链接:
https://zhuanlan.zhihu.com/p/28732616
https://blog.csdn.net/xmcy001122/article/details/61623128
使用软电话互相拨打1001 1002 测试可以pcma pcmu 或者 Xlit Zoiper互相转码通话