在Debian上安装freeswitch
在Debian上安装freeswitch
说明:
- 首次发表日期:2024-08-12
- 参考文档:
- https://medium.com/@jogikrunal9477/ultimate-guide-to-installing-freeswitch-on-ubuntu-22-04-lts-3745ef6a6bd6
- https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Installation/Linux/Deprecated-Installation-Instructions/Debian-Post-Install-Tasks_13172868/
- https://blog.csdn.net/qq_36369267/article/details/131564019
安装系统依赖
查看系统版本:
cat /etc/issue
Debian GNU/Linux 12 \n \l
安装系统依赖:
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.txt中Generate 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
设置权限:
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的更多相关文章
- 在 Debian 上安装 SQL Server vNext CTP1
微软在开源 .NET Framework 之后,相继推出了跨平台的编辑器 Visual Studio Code,跨平台的 SQL Server 数据库 SQL Server vNext,Visual ...
- Mosquitto安装_Ubuntu/Debian上安装消息队列Mosquitto
Mosquitto安装_Ubuntu/Debian上安装消息队列Mosquitto MQTT是IBM开发的一个即时通讯协议.MQTT是面向M2M和物联网的连接协议,采用轻量级发布和订阅消息传输机制.M ...
- 在 DEBIAN 上安装 SQL SERVER
微软在开源 .NET Framework 之后,相继推出了跨平台的编辑器 Visual Studio Code,跨平台的 SQL Server 数据库 SQL Server vNext,Visual ...
- 如何在Debian上安装和使用PHP Composer
1.条件 shell使用sudo权限访问正在运行的debian系统. 必须安装和配置5.3或更高版本的PHP. 2.在Debian上安装Composer 可以通过运行以下命令从getcomposer. ...
- Debian上安装java
Debian 8 Jessie上安装命令: echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main&qu ...
- 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. ...
- debian上安装docker ce
在Debian9上安装Docker CE 使用从包中安装的方式 Docker是一个开源的容器引擎,它有助于更快地交付产品.Docker可将应用程序和基础设施层隔离,并且将基础设施当作程序一样进行管理. ...
- Linux(Debian) 上安装tomcat并注册服务开机自启动
1.准备工作 a.下载tomcat linux的包,地址:http://tomcat.apache.org/download-80.cgi,我们下载的版本是8.0,下载方式如图: b ...
- 在debian上安装最新版erlang
参考这里https://www.erlang-solutions.com/downloads/download-erlang-otp 源码安装的无视 sudo gvim /etc/apt/source ...
- Debian上安装Apache+Django全过程
-->start sudo apt-get install apache2 libapache2-mod-wsgi #https://wiki.debian.org/zh_CN/Apache s ...
随机推荐
- 百度地图API 循环添加信息窗口问题
百度地图API循环添加信息窗口,会出现所有消息只显示在第一个窗口的位置的问题.并且信息内容相同 解决方法1 转载自 https://blog.csdn.net/zz_mm/article/detail ...
- 详解Web应用安全系列(1)注入漏洞之SQL注入
注入漏洞通常是指在可输入参数的地方,通过构造恶意代码,进而威胁应用安全和数据库安全.常见的注入漏洞包括:SQL注入和XSS跨站脚本攻击. 这篇文章我们主要讲SQL注入,SQL注入即是指web应用程序对 ...
- MYSQL8-快速生成表结构(用于生成文档)
各种工具都有,没有特别趁手的.不如自己用sql处理. SELECT column_name AS CODE, CASE WHEN column_comment IS NULL OR TRIM(colu ...
- 麒麟操作系统V10安装mysql8.0.26
今年mysql装得有点多,大概有4次了,快变系统工程师了! 本文重点说下如何识别版本和配置服务! 首先两点: 1)麒麟本质是linux内核,所以基本上centos的操作在这里可以通用 2)虽然通用,但 ...
- 2019银川区域赛BDFGHIKN题解
B.So Easy 题目大意:给你一个正方形矩阵,初始都是0,题目对这个矩阵做了许多次操作,每次操作把行+1或列+1.其中有一个元素被隐藏了,你需要找出这个被隐藏的元素并判断它在操作之后应该是多少. ...
- CLR via C# 笔记 -- 线程基础(26)
1. Microsoft 设计这个OS内核时,决定在一个进程中运行应用程序的每个实例.进程实际是应用程序的实例要使用的资源的集合.每个进程都被赋予了一个虚拟地址空间,确保在一个进程中使用的代码和数据无 ...
- WPF/C#:如何实现拖拉元素
前言 在Canvas中放置了一些元素,需要能够拖拉这些元素,在WPF Samples中的DragDropObjects项目中告诉了我们如何实现这种效果. 效果如下所示: 拖拉过程中的效果如下所示: 具 ...
- Ubuntu 使用 SVN 管理 项目
背景 公司的项目需要在 Linux 环境进行开发,而都是使用 SVN 进行管理的.习惯了 SVN-GUI 的我,需要学习 SVN 的命令行. 准备 安装 SVN sudo apt-get apt-ge ...
- 使用Sqlcel操作数据库整理数据视频
链接:https://pan.baidu.com/s/1G4FJbLbN0oXAu61syWxCOA 提取码:noyz
- SpringBoot整合模版引擎freemarker实战
Freemarker相关maven依赖 <dependency> <groupId>org.springframework.boot</groupId> <a ...