FreeSwitch呼叫中心


FreeSwtich 安装

参考链接 https://freeswitch.org/confluence/display/FREESWITCH/CentOS+7

#freeswitch_v1.6_install_centos7.6.shyum install -y http://files.freeswitch.org/freeswitch-release-1-6.noarch.rpm epel-releaseyum 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#
cd /usr/local/src
#git clone -b v1.6 https://github.com/signalwire/freeswitch.git freeswitch
git clone -b v1.6 https://gitee.com/dong2/freeswitch.git freeswitch
cd /usr/local/src/freeswitch
./bootstrap.sh -j
./configure
make -j
make -j install#
#make -j cd-sounds-install
#make -j cd-moh-install#
ln -sf /usr/local/freeswitch/bin/freeswitch /usr/bin/
ln -sf /usr/local/freeswitch/bin/fs_cli /usr/bin/#
#freeswitch
#freeswitch -nc
#freeswitch -nonat -nonatmap
#freeswitch -nonat -nonatmap -nosql#
#netstat -anp|grep 5060#
#fs_cli

安装过程中遇到各种问题

一. 编译出错
安装 之前, 最好 先安装 这几个东西(如果有, 请忽略):yasm (有nasm的话 不用装这个) ,
opus-devel(可能 提示 libopus-dev 或 libopus-devel 等) ,
lua-devel , libsndfile-devel , libtiff-devel当然了,  你也可以 先不管, 等 出错 提示了, 在按照下面的方法安装:1. 安装 yasm ,  yasm 和 nasm 必须要有一个,必须装了!
错误提示: Neither yasm nor nasm have been found((which nasm) || (which yasm) || (git clone https://github.com/yasm/yasm.git && cd yasm && ./autogen.sh && make && make install))
2.安装 lua-devel
错误提示:  找不到 lua.h 等lua的头文件yum install lua lua-devel
3.安装 opus-devel
错误提示: You must install libopus-dev to build mod_opusyum -y install opus-devel
#可能需要清理:  make clean && ./configure && make
如果还是报这个错误, 就注释这两行,在Makefile:vim freeswitch/src/mod/codecs/mod_opus/Makefile
# Comment line 896 & 897
#install: error
#all: error4.安装 sndfile
错误提示 :  You must install libsndfile-dev to build mod_sndfileyum install libsndfile-devel
或者源代码编译安装:复制代码
#下载包libsndfile-x.x.xx.tar.gz  from地址 http://www.mega-nerd.com/libsndfile/#Download,  然后
wget http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.28.tar.gz
tar zxvf libsndfile-1.0.28.tar.gz
./configure
make
make install
cp /usr/local/lib/pkgconfig/sndfile.pc /usr/lib64/pkgconfig
复制代码
然后 重新 configure FreeSWITCH , 再 make如果还是报这个错误,就修改这两行,在 Makefile 末尾:vim src/mod/formats/mod_sndfile/Makefile
# 修改这两行install: install-am
all: install
然后 再 make5.安装 libyuv
错误提示: You must install libyuv-dev to build mod_fsvcd freeswitch/libs
git clone https://freeswitch.org/stash/scm/sd/libyuv.gitcd libyuv
make -f linux.mk CXXFLAGS="-fPIC -O2 -fomit-frame-pointer -Iinclude/"
make install
cp /usr/lib/pkgconfig/libyuv.pc /usr/lib64/pkgconfig/
6.安装 libvpx
错误提示: You must install libvpx-dev to build ....复制代码
cd freeswitch/libs
git clone https://freeswitch.org/stash/scm/sd/libvpx.git
cd libvpx
./configure --enable-pic --disable-static --enable-shared
make
make install
cp /usr/local/lib/pkgconfig/vpx.pc /usr/lib64/pkgconfig/
复制代码
7.安装 libpng
错误提示: You must install libpng-dev to build ....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/
8.安装 libav
错误提示: You must install libav-dev to build mod_av或者 : You must install libavformat-dev to build mod_avgit clone https://freeswitch.org/stash/scm/sd/libav.git
#或者 wget https://freeswitch.org/stash/rest/api/latest/projects/SD/repos/libav/archive?format=zip
cd libav
./configure             #CFLAGS="-fPIC" ./configure --enable-pic --enable-shared
make                    # make CXXFLAGS="-fPIC"
make install
安装完成,如果 make 还是 提示这个错误,重新执行:./bootstrap.sh -j
./configure
make二. 其他问题
1.错误提示: libs/spandsp
configure: loading cache ../../config.cache
configure: error: `CFLAGS' was not set in the previous run
configure: error: `CPPFLAGS' was not set in the previous run
configure: error: in `/usr/src/freeswitch.git/libs/spandsp':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ../../config.cache' and start over
解决: 重新 configure./configure -C && make三. 安装中文语音
fs默认不加载中文语音。需要在fs的src中首先编译中文模块。1.编译:
a.在 configure 之前, 编辑 modules.conf,  取消 "#say/mod_say_zh"  这行的注释 ->"say/mod_say_zh"b.补救安装 `make mod_say_zh-install` 2.加载(不重启fs)
在fs控制台上加载该模块 `load mod _say_zh`
若想fs在每次启动的时候都加载该模块,就在`autoload_configs/modules.conf.xml``<load module="mod_say_zh">`的注释去掉即可。也可以这样:sed -i 's#<!-- <load module="mod_say_zh"/> -->#<load module="mod_say_zh"/>#g' autoload_configs/modules.conf.xml3.修改 `var.xml`中的配置
`<X-PRE-PROCESS cmd="set" data="sound_prefix=$${sounds_dir}/en/us/callie"/>`修改为中文语音文件的目录
`<X-PRE-PROCESS cmd="set" data="sound_prefix=$${sounds_dir}/zh/cn/link"/>`
加入以下几行(也可以不加)<X-PRE-PROCESS cmd="set" data="default_language=zh"/>
<X-PRE-PROCESS cmd="set" data="default_dialect=cn"/>
<X-PRE-PROCESS cmd="set" data="default_voice=sue"/>4.加入中文语音配置
cd conf/lang
cp -R en zh
mv zh/en.xml zh/zh.xml
vim zh/zh.xml
(替换路径`en/us/callie``en`等:第二行修改为)
<language name="zh" say-module="zh" sound-prefix="$${sounds_dir}/zh/cn/link" tts-engine="cepstral" tts-voice="link">5. 载入中文配置
在`freeswitch.xml``<section name="languages" `节点中增加一行 (或那一行取消注释)` <X-PRE-PROCESS cmd="include" data="lang/zh/*.xml"/>`四. 解决ESL拒绝连接问题
默认是只接受本机连接的,稍一改动就 内外都不能连接了,或者只能接受内外之一连接 解决方法:1. event_socket.conf.xml 加入:
<param name="apply-inbound-acl" value="domains"/>2. acl.conf.xml 加入:
<list name="domains" default="deny">
<node type="allow" domain="$${domain}"/>
<node type="allow" cidr="192.168.1.0/24"/>
<node type="allow" cidr="127.0.0.1/24"/>
</list>
报错:Neither yasm nor nasm have been found. See the prerequisites section in the README for more info.这个只需要安装yasm有两种方法1)yum install yasm2)wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar zxvf yasm-1.2.0.tar.gz
cd yasm-1.2.0/
./configure
make
make install
报错:
spandsp >= 3.0... configure: error: no usable spandsp; please install spandsp3 devel package or equivalentcd /usr/src/freeswitch
git clone https://github.com/freeswitch/spandsp.git
cd spandsp
./bootstrap.sh -j
./configure
make
make install
ldconfig或者
yum  install  -y spandsp3-devel.x86_64报错configure: error: no usable sofia-sip; please install sofia-sip-ua devel package or equivalentcd /usr/src/freeswitch
git clone https://github.com/freeswitch/sofia-sip.git
cd sofia-sip
./bootstrap.sh -j
./configure
make
make install
ldconfig
或者yum  install  sofia-sip-devel.x86_64 -y
报错:You must install libopus-dev to build mod_opus. Stop.解决:安装libopus-devel rmp包:  https://centos.pkgs.org/6/linuxtech/libopus-devel-1.1-1.el6.i686.rpm.html1.Create the repository config file /etc/yum.repos.d/linuxtech.repo:[linuxtech]name=LinuxTECHbaseurl=http://pkgrepo.linuxtech.net/el6/release/enabled=1gpgcheck=1gpgkey=http://pkgrepo.linuxtech.net/el6/release/RPM-GPG-KEY-LinuxTECH.NET2.install libopus-devel rpm package:# yum install libopus-devel报错: CMake 3.7.2 or higher is required.  You are running version 2.8.12.2wget https://cmake.org/files/v3.17/cmake-3.17.0.tar.gztar -zxvf cmake-3.17.0.tar.gzcd cmake-3.17.0./bootstrapgmakesudo make install  报错:-bash: /usr/bin/cmake: No such file or directory,则可以手动添加,找到安装的cmake文件,进入cmake3.x文件夹中,在进入bin文件夹,运行freeswitch1.6 以上 configure添加 :cp ./cmake-3.x/bin/cmake /usr/bin/报错:You must install libks to build mod_signalwire.  Stop.git clone https://github.com/signalwire/libks.gitcmake .makesudo make install  或yum install libks报错:You must install signalwire-client-c to build mod_signalwiregit clone https://github.com/signalwire/signalwire-c.gitcmake .makesudo make installfreeswitch1.6以上编译文件需要添加:或yum install signalwire-client-cexport PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:${PKG_CONFIG_PATH}然后重现./configure# 这两句应该没用
# cp    /usr/local/lib/pkgconfig/*.pc /usr/lib64/pkgconfig/
# cp -f /usr/local/lib/* /usr/lib64/
3. 执行./configure 此时会报错: checking for sqlite3 >= 3.6.20... Package sqlite3 was not found in the pkg-config search path. Perhaps you should add the directory containing `sqlite3.pc' to the PKG_CONFIG_PATH environment variable No package 'sqlite3' found
configure: error: Library requirements (sqlite3 >= 3.6.20) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.看来是没有安装sqlite3的包4. 安装sqlite3:下载sqlite3安装配置文件: http://www.sqlite.org/2015/sqlite-autoconf-3080800.tar.gz解压后./configure make make installyum install sqlite-devel[root@vtc-test1 sqlite-autoconf-3080800]# sqlite3 --version3.8.8 2015-01-16 12:08:06 7d68a42face3ab14ed88407d4331872f5b243fdf5. 回到Freeswitch又遇到新的问题: checking for libpcre >= 7.8... Package libpcre was not found in the pkg-config search path. Perhaps you should add the directory containing `libpcre.pc' to the PKG_CONFIG_PATH environment variable No package 'libpcre' found
configure: error: Library requirements (libpcre >= 7.8) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.yum install libpcre-devel后继续(如果没有这个包的话可以直接从以下地址下载: http://rpm.pbone.net/index.php3/stat/4/idpl/23606412/dir/centos_6/com/pcre-devel-8.13-1.1.x86_64.rpm.html如果遇到NOKEY的错误可以:rpm --import /etc/pki/rpm-gpg/RPM* 然后重新安装即可正常,或者直接带--force --nodeps参数安装;rpm -ivh *rpm --force --nodeps 这样即可正常安装。)checking for speex >= 1.2rc1 speexdsp >= 1.2rc1... Package speex was not found in the pkg-config search path. Perhaps you should add the directory containing `speex.pc' to the PKG_CONFIG_PATH environment variable No package 'speex' found Package speexdsp was not found in the pkg-config search path. Perhaps you should add the directory containing `speexdsp.pc' to the PKG_CONFIG_PATH environment variable No package 'speexdsp' found
configure: error: Library requirements (speex >= 1.2rc1 speexdsp >= 1.2rc1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.yum install speex-devel后继续checking for libldns >= 1.6.6... checking for ldns_str2rdf_a in -lldns... no
configure: error: You need to either install libldns-dev or disable mod_enum in modules.conf按照提示注释掉mod_enum在modules.conf文件中configure: error: You need to either install libedit-dev (>= 2.11) or configure with --disable-core-libedit-supportyum install libedit-devel

配置freeswitch

1) Change password
cd /usr/local/freeswitch/conf
vi vars.xmlChange:  <X-PRE-PROCESS cmd="set" data="default_password=123456"/> {!!set it to something different!!}Save and close (<Esc> :wq!)2) Delete IPv6
cd /usr/local/freeswitch/conf/sip_profiles
mv internal-ipv6.xml internal-ipv6.xml.removed   {disables ipv6 support}
mv external-ipv6.xml external-ipv6.xml.removed  {disables ipv6 support}3) Configuring ext-rtp-ip
cd /usr/local/freeswitch/conf/sip_profiles/
vi internal.xml<param name="ext-rtp-ip" value="14.29.xx.77"/><param name="ext-sip-ip" value="14.29.xx.77"/>vi external.xml<param name="ext-rtp-ip" value="14.29.xx.77"/><param name="ext-sip-ip" value="14.29.xx.77"/>4)stun<X-PRE-PROCESS cmd="stun-set" data="external_rtp_ip=stun:14.29.xx.77:3478"/><X-PRE-PROCESS cmd="stun-set" data="external_sip_ip=stun:14.29.xx.77:3478"/>

