I have been experimenting Asterisk 1.8 on Dockstar for gtalk during the past a couple of months. Until last week, the only way known to work on Dockstar was to install it on top of Optware. Other installations always had two problems: the inability to verify sip phone's password (secret) and the error of "not having RTP engine loaded". Thanks to radael, a fix was proposed in
http://forums.digium.com/viewtopic.php?f=1&t=76909&sid=59baa909f1fff9b9e109113d3a364f37. Based on the fix, I have installed working asterisk1.8/gtalk on Dockstar with Debian Linux and Openwrt. Below I will describe my installation procedures for Dockstar/Debian. It has been shown to work fine for me. Hope everybody will have the same good luck and it will be useful for others have the same interest.
In the description below, I assume Debian has been installed in Dockstar with Jeff's instruction or something similar. Additional information can also be found in the PlugPBX board, e.g.,
http://jeff.doozan.com/debian/install_lenny.htm (I use Lenny but Squeeze should also work.)
http://forums.plugpbx.org/index.php/topic,97.15.htmlIn addition, I only installed Asterisk 1.8, not full FreePBX. Asterisk 1.8 alone should be sufficient for gtalk to work. If you need full FreePBX installed, you can find further information from this PlugPBX Forum, e.g.,
http://forums.plugpbx.org/index.php/topic,110.0.html, or elsewhere. You will also need a larger USB drive, e.g., 4GB, instead of 2GB that is sufficient just for Asterisk 1.8 and gtalk.
Below are the steps:
1. Log into your Dockstar/Debian through SSH.
2. Update apt-get
# apt-get update
3. Install the necessary c programs and libraries (based on what posted in "
http://forums.plugpbx.org/index.php/topic,109.0.html" by klingon). Not all of them are necessary but they are sufficient to make asterisk 1.8 work):
# apt-get -y install make gcc g++ libxml2 libxml2-dev ssh libncurses5 libncursesw5 libncurses5-dev libncursesw5-dev linux-libc-dev sqlite libnewt-dev libusb-dev zlib1g-dev libmysqlclient15-dev libsqlite0 libsqlite0-dev bison openssl libssl-dev libeditline0 libeditline-dev libedit-dev mc sox libedit2 libedit-dev curl libcurl4-gnutls-dev apache2 libapache2-mod-php5 php-pear openssh-server build-essential openssh-client zlib1g zlib1g-dev libtiff4 libtiff4-dev libnet-telnet-perl mime-construct libipc-signal-perl libmime-types-perl libproc-waitstat-perl mpg123 libiksemel-dev
[If you want to install FreePBX also, you need to install additional programs and libraries:
# apt-get -y install php5 php5-cli mysql-server php5-mysql php-db libapache2-mod-php5 php5-gd php5-curl mysql-client
]
4. Download the latest asterisk 1.8
# cd /usr/src
# 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.2.3 (or whatever the latest installed version is)
[Edit: 02/17/2012] The step 5 is no longer needed.
5. Make the following code fixes based on "http://forums.digium.com/viewtopic.php?f=1&t=76909&sid=59baa909f1fff9b9e109113d3a364f37" by radael:
# vi main/utils.c
After opening utils.c do the following:
(1) Under the line: #include asterisk/config.h add the following line:
#define __arm__ 1
(2) Search for "__sparc__" and replace the line "#ifdef __sparc__" with:
#if defined(__sparc__) || defined(__arm__)
for two instances.6. Set proper compilation for ARM platform:
# vi makeopts.in
After opening the file, search for "PROC=" and change the line to be:
PROC=arm
7. Configure:
# ./configure
8. Select the modules:
# make menuconfig
In the item "Channel Drivers" make sure "chan_gtalk" is selected
In the item "Resource Modules" make sure "res_jabber" and "res_rtp_asterisk" are selected
In the item "Music On Hold File Package" select "MOH-OPSOUND-G729"
[Note: Don't touch all the other selections done by default.]
Exit and save
9. Compile and install Asterisk 1.8
# make
# make install
For new installations do:
# make samples
(Note: it will overwrite if you already have customized .conf files installed!)
# make config
10. Setup the .conf files for Asterisk 1.8 and gtalk
# cd /etc/asterisk
# cp sip.conf sip.sample
# cp extensions.conf extensions.sample
# cp gtalk.conf gtalk.samples
# cp jabber.conf jabber.samples
You can write your own .conf files or download the needed .conf files from
http://www.arctangent.net/~superm1/gv_configs/. For gtalk to work, only 4 files (sip.conf, extensions.conf, gtalk.conf, jabber.conf) need to be changed. You also need to edit these files to include the necessary information of your own, in particular, the Google Voice credentials. Put these 4 files into the /etc/asterisk directory. You can either use WinSCP or simply use a text editor to edit the 4 files in /etc/asterisk/ and paste the edited contents from the downloaded files into them.
11. Test drive:
# asterisk -cvvv
Log into Asterisk 1.8 with a sip phone, such as an X-Lite softphone, and make calls.
12. Final touch
If everything is all right, add a line
/etc/init.d/asterisk start
in /etc/rc.local, so that Asterisk will start when Dockstar turns on.
That's it!
Note and disclaimer:
Even thought the above procedure has been tested by me and appears working, it should still be viewed as experimental. I cannot guarantee that it will work in your setup and will not be responsible for any potential harm that it could cause, albeit not likely. As people say: "Make sure you know what you are doing".
Hope you enjoy doing the installation process. Please let me know if you have any questions, comments and suggestions.