O'Reilly logo

VoIP Hacks by Theodore Wallingford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hack #79. Build a $100 PSTN Gateway in 10 Minutes or Less

The Sipura SPA-3000 is a marvel of engineering. For less than a hundred bucks, you can interface your phone line with your VoIP network. What's cooler than that?

When your phone line is connected to your plain-old analog phone, it works and works well. But when it's connected to your VoIP network, it takes on a whole new personality. Suddenly you can do all kinds of cool stuff.

This hack will show you how to connect a PSTN phone line to an Asterisk-based VoIP network using the Sipura SPA-3000 ATA. This device is like other ATAs in that it has one FXS port. However, the SPA-3000 has a trick up its sleeve: a single FXO port as well. Not only does it have the hardware, but Sipura's firmware is actually quite flexible, allowing you to do all kinds of things to impress your friends and make life easier (hopefully). For this hack you'll need an Asterisk machine nearby [Hack #4] .

I am going to demonstrate this hack using Asterisk and the SPA-3000. But because the SPA-3000 speaks SIP, you can just as easily use it in conjunction with most other SIP-compatible devices out there. (In fact, the Clipcomm CG-200 gateway [Hack #43] would make a fine substitute.)

The Asterisk server has a sip.conf file that allows calls to be placed into the default context from remote SIP endpoints. I am going to assume that you want incoming calls to the FXO port on the Sipura to be forwarded to an extension on that existing Asterisk server; I'm using ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required