添加音视频

1.修改FreeSWITCH安装路径下/conf/var.xml文件中,增加:<X-PRE-PROCESS cmd=="set" data="proxy_media=true"/>
2.修改FreeSWITCH安装路径下/conf/sip_profiles/internal.xml文件,设置inbound-proxy-media和inbound-late-negotiation为true<!--Uncomment to set all inbound calls to proxy media mode-->
<param name="inbound-proxy-media" value="true"/>
<!-- Let calls hit the dialplan before selecting codec for the a-leg -->
<param name="inbound-late-negotiation" value="true"/>
修改配置之后重启FreeSWITCH或者打开FS_Cli输入reloadxml。如果视频编码问题报错,可尝试修改/conf/var.xml的配置项global_codec_prefs 和 outbound_codec_prefs如下(增加可用编解码器)<X-PRE-PROCESS cmd="set" data="global_codec_prefs=OPUS,G722,PCMU,PCMA,GSM,H263,H264,VP8,H263-1998"/>
<X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=OPUS,G722,PCMU,PCMA,GSM,H263,H264,VP8,H263-1998"/>

webrtc客户端sipml5

网上开源版本可能存在问题,请使用我们提供的jsSip

参考链接 https://github.com/DoubangoTelecom/sipml5

webrtc客户端使用

