Roll Your Own: Part 1 – Installation

(previous)

Alright, first thing’s first, we need to download and install Asterisk and PyGoogleVoice.

Installing Asterisk
First, we need to download the Asterisk source files. I’m using Asterisk 1.6.2.6, which is the latest stable version as of this writing. You can choose to go with another 1.6 branch, or the 1.4 branch, but things may now work out as well as you’d like.

  1. Log into your Linux Box as root (or get root privileges with sudo) and download the Asterisk source tarball
    # wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.6.2.6.tar.gz
  2. Extract the Asterisk source files (in this case we’re extracting to /usr/src/, feel free to change to your liking.)
    # tar -xzf asterisk-1.6.2.6.tar.gx -C /usr/src
  3. Run ./configure and resolve any dependency issues that come up.
    # cd /usr/src/asterisk-1.6.2.6
    # ./configure
  4. Run make menuselect and select the options you want.
    # make menuselect
    I’d highly recommend setting the DONT_OPTIMIZE option from the Compiler Flags menu, as this will allow you to get a useful backtrace if you need to do any serious debugging.
    I’d also select the ULAW, ALAW, and GSM sound packages for your language from both the Core Sound Packages and Extras Sound Packages menus. This will prevent most transcoding you’ll run into with clients using different audio codes. You should pick the Core and Extra sound packages for at least one codec.
  5. Once you’ve saved your options from make menuselect, run make, and then make install
    # make
    # make install
  6. Finally, install the sample configuration files for Asterisk by running make samples
    # make samples

Installing PyGogleVoice
Now we’ll install PyGoogleVoice. This is a Python API and command-line utility for accessing the Google Voice API.

  1. Make sure you have Python 2.3 or newer. You should also have the Python easy_install utility available (part of the Python setuptools package). If you’re using Python <2.6, you’ll also need the simplejson package.
    # easy_install simplejson
  2. Once you’ve verified you’ve got everything you need for PyGoogleVoice, install it
    # easy_install -U pygooglevoice

Quick Test
Before we move on, let’s make sure we’ve got Asterisk installed properly.

  1. We’ll start asterisk in the foreground (rather than as a daemon) and make sure there are no errors.
    # asterisk -cvvv
  2. This will start Asterisk with a Verbosity level of 3 and should bring you to the Asterisk CLI prompt:
    hostname*CLI>
  3. f you’re seeing that, and you don’t see any errors as you scroll back through the asterisk messages, go ahead and stop Asterisk for now:
    hostname*CLI> core stop now

Next we’ll get things configured with your sipgate and Google Voice Accounts… (continue)

This entry was posted in Computers and other Gadgety-Type Things. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>