DIY PBX Chapter 2: Got hardware?

Telephony slowly moves from the Alexander Graham Bell, two copper wires leading to the house stage of it's life into the more flexible, more portable over the internet, in my pocket stage. And I, even more slowly, move with it. I still want a home phone, and I want to tinker, and I have nothing better to do. So, I'm going to build a PBX to replace my aging IP04 Asterisk PBX appliance.

It will take hardware. It will take software. And it will take as much time as I have in COVID-19 lockdown. But, before I get into what I consider the fun part (the software), lets take a look at the hardware.

A PBX, of the sort that I intend to build, takes two parts: a commodity PC and a specialized telephone interface card. That's it. In my case, I have a spare PC (courtesy of my recent hardware upgrade), and I purchased, online, the telephone interface card.

The part in which I tell you about my spare PC

The PC consists of

  1. an AsusTek M4A78-EM motherboard (with built-in HD graphics, HD audio, and gigabit ethernet), running
  2. an AMD Athlon X4 630 4 core processor,
  3. 4 Gb memory,
  4. one PATA DVD burner, and
  5. two Western Digital Caviar hard disks, totalling 1.5 Tb of storage space, all powered by
  6. a Corsair VS500 500W ATX power supply that I scavanged from my dead workstation.

Not very impressive, I know, but a damn sight more powerful than the Blackfin ADSP-BF532 processor and 64Mb memory that my IP04 boasts. Each of the four cores on the Athlon X4 630 runs eight times as fast as the single Blackfin core. And the AsusTek motherboard has, onboard, sixty four times more memory than the IP04. Additionally, this old desktop system has six times the file storage space that the IP04 has. So, comparatively, the hardware in this ten-year-old desktop stands miles ahead of the IP04. Additionally, while as backlevel as the hardware it runs on, this intended new PBX runs a 64bit Linux 4.4.240 kernel; the IP04 runs a 32bit Linux kernel, with a software MMU.

The part in which I tell you about the telephony adaptor

I only needed one additional hardware element for this project: a telephone adaptor card. In my case, I chose the cheapest 4-line PCI-bus card I could find: a TDM410P clone, which I purchased from a Chinese distributer through Alibaba. A single page of documentation accompanied the card, reiterating the scant device details originally documented on the website. I purchased the card with one FXO (Foreign Exchange Office) daughter-card and three FXS (Foreign Exchange Station) daughter-cards. The FXO port will connect to my landline (just as the IP04's FXO currently does), and the three FXS ports will connect to my home analogue telephone lines.

The part in which I show you that I managed to install a component without blowing things up

So, after setting up the system with 64bit Slackware 14.2, and updating all the software to the "latest" releases, I found that the kernel did indeed recognize the TDM410P clone, and lspci -v showed me:

03:06.0 Ethernet controller: Digium, Inc. Wildcard TDM410 4-port analog card (rev 11)
Subsystem: Digium, Inc. Wildcard TDM410 4-port analog card
Flags: bus master, medium devsel, latency 64, IRQ 20
I/O ports at e800 [size=256]
Memory at fbfffc00 (32-bit, non-prefetchable) [size=1K]
Expansion ROM at fbfc0000 [disabled] [size=128K]
Capabilities: [c0] Power Management version 2

Whoo hoo! Step one completed - I've successfully installed the hardware.

Now, on to the software. I can do this.