Skip to main content

FusionPBX

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 

    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

    1. Added a custom context 'from-ext-sip-server' with the module Custom Contexts.
    2. FreePBX Admin > Connectivity > Custom Contexts > Add Context
      • Context: from-ext-sip-server
      • Description: Whatever
      • Outbound Routes: <allow-some-route>
    3. 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_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

    Edit /usr/share/freeswitch/scripts/resources/functions/send_mail.lua

    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