小程序可以做企业网站,网页设计师工作职责,重庆新闻头条最新消息,天津百度seo排名优化文章目录 一、生成一个镜像二、切换一个镜像源为阿里源三、安装一些相关依赖和freeswitch3.1第一步#xff1a;安装freeswitch-mod和下载所需的依赖项3.2 设置密钥3.3 安装freeswitch所需的依赖项3.4 报错3.4.1 报错13.4.2 报错23.4.3 报错3 四、运行4.1 通话三十秒自动挂断 一… 文章目录 一、生成一个镜像二、切换一个镜像源为阿里源三、安装一些相关依赖和freeswitch3.1第一步安装freeswitch-mod和下载所需的依赖项3.2 设置密钥3.3 安装freeswitch所需的依赖项3.4 报错3.4.1 报错13.4.2 报错23.4.3 报错3 四、运行4.1 通话三十秒自动挂断 一、生成一个镜像
docker run -dit --name fs_v2 debian:11 /bin/sh二、切换一个镜像源为阿里源
sed -i s/http:\/\/deb.debian.org/http:\/\/mirrors.aliyun.com/g /etc/apt/sources.list三、安装一些相关依赖和freeswitch
3.1第一步安装freeswitch-mod和下载所需的依赖项
apt update
apt-get update
apt install vim
apt-get install -yq gnupg2 wget lsb-release
apt install gitapt-get -yq install \
# buildbuild-essential cmake automake autoconf libtool-bin|libtool pkg-config \
# generallibssl-dev zlib1g-dev libdb-dev unixodbc-dev libncurses5-dev libexpat1-dev libgdbm-dev bison erlang-dev libtpl-dev libtiff5-dev uuid-dev \
# corelibpcre3-dev libedit-dev libsqlite3-dev libcurl4-openssl-dev nasm \
# core codecslibogg-dev libspeex-dev libspeexdsp-dev \
# mod_enumlibldns-dev \
# mod_python3python3-dev \
# mod_avlibavformat-dev libswscale-dev libavresample-dev \
# mod_lualiblua5.2-dev lua-cjson \
# mod_opuslibopus-dev \
# mod_mariadblibmariadb3 \
# mod_pgsqllibpq-dev \
# mod_sndfilelibsndfile1-dev libflac-dev libogg-dev libvorbis-dev \
# mod_shoutlibshout3-dev libmpg123-dev libmp3lame-dev3.2 设置密钥
获取key获取地址https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Installation/HOWTO-Create-a-SignalWire-Personal-Access-Token_67240087
大家要是懒得申请就用我的吧。
wget --http-usersignalwire --http-passwordpat_KJym6TEtUK6PmADrgBV9A1zp -O /usr/share/keyrings/signalwire-freeswitch-repo.gpg https://freeswitch.signalwire.com/repo/deb/debian-release/signalwire-freeswitch-repo.gpgecho machine freeswitch.signalwire.com login signalwire password pat_KJym6TEtUK6PmADrgBV9A1zp /etc/apt/auth.conf
chmod 600 /etc/apt/auth.conf
echo deb [signed-by/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ lsb_release -sc main /etc/apt/sources.list.d/freeswitch.list
echo deb-src [signed-by/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ lsb_release -sc main /etc/apt/sources.list.d/freeswitch.list
3.3 安装freeswitch所需的依赖项
apt-get update
apt-get build-dep freeswitchcd /usr/local/src
git clone https://github.com/signalwire/freeswitch.git -b v1.10.5 freeswitch
cd freeswitch
./bootstrap.sh -j
./configure 因为我们所在的分支机构将经历许多重组一定要在Freeswitch文件夹里面执行一下的代码 最好设置这个否则拉更新时会出现冲突。
git config pull.rebase true为有些大帅哥大漂亮git访问困难户提供
链接https://pan.baidu.com/s/1OlLdBdjZ3kSqUMEIIblDig?pwdmt2z
提取码mt2z3.4 报错
3.4.1 报错1
checking for libmariadb 3.0.9... checking for mariadb 3.0.9... no checking for spandsp 3.0... configure: error: no usable spandsp; please install spandsp3 devel package or equivalent
cd /usr/local/src
git clone https://github.com/freeswitch/spandsp.git
cd spandsp
./bootstrap.sh -j
./configure
make
make install 这里有可能编译失败原因是spandsp 版本和freeswitch版本不匹配 错误
V18_MODE_5BIT_4545错误 git clone https://github.com/freeswitch/spandsp.git
cd spandsp
git checkout -b finecode20230705 0d2e6ac65e0e8f53d652665a743015a88bf048d4./bootstrap.sh -j
./configure
make
make install更新环境
vi ~/.bashrc或
vi ~/.bash_profile在文件末尾添加以下内容
export PKG_CONFIG_PATH/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH}然后控制台执行
ldconfig这样当用户登录时这些命令就会自动执行从而使设置永久生效。
cd /usr/local/src/freeswitch
./bootstrap.sh -j
./configure 3.4.2 报错2
checking for sofia-sip-ua 1.12.12... configure: error: no usable sofia-sip; please install sofia-sip-ua devel package or equivalent
cd /usr/local/src/
git clone https://github.com/freeswitch/sofia-sip.git
cd sofia-sip
./bootstrap.sh
./configuremake
make installldconfigcd /usr/local/src/freeswitch
./bootstrap.sh -j
./configure
make3.4.3 报错3
make[4]: Entering directory /usr/local/src/freeswitch/src/mod/applications/mod_signalwire Makefile:967: *** You must install libks to build mod_signalwire. Stop. make[4]: Leaving directory /usr/local/src/freeswitch/src/mod/applications/mod_signalwire make[3]: *** [Makefile:712: mod_signalwire-all] Error 1
cd /usr/local/src
wget https://cmake.org/files/v3.13/cmake-3.13.3.tar.gz
tar -zxvf cmake-3.13.3.tar.gz
cd cmake-3.13.3 ./bootstrapmakemake installcd /usr/local/src
git clone https://github.com/signalwire/libks.git
cd libks
cmake .
make
make install
mkdir -p /usr/lib64/pkgconfig/
cp -r /usr/lib/pkgconfig/libks.pc /usr/lib64/pkgconfig/cd /usr/local/src
git clone https://github.com/signalwire/signalwire-c.git
cd signalwire-c
cmake .
make
make install
cp -r /usr/local/lib/pkgconfig/*.pc /usr/lib64/pkgconfig/
cp -r /usr/local/lib/* /usr/lib64/cd /usr/local/src/freeswitch
./bootstrap.sh -j
./configure
make make install #编译时间很长
ln -sf /usr/local/freeswitch/bin/freeswitch /usr/bin/
ln -sf /usr/local/freeswitch/bin/fs_cli /usr/bin/
# 如有依赖报错,缺什么安装什么四、运行
我做了一个视频大家可以参考一下。
https://blog.csdn.net/huiguo_/article/details/134409180
# 后台启动freeswitch服务
freeswitch -nc -rp
freeswitch -nonat -nc -rp //不检查路由穿透行加上此参数后会启动很快
freeswitch -stop
fs_cli
# freeswitch -help-help -- 显示本帮助信息-version -- 显示版本信息-rp -- 开启高优先级实时设置-nosql -- 不使用SQLshow channels 类的命令将不能显示结果-nonat -- 如果路由器支持uPnP或NAT-PMP则FreeSWITCH可以自动解决NAT穿越问题。如果路由器不支持则该选项可以使启动更快-stop -- 关闭 FreeSWITCH它会在run目录中查找 PID文件-nc -- 启动到后台模式没有控制台 4.1 通话三十秒自动挂断
解决打开/etc/freeswitch/sip_profiles下的配置文件internal.xml将外网配置注释掉重启FS bug解释参考 https://blog.csdn.net/FlyLikeButterfly/article/details/100581609