PlugPBX Forums
May 19, 2012, 02:44:12 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: HOW-TO: Setup Asterisk 1.8/gtalk on Dockstar/Debian  (Read 14715 times)
twinclouds
Jr. Member
**
Posts: 99


Email
« on: January 30, 2011, 10:05:57 PM »

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.html
In 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
Code:
# 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):
Code:
# 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:
Code:
# 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
Code:
# 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:
Code:
# vi makeopts.in
After opening the file, search for "PROC=" and change the line to be:
Code:
PROC=arm

7. Configure:
Code:
# ./configure

8. Select the modules:
Code:
# 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
Code:
# make
# make install
For new installations do:
Code:
# make samples
(Note: it will overwrite if you already have customized .conf files installed!)
Code:
# make config

10. Setup the .conf files for Asterisk 1.8 and gtalk
Code:
# 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:
Code:
# 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
Code:
/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.
« Last Edit: February 17, 2012, 09:16:41 PM by twinclouds » Logged
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #1 on: January 31, 2011, 05:38:47 AM »

Great stuff twinclouds!

I'll drop this into a build script with some SED statements, looks like i'm going back to Asterisk 1.8 instead of 1.6 for the experimental builds woot!
Logged

-Greg
dangerstranger
Newbie
*
Posts: 4


Email
« Reply #2 on: February 04, 2011, 01:08:27 PM »

Hello,

I'm getting the following error when I'm trying to install 1.8

root@debian:/usr/src/asterisk-1.8.2.3# ./configure
checking build system type... armv5tel-unknown-linux-gnueabi
checking host system type... armv5tel-unknown-linux-gnueabi
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.

