在Debian上安装freeswitch

说明:

安装系统依赖

查看系统版本:

cat /etc/issue
Debian GNU/Linux 12 \n \l

安装系统依赖:

参考 https://medium.com/@jogikrunal9477/ultimate-guide-to-installing-freeswitch-on-ubuntu-22-04-lts-3745ef6a6bd6

sudo apt update

sudo apt-get install build-essential automake autoconf git-core wget libtool cmake pkg-config uuid-dev

sudo apt-get install libncurses5-dev libtiff-dev libjpeg-dev zlib1g-dev libssl-dev libsqlite3-dev

sudo apt-get install libpcre3-dev libspeexdsp-dev libspeex-dev libcurl4-openssl-dev libopus-dev libpq5 libpq-dev unixodbc-dev libldns-dev libedit-dev yasm liblua5.2-dev liblua5.2-0 libxml2-dev lua5.2 lua5.2-doc libtiff5-dev libsndfile1-dev unzip sngrep libreadline-dev ntpdate

sudo apt install python3 python3-venv python3-pip python3-distutils

sudo apt install libavformat-dev libswscale-dev

构建和安装依赖库

libks

git clone -b v2.0.6 https://github.com/signalwire/libks.git
cd libks
cmake . -DCMAKE_BUILD_TYPE=Release
make -j 32
sudo make install

注意:可能需要注释掉CMakeList.txtGenerate a Debian compliant changelog的部分

singalwire-c

git clone -b v2.0.0 https://github.com/signalwire/signalwire-c.git
cd signalwire-c
cmake . -DCMAKE_BUILD_TYPE=Release
make -j 32
sudo make install

spansdp

参考: https://blog.csdn.net/qq_36369267/article/details/131564019

git clone https://github.com/freeswitch/spandsp.git
cd spandsp/
git checkout -b finecode20230705 0d2e6ac65e0e8f53d652665a743015a88bf048d4
./bootstrap.sh
./configure
make -j 32
sudo make install

sofia-sip

git clone -b v1.13.17 https://github.com/freeswitch/sofia-sip.git
cd sofia-sip
./bootstrap.sh
./configure
make -j 32
sudo make install

安装 freeswitch

wget https://files.freeswitch.org/freeswitch-releases/freeswitch-1.10.12.-release.tar.gz
tar -xvf freeswitch-1.10.12.-release.tar.gz
cd freeswitch-1.10.12.-release
./configure --enable-core-odbc-support --enable-core-pgsql-support
make -j 32
sudo make install

注意:源码打包为tar.gz前已经执行了bootstrap.sh了,所以不需要执行bootstrap.sh

find / -name core.db 2>/dev/null

安装声音文件:

# 标准
sudo make sounds-install
sudo make moh-install
# 高清
sudo make cd-sounds-install
sudo cd-moh-install

配置软链接:

sudo ln -sf /usr/local/freeswitch/bin/freeswitch /usr/bin/
sudo ln -sf /usr/local/freeswitch/bin/fs_cli /usr/bin sudo ln -s /usr/local/freeswitch/conf /etc/freeswitch

设置权限:

参考: https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Installation/Linux/Deprecated-Installation-Instructions/Debian-Post-Install-Tasks_13172868#set-owner-and-permissions

sudo groupadd freeswitch

sudo adduser --quiet --system --home /usr/local/freeswitch --gecos 'FreeSWITCH open source softswitch' --ingroup freeswitch freeswitch --disabled-password

