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.
Let’s get started.
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 /root
wget http://incrediblepbx.com/incrediblepbx18.x
chmod +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.
![]()
playball25
December 31, 2011 at 10:27am
I got everything setup but when I go to setup the account with X-Lite 4 and test it says:
'Account failed to enable
Account: Account 1 could not be enabled.
Problem at server, error 403. Try again later.'
This is on my mbp but I'm also getting the same message from my Windows laptop. Both firewalls are turned off on the mbp and the Windows laptop. I turned off the firewall on my Linksys router as well and I have to wait 3-5 business days to get a new gateway (modem/router) from Comcast so that I can log into that and turn that firewall off as well. That is the only firewall that is on in this entire setup. I did try testing from the laptop with exceptions in the firewall for X-Lite and for port 5060 as it shows in the 'FreePBX' server web page.
The message I'm getting when setting up the account info on the Windows laptop is:
'Account failed to enable.
Account: Account 1 could not be enabled.
Unknown error. Contact your administrator.'
Please help.. I have come this far and I have everything else in place.
I have a post here on X-Lite 4's forum http://forums.counterpath.com/viewtopic.php?f=26&t=19613 but no reply yet and I registered with PIAF's forum but was banned forever immediately and have no clue why. I emailed the admins to see what's up with that.
Thank you for any help you can provide.
![]()
rgalverson
August 26, 2011 at 4:37pm
Very intersting article, although I would have liked more info on how/why stuff worked. pbxes.org now has an easier way for SIP to access google talk. I can't figure how to set it up manually, but sipdroid on my phone did it for me.
![]()
handsomeboy
August 10, 2011 at 12:16am
Yeah ,I appreciate this is a nice post, many people will be thankful for you .ring die pellet mill
![]()
handsomeboy
August 03, 2011 at 1:36am
This is a post about calling technology,I am interested in this but I know very little information about this .the dual saw
![]()
wildo2ne
May 12, 2011 at 12:56am
Ok,
I got into the admin and setup extention 701, I can interact with the phone system but cannot make any calls out and some of the interal dial numbers like the demo 3366 number does not work, any suggestions?
![]()
batherton
May 25, 2011 at 10:48am
When you say things don't work, can you be more specific? Do you hear anything on the line when you dial a number or the 3366 demo number? Not having the 3366 number work at all would be quite strange and could indicate that something went wrong with the install.
Does the phone on extension 701 (I assume it is an X-lite client) show that it is registered? The icon in the taskbar should be green.
If you set up a second extension, can you call between those numbers?
As far as outgoing calls are concerned, I'm guessing you are talking about using Google Voice for outgoing calls. Note that you can also use an ATA like the SPA-3102 to hook up your land line to Asterisk and make outgoing calls there as well. There are two sections for configuration you should look at. The first place is the Trunks section. Is there a trunk for Google Voice. If you followed the setup instructions correctly, there should be a couple of trunks with "gvoice" in their name. The one that is just labelled "gvoice" should have trunks associated with it.
Now look at the Outbound Routes section. You should have some routes that use Google Voice. Look at the prefix section to see which digits to dial to get an outside line using Google Voice. You may need to dial "48" and then the 10 digit number. You can set up other routes using other prefixes and patterns, if you wish. Personally, I set up separate outbound routes for emergency numbers, toll free numbers, local calls, calls to North America, and calls to overseas. For each one I can set the trunks that are used, in the order I want them tried.
You don't mention whether your server can now receive incoming calls. Is that working for you?
![]()
wildo2ne
May 12, 2011 at 12:14am
I am getting stuck on getting into the admin section of the setup, it keeps asking me for a username and password.
I have tried all the passwords that I had setup, I have tried combinations of usernames of root, admin, Admin, Root, Administrator, administrator and nothing works, any suggestions?
![]()
batherton
May 25, 2011 at 10:27am
Try using the username "maint". If you have forgotten the password associated with this user, rerun the passwd-master script to reset the passwords.
![]()
ikagar324
April 26, 2011 at 1:53am
Hello. Major job. I did not await this on a Wednesday. This is a goodish taradiddle. Thanks!
Nice
30th birthday party || how to get rid of stretch marks || iPhone Repair || Auto Transport Tampa || Hair Products For Men
![]()
Zor
April 25, 2011 at 3:11pm
Wondering if this would work on 700MHz Pentium II? If so, should I upgrade my 10/100 NIC?
![]()
batherton
May 25, 2011 at 10:23am
The main CPU cost with a phone server lies in the transcoding of audio. So long as you aren't going for heavy duty compression, your old 700MHz machine is likely to be able to keep up with a few calls no problem. Make sure you use ulaw (aka G.711) encoding.
Your NIC can complicate this. If you want to handle a lot of calls at the same time, you can saturate your bandwidth without using heavier duty compression. Fortunately, a 100Mbps Fast Ethernet connection is likely to handle anything you are likely to encounter in the home for call volume.
![]()
Hanjin
April 25, 2011 at 9:57am
I was checking out the Ned Vittles site and come accross this link http://nerdvittles.com/?p=718. This is very interesting alternative. Check out the section about RentPBX.com. I sign up with them. It save a lot of time. I can skip most of the tutorial. I just have to run the incredible script that was made for RentPBX. It should be good for those who can not manage to get old PC too.
![]()
JBerkeley
April 22, 2011 at 6:36pm
Small and medium businesses are also using Asterisk/trixbox/SwitchVox more and more. I used to moonlight as an IT consultant a few semesters ago and ended up installing quite of few of them. Remote offices, teleworkers and remote administration are all MUCH easier with a VoIP based phone system. Using analog (traditional) phones may work in the home environment but for business, VoIP phones are the only way to go (they call them SIP phones in the article). You won't be able to use all the features on an analog phone, like you would a VoIP phone. Caller ID or transfer may not work on an analog handset. Its amazing to see how many VoIP handsets are available now. Wireless, HD voice, color touch screens, all over the place. http://www.voiplink.com/VoIP_Phone_s/397.htm A few years back you were lucky to get a monochrome LCD display!
![]()
Awelao01
April 20, 2011 at 11:58pm
I open your web log from lycos and it is superior. Thanks for substance much an revealing blog spot!
Regards
Moving Companies Boston | Columbus Moving Companies | Moving Companies Memphis | Moving Companies Fort Worth | Moving Charlotte
![]()
BAMT
April 20, 2011 at 3:59pm
Awesome guide.
Also be aware that FXS PCI cards can be had for less than $100, even retail. They allow you to hook analog phones right up to the PBX. An example is the OpenVox A400P10 which goes for $90 from manufacturer.











