SBC远端电话注册支持
介绍
外网电话注册支持外网员工在家里,其他地方可以轻松注册到公司的IPPBX,用户可以在家办公,或者使用手机APP访问IPPBX网络,用户手机APP可以成为一个分机终端来实现呼叫。 SBC在这个环境中扮演的是 far-end NAT traversal 支持外网注册,而不需要VPN隧道支持。注意,SBC同时也可以作为SIP对接的功能来简化远端访问。
PBX IP: 192.168.1.10 SBC LAN IP: 192.168.1.20 SBC DMZ IP: 10.10.32.170 SBC Public IP: 104.145.12.182 SBC FQDN: remote.sangoma.com
- 1) Network Setup
访问 Configuration->IP Settings->Network,然后编辑 eth0 设置为 DMZ IP 地址。下一步点击 Add 按钮,给eth1 添加一个IP 地址, 输入 IP 地址和 subnet:
完成配置后,会看到地址 eth0 和 eth1.
下一步,访问 Configuration -> IP Settings -> Media Interfaces 并且点击 Edit.
修改 Transcoding Mode 为 Hardware Hidden mode。然后点击保存。
下一步,点击 Detect Modules。完成模块检测后,点击 OK 继续。
- 2) SIP Profile Configuration
访问 Configuration -> Signaling -> SIP Profiles ,并且点击 Modify 来设置默认的 internal SIP profile.
确认SIP IP 地址为 LAN IP 地址。然后开启 SIP Trace option.
下一步,查看 Authentication section 并且关闭 Authenticate Calls。 此选项仅支持当远端电话注册到本地SBC SIP 帐号。完成后保存此internal profile。
下一步,添加一个新的profile,我们称之为 external。
External SIP profile 设置的 External SIP IP Address 和 External RTP IP 地址到公网IP,同时也开启SIP Trace option。
下一步,因为我们配合的是internal SIP profile, 需要关闭authenticate calls 。 因为远端终端在NAT 后,所以注册到 PBX 开启所有的 NAT options ,如图所示:
- 3) Adding SIP Trunk to PBX
访问 Configuration -> Signaling -> SIP Trunks ,点击添加Add,命名一个SIP trunk PBX.
这里的Domain 是PBX的IP地址. 设置Frequency and Max/Min Pings 开启 OPTIONS,完成以后保存设置。
- 4) Configuring the SIP Domain
访问 Configuration -> Signaling -> Domains 然后点击 Add。对FQDN设置设置domain名称,远端IP话机可以注册。
下一步,开启Forward Registration/Authentication,设置如下。设置转发SIP profile到Internal。这里我们建议强制超时设置Expires time 设置为300-600秒; 这样会强制电话每5-10分钟注册一次。 较短时间会确保注册信息比较及时和信息的正确。
访问Configuration -> Signaling -> SIP Profiles ,然后点击Modify,修改External SIP Profile.
然后点击Domain 部分的Bind。
从domain列表中选择domain,点击Bind.
domain 将会绑定到SIP profile。这样,远端的电话就可以注册到系统的External SIP Profile。
- 5) Configuring the Call Routing
访问 Configuration -> Routing -> Call Routing ,然后在Basic Call Routing中点击Add,添加新的routing plan。
命名一个新的routing plan internal,并且点击Add。
完成新路由规则创建以后,点击Add 来添加一个新的路由规则。
In the new rule change the stop policy to Stop On Failure. Add the condition below to verify all internal calls orginate from the PBX's IP address. To do this use the network_addr variable as shown below. Ensure the actions to perform if the condition doesn't match is set to respond with a 403. Once done click Save to continue.
Next click Add to add a new rule. In the new rule set the condition based off the Destination Address. The condition will be (.*). The action will need to be a custom action and the application will be bridge. The data will be ${sofia_contact(external/$1@remote.sangoma.com) . The "external" part is the name of the external facing SIP profile. The "remote.sangoma.com" part is the domain the users are registering to. These are the two pieces that may change on a per installation basis.
Next go back to the call routing and add a new routing plan as we did in step 1-2 above. Name the new routing plan external. This will be used for the external SIP profile. In the new routing plan add only one rule. The condition will be (.*) and based on the Destination Address. Then the action will be bridge to trunk. The Trunk will be the SIP trunk named PBX with the destination $1 as shown below.
Now that both routing plans are made go to Configuration -> Signaling -> SIP Profiles and modify the internal SIP profile.
In the internal SIP profile under Session Routing change the Routing Plan to Internal. Then click Save to continue.
Next go back to Configuration -> Signaling -> SIP Profiles and this time click Modify next to the External SIP profile. Once in the External SIP profile, go to the Session Routing section and change the Routing Plan to External. Then click save
- 6) Finalizing the Installation
Go to Overview -> Dashboard -> Control Panel and start the following services. Vega Session Controller IP Firewall Intrusion Detection Intrusion Prevention
Enable all IDS rules by going to Configuration -> Security -> Intrusion Detection and ensuring all are checked. Once done click Update to apply the changes.
Next go to System -> Server -> Web and change the Network Interface from All interfaces to only the internal network interface.
In this example eth1 is the internal network interface. Once done click Save.
Next go to System -> Server -> Web and change the Network Interface from All interfaces to only the internal network interface. Now both the web server and SSH will only be available on your internal network.
Since the configuration is now completed get a backup. Go to System -> Management -> Backup-Restore and click Backup.
Name the file accordingly and click backup to download a copy. Ensure you keep this safe somewhere and always take a new backup after each change made to the SBC.