Home Box to Trixbox
A little more than two years ago, I built a home phone system using Asterisk and analog interface cards. It has served us quite well, but it is time for an upgrade. In the time since first constructing that system, great strides have been taken in simplifying Asterisk configuration. Asterisk@Home (now called Trixbox) is a system that makes it possible to implement a powerful phone system for work or home using a Web-based GUI. I decided to use Trixbox for my new phone system to see if it has the flexibility to achieve all the features of my current system. This article discusses the installation and configuration of my new home phone system.
I have several goals for the new phone system. The first goal is to be able to call from one part of the house to another. Next, I want to minimize annoying telemarketing calls and direct calls after 10 pm to voice mail, rather than ringing the phones (unless the call is urgent). Because I work at home much of the time, I want to have a VoIP extension to the office system.
Before configuring the phone system, you must assemble it and install the software. Although Trixbox makes this rather easy, I outline the installation process here, so that those who want to try it for themselves will know what to expect.
The first things to consider are the hardware and software pieces needed for this project. I already have an old spare computer to use (a Pentium II 266MHz with 256MB of RAM and 6GB HDD), but I also need an interface card for the phone lines. When I first built my current system, I got a Digium TDM31B with three ports for phone sets (FXS) and one telephone company (FXO) port, which now costs around $350 US. Purchasing from Digium helps support Asterisk, because it is the primary supporter of the project. The last requirement is the system software, Trixbox, which can be downloaded from www.trixbox.org.
The Digium card came configured with ports 1–3 for the phone sets and port 4 for the incoming phone line. Because managing phone interfaces has real-time demands, it is best to keep the Digium device on its own interrupt, especially in older machines like mine. Isolating the card on its own interrupt is usually not very difficult—changing slots and disabling unnecessary devices in the BIOS usually will do the trick. It is worth noting that because of the high interrupt rate of these interface cards, one should not run many other devices or applications with high interrupt frequencies, especially not X11.
After downloading the Trixbox ISO, I burned it onto a CD and booted the system from it. I was presented with a screen that told me that continuing will completely destroy any data on the hard drive. Willing to do that, I pressed Return to continue. The install process asked me to select a keyboard type and layout, a time zone and a root password. There seemed to be some very long pauses between these selections, but the system completed the install and configured the bootloader. At that point, with the base system installed and the network configured, it rebooted.
After coming back up, it retrieved the Trixbox software itself, built and installed everything and initiated another reboot. At reboot, it finished the installation of FreePBX and restarted. These reboots were a bit disconcerting at first, but by this point, the entire system was fully installed and running. However, it did not recognize or configure my TDM card.
One of the main features of Trixbox is its upgradability, so before panicking about the TDM configuration, I decided to update first. After logging in as root, I ran trixbox-update.sh. Twice. The first run updated the script itself and the second updated the rest of the system. After finishing, it told me to reboot the system. That time, all the TDM-related modules loaded, though only wctdm and zaptel were needed. The card was detected correctly, and running genzaptelconf from the command line configured it correctly. At this point, the Trixbox system was installed, up to date and functional.
Networking is configured easily from the command line with the netconfig command. I could leave it with a dynamic IP address, as I have no VoIP phones to connect, but my intention was to remove the keyboard and the monitor from the system and administer it remotely. Doing that is much easier if I know the internal network address of the system, so I set it to a static address and configured the rest of the network settings appropriately. I also changed the hostname of the system by modifying /etc/hosts and /etc/sysconfig/network and rebooting.
After reboot, I opened a browser window and directed it to the static address I defined. I then saw the initial Trixbox screen, as shown in Figure 1. Most configuration is done through FreePBX, which is found by selecting System Administration, entering the maint user name and the password from above (Figure 2) into the pop-up window and then selecting FreePBX. The FreePBX is very modularized, and those modules still needed to be installed and activated before I could do anything with the system. By first selecting Tools from the top menu and then Module Admin from the side, I was at the module management screen. I then selected the Connect to Online Module Repository link to view all the modules available. I selected all the Local modules and clicked the Submit button at the bottom of the table. Next, I downloaded and installed all the Online Modules except for Gabcast and Java SSH.
The final set of modules, shown in Figure 3, is a very comprehensive set of functionality for a small home system. This module management interface also checks to see if any module updates are available whenever connecting to the on-line repository. Those updates can be downloaded and installed easily to keep the system current.
- Resurrecting the Armadillo
- High-Availability Storage with HA-LVM
- Real-Time Rogue Wireless Access Point Detection with the Raspberry Pi
- DNSMasq, the Pint-Sized Super Dæmon!
- March 2015 Issue of Linux Journal: System Administration
- Localhost DNS Cache
- Days Between Dates: the Counting
- The Usability of GNOME
- Linux for Astronomers
- You're the Boss with UBOS