ENP with Switchvox using Digium Phones
- 1 Overview
- 2 Introduction
- 3 Remote Extensions
- 3.1 Switchvox Configuration
- 3.1.1 General Configuration
- 3.1.2 IP Configuration
- 3.1.3 Phone Networks
- 3.1.4 Manage Extensions
- 3.2 Vega Gateway Configuration
- 3.2.1 General Configuration
- 3.3 ENP
- 3.3.1 SIP Proxy Configuration
- 3.3.2 SIP Proxy Auth Users
- 3.3.3 SIP Proxy Filters
- 3.3.4 SIP ITSP Proxies
- 3.3.5 Trunk Gateway
- 3.3.6 Trunk Gateway Call Routing
- 3.3.7 To receive call from POTS on your Dphones ( incoming calls from POTS ) , navigate to:Â
- 3.3.8 configuration → Expert config→ SIPÂ
- 3.3.9 Save Configuration
- 3.1 Switchvox Configuration
- 4 Verify ENP Remote Survivablity
Â
Overview
This document will guide you through the process of configuring a Remote Survivability solution using the Enhanced Network Proxy (ENP) feature in the Vega Gateway to work with Switchvox and the Digium Phones.
Introduction
At times there calls for a solution that provide simple VoIP Phone Survivability where Phones can continue basic PSTN calling and local calling, should the PBX fail, or any broadband connection fail, resulting in a loss of connection and communication between the Phones and the PBX. In this document, the example when there is a Remote Office, where there are several Digium Phones, and a Analog Station connected over the Internet to the Main Office where the Switchvox is located. There is a Vega Gateway connected to the PSTN, either over FXO or T1/E1. Also connected to the Gateway is a FXS Analog Station. The Vega Gateway is configured to operate with the Switchvox to deliver Trunking and Analog Station solutions. This document will focus on the Remote Survivablity configuration of the Vega Gateway, and requirements of the Switchvox and Digium Phone configuration to ensure that Digium phones can use the Vega Gateway in a Failover Mode. This document will not discuss the configuration of the FXS Station, FXO Trunk and T1/E1 Trunk to the Switchvox, as there are other Wikis for this.Â
The two key aspects of this solution, 1) the Switchvox and Digium Phones ability to detect that there is communication problem between the Phone and the PBX, and then with use of the Alternate Host setting. The Alternate Host is configured with the IP Address (or FQDN) of the Vega Gateway ENP feature, giving the Digium Phone an alternate location to REGISTER and send calls to. 2) The Vega Gateway ENP feature is used to accept the incoming REGISTERs and calls and direct both Inbound and Outbound Traffic to assigned Ports and Phones. Analog and VoIP Phones can make use of the PSTN access as well as call each other.
Note: Digium D80 Phones do not support Alternate Host, thus do not work with this solution. (at the time this was written)
In a normal operation, the Digium Phones communicates with the Switchvox directly, in the case of a Remote Office, this would be the WAN IP of the Main Office Firewall, which Port Forwards traffic to the Switchvox. When the Switchvox needs to make a PSTN call the PBX establishes communication with the Vega Gateway, which may have the Remote Office Firewall Port Forward to the Vega Gateway.
Â
But things break, and other things fail. The loss of communication can occur in many places. PBX failure and broadband connection failures. In any case, there is a loss of communication between the Digium Phones and Vega Gateway to the Switchvox. These remote phones are no longer connected to the PBX for normal operation. With the use of Alternate Host, these Remote Digium Phones can detect the loss of communication, and go into Failover Mode. Also with the Alternate Host the Digium Phones can failover their communication with the Vega Gateway. This allow Digium Phones to contact other Digium Phones, as well as any FXS Stations on the Vega Gateway, in addition use the FXO and T1/E1 Trunk lines for inbound and outbound calls.
Â
Note:Â This example is for a Remote Office, very similar configuration is used if the Vega Gateway is co-located with the Switchvox.
Remote Extensions
Both Digium D60/62 and D65 Phones and the POTS Phones on the Vega Gateway will REGISTER to the Switchvox. As these are Remote Phones, they will REGISTER to the WAN IP Address of the Firewall at the Main Office, the Firewall will Port Forward to the Switchvox. DPMA Provisioning will also be forwarded to the Swtichvox. An Alternate Host will also be configured to provide the Digium Phone the Vega Gateway IP Address to REGISTER to in the event of a Failure.
Switchvox Configuration
General Configuration
The Switchvox will typically have a Static IP or Fully Qualified Domain Name on the LAN and a Static IP or Fully Qualified Domain Name on the WAN (Internet). In this configuration we are defining the Digium Phones and Vega Gateway FXS Lines to REGISTER to the WAN IP of the Switchvox. Typically, the Switchvox reside behind a Firewall, thus the Firewall will Port Forward SIP Protocol to the Switchvox. From there the Switchvox will accept calls from the Digium Phones and the Vega Gateway FXS Line. In addition to the normal configuration, the Digium Phones are given an Alternate Host location, this is used when the Digium Phone detects that it no longer is in communication with the Swtichvox. When the Digium Phone is in Failover Mode, they will begin to call the Alternate Host, which is the Vega Gateway.
Â
IP Configuration
Open the IP Configuration tab. (Server > Networking > IP Configuration)
Â
Under IP Configuration - complete the following information:
Gateway Address:Â Enter the Default Gateway (Usually the Firewall)
DNS Address:Â Enter the DNS Server
Allow NAT Port Forwarding:Â Â Select YES
External IP Address:Â Â Either Enter the WAN IP of the Firewall or press "Look Up External IP"
Â
Phone Networks
Open the IP Configuration tab. (Server > Networking > Phone Networks)
Â
Under Phone Network - Modify - All Networks:
Note:Â All Networks is modified as all the Remote Phones will come from outside the Internal LAN.
Â
Â
When modifying "All Networks" complete the following information:
Primary Host (PBX)
Host Address:Â Enter the IP address or FQDN of the Switchvox, this is automatically entered based on the "Look Up External IP" pressed earlier
Alternate Host
Host Address: Â Enter the IP Address of the Vega Gateway
Port:Â Enter the IP Address of the Vega Gateway ENP Rx Port (not 5060) - Note:Â See Later in Vega Gateway ENP setup
Transport:Â Select UDP
Â
Manage Extensions
Open the Manage tab. ( Setup > Extensions > Manage )
Â
Modify the Extensions of only the D60/D62 and D65 Phones that are located at the Remote Office.
Note:Â The follow steps are not the complete requirements for Extension creation, these steps are the requirements only for Remote Survivablity using Vega Gateway ENP.
Â
Under Modify Extension - Phone Settings - Common Settings complete the following information:
Phone Password:Â Enter a Password
Retype Phone Password:Â Reenter same Password
Phone NAT Traversal:Â Select Always
Note: Record this password for entry into the Vega Gateway. Make sure this password long and secure using a mix of alpha numeric and special characters.
Â
Under Create Extension - Phone Settings complete the following information:
Phone Password:Â Enter a SIP Authentication Password
Retype Phone Password:Â Enter the same SIP Authentication Password
Note:Â This is the same SIP Authentication Password that will need to be entered into the Vega Gateway FXS Port configuration.
Â
Click "Save SIP Extension"
Â
Vega Gateway Configuration
General Configuration
NOTE
The following steps are specific to the setup of Remote Survivability using the Vega Gateway ENP. The following steps are additional configuration on top of Trunking and FXS Stations. Â
Prior to enabling the Remote Survivability features on the Vega Gateway ENP, ensure that the FXS Stations, FXO and T1/E1 Trunking, and Digium Phones are completely operational. Phones and Stations are registered, Trunking is working.
Switchvox Trunking Configuration
Switchvox FXS Station Configuration
Â
ENP
The following configuration applies to all variants of Vega Gateways.
Configuration > Expert Config >Â ENP
Â
SIP Proxy Configuration
This section of ENP defines the ENP Mode, which is the core behavior of ENP, then SIP Realm, which is the SIP Domain, and the ENP Receive Port, which is different than the Gateway Port of the Vega Gateway and is used for the ENP feature.
Mode:Â Select "standalone_proxy"
Realm:Â Enter the IP Address of the Vega Gateway
Rx Port:Â Enter a Port, 6060, (and is not 5060)Â Note:Â This is the same port defined in Alternate Host Port field in the Switchvox.
Â
Press Submit
Â
SIP Proxy Auth Users
Two functions to this section
1) ENP SIP Registrar for definition of the User and Authentication credentials.  The Digium Phone when configured with Alternate Host as the Vega Gateway ENP, the Phone will REGISTER to the Vega Gateway ENP. The ENP needs to have the Username and Password for Authentication.
2) ENP Aliases for the Users. These Aliases are the DIDs from the Gateway to route to individual extensions.
Use Aliases: Select "if_itsp_down"Â This is needed for ENP to route Incoming Trunk calls to a specified extension, only when there is a loss of communication with the Switchvox.
Enabled:Â Select Enable
Username:Â This is the Extension Number of the Digium D60/D62 and D65 Phones.
Aliases:Â Enter the corresponding DID from the FXO Port or T1/E1 Port that will ring this extension when in Failure Mode.
Password: Enter the Phone Password, as defined in the Manage > Extensions > Modify > Phone Settings > Common Settings , which was defined earlier.
Note:Â Repeat this step for each Digium D60/D62 and D65 phone on the Remote Office.
Note: Call Capacity should not exceed the Port/Channel capacity of the Vega Gateway. 4 FXS + 4 FXO Vega Gateway can have 8 Calls. A Vega 100G Gateway can have 30 Calls.Â
Note: # of Phone REGISTERs impacts calls per second. Max CPS of a Vega Gateway is 6 cps, with short Burst CPS support up to 12. Do the math... How many phones x REG frequency = REG cps  ...  Vega cps - Reg cps = actual cps  ...  Leave enough actual cps to make calls effectively for your business.
Press Submit
Â
Note:Â Here is a configuration example from the Vega Gateway Quick Config where the DID is configured for a FXO Port, This DID should be an Alias for a Phone under SIP Proxy Auth Users.
Â
SIP Proxy Filters
At minimum, the Trusted IP Addresses Filter needs to be configured. This defines allowed or trusted IP Addresses to access the ENP.
Enable:Â Select Enable
ipmin:Â Enter the Lowest numeric IP Address of the Remote Office
ipmax:Â Enter the Highest numeric IP Address of the Remote Office
Press Submit
Â
SIP ITSP Proxies
This is where the ENP can determine where the Switchvox is located and when the communication is interrupted to the Switchvox.
Mode:Â Select "normal"
Proxy Test: Select "options". Here the Vega Gateway will send a OPTIONS ping to the Switchvox.
Test Interval (s): Enter 30 Seconds. Here the Vega Gateway will send an OPTIONS ping every 15 seconds (half time of Interval)
Transport:Â Select UDP
Enable:Â Select Enable
IP/Host: Enter the WAN IP Address of the Firewall in front of Switchvox. This is the "External IP Address" found in IP Configuration of the Switchvox.
Port:Â Enter 5060
TLS Port:Â Enter 5061, although this is not used.
Note: Upon 3 consecutive OPTION ping failures, the Vega Gateway will deem the Switchvox as down. Thus, if the Test Interval is 30 seconds, 3 consecutive failures will at 45 seconds, the Switchvox is deemed down.
Press Submit
Â
Â
Trunk Gateway
There are 2 types of trunk gateways. Â Â
Local trunk gateways - these route calls to other Gateways, PBXs, and Channel banks outside the Vega Gateway (deselect the "Is PSTN Gateway?" checkbox) Â
PSTN gateways - these route calls to PSTN gateways, (select the "Is PSTN Gateway?" checkbox) Â Â
In this Remote Office Survivability, when the Vega Gateway and the Digium Phone can no longer communicate with the Switchvox, we want to use the PSTN Gateway on the Vega Gateway (itself - Port 5060 of the same Vega Gateway).
The following settings, similar to SIP ITSP Proxies, is to test the accessibility of the PSTN Gateway. Is there a PSTN Gateway available?
SIP Messages from Trunk Gateway:Â Select "trust"Â Â Â This will allow the ENP to trust SIP calls from the local PSTN Gateway
Allow Calls from ITSP Proxy to PSTN: Select "never".  Calls from the Switchvox should not be calling the ENP. Switchvox should be calling the Gateway port (5060) not the ENP port (6060 - defined earlier)
Transport:Â Select UDP
Mode:Â Select "normal"
Test:Â Select "options"Â Â This uses OPTIONs ping.
Test Interval(s):Â This is the interval in sending OPTIONs ping.
Gateway ID: 1 will always be the localhost or the Vega Gateway itself. This is what we want to use the send and receive calls from.
Enabled:Â Â Select Enable
Is PSTN Gateway?:Â Select Enable
IP/Host:Â For Gateway ID 1 - this will always be 127.0.0.1 for the Vega Gateway itself
Â
Press Submit
Â
Trunk Gateway Call Routing
When in Failover Mode, the Digium Phones will start calling the ENP of the Vega Gateway. A Dial Plan is needed to route calls to the Trunk Gateways defined in the previous step.  Â
Calls matching the attributes are routed to the specified gateway(s) (whether ITSP is up or down). Â
Â
PSTN Gateways have routing restrictions: Â Â
Calls from PSTN gateways cannot be routed to other PSTN gateways  Â
Calls from PSTN gateways cannot be routed to the ITSP Â Â
Calls from unregistered users (even if " trusted") cannot be routed to PSTN gatewaysÂ
Â
Press Add, to add a second Dial Plan
Enabled:Â Select to Enable
Description:Â Open Text field, enter a description
Call Attributes: Enter  TEL:.*    (TEL Colon Dot Asterisk)
Trunk Gateway ID List:Â Enter 1Â Â Â This is for the Trunk Gateway ID 1 in the previous step which defines the internal PSTN Gateway.
Routing Rule:Â Enter linear_up
Redirection Responses:Â Enter 500-599
Â
Press Submit
Â
To receive call from POTS on your Dphones ( incoming calls from POTS ) , navigate to:Â
configuration → Expert config→ SIPÂ
Modify profile 1 and set local domain == IP address of vega gatewayÂ
Save Configuration
You are done. Press Save Configuration.
You will have to reboot as well when changing IP Addresses.
Â
Verify ENP Remote Survivablity
Digium Phone Registration with ENP
Configuration > Expert Config >Â ENPÂ >Â SIP Proxy Registered Users
This is a registration status on the Vega Gateway ENP that shows the Digium Phones that are registered.  Digium Phones should be registered for ENP to be operational.
Â
Â
Â