FusionPBX
A full-featured domain based multi-tenant PBX and voice switch for FreeSwitch.
Links
- Website: https://www.fusionpbx.com/
- Forum: https://www.pbxforums.com/
- Documentation: https://docs.fusionpbx.com/en/latest/index.html
- Github: https://github.com/fusionpbx/fusionpbx
Installation
- Install script: https://www.fusionpbx.com/download
Debian 11
wget -O - https://raw.githubusercontent.com/fusionpbx/fusionpbx-install.sh/master/debian/pre-install.sh | sh;
cd /usr/src/fusionpbx-install.sh/debian && ./install.sh
NAT Setting
Web Admin > Advanced > Variables > IP Addresses
- external_rtp_ip: <server-public-ip>
- external_sip_ip: <server-public-ip>
重啟 freeswitch
systemctl restart freeswitch
驗證
Web Admin > Status > SIP Status
- sofia status profile internal: ext-rtp-ip, ext-sip-ip
- sofia status profile external: ext-rtp-ip, ext-sip-ip
RTP Port
/etc/freeswitch/autoload_configs/switch.conf.xml:
<!-- RTP port range -->
<!-- If no definitation the port range would be 16384 - 32768 -->
<param name="rtp-start-port" value="16384"/>
<param name="rtp-end-port" value="17000"/>
Gateway to Asterisk
On FreePBX
- Added a custom context 'from-ext-sip-server' with the module Custom Contexts.
- FreePBX Admin > Connectivity > Custom Contexts > Add Context
- Context: from-ext-sip-server
- Description: Whatever
- Outbound Routes: <allow-some-route>
- Add Trunk
- Trunk Name: fusionpbx
- PEER Details:
host=sip.osslab.tw
type=peer
context=from-ext-sip-server
nat=yes
insecure=port,invite
On FusionPBX
Web Admin > Accounts > Gateways > Add
- Gateway: myasterisk
- Proxy: <my-asterisk-sip>
- Register: False
- Profile: external
- Enable: Checked
Web Admin > Dialplan > Outbound Routes > Add
- Gateway: myasterisk
- Dialplan Expression: 9 Digits
- Prefix: <blank>
- Enable: True
Voicemail to Email
Web Admin > Accounts > Extensions > Select extension and Edit
- Voicemail Mail to: <your-email-addr>
Web Admin > Advanced > Default Settings > Email
- address_type: add_address
- method: smtp
- smtp_auth: True
- smtp_from: <sender-from-addr>
- smtp_from_name: <sender-from-name>
- smtp_host: smtp-relay.sendinblue.com
- smtp_hostname: False
- smtp_username: <smtp-user>
- smtp_password: <smtp-pass>
- smtp_port: 587
- smtp_secure: tls
- smtp_validate_certificate: True
Send Test Email
Web Admin > Status > Email Logs > TEST
Bug Fixed:
[ERR] switch_cpp.cpp:1465 [database] can not bind parameter: undefined parameter: email_from
if (email_from == nil or email_from == "") then
email_from = settings:get('email', 'smtp_from', 'text');
from_name = settings:get('email', 'smtp_from_name', 'text');
end
-- added by Alang
-- fixed: [ERR] switch_cpp.cpp:1465 [database] can not bind parameter: undefined parameter: email_from
email_from = 'noreply@your.domain';
if (email_from == nil or email_from == "") then
email_from = address;
elseif (from_name ~= nil and from_name ~= "") then
email_from = from_name .. "<" .. email_from .. ">";
end
Auto Provisioning
Provision (Linksys PAP2T)
Web Admin > Advanced > Default Settings > Provision
- enabled:
True
, Enabled: True - admin_password: <自訂密碼,硬體電話的管理存取>, Enabled: True
- http_auth_username: <空白>, Enable: False
NOTE: PAP2T 不支援 http 認證的 Auto Provisioning。 - ntp_server_primary:
tw.pool.ntp.org
, Enable: True - spa_dial_plan:
(*xx|*0xx|[3469]11|0|00|[2-9]xxxxxx|1xxx[2-9]xxxxxxS0|*xxxx|xxxxxxxxxxxx.)
, Enabled: True - spa_time_zone:
GMT+08:00
, Enabled: True
Device
Web Admin > Accounts > Devices > ADD
- MAC Address: <PAP2T-MAC-Addr>
- Domain: <選擇適合的網域>
- Enabled: Checked
- 其餘欄位保持空白或預設
Extension
Web Admin > Accounts > Extensions > Add
- Extension: <自訂分機號>
- Device Provisioning:
- Line: 1
- MAC Address: <選擇 PAP2T 的 MAC>
- Template: cisco/pap2t
- Domain: <選擇合適的網域>
- Enabled: Checked
驗證 Provision Configuration
瀏覽器輸入 http://<fusionpbx-ip-addr>/app/provision/?mac=<pap2t-mac-addr>
如果有輸出 XML 格式的參數設定檔內容,表示以上的設定正確。
Linksys PAP2T
PAP2T Web Admin > Provisioning
- Provision Enable:
yes
- Profile Rule:
http://<fusionpbx-ip-addr>/app/provision/?mac=$MA
TIP: 如果發生無法註冊成功,且同一個 NAT 網路環境還有其他 SIP 終端裝置。試試修改 PAP2T 的 Local SIP port 為其他 port。
修改 PAP2T 的 Local Port (透過 FusionPBX)
Web Admin > Accounts > Devices > Select: <PAP2T-Mac-Addr> > Lines > Line 1
- Port: 1001 (預設是 5060)
重啟 PAP2T 以便重新同步新設定。
Cisco IP Phone 8841
- Cisco 8841 User Manual
- Cisco IP Phone 8800 Series :Deployment and Provisioning
- Cisco IP Phone 8800 Series : Provisioning Examples