FreeSwitch安装

1.安装依赖

yum install -y git gcc-c++ wget alsa-lib-devel autoconf automake bison broadvoice-devel bzip2 curl-devel db-devel e2fsprogs-devel flite-devel g722_1-devel 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 libtiff-devel libtheora-devel libtool 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 libuuid-devel which yasm zlib-devel

2.安装libvpx

cd ..
git clone https://freeswitch.org/stash/scm/sd/libvpx.git
cd libvpx
./configure --enable-pic --disable-static --enable-shared
# 如果出现Configuration failed。错误原因为:Neither yasm nor nasm have been found,则编译yasm
make
make install
cp /usr/local/lib/pkgconfig/vpx.pc /usr/lib64/pkgconfig/

###################################
# 安装 yasm: yasm是一个汇编编译器,是nasm的升级版
###################################

# 可以通过yum工具直接下载安装
yum install yasm
# 或者下载源码包安装
# 到官网 `http://www.tortall.net/projects/yasm/releases/` 下载安装包
tar -zxvf ****.tar.gz
./configure
make
make install
# yasm安装完毕之后回到第二步重新安装libvpx

3.安装cmake

yum remove cmake #卸载yum安装的版本,若无安装则忽略
cd /usr/local/src
wget https://cmake.org/files/v3.14/cmake-3.14.0.tar.gz
tar vzxf cmake-3.14.0.tar.gz
cd cmake-3.14.0
./configure
make
make install

4.安装libks

cd /usr/local/src
yum install libatomic
git clone https://github.com/signalwire/libks.git
cd libks
cmake .
make
make install

5.安装signalwire-c

cd /usr/local/src
git clone https://github.com/signalwire/signalwire-c.git
cd signalwire-c/
cmake .
make
make install
ln -sf /usr/local/lib64/pkgconfig/signalwire_client.pc /usr/lib64/pkgconfig/signalwire_client.pc

6.安装opus

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

7.编译freeswitch 如果你需要编译 odbc 可以添加 --enable-core-odbc-support 参数,

./configure  --enable-core-odbc-support
make
make install
# 可以选择安装声音等文件
make -j cd-sounds-install
make -j cd-moh-install

8.开启event_socket,配置autoload_configs/acl.conf.xml文件:


  
  
  
  
  
  

修改esl配置:


  
    
    
    
    
    
    
  

两个常用的命令是bin/freeswitch和bin/fs_cli,为了便于使用,建议将这两个命令做符号链接放到你的搜索路径中

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

你可能感兴趣的:(FreeSwitch安装)