WebSocket URI 默认的端口是5066

可在 文件中修改 /usr/local/freeswitch/conf/sip_profiles/internal.xml

可在 文件中修改 /usr/local/freeswitch/conf/vars.xml

SIP IP:PORT 默认的端口是5060

账号1001 - 1020 可以直接使用注册

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Ci2Evm2D-1645608816179)(C:%5CUsers%5CSjmao%5CAppData%5CRoaming%5CTypora%5Ctypora-user-images%5C1621561719084.png)]

常见错误


https://blog.csdn.net/yijianxiongwan/article/details/120027347

sip呼叫报错AUDIO RTP REPORTS ERROR: [Remote Address Error!]

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-aRa2J6es-1645608816181)(FreeSwitch%E5%91%BC%E5%8F%AB%E4%B8%AD%E5%BF%83.assets/1636081929111.png)]

本教程参考链接:

https://www.cnblogs.com/dong1/p/12148731.html

https://freeswitch.org/confluence/display/FREESWITCH/CentOS+7

https://www.cnblogs.com/lzpong/p/6740188.html

https://blog.csdn.net/luozirong/article/details/78532679

https://blog.csdn.net/gpf626487/article/details/81213711

https://blog.csdn.net/tech_universe/article/details/42870123

freeswitch安装1.6相关推荐

  1. FreeSwitch安装和配置记录

    安装FreeSwitch 主要示例,下面的命令: git clone -b v1.2.stable git://git.freeswitch.org/freeswitch.git cd freeswi ...

  2. FreeSWITCH安装报错“You must install libyuv-dev to build mod_fsv”的解决方案

    昨天下午安装FreeSWITCH时遇到该问题时,整了一个下午都没解决,也走了许多弯路.如果直接通过yum安装libyuv-devel时,会报错说找不到该安装包.后来又通过FreeSWITCH官网的网上 ...

  3. FreeSWITCH安装教程

    本文参考官网安装文档CentOS 7 and RHEL 7 FreeSWITCH安装文档Building from source部分 安装环境说明 服务器:腾讯云服务器CVM 系统:CentOS 7 ...

  4. windows上的软交换软件FreeSWITCH安装详细步骤(使用ip电话机测试打通电话)

    文章目录 windows下的软交换软件FreeSWITCH windows下的软交换 安装FreeSWITCH 安装目录 使用IP电话机测试 windows下的软交换软件FreeSWITCH 我们介绍 ...

  5. 安装 esl php 模块,FreeSWITCH 安装配置的 各种坑, 填坑

    个人安装环境: OS:CentOS6.7 64位 FreeSWITCH Ver:1.6.17 一. 编译出错 安装 之前, 最好 先安装 这几个东西(如果有, 请忽略): yasm (有nasm的话 ...

  6. freeswitch 安装 fail2ban 动态拦截IP攻击

    一. 安装 fail2ban centos: sudo yum install fail2ban ubuntu: sudo apt install fail2ban 设置开机自启动  systemct ...

  7. Freeswitch 安装

    Centos7 版本  7.6.1810 64bit freeswtich 版本  freeswitch-1.4.0.beta6.tar.bz2 对于版本说明:Freeswitch 权威指南中使用的既 ...

  8. ubuntu freeswitch 安装

    看了freeswitch 权威指南,自己安装了一下 freeswitch,过程和一些问题如下 需要先通读全文,再进行安装,本文记录的是我的安装过程,期间遇到一些问题,又重新安装了些库.工具啊之类的,所 ...

  9. switch安装linux教程,ubuntu 14.04 freeswitch安装及应用

    FreeSWITCH 是一个电话的软交换解决方案,包括一个软电话和软交换机用以提供语音和聊天的产品驱动.FreeSWITCH 可以用作交换机引擎.PBX.多媒体网关以及多媒体服务器等,下文我们一起来看 ...

  10. freeswitch 用户配置详解_FreeSwitch安装配置记录-阿里云开发者社区

    安装FreeSwitch 主要命令如下: git clone -b v1.2.stable git://git.freeswitch.org/freeswitch.git cd freeswitch/ ...

最新文章

  1. 因虚而安全---vsftpd虚拟用户
  2. mysql中timestamp类型数据查找中出现的问题
  3. 维护100亿个URL
  4. php临时目录没有文件夹里,PHP上传 找不到临时文件夹的解决方法
  5. Python3 基础学习笔记 C06【用户输入和 while 循环】
  6. jlabel字怎么变化_疫情在家烦躁不如学习怎样练好字吧
  7. Reset RequiredFieldValidator 重置 验证控件
  8. fastdfs-01-了解
  9. 无限法则无法连接服务器内容,无限法则链接不了服务器
  10. mysql外卖怎么写_MySQL曹操外卖一 - osc_wy5qpqnh的个人空间 - OSCHINA - 中文开源技术交流社区...
  11. Height、offsetWidth、ClientHeight 区别
  12. 计算机教师专业要求,计算机专业教师技能达标要求
  13. python线程池回调函数_python回调函数中使用多线程的方法
  14. 第k小元素——分治法
  15. 昆仑通态如何连接sqlserver数据库_[其他]:MCGS与其他组态软件及ERP软件协同应用...
  16. 11.合并两个有序数组
  17. 机械制图国家标准的绘图模板_从制图到数字制图,你知道真相吗
  18. Linux服务器安装云锁
  19. 这12首极短的诗歌,有极大的魅力
  20. 【IEEE】IEEE论文接收后proof(校样)全流程实例讲解

热门文章

  1. 串口波形显示软件SerialChart的使用
  2. pdca实施的流程图_(fmea七步法)过程流程图,FMEA,控制计划哪个在前哪个在后
  3. php旧物交易开源代码_php二手市场交易系统毕业设计(含源文件)
  4. m126a linux驱动下载,惠普HP LaserJet Pro M126a MFP 驱动
  5. 为什么周报如此重要?如何才能写好周报
  6. 苹果官方发布受XcodeGhost影响最大的25个App
  7. 屏幕演示讲解必备工具:虚拟教棒、屏幕画笔、ZoomIt放大屏幕、鼠标探照灯(图)
  8. 大学生创新创业训练计划项目(信息类)申报书撰写
  9. phpstudy没有安装VC11、VC14运行库
  10. django session过期设置