freeswitch安装

Posted 天上月

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了freeswitch安装相关的知识,希望对你有一定的参考价值。

OS环境:

CentOS release 6.5 (Final)

1.安装

$ sudo yum install epel-release vim -y
$ wget http://files.freeswitch.org/freeswitch-releases/freeswitch-1.6.20.tar.bz2
$ tar xvjf freeswitch-1.6.20.tar.bz2

 

2.安装依赖包

$ sudo yum install gcc-c++ sqlite-devel zlib-devel libcurl-devel pcre-devel speex-devel ldns-devel libedit-devel openssl-devel -y 
$ sudo yum install libjpeg-devel lua-devel libsndfile-devel libyuv-devel git libtool -y

 

3.安装代码依赖包

$ cd freeswitch-1.6.20

 ------1)安装libyuv(先查看是否存在目录,存在跳过本步骤)

$ cd libs/ 
$ git clone https://freeswitch.org/stash/scm/sd/libyuv.git 
$ cd libyuv/ 
$ make -f linux.mk CXXFLAGS="-fPIC -O2 -fomit-frame-pointer -Iinclude/" 
$ sudo make install
$ sudo cp /usr/lib/pkgconfig/libyuv.pc /usr/lib64/pkgconfig/

 

------2)安装libvpx(先查看是否存在目录,存在跳过本步骤)

$ cd ..
$ git clone https://freeswitch.org/stash/scm/sd/libvpx.git
$ cd libvpx/
$ sudo yum install yasm -y
$ ./configure --enable-pic --disable-static --enable-shared
$ make
$ sudo make install
$ sudo cp /usr/local/lib/pkgconfig/vpx.pc /usr/lib64/pkgconfig/

 ------3)安装opus

$ cd ..
$ git clone https://freeswitch.org/stash/scm/sd/opus.git
$ cd opus/
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
$ sudo cp /usr/local/lib/pkgconfig/opus.pc /usr/lib64/pkgconfig

 -------4)安装libpng

$ cd ..
$ git clone https://freeswitch.org/stash/scm/sd/libpng.git
$ cd libpng/
$ ./configure
$ make
$ sudo make install
$ sudo cp /usr/local/lib/pkgconfig/libpng* /usr/lib64/pkgconfig/

 4.编译

$ cd freeswitch-1.6.20
$ ./configure
$ make
$ sudo make install

 注:make的时候出现"Neither yasm nor nasm have been found. See the prerequisites section in the README for more info." 报错的话直接 "yum install yasm"即可

5.安装声音文件

$ sudo make cd-sounds-install
$ sudo make cd-moh-install

 6.设置链接符号,便于使用

$ sudo ln -sf /usr/local/freeswitch/bin/freeswitch /usr/local/bin/
$ sudo ln -sf /usr/local/freeswitch/bin/fs_cli /usr/local/bin/

 7.禁用freeswitch上ipv6

cd /usr/local/freeswitch/conf/sip_profiles
mv external-ipv6.xml external-ipv6.xml.inactive

 8.启动

/usr/local/freeswitch/bin/freeswitch

 9.停止

shutdown        
freeswitch -stop           //当运行在后台可以在linux 下使用该命令结束

 至此freeswitch-1.6.2版本在centos 6.5上安装完成,可注册分机拨打测试

后面将记录freeswitch配置操作信息

以上是关于freeswitch安装的主要内容,如果未能解决你的问题,请参考以下文章

FreeSWITCH部署与功能配置

Centos 7 安装freeswitch-1.10.3 make freeswitch报错 求大神帮助

freeSwitch入门

freeswitch安装

ubuntu16.04 lts 安装freeswitch

freeSWITCH 视频通话