2.1 安装

yum install git gcc-c++ autoconf automake libtool wget python ncurses-devel zlib-devel libjpeg-devel openssl-devel e2fsprogs-devel sqlite-devel libcurl-devel pcre-devel speex-devel ldns-devel libedit-devel

yum install lua lua-devel

wget http://files.freeswitch.org/freeswitch-releases/freeswitch-1.6.0.tar.gz

cd freeswitch-1.6.0

./configure --disable-debug --disable-libyuv --disable-libvpx --enable-core-odbc-support

make

make install

出现了下面的错误:

make[4]: Entering directory `/usr/local/src/freeswitch-1.6.0/src/mod/formats/mod_sndfile'

Makefile:796: *** You must install libsndfile-dev to build mod_sndfile.  Stop

解决方法:

下载包libsndfile-1.0.26.tar.gz 上传到服务器

下载地址  http://www.mega-nerd.com/libsndfile/#Download

tar zxvf  libsndfile-1.0.26.tar.gz

./configure

make

make install

cp /usr/local/lib/pkgconfig/sndfile.pc /usr/lib64/pkgconfig

重新执行重新执行FreeSWITCH的“./configure”,再make   make install

下载yasm并编译

        yasm是一个汇编编译器,是nasm的升级版

可以直接yum install yasm

或者下载源码包安装

        yasm下载地址:http://www.tortall.net/projects/yasm/releases/

        yasm解压命令:tar -zxvf ****.tar.gz

        yasm编译安装:① ./configure, ② make, ③make install

        yasm安装完毕之后回到第二步重新安装libvpx

下载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

下载libpng并编译

        cd ..

        git clone https://freeswitch.org/stash/scm/sd/libpng.git

        cd libpng

        ./configure

        make

        make install

        cp /usr/local/lib/pkgconfig/libpng* /usr/lib64/pkgconfig/

重新执行FreeSWITCH的“./configure”之后,“make && make install”安装FreeSWITCH了

然后根据需要安装语音包

make cd-sounds-install

make cd-moh-install

安装简单的配置文件

make samples

以上便完成了安装,但是启动的时候又报错了:

root@localhost bin]# ./freeswitch

./freeswitch: error while loading shared libraries: libyuv.so: cannot open shared object file: No such file or directory

解决办法: cp /usr/lib/libyuv.so /usr/lib64/

然后就可以正常启动的

conf\autoload_configs\opus.conf.xml

2.2.2 OPUS带宽设置

<configuration name="opus.conf">

<settings>

<param name="use-vbr" value="1"/>

<!--<param name="use-dtx" value="1"/>-->

<param name="complexity" value="10"/>

<!-- Set the initial packet loss percentage 0-100 -->

<!--<param name="packet-loss-percent" value="10"/>-->

<!-- Support asymmetric sample rates -->

<!--<param name="asymmetric-sample-rates" value="1"/>-->

<!-- Keep FEC Enabled -->

<param name="keep-fec-enabled" value="1"/>

<!--<param name="use-jb-lookahead" value="true"/> -->

<!--

maxaveragebitrate: the maximum average codec bitrate (values: 6000 to 510000 in bps) 0 is not considered

maxplaybackrate: the maximum codec internal frequency (values: 8000, 12000, 16000, 24000, 48000 in Hz) 0 is not considered

This will set the local encoder and instruct the remote encoder trough specific "fmtp" attibute in the SDP.

Example: if you receive "maxaveragebitrate=20000" from SDP and you have set "maxaveragebitrate=24000" in this configuration

the lowest will prevail in this case "20000" is set on the encoder and the corresponding fmtp attribute will be set

to instruct the remote encoder to do the same.

-->

        <param name="maxaveragebitrate" value="6000"/>

        <param name="maxplaybackrate" value="8000"/>

         <!-- Max capture rate, 8000, 12000, 16000, 24000 and 48000 are valid options -->

        <param name="sprop-maxcapturerate" value="8000"/>

</settings>

</configuration>

2.2.3 公网IP

conf\sip_profiles\external.xml

    <param name="ext-rtp-ip" value="120.77.183.212"/>

<param name="ext-sip-ip" value="120.77.183.212"/>

conf\sip_profiles\internal.xml

    <param name="ext-rtp-ip" value="120.77.183.212"/>

<param name="ext-sip-ip" value="120.77.183.212"/>

<param name="tls-cert-dir" value="/usr/local/freeswitch/certs"/>

2.2.4编码配置

conf\vars.xml

  <X-PRE-PROCESS cmd="set" data="global_codec_prefs=OPUS,G722,PCMU,PCMA"/>

  <X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=OPUS,G722,PCMU,PCMA"/>

  <X-PRE-PROCESS cmd="set" data="internal_ssl_enable=true"/>

  <X-PRE-PROCESS cmd="set" data="external_ssl_enable=true"/>

2.2.5 录音

首先备份/usr/local/freeswitch/conf/dialplan/default.xml

然后vi编辑default.xml ,在

<extension name="Local_Extension">

<condition field="destination_number" expression="^(10[01][0-8])$">

下面加入以下语句即可录音。

<action application="set" data="RECORD_TITLE=Recording ${destination_number} ${caller_id_number} ${strftime(%Y-%m-%d %H:%M)}"/>

<action application="set" data="RECORD_COPYRIGHT=(c) 2011"/>

<action application="set" data="RECORD_SOFTWARE=FreeSWITCH"/>

<action application="set" data="RECORD_ARTIST=FreeSWITCH"/>

<action application="set" data="RECORD_COMMENT=FreeSWITCH"/>

<action application="set" data="RECORD_DATE=${strftime(%Y-%m-%d %H:%M)}"/>

<action application="set" data="RECORD_STEREO=true"/>

<action application="record_session" data="$${base_dir}/recordings/archive/${strftime(%Y-%m-%d-%H-%M-%S)}_${destination_number}_${caller_id_number}.wav"/>

大家应该看明白了,录音会自动存放在${base_dir}/recordings/archive下。

2.2.6 Change Default Password

/usr/loca/freeswitch/conf/vars.xml

<X-PRE-PROCESS cmd="set" data="default_password=MAKE_GOOD_PASSWORD"/>

service freeswitch restart

freeswitch阿里云安装配置文档相关推荐

  1. oracle12c配置文档,Oracle12C安装配置文档

    Oracle12C安装配置文档 Oracle12C安装配置文档 准备软件: 开始安装: 打开从官网下载下来的两个压缩包,进行解压 打开解压好的后缀为2of2的文件夹 找到路径为database下的&q ...

  2. 阿里云安装配置mysql(centos版)

    阿里云安装配置mysql(centos版) 阿里云安装配置mysql(centos版) 1,安装mysql数据库 a)下载mysql源安装包:wget http://dev.mysql.com/get ...

  3. docsify 安装配置文档

    docsify 安装配置文档 安装运行环境npm 用sudo执行以下命令即可完成安装 node安装命令 $ sudo curl -sL -o /etc/yum.repos.d/khara-nodejs ...

  4. 博科系统怎么在电脑里装服务器,博科SAN存储交换机安装配置文档

    <博科SAN存储交换机安装配置文档>由会员分享,可在线阅读,更多相关<博科SAN存储交换机安装配置文档(12页珍藏版)>请在人人文库网上搜索. 1.word可编辑.Brocad ...

  5. 开源文档管理系统——LogicalDOC安装配置文档

    LogicalDOC安装配置文档 一.准备工作 下载 jdk 1.8以上版本 网址: http://www.oracle.com/technetwork/java/javase/downloads/j ...

  6. pureftpd 配置 mysql_pureftpd+mysql验证的安装配置文档

    pureftpd+mysql验证的安装配置文档 一.mysql编译安装: 1,准备工作 a,下载安装程序mysql-5.1.41.tar.gz b,为mysql建立用户和组 groupadd -g 2 ...

  7. mysql sphinx 中文搜索_sphinx+mysql+mmseg 实现中文全站搜索 安装配置文档

    一.Sphinx的特性 高速的建立索引(在当代CPU上,峰值性能可达到10 MB/秒); 高性能的搜索(在2 – 4GB 的文本数据上,平均每次检索响应时间小于0.1秒); 可处理海量数据(目前已知可 ...

  8. Hudson安装配置文档

    2019独角兽企业重金招聘Python工程师标准>>> 1.神马是Hudson ? Hudson是一款持续集成工具,在项目开发过程中,使用它不断构建项目,一方面利于及时测试,另一方面 ...

  9. xCAT安装配置文档

    xCAT安装文档 一.系统安装规划( 实验环境:Vmware Workstation ) Master 内网:10.1.1.11  eth0 custom 外网:222.31.64.11 eth1 桥 ...

最新文章

  1. 一起智慧课堂_智慧课堂与传统课堂相比,优点在哪些
  2. web前端开发--列表
  3. redis数据类型_认识Redis与Redis的数据类型
  4. 算法题-大数相乘问题
  5. 《Python游戏编程快速上手》第十章TicTacToe
  6. 如何在vscode中使用GitLab
  7. JQuery实现页面跳转
  8. nginx源码阅读(二).初始化:main函数及ngx_init_cycle函数
  9. 做技术知道了哪些事情代表自己成熟了?
  10. koa 接口返回数据_node和koa实现数据mock接口
  11. 常见的Mule Esb下载地址
  12. 小话设计模式五:模板方法模式
  13. 350. Intersection of Two Arrays II
  14. PCL:RANSAC 空间直线拟合
  15. 尼康图像处理软件——nx studio
  16. kernel/Makefile:971: recipe for target ‘prepare3‘ failed
  17. c语言程序设计精髓第四章编程题
  18. 10万字公安大数据平台建设项目方案
  19. 物理内存管理-ucore操作系统的PADDR宏
  20. idea项目打包和部署

热门文章

  1. 武汉科技大学计算机转专业吗,武汉科技大学的护理专业可以转专业吗
  2. 信用卡危机会在中国上演吗?
  3. 算法实例_线性表 By:比方
  4. Python实现机器学习二(实现多元线性回归)
  5. Android实现打电话,发短信
  6. IDEA初次使用的设置流程
  7. android七大主流Android音乐播放器横向评测
  8. 验证(Verification)与确认(Validation)的差别
  9. web前端开发发展史,前后30年,展望未来!
  10. 电磁场与仿真软件(16)