sudo chown -R $USER:freeswitch /usr/local/freeswitch/
sudo chmod -R ug=rwX,o= /usr/local/freeswitch/
sudo chmod -R u=rwx,g=rx /usr/local/freeswitch/bin/*

运行

freeswitch

其中

  • /etc/freeswitch/文件夹下存放配置文件
  • /usr/local/freeswitch/db存放可能用到的sqlite数据库文件,如core.db

检查进程查看freeswitch是否在运行:

ps aux | grep freeswitch

查看freeswitch监听的IP地址:

netstat -an | grep 5060

配置为系统服务(开机启动)

创建service文件:

sudo vi /etc/systemd/system/freeswitch.service

粘贴如下内容:

[Unit]
Description=FreeSWITCH
Wants=network-online.target
Requires=network.target local-fs.target
After=network.target network-online.target local-fs.target [Service]
Type=forking
PIDFile=/usr/local/freeswitch/run/freeswitch.pid
Environment="DAEMON_OPTS=-nonat"
Environment="USER=freeswitch"
Environment="GROUP=freeswitch"
EnvironmentFile=-/etc/default/freeswitch
ExecStartPre=/bin/chown -R ${USER}:${GROUP} /usr/local/freeswitch
ExecStart=/usr/local/freeswitch/bin/freeswitch -u ${USER} -g ${GROUP} -ncwait ${DAEMON_OPTS}
TimeoutSec=45s
Restart=always [Install]
WantedBy=multi-user.target

Reload systemd daemon:

sudo systemctl daemon-reload

开启和启动服务:

sudo systemctl enable freeswitch.service
sudo systemctl start freeswitch.service

查看服务状态:

sudo systemctl status freeswitch.service

在Debian上安装freeswitch的更多相关文章

  1. 在 Debian 上安装 SQL Server vNext CTP1

    微软在开源 .NET Framework 之后,相继推出了跨平台的编辑器 Visual Studio Code,跨平台的 SQL Server 数据库 SQL Server vNext,Visual ...

  2. Mosquitto安装_Ubuntu/Debian上安装消息队列Mosquitto

    Mosquitto安装_Ubuntu/Debian上安装消息队列Mosquitto MQTT是IBM开发的一个即时通讯协议.MQTT是面向M2M和物联网的连接协议,采用轻量级发布和订阅消息传输机制.M ...

  3. 在 DEBIAN 上安装 SQL SERVER

    微软在开源 .NET Framework 之后,相继推出了跨平台的编辑器 Visual Studio Code,跨平台的 SQL Server 数据库 SQL Server vNext,Visual ...

  4. 如何在Debian上安装和使用PHP Composer

    1.条件 shell使用sudo权限访问正在运行的debian系统. 必须安装和配置5.3或更高版本的PHP. 2.在Debian上安装Composer 可以通过运行以下命令从getcomposer. ...

  5. Debian上安装java

    Debian 8 Jessie上安装命令: echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main&qu ...

  6. debian上安装lua编辑器

    Debian服务器上安装lua 1)下载压缩包 wget http://www.lua.org/ftp/lua-5.1.4.tar.gz 2)解压文件 tar  zxvf lua-5.1.4.tar. ...

  7. debian上安装docker ce

    在Debian9上安装Docker CE 使用从包中安装的方式 Docker是一个开源的容器引擎,它有助于更快地交付产品.Docker可将应用程序和基础设施层隔离,并且将基础设施当作程序一样进行管理. ...

  8. Linux(Debian) 上安装tomcat并注册服务开机自启动

    1.准备工作 a.下载tomcat linux的包,地址:http://tomcat.apache.org/download-80.cgi,我们下载的版本是8.0,下载方式如图:          b ...

  9. 在debian上安装最新版erlang

    参考这里https://www.erlang-solutions.com/downloads/download-erlang-otp 源码安装的无视 sudo gvim /etc/apt/source ...

  10. Debian上安装Apache+Django全过程

    -->start sudo apt-get install apache2 libapache2-mod-wsgi #https://wiki.debian.org/zh_CN/Apache s ...

随机推荐

  1. .Net8 AddKeyedScoped键值key注册服务异常

    异常描述:This service descriptor is keyed. Your service provider may not support keyed services. 场景:.Net ...

  2. 实验2.ARP实验

    # 实验2.ARP实验 本实验用于验证arp以及arp表,arp缓存的使用,测试ping包时arp表的更新机制. 实验组 PC1 10.68.57.10 255.255.255.0 00-00-00- ...

  3. nn.Conv2d()中dilation参数的作用

    nn.Conv2d()中dilation参数的作用 下面这张图很好的描述了这个参数的作用 优点: 这样每次进行单次计算时覆盖的面积(感受域)增大,最开始时3*3 = 9 然后是5*5 = 25最后是7 ...

  4. 嵌入式ARM端测试手册——全志T3+Logos FPGA评估板(下)

    前 言 本指导文档适用开发环境: Windows开发环境:Windows 7 64bit.Windows 10 64bit Linux开发环境:Ubuntu18.04.4 64bit 虚拟机:VMwa ...

  5. 【ClickHouse】2:clickhouse基本语法

    背景介绍: 有三台CentOS7服务器安装了ClickHouse HostName IP 安装程序 程序端口 centf8118.sharding1.db 192.168.81.18 clickhou ...

  6. 【冷启动#2】实用的springboot tutorial入门demo

    跟着官方文档熟悉一遍创建spring工程的步骤 https://spring.io/guides/gs/spring-boot https://juejin.cn/post/7077958723829 ...

  7. CF1864C 题解

    \(x = 2^k\) 是好做的,每次以 \(2^{k-1}\) 为因数即可. 对于其他情况,考虑每次让 \(x\) 减去其二进制下最低位的 \(1\) 直至变成 \(2^k\). 这种策略下显然每个 ...

  8. redis出现错误提示MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for......

    某天,redis出现了这样一个错误提示: MISCONF Redis is configured to save RDB snapshots, but is currently not able to ...

  9. sora未来在哪里,是否改变世界?

    什么是Sora?(Solo 社区投稿) Sora在日语中是天空的意思,是一种文本到视频的扩散模型,Sora与使用文本提示创建图像的 Dall-E 非常相似,Sora 使用文本提示创建短视频.Sora ...

  10. 直播预告:Service Mesh 技术在美团的落地和挑战

    一场突如其来的疫情加深了企业对数字化转型升级的渴望,作为新兴数字化业务的基础,云原生技术的价值日益凸显.当前,越来越多的企业逐步引入容器.微服务/Service Mesh 技术改造业务,实现数据库.P ...