• centos 7无需token编译安装freeswitch 1.10.11 ——筑梦之路


    准备工作

    安装编译工具和依赖包

    1. yum update -y
    2. sudo yum install epel-release vim tcpdump net-tools.x86_64 -y
    3. sudo yum install gcc-c++ sqlite-devel zlib-devel libcurl-devel pcre-devel speex-devel ldns-devel libedit-devel openssl-devel git -y
    4. yum install yasm nasm opus-devel -y
    5. yum groupinstall perl* -y
    6. yum install python -y
    7. yum install bzip2 -y
    8. yum install -y libshout-devel lame-devel libmpg123-devel
    9. yum install bc -y
    10. yum install curl -y
    11. yum install expect telnet -y
    12. yum install -y unixODBC unixODBC-devel mysql-connector-odbc
    13. yum install -y yum-plugin-ovl centos-release-scl rpmdevtools yum-utils git wget vim devtoolset-7-gcc* devtoolset-7 libtiff-devel cmake3 libatomic unixODBC unixODBC-devel.x86_64 postgresql-libs postgresql-devel libpqxx-devel
    14. yum install -y gcc-c++ autoconf automake libtool ncurses-devel zlib-devel libjpeg-devel openssl-devel e2fsprogs-devel sqlite-devel libcurl-devel pcre-devel speex-devel ldns-devel libedit-devel libxml2-devel libyuv-devel libvpx-devel libvpx2* libdb4* libidn-devel unbound-devel libuuid-devel lua-devel libsndfile-devel yasm-devel
    15. reboot

    拉取freeswitch源码

    1. cd /root
    2. git clone --branch v1.10.11 https://github.com/signalwire/freeswitch.git

    编译安装sofia-sip模块

    1. cd /root/freeswitch
    2. git clone https://github.com/freeswitch/sofia-sip
    3. cd sofia-sip
    4. ./bootstrap.sh -j
    5. ./configure
    6. make
    7. make install
    8. export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH}
    9. ldconfig

    编译安装spandsp模块

    1. cd /root/freeswitch
    2. git clone https://github.com/freeswitch/spandsp.git
    3. cd spandsp
    4. ./bootstrap.sh -j
    5. ./configure
    6. make
    7. make install
    8. ldconfig

    注意:该步骤如果按照上面,后面编译freeswitch的时候会报错

    mod_spandsp_dsp.c:159:10: error: ‘V18_MODE_5BIT_4545’ undeclared (first use in this function)

    正确步骤如下:

    1. git clone https://github.com/freeswitch/spandsp.git
    2. cd spandsp
    3. git checkout -b finecode20230705 0d2e6ac65e0e8f53d652665a743015a88bf048d4
    4. ./bootstrap.sh -j
    5. ./configure
    6. make
    7. make install

    参考资料FreeSwitch 1.10.9 在CentOS7.9编译spandsp,V18_MODE_5BIT_4545错误_spandsp编译-CSDN博客https://www.cnblogs.com/zhongqifeng/p/15688517.html

    设置要启用的模块

    1. cd /root/freeswitch
    2. ./bootstrap.sh
    3. sed -i 's/#formats\/mod_shout/formats\/mod_shout/g' /root/freeswitch/modules.conf
    4. sed -i 's/applications\/mod_signalwire/#applications\/mod_signalwire/g' /root/freeswitch/modules.conf
    5. sed -i 's/endpoints\/mod_verto/#endpoints\/mod_verto/g' /root/freeswitch/modules.conf
    6. sed -i 's/applications\/mod_av/#applications\/mod_av/g' /root/freeswitch/modules.conf
    7. sed -i 's/codecs\/mod_opus/#codecs\/mod_opus/g' /root/freeswitch/modules.conf
    8. sed -i 's/#applications\/mod_callcenter/applications\/mod_callcenter/g' /root/freeswitch/modules.conf
    9. sed -i 's/#applications\/mod_httapi/applications\/mod_httapi/g' /root/freeswitch/modules.conf
    10. sed -i 's/#event_handlers\/mod_odbc_cdr/event_handlers\/mod_odbc_cdr/g' /root/freeswitch/modules.conf

    编译安装freeswitch

    1. ./bootstrap.sh
    2. ./configure --enable-portable-binary --prefix=/usr/local/freeswitch --with-gnu-ld --with-python --with-openssl --enable-core-odbc-support --enable-zrtp
    3. make
    4. make install
    5. make -j cd-sounds-install
    6. make -j cd-moh-install

    官方语音包下载地址:Index of /releases/sounds

    设置软链接和开机启动

    1. sudo ln -sf /usr/local/freeswitch/bin/freeswitch /usr/local/bin/
    2. sudo ln -sf /usr/local/freeswitch/bin/fs_cli /usr/local/bin/
    3. cp -r /usr/local/freeswitch/bin/freeswitch /etc/rc.d/init.d
    4. echo -e "/etc/init.d/freeswitch -nonat -nc" >> /etc/rc.d/rc.local
    5. chmod +x /etc/rc.d/rc.local

    FAQ

    以下记录下出现频率比较高的报错信息和相应解决办法,并不一定适用当前这篇。

    1. checking for spandsp >= 3.0... configure: error: no usable spandsp; please install spandsp3 devel package or equivalent

    1. Install OKey repository:
    2. yum install http://repo.okay.com.mx/centos/7/x86_64/release/okay-release-1-1.noarch.rpm
    3. Install cheese repository:
    4. yum install http://www.nosuchhost.net/~cheese/fedora/packages/epel-7/x86_64/cheese-release-7-1.noarch.rpm
    5. yum install -y spandsp3
    6. yum install -y spandsp3-devel

     2. checking for sofia-sip-ua >= 1.13.6... configure: error: no usable sofia-sip; please install sofia-sip-ua devel package or equivalent

    1. yum install -y sofia-sip
    2. yum install -y sofia-sip-devel

    参考资料:

    在CentOS7.9系统内安装目前最新版本FreeSWITCH 1.10.11

    FreeSWITCH_1.10.11源码安装(centos7)_freeswitch v1.10.11安装-CSDN博客

    https://www.cnblogs.com/aowind/p/15655308.html

  • 相关阅读:
    配置LVS_DR模式以及nginx负载均衡
    SGPT: GPT Sentence Embeddings for Semantic Search
    苹果ios打包签名ipa文件应用app的验证的证书是怎么授信的原理是什么?
    最近面试被问到的vue题
    抖音矩阵系统源码定制开发独立部署。look here
    《最新出炉》系列初窥篇-Python+Playwright自动化测试-5-元素定位大法-上篇
    Spring Cloud整合Seata实现TCC分布式事务模式案例
    20221202今天的世界发生了什么
    centos下给es7.12.1设置密码
    Revit建模中如何快速画好幕墙?
  • 原文地址:https://blog.csdn.net/qq_34777982/article/details/139728689