How to Build Your Own Home Phone Server

Category: Tutorials

 



How to Build Your Own Home Phone Server

 

Using Asterisk in conjunction with Google Voice will help you dramatically reduce your landline phone bill

 

Google Voice. Skype. VoIP-to-PSTN providers. SIP-to-SIP calls. All of these technologies and products allow you to make calls that are either free or much cheaper than on your landline. Wouldn’t it be great if you could escape the clutches of your Telco and connect your home phone to these services? A phone server like Asterisk can help you realize this dream.

Short for Private Branch Exchange, PBX is a telephone exchange that is often used by businesses or offices. If you work a 9-to-5, chances are that your phone system is PBX-based. The short definition is that it’s essentially a network of phones connected to a main public switched telephone network (PSTN) that functions in a similar manner to a data network. In fact, in many instances today, the voice network is actually a VoIP-based network operating over data lines.

 

Don’t be intimidated; connecting Google Voice to your own home telephone line using Incredible PBX just takes a few configurations on this screen.

There’s a cheap and fairly simple way that you can ditch Ma or Pa Bell. The trick entails using an old PC to set up your own PBX in your home, and then connecting this PBX to Google Voice.

We’re going to show you how to set up your own home PBX server, how to connect it to Google Voice, and how to connect your landlines to the entire network.

 

Step 1: Install Asterisk

The best way to run Asterisk is on a separate computer. Fortunately, Asterisk does not require much horsepower, which means that you can use any old computer you have lying around. Many people actually prefer to run it on their wireless router using OpenWRT, a custom Linux distribution devised for embedded devices.

The easiest option for installing Asterisk is to use a Linux distribution designed for it. There are many available but if you want to integrate Google Voice you should make sure your distribution supports Asterisk 1.8.*.

We’ll use PBX-in-a-Flash (PIAF) burned on a CD. Go to http://bit.ly/VG9n, where you can download PIAF and find instructions for installation. Please note that the installation will reformat all drives including USB, so make sure you back up all critical information. After the initial install, there is a reboot; make sure you get the PIAF CD out or you’ll end up reinstalling. When prompted, pick the PIAF Purple install to get version 1.8 of Asterisk. It is stable enough for home use. Finally, make sure your root password is secure because if it is not, your phone bill could suffer.

You may be surprised to discover there is no GUI. This is because a phone server needs to process audio in real time. GUIs require CPU and their own real-time processing for the mouse cursor, so Asterisk distributions avoid them, and instead rely on command line and web applications for configuration and monitoring.

 

Step 2: Configure Asterisk

We now have a base installation of Asterisk, and are ready to begin configuring it. We’re going to use Incredible PBX for Asterisk 1.8 to integrate Google Voice onto our custom PBX server.

The Incredible PBX package will give us an advanced configuration that supports Google Voice. Log in as root and you’ll see a status screen that shows that Asterisk is running. Record the IP address that is shown. You may want to consider switching to a static IP, but it’s not essential.

It’s worth noting that the Incredible PBX code base changes over time. See  http://bit.ly/aBKJiF for the latest instructions. Currently, you need five pieces of information to make it work:

  • A Gmail account other than your regular Gmail account
  • The password for this Gmail account
  • The phone number assigned to this account by Google Voice. (Make sure your GV account is set to forward to Gmail Chat and that call screening and call presentation are off.)
  • Your regular Gmail account
  • A secure password such as the root password

Enter the following commands into the command line at the bottom of the screen:

 

 

cd /rootwget http://incrediblepbx.com/incrediblepbx18.xchmod +x incrediblepbx18.x./incrediblepbx18.x

 


Answer the prompts and wait for the install to finish. While the script is running, open a browser on another machine and open UDP port 5222 in Windows and on your router. Point it to the Asterisk IP address. Google Voice uses this for incoming calls.

Once done, set your passwords by typing passwd-master into the command line. Use the same password you did in the previous script.

 

Step 3: Perform Initial Tests on Your Installation

OK, you’ve successfully set up your PBX server and you’ve also connected it to Google Voice. Now we need to make sure that it works before we go any further. To do this, open up a web browser on another machine, go to: http://[Asterisk IP Address]/.

You should see the PIAF webpage. Monitoring and configuration can be done here. In the lower-left corner, click the Admin button. Click the FreePBX Administration button. This gives you access to the main tool for configuring Asterisk. In the left menu under the Basic section, click Extensions. Select 701 from the right menu. Scroll down until you see the Secret field. This is your SIP phone password for extension 701.

 

 

This PIAF setup screen will allow you to monitor, test, and customize your personal PBX.

You may also want to check the Asterisk console on the server. Press Ctrl + Alt + F9 to access it. All phone activity will display here. Type HELP to see all the commands available. Press Ctr + Alt + F1 to return to your login session.

The easiest way to test Asterisk is with a softphone—a program that behaves like a traditional telephone. We prefer X-Lite as a good option to work in Windows. You can download it at http://bit.ly/I0pol. Once you’ve installed it and gotten it running, go to the Account Settings screen.

Set User ID to 701, the domain to the IP address of the Asterisk server, and the password to the SIP phone password that was in the Secret field. When you press the OK button, the softphone should register itself and show its status as Available. Please note that Windows Firewall may require you to unblock X-Lite in order to make it work.

OK, let’s make a call. Make sure you have a headset connected or your speakers on. Dial 3366 and press Call. This runs the DEMO voice menu. If you hear Allison, the voice of Asterisk, then everything is working fine.

Now try phoning your home or cell phone number. The call should go out over Google Voice, the not-so-secret sauce that will save us hundreds of dollars per year thanks to Google making all calls to numbers in the United States and Canada free. (Thanks, Google.)

Finally, try using another phone to call the Google Voice number that was assigned. If all goes well, you should receive the call on your softphone.

 

Source: http://www.maximumpc.com/articles/how-tos



Source:

  • Views: 1599
  • Date: 24-04-2011, 14:46
  • Share:
Who read this article:(2)

{popupx}