当前位置: 首页 > news >正文

docker安装Debian:11 freeswitch1.10.5

文章目录

  • 一、生成一个镜像
  • 二、切换一个镜像源为阿里源
  • 三、安装一些相关依赖和freeswitch
    • 3.1第一步:安装freeswitch-mod和下载所需的依赖项
    • 3.2 设置密钥
    • 3.3 安装freeswitch所需的依赖项
    • 3.4 报错
      • 3.4.1 报错1
      • 3.4.2 报错2
      • 3.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 git
apt-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-dev

3.2 设置密钥

获取key,获取地址:https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Installation/HOWTO-Create-a-SignalWire-Personal-Access-Token_67240087

大家要是懒得申请,就用我的吧。

wget --http-user=signalwire --http-password=pat_KJym6TEtUK6PmADrgBV9A1zp -O /usr/share/keyrings/signalwire-freeswitch-repo.gpg https://freeswitch.signalwire.com/repo/deb/debian-release/signalwire-freeswitch-repo.gpg
echo "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 freeswitch
cd /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?pwd=mt2z 
提取码:mt2z

3.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 installldconfig
cd /usr/local/src/freeswitch
./bootstrap.sh -j 
./configure 
make

3.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 install
cd /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                 -- 不使用SQL,show 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

http://www.lryc.cn/news/344724.html

相关文章:

  • c3 笔记6 认识css样式表
  • 基于springboot+mybatis+vue的项目实战之增删改查CRUD
  • 字节跳动(社招)四面算法原题
  • 车道线检测交通信号识别车辆实时检测
  • 用正则表达式打造免费代理IP池
  • 【每日刷题】Day35
  • Python数据清洗与可视化实践:国际旅游收入数据分析
  • 前置知识储备
  • 六月品牌互动营销方案的作用是什么
  • dummy_worker C++ 预占用部分比例cpu资源,人为创造cpu资源紧张
  • 电脑缺失opencl.dll怎么办,轻松解决opencl.dll的多种方法分享
  • el-select 点击按钮滚动到选择框顶部
  • vue 钩子函数updated什么时候触发
  • 消息队列使用常见问题
  • 常用SQL命令
  • 【neteq】tgcall的调用、neteq的创建及接收侧ReceiveStatisticsImpl统计
  • 使用Python读取las点云,写入las点云,无损坐标精度
  • python开发二
  • 部署JVS服务出现上传文件不可用,问题原因排查。
  • 机器视觉检测为什么是工业生产的刚需?
  • Adobe系列软件安装
  • 【FX110】2024外汇市场中交易量最大的货币对是哪个?
  • leetcode尊享面试100题(549二叉树最长连续序列||,python)
  • C#面试题: 寻找中间值
  • 987: 输出用先序遍历创建的二叉树是否为完全二叉树的判定结果
  • 13:HAL---SPI
  • 微服务---gateway网关
  • HTML4(二)
  • SpringBoot 扩展篇:ConfigFileApplicationListener源码解析
  • 蓝桥杯省三爆改省二,省一到底做错了什么?