Home » Configs » Debian, Asterisk and Google Voice For Free Home Telephone Service

Debian, Asterisk and Google Voice For Free Home Telephone Service

phone-499991_640

We’ve decided to cut costs. One big cost is Cable and the phone service that is bundled with it. With some research I realized we could use Debian, Asterisk and Google Voice For Free Home Telephone Service.

Debian, Asterisk and Google Voice For Free Home Telephone Service

Update 2014: I’ve since migrated from Debian and Aterisk to just using an Obi (aka: Obihai) with Google Voice.

obi

Its much simpler and less maintenance. It’s been a few years and it just works. 

Original Post from 2013:

Cutting the costs associated with service bundling can be challenging. Internet, TV and phone can get pretty pricey.

I decided with a Roku, Apple TV or Amazon Firestick we could watch all our favorite shows, so ditching the cable itself should be of minimal pain.

A home phone isn’t always a huge deal since we all have cell phones these days, but there are times I need a land line for stuff (sending or receiving faxes, home alarm systems, etc) so the VOIP is still an issue.

I started doing some digging and came across using Google Voice, Asterisk and a SIP phone adapter to get free home VOIP service.

Needed items:

  1. Linux Box – I’m using Debian hosted on my VMWare ESX server
  2. Google Account (new preferable to avoid conflicts with being logged in to a google account)
  3. SIP Phone adapter (like the Grandstream HandyTone HT286)
Debian Setup
Ensure that your Debian system (or other linux) is configured with a Static IP address.
Make sure that you have libssl-dev and libiksemel-dev installed as well as tools to compile software.

Download and install the latest or current version of Asterisk:

  • # wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8-current.tar.gz
  • # tar xvfz asterisk-1.8-current.tar.gz
  • # cd asterisk-1.8.17 (or whatever the latest installed version is)
  • # ./configure
  • # make menuconfig
    Under the menu “Channel Drivers” make sure “chan_gtalk” is selected
    Under the menu “Resource Modules” make sure “res_jabber” and “res_rtp_asterisk” are selected
    Under the menu “Music On Hold File Package” select “MOH-OPSOUND-G729“[Note: Leave all other items with the default values.]

    Exit and save (use “x”)

  • # make
  • # make install
  • # make samples (Note: this will overwrite any preexisting .conf files!)
  • # make config
  • # cd /etc/asterisk
  • # cp sip.conf sip.conf.orig
  • # cp extensions.conf extensions.conf.orig
  • # cp gtalk.conf gtalk.conf.orig
  • # cp jabber.conf jabber.conf.orig
Hand edit the conf files in /etc/asterisk (or download some files and do search replace)
You can go here to get some files: http://www.arctangent.net/~superm1/gv_configs/
or
#wget -r -nd http://www.arctangent.net/~superm1/gv_configs/
For google voice/gtalk to work, you only need 4 files (sip.conf, extensions.conf, gtalk.conf, jabber.conf). Make sure to change the google account in these files to your own. Make sure in the jabber.conf that the “Secret” entry uses your google password.
SIP Adapter setup
Connect your Handytone  to power, connect it via ethernet to your network, and plug in your phone. (Handytone manual)Ensure that your phone is connected, then use it to dial ***.  After the message (if any) dial “01” (You may have to hit * again) to hear your IP addressing mode (dynamic or static). Use  9 to toggle between dynamic and static IP addresses.  I highly recommend a static IP.  After toggling to static, hit * to hear a readout of the Handytone’s current IP address. You can change the IP address by typing the 12 digits on the keypad (including any zero values).  Then reboot it after that.  (You can reboot by typing #, then 99, then 9).  Once it reboots, you should be able to use a web browser to access the web interface at the IP address you just specified.

On the  Handytone‘s web interface, the default password is “admin”.

Select “basic settings” and change end-user password. Ensure the network options making  and that subnet mask, gateway and DNS servers match your local network settings.

Set up your time sone (USA residents in areas with DST should replace the Optional Rule with “3,2,7,2,0;11,1,7,2,0;60” so it follows the newer DST rules instead of the deprecated DST dates that come preloaded on the device).  This will matter if you have a handset that resets its display time from the incoming line when you receive a call (as mine does).  Click “Update” when finished.

Then Select “advanced settings 1” and enter a new admin password in the first box (this will be the password which you will use to login to the web interface in the future), your Asterix server’s IP in the second and third boxes, and “101” in boxes 4 and 5. Then click update (leaving all other settings alone on this page), and then click reboot.

There should be no changes required on Advanced Settings 2.  After the reboot you can click status and see “Registered: Yes” (your Handytone should no longer flash red from the button on top of the unit).

Test it out and make some calls and try to call your Google Voice number to see if your phones ring.

Log file to check for issues:
/var/log/asterisk/messages

Credit to the Sites that I used for my setup and to document this process:
http://pcprob.blogspot.com/2011/03/howto-use-google-and-asterisk-for-free.html
http://forums.plugpbx.org/index.php/topic,247.0.html
http://forum.doozan.com/read.php?2,1647,4063#msg-4063


* This post may contain affiliate links. This means that I “might” receive a tiny amount of money, if you make a purchase using one of our links. It does not cost you anything extra, and helps us defray the costs of hosting and maintaining this site.

Leave a Reply