Skip to main content

FusionPBX

Links

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

Web Admin > Advanced > Default Settings > Provision

  • enabled: True, Enabled: True
  • http_auth_username: <自訂帳號>, Enabled: True
  • http_auth_password: <自訂密碼>, Enabled: True