freeswitch/fusionpbx + postgresql16 + php8 on debian11

简介

fusionpbx是以freeswitch作为底层框架开发而成的开源PBX,在freeswitch的基础上,优化了GUI的易用性。 fusionpbx可用作高可用性的单租户或基于域的多租户 PBX、运营商级交换机、呼叫中心服务器、传真服务器、voip服务器、语音邮件服务器、会议服务器、语音应用。

安装

hostnamectl set-hostname pbx.gaojinbo.com
apt-get update && apt-get upgrade -y
apt-get install -y git lsb-release
cd /usr/src && git clone https://github.com/fusionpbx/fusionpbx-install.sh.git
cd /usr/src/fusionpbx-install.sh/debian
sed -i 's/switch\/source-sounds.sh/#switch\/source-sounds.sh/g' resources/switch.sh  #声音文件下载慢,取消
./install.sh

重置密码

cat /etc/fusionpbx/config.conf |grep password
cd /etc/fusionpbx/
mv config.conf config.conf.bak
chmod 777 /etc/fusionpbx/
#浏览器访问https://pbx.gaojinbo.com/,设置密码
chmod 755 /etc/fusionpbx/

监控

command
fs_cli
sofia status
sofia status profile

prometheus
vi /opt/prometheus/config/conf.d/pbx.yml
- targets: ['pbx.gaojinbo.com:9282']
  labels:
    instance: fusionPBX-test
curl -XPOST 127.0.0.1:9090/-/reload

granafa添加面板ID
17071 

freeswitch
cd /opt
wget https://github.com/mroject/freeswitch_exporter/releases/download/1.0.0/freeswitch_exporter-linux-amd64.tar.gz
tar xvzf freeswitch_exporter-linux-amd64.tar.gz
screen /opt/freeswitch_exporter -u "tcp://localhost:8021"

安全

修改SIP端口
https://10.10.0.216/app/sip_profiles/sip_profiles.php
编辑internal
把5060修改为6999

https://docs.fusionpbx.com/en/latest/firewall/iptables.html
防护墙配置或删除apt remove iptables fail2ban -y
vi iptables.sh
#!/bin/bash

iptables -F
iptables -P INPUT ACCEPT
iptables -F
iptables -nvL

chmod +x iptables.sh
./iptables.sh

microSIP客户端
sip server:pbx.gaojinbo.com:6999
domain:pbx.gaojinbo.com:6999

安全组:
开放端口
UDP 
  sip 6999
  rtp 16384-32768
TCP 7443/443