Here is the config.log code:
Code:
configure:2323: checking build system type
configure:2341: result: armv5tel-unknown-linux-gnueabi
configure:2363: checking host system type
configure:2378: result: armv5tel-unknown-linux-gnueabi
configure:2509: checking for gcc
configure:2525: found /usr/bin/gcc
configure:2536: result: gcc
configure:2774: checking for C compiler version
configure:2781: gcc --version >&5
gcc (Debian 4.4.5-8) 4.4.5
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2784: $? = 0
configure:2791: gcc -v >&5
Using built-in specs.
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-sjlj-exceptions --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi
Thread model: posix
gcc version 4.4.5 (Debian 4.4.5-8)
configure:2794: $? = 0
configure:2801: gcc -V >&5
gcc: '-V' option must have argument
configure:2804: $? = 1
configure:2827: checking for C compiler default output file name
configure:2854: gcc    conftest.c  >&5
gcc: Internal error: Bus error (program cc1)
Please submit a full bug report.
See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions.
configure:2857: $? = 1
configure:2895: result:
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "asterisk"
| #define PACKAGE_TARNAME "asterisk"
| #define PACKAGE_VERSION "trunk"
| #define PACKAGE_STRING "asterisk trunk"
| #define PACKAGE_BUGREPORT "https://issues.asterisk.org"
| #define _GNU_SOURCE 1
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:2902: error: C compiler cannot create executables
See `config.log' for more details.

Any help would be appreciated -- thanks!
Logged
jet101
Newbie
*
Posts: 15


Email
« Reply #3 on: February 05, 2011, 10:06:33 AM »

You probably got a lot of errors when performing Step 3 to load all the dependencies. Try editing the /etc/apt/sources.list file and change the "uk" mirror site to "us" for both ftp and http. It worked for me after doing this.

EDIT: A couple of additional details on the install. Putting "/etc/init.d/asterisk start" in the /etc/rc.local file did not work for me. Instead, I put in "/etc/sbin/asterisk start" in the rc.local file instead.

I figured I'd get an ntp service running with the install, but it wasn't working. I did an # apt-get install ntp and after it finished I entered  # dpkg-reconfigure tzdata to set the correct timezone. The date and time were spot on after rebooting and remain that way.
« Last Edit: February 05, 2011, 05:03:24 PM by jet101 » Logged
dangerstranger
Newbie
*
Posts: 4


Email
« Reply #4 on: February 07, 2011, 05:13:43 PM »

ahh those dang uk mirrors!  Cheesy

I didn't notice any errors when installing the dependencies, but I'll change the sources and try to install them again and see what comes up.

I figured it was a problem with gcc due to the error messages, but when i searched for the errors I got, no solutions came up. Hopefully this helps!

Thanks!
Logged
twinclouds
Jr. Member
**
Posts: 99


Email
« Reply #5 on: February 08, 2011, 01:04:19 PM »

................
EDIT: A couple of additional details on the install. Putting "/etc/init.d/asterisk start" in the /etc/rc.local file did not work for me. Instead, I put in "/etc/sbin/asterisk start" in the rc.local file instead.
.........................
Did you do a "make config" at the end of installation?  I found it is necessary for the asterisk file (I think it is script file) to be add to the /etc/init.d/ directory.  Maybe you can check if it exists in the init.d directory, or not.
Logged
jet101
Newbie
*
Posts: 15


Email
« Reply #6 on: February 08, 2011, 09:18:57 PM »

You know, I may have left the make config out, but I can't be sure. I'll make sure I do that with my next install. It's entirely possible I left it out.
Logged
jet101
Newbie
*
Posts: 15


Email
« Reply #7 on: February 09, 2011, 10:17:15 AM »

For those that are using this method, please report on your call quality. My outgoing quality seems to be choppy/jittery much of the time. This choppiness was noticeable on both Optware and Debian versions of the Dockstar. The incoming quality is great. I can test the outgoing quality by calling one of my DIDs on another production Asterisk server that is on a different network, and place the call on hold. The resulting music on hold is choppy.

If I plug in a USB drive with the pygooglevoice method of using Google Voice, call quality both directions is fine. I tried it with a second google voice number just to make sure it wasn't specific to a certain number. It made no difference.
« Last Edit: February 09, 2011, 10:34:17 AM by jet101 » Logged
twinclouds
Jr. Member
**
Posts: 99


Email
« Reply #8 on: February 09, 2011, 12:05:31 PM »

You know, I may have left the make config out, but I can't be sure. I'll make sure I do that with my next install. It's entirely possible I left it out.
Simply check if there's a (script?) file named asterisk in /etc/init.d/.  If not, just run make config again.  You don't need to reinstall asterisk.
As for call quality, I feel asterisk 1.8 is better, if not much better, than my previous sipgate callback set up for outgoing calls.
Logged
jet101
Newbie
*
Posts: 15


Email
« Reply #9 on: February 09, 2011, 04:12:00 PM »

Quote
Simply check if there's a (script?) file named asterisk in /etc/init.d/.  If not, just run make config again.  You don't need to reinstall asterisk.

Yes, I went back and ran make config, and it worked as you described. All is well...except that outgoing call quality. I'm running it over a Clear network, so I'm gonna move it over to my Suddenlink network and try it again. The Clear network works just fine for most of my testing I do with the many Asterisk servers (usually Atom based) I put together though. I have a voip.ms account registered on the dockstar with a dialplan that allows me to use it vs. google voice. The voip.ms calls are fine in both directions. Strange that outgoing google voice using gTalk is the only thing that has a quality issue.
Logged
shufb
Newbie
*
Posts: 2


« Reply #10 on: February 25, 2011, 05:51:41 AM »

I used this how to to setup my dockstar twice. Every single time I get the jabber authentication error.
I checked and changed gv password, logged in using gv software.
I'm using asterisk 1.8.2.4
Logged
jet101
Newbie
*
Posts: 15


Email
« Reply #11 on: February 26, 2011, 10:01:39 PM »

Wanted to update on the poor outgoing voice quality I was experiencing using my dockstar and gTalk. It turns out that it was my network that was using Clear internet service. When I moved everything over to my Suddenlink cable internet service, the outgoing voice quality was excellent. I can make VoIP SIP calls over the Clear network and they sound fine most of the time, however, Google Voice using gTalk must be more sensitive to higher latency and jitter. I wouldn't call the latency and jitter I experience over the Clear network excessive for VoIP, but it seems to upset gTalk. I could use the old pygooglevoice method of Google Voice over that network, and it was just fine. Hmmmmm?
Logged
shufb
Newbie
*
Posts: 2


« Reply #12 on: February 28, 2011, 08:57:33 AM »

This is really weird, I let it sit for a couple of days and all of the sudden gv it registered, I didn't change a thing.
Logged
jrey
Newbie
*
Posts: 4


« Reply #13 on: February 28, 2011, 06:38:19 PM »

I have just installed following the instruction in this forum and have a question about the outgoing CID. When I use GV to call my cellphone, the CID showed as "Unknown" but when I called a Vonage number, the Vonage phone can display the phone number correctly. This is strange. When I used the GV to call another GV number, it also showed Unknown too. Anyone has any idea why Vonage can view the phone number?
Logged
jrey
Newbie
*
Posts: 4


« Reply #14 on: March 26, 2011, 03:45:25 PM »

Hi there,

First of all, thanks for the good how-to. I have setup a debian box on dockstar and followed the guide above for asterisk. I was using DHCP and everything worked well. Just recently, I needed to change to a static IP since my new router cannot make an IP reservation for the dockstar. Then there is a problem and asterisk no longer works. I got the following errors:

*CLI> [Jan  1 00:09:47] ERROR[748]: res_jabber.c:3113 aji_initialize: JABBER ERROR: No DNS gmailusername for client to  talk.google.com

It seems the problem is with the DNS server. Could you tell me how to fix it? I have tried to add the router's IP to the /etc/resolv.conf but it did not solve the problem. Do I need to reinstall asterisk after changing from DHCP to static IP?

Thanks.
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Install SimpleMachinesForum web hosting Valid XHTML 1.0! Valid CSS!