Today’s exciting installment shows how to have both old-fashioned analog phone
service and VoIP on the same local network, for small shops with fewer than
ten analog phone lines. Scenario: you want to keep your existing analog lines,
add VoIP, use Asterisk for your PBX, and have a reasonable upgrade path for
future changes and additions. (We’ll get to digital services in future installments.)
First of all let’s get our terminology straight. Now that everyone in the world
has leaped onto the telephony train, telephony terminology has suffered. Terms
that have long had precise, well-defined meanings are being stretched and morphed
in all sorts of new ways, to the dismay of old-time telephony gurus. I fear that
it is impossible to stem the tide; it’s as impossible as teaching certain computer
geeks the difference between “loose” and “lose.” But we can at least achieve
a common understanding.
The traditional meaning is a single physical connection between switches, such as from the telco to your PBX. In these here modern times it also means any physical or logical path between voice networks.
Plain old analog telephone service delivered over copper wire pairs, like your home phone. POTS just plugs into a dumb phone and works. POTS is not the same as PSTN, though they are often used interchangeably.
Public switched telephone network; the old-fashioned telephone service we all know and love, which encompasses both analog and digital services.
There are many possible ways to do this. This is our example network:
- Four phone lines
- One Asterisk server
- One Digium TDM04B analog interface card
- DSL or cable Internet
- IP hardphones
The example network is connected as this fabulous sample of ASCII art shows:
Internet -> router -> switch |-> LAN w/IP phones |-> Asterisk server |||| Phone lines
The Digium TDM04B, which has four FXO ports, is installed in a PCI slot on the server. Then the phone lines plug into the TDM04B’s ports.
You could connect legacy analog phones to the server by adding a Digium TDM40B, which has four FXS ports. (Remember, phone lines plug into FXO ports, and telephones plug into FXS ports.) These cost roughly $100 per port, which could go a long way towards purchasing some good-quality IP hardphones. So in our little example network we’ll stick with IP hardphones.
Alternatives to the TDM04B
You don’t have to use a Digium card. Other vendors make similar cards, or you might use a standalone analog FXO gateway. Plug your phone lines into it, plug the gateway into your LAN switch with an ordinary CAT5 patch cable, plug in the power cord, and away you go. These are also available as FXS gateways, if you want to keep some legacy telephones in service.
Some examples of these are the Clipcomm CG-400, the AudioCodes MediaPack MP-114-FXO,
and the Vegastream Vega 50. This saves the hassle of installing a PCI card and
futzing with drivers. Additionally, some of them (like AudioCodes) come with
a “lifeline,” or fail-over port, which means that during a power failure you’ll
still have one active phone line. Most of them have nice Web-based management
interfaces and additional features like compression, echo cancellation, and
Installing the TDM04B
Plug it into a spare PCI slot on your Asterisk server, just like any other expansion card. If you installed the Zaptel drivers when you installed Asterisk, you’re almost there. (If you didn’t, you need to re-install Asterisk and compile in Zaptel support.) The next step is to configure /etc/zaptel.conf. First make a backup copy of the original /etc/zaptel.conf:
# zaptel.conf zaptel.conf-old
Delete everything in zaptel.conf. If you’re using the Nano editor, just hold down Ctrl+k until everything is gone. Then copy these lines into it:
loadzone = us
Notice how lines are commented with semi-colons, and not hash marks. Now you can manually load the module if you like, to make sure it loads:
# modprobe wctdm # lsmod Module Size Used by wctdm 34880 0 ...
Installing a media gateway
Follow the vendor’s instructions, since each one is a bit different.
Next week we’ll have more configuring fun, and get our little voice network
up and running.
To install Asterisk with the Zaptel drivers: VoIPowering Your Office With Asterisk: Moving to the Grownup Version
A couple of VoIP shopping sites:
The TDM400 documentation, or the README in your Zaptel source directory tells the module names.