What is a Private Branch Exchange?

A PBX or Private Branch exchange is a telephone switching system that allows many different people to use one phone line through extensions. Businesses usually use them to save money so they only need to lease one line. 

In this tutorial we will be setting up an IP PBX on a computer using Google voice. To get started, You should download Freepbx. It's a Linux distribution that makes it very easy to get set up and started with your system. You'll need to download the iso image and burn it to a cd. Alternatively you can install it in a virtual machine with the network settings on "bridged".


After you have downloaded the image and burned it to a disc, Insert it into the CD drive and boot from the CD. Make sure the machine you are installing this on has a formatted hard drive and at least 512mb of RAM. 

Upon boot up, You'll be presented with the following options..


 If you plan on using a Google voice account, Choose FreePBX with Asterisk 11 Full install. Proceed with Tcp/Ip setup.



Leave everything at the default settings as pictured above and use the tab key to select "OK".

The network interface will be configured as eth0.



Next you will need to choose your time zone, Pick the closest area to where you live and highlight "OK" and press Enter.

In the next screen you will set the root password, The system will notify you if you have selected a weak password. The filesystems will be created and package installation will begin. 



 After Package installation has completed, The machine will run some post installation scripts and reboot. The FreePBX GUI will be installed and you can log in at the prompt with username root and the password you created during setup.

Upon logging in, You should be presented with an IP address for the web user interface. You can enter this into any web browser and configure the web UI username and password.  Click on FreePBX Administration and enter the newly created login details. You will be presented with the System status page.

To set up a Google voice account to use, You first need to go to the admin tab and down to module admin. Under "Connectivity" make sure you have the Google voice module and that it's enabled. 




 Next go to the Connectivity tab at the top of the page and select the Google voice module. You can now fill out your account information and press submit. Be sure to check the Add Outbound Route box as well as Add Trunk.



After you've completed adding your account, It's time to start creating an extension for use with a soft phone or another device. Go to the Applications tab at the top of the page and select Extensions. Make sure that "Generic sip device" is selected in the drop down menu and submit.

You will now see the following.



Choose an extension number and type it into the User Extension box and Add a Display name if you want to, This can be anything you want.

Scroll down until you see the following field.


Beside of the "secret" box you will enter the password you want to use. Continuing down the page find this field and enter the same password.


When you are done with these parts of the form you can click submit.

Now that our extension is created, We can set up the inbound route. Simply go to the connectivity tab and select inbound routes.  Enter the following information.


Also set the destination to the Extension number you created previously.

The last thing we need to do before making calls is edit the Trunk. Go to the Connectivity tab and down to Trunks. To the right of the page select the trunk containing your Google voice number. In this page you need to uncheck the override on "Asterisk Trunk Dial Options".


You can now open your soft phone of choice, X-lite is good. I'm using Twinkle under Linux. In your soft phone options you should set the domain to the IP address you used to get to the Web UI. The user name will be the extension number you chose and the password is what you selected under "secret". Save the settings. 

If all went well you should now be able to make and receive calls using your Google voice number!