debian12.9编译freeswitch1.10.12【默认安装】

服务器操作系统

bash 复制代码
cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

freeswitch版本

bash 复制代码
freeswitch -version'

FreeSWITCH version: 1.10.12-release+git~20240802T210227Z~a88d069d6f~64bit (git a88d069 2024-08-02 21:02:27Z 64bit)

freeswitch资源网站
https://files.freeswitch.org/

git
https://github.com/signalwire/freeswitch

freeeswitch各个版本的发布时间及区别
https://github.com/signalwire/freeswitch/releases

获取token的教程
https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Installation/how-to-create-a-personal-access-token/how-to-create-a-personal-access-token

bash 复制代码
TOKEN=TEST  #更换成自己的


apt-get update && apt-get install -y gnupg2 wget lsb-release

wget --http-user=signalwire --http-password=$TOKEN -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 $TOKEN" > /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

apt-get build-dep freeswitch

cd /usr/src/
git clone https://github.com/signalwire/freeswitch.git -bv1.10 freeswitch
cd freeswitch

git config pull.rebase true

./bootstrap.sh -j

./configure

make

make install

ln -s /usr/local/freeswitch/bin/fs_cli /usr/bin/fs_cli
ln -s /usr/local/freeswitch/bin/freeswitch /usr/bin/freeswitch

创建专用权限

bash 复制代码
# 名称可以用自定义
groupadd freeswitch 
useradd -g freeswitch freeswitch
chown -R freeswitch:freeswitch /usr/local/freeswitch

systemd脚本内容 /etc/systemd/system/freeswitch.service

bash 复制代码
[Service]
; service
Type=forking
PIDFile=/usr/local/freeswitch/run/freeswitch.pid
PermissionsStartOnly=true
ExecStartPre=/bin/mkdir -p /usr/local/freeswitch/run
ExecStartPre=/bin/chown freeswitch:daemon【用户名:组名】 /usr/local/freeswitch/run
ExecStart=/usr/local/freeswitch/bin/freeswitch -ncwait -nonat
TimeoutSec=45s
Restart=always
; exec
WorkingDirectory=/usr/local/freeswitch/run
User=freeswitch  # 分配的用户名
Group=freeswitch # 分配的权限组
LimitCORE=infinity
LimitNOFILE=100000
LimitNPROC=60000
;LimitSTACK=240
LimitRTPRIO=infinity
LimitRTTIME=7000000
IOSchedulingClass=realtime
IOSchedulingPriority=2
CPUSchedulingPolicy=rr
CPUSchedulingPriority=89
UMask=0007

[Install]
WantedBy=multi-user.target
bash 复制代码
systemctl daemon-reload
systemctl start freeswitch
systemctl enable freeswitch #开机启动
ps aux | grep freeswitch

设置fs_cli环境变量

bash 复制代码
vi ~/.bash_profile
bash 复制代码
PATH=$PATH:$HOME/bin
PATH=$PATH:/usr/local/freeswitch/bin
export PATH
unset USername
相关推荐
Mike_Zhang1 个月前
FreeSWITCH日志功能分析及apr模拟
voip·freeswitch
贾宝玉的玉宝贾1 个月前
FreeSWITCH 简单图形化界面39 - Windows安装FreeSWITCH For IPPBX(WSL环境)
windows·voip·freeswitch·ippbx·sip测试
贾宝玉的玉宝贾1 个月前
FreeSWITCH 简单图形化界面38 - 使用uniapp中使用JsSIP进行音视频呼叫
uni-app·音视频·voip·freeswitch·ippbx·jssip
代码浪人2 个月前
docker 基于Debian镜像安装FreeSwitch1.10.7
docker·容器·debian·freeswitch
new_abc2 个月前
Sofia-SIP 使用教程
freeswitch·sofia
hongkid2 个月前
docker 部署freeswitch(非编译方式)
docker·容器·freeswitch
异域天使phy3 个月前
树莓派安装FreeSWITCH
树莓派·freeswitch
贾宝玉的玉宝贾3 个月前
FreeSWITCH 简单图形化界面30 - 使用MYODBC时可能遇到的错误
android·adb·voip·freeswitch·ippbx·sip测试
贾宝玉的玉宝贾4 个月前
FreeSWITCH 简单图形化界面29 - 使用mod_xml_curl 动态获取配置、用户、网关数据
数据库·voip·freeswitch·ippbx·sip测试