
Configuring telephony cards
When configuring a PBX, it is very important to configure any device capable of connecting our system to the public switched telephone network (PSTN). Elastix is so flexible that we don't need to use a specific brand of telephonic cards. There are so many brands such as Digium, Sangoma Open Vox, Synway, and Khomp (just to name a few) that can be used to connect our server to the PSTN. For a complete list of certified hardware and configuration guides that work perfectly with Elastix, we can visit http://elastix.org/index.php/en/product-information/certified-hardware.html.
In this chapter, we will cover the specific examples of the Sangoma analog card and the Sangoma digital E1 card.
How to do it…
- After we have physically installed the cards in the server, we proceed to configure them in the System | Hardware Detector menu.
- Click on the Advanced checkbox and select the Replace file chan_dahdi.conf and Detect Sangoma hardware options.
- Click on Detect New Hardware to start the hardware detection process. If the system was able to detect all ports and the A200 analog card as well, then this will be shown on the screen. The green squares represent the voltage in the port; therefore, FXS ports are shown in this color. The pink squares represent the FXO ports found in the process. The message Detected by Asterisk appears when the ports are configured correctly. For the digital lines card (A102), we should see two spans with several channels (60), which are Detected by Asterisk, shown at the bottom of each port.
- Click on the Span Parameters link; a new window will pop up, allowing you to choose the E1/T1 transmission format. For both types of cards, we can set up the echo-cancel feature. This feature is very helpful for canceling echo in analog and digital lines. To configure this feature, click on the Configuration of Span link. A new window will appear with the Echo-Cancelling options, such as Oslec (default) and MG2, for each port.
- Click on the Save button when finished.
There is more…
For this recipe, we will set up the first E1 port with the MFC/R2 protocol and the second port with the ISDN/PRI protocol. To configure the first E1 port with the MFC/R2 protocol, select the Span Parameters link and configure the line settings, as shown in the following image:

To configure the second E1 port as Europe ISDN/PRI, select the Span Parameters link and configure the line settings, as shown in the following image:

Note
When configuring any E1 line, irrespective of the communication protocol, for most of the time your Elastix system must be configured as a synchronization slave. This means that Telco should provide the clocking signal across the E1 link. The rest of the time, our system should act as a clocking master. In this case, we will configure both E1s as slaves from Telco.
Now, we must declare the trunks in the PBX core. The type of trunks used is Digium Asterisk Hardware Device Interface (DAHDI). DAHDI is a device driver program used to interface Asterisk with telephony hardware. It mainly supports digital and analog cards. Before May 19, 2008, it was called ZAPTEL. To avoid any confusion, irrespective of whether we configure a DADHI trunk or a ZAPTEL trunk, the parameters, options, and behavior are exactly the same.
To add a DAHDI trunk to the PBX, go to the PBX | PBX Configuration | Trunks menu. Now, click on Add DAHDI Trunk. In this case, we will set up the E1s and the analog trunks as follows:

The DAHDI identifiers g0, g1, and 64 denote the first group of trunks, the second group of trunks, and channel 64, respectively.