Configuring GoogleTalk with Asterisk 1.4.8 on OpenWRT whiterussian 0.9

Submitted by chris.chen on July 18, 2007 - 11:17pm.

by Chris Chen, P.Eng; chris.chen2004 at gmail dot com
July 18th, 2007

This article is a HOWTO for configuring GoogleTalk with Asterisk 1.4.8 on the Linksys WRTSL54GS running OpenWRT whiterussian 0.9

My network environment is as follows:

Cable Internet -> (Public IP @A1) WAN [Dlink DI724U] LAN(Private IP @B1) ->
WAN (Private IP @B2)  [ Linksys WRTSL54GS] LAN(Private IP @C1) 
                   -> Home PC (Private IP @C2)  running GoogleTalk Client 1.0.0.104
                   -> ATA     (Private IP @C3)  with one analogue phone

The Linksys WRTSL54GS is running OpenWRT whiterussian 0.9, with a 1GB USB2 Flash drive installed in the USB2 port, as Asterisk 1.4.8 core, plus the sounds files, and MOH files altogether exceed 25MB.

Prerequisites:

The Optware packages from nslu2 project are used, please follow the Information and installation instructions to setup the Optware on OpenWRT whiterussian before continuing.

Installation:

The files required for GoogleTalk to speak with Asterisk 1.4.8 are from the ddwrt package feed:

To install these packages, use the ipkg command:

root@OpenWrt:/# /opt/bin/ipkg install \
  http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/asterisk14_...
root@OpenWrt:/# /opt/bin/ipkg install \
  http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/asterisk14-...
root@OpenWrt:/# /opt/bin/ipkg install \
  http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/asterisk14-...
root@OpenWrt:/# /opt/bin/ipkg install \
  http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/asterisk14-...
root@OpenWRT:/# /opt/bin/ipkg install \
  http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/iksemel_1.2... 

Verifying Installation:

After a successful installation of Asterisk 1.4.8/Optware on the OpenWRT whiterussian 0.9, start the asterisk console. When "gtalk" and "jabber" commands are available, it is ready for action:

root@OpenWrt:/opt/etc/asterisk# asterisk -r
Asterisk 1.4.8, Copyright (C) 1999 - 2007 Digium, Inc. and others.
Created by Mark Spencer 
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for detail          s.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.4.8 currently running on OpenWrt (pid = 28709)
Verbosity is at least 11
    -- Remote UNIX connection
OpenWrt*CLI> ?
!           abort       add         agi         cdr         clear       convert
core        database    debug       dialplan    dnsmgr      dont        dump
extensions  feature     file        group       gtalk       help        http
iax2        include     indication  init        jabber      keys        load
local       logger      manager     module      moh         no          originate
reload      remove      restart     rtcp        rtp         save        say
set         show        sip         soft        stop        stun        udptl
unload      voicemail
OpenWrt*CLI>

Configuration:

This is an example setup based on my network mentioned previously.

jabber.conf: This is where you set your gmail/gtalk account information, and what google server to register with.

[general] 
debug=no                      ;;Turn on debugging by default.    
autoprune=no                  ;;Auto remove users from buddy list.
autoregister=no               ;;Auto register users from buddy list.
[asterisk]                    ;;label
type=client                   ;;Client or Component connection
serverhost=talk.google.com    ;;Route to server for example,  talk.google.com
username=username@gmail.com   ;;Username with optional roster.
secret=YOUSECRET              ;;Password
port=5222                     ;;Port to use defaults to 5222
usetls=yes      ;;TLS is required by talk.google.com, you'll get a 'socket read error' without 
usesasl=yes     ;;Use sasl or not
buddy=buddyusername@gmail.com  ;;Manual addition of buddy to list.
statusmessage="This is an Asterisk server" 
timeout=100 

gtalk.conf : This is where the settings for the actual calls are made:

[general]
context=google-in        ;;Context to dump call into
allowguest=yes           ;;Allow calls from people not in
                         ;;list of buddy
bindaddr=Private IP @B2  ;;These two settings are very critical for getting 
externip= Public IP @A1  ;; gtalk audio with Asterisk server behind NAT
[guest]                  ;;special account for options on guest account
disallow=all
allow=ulaw
context=google-in
[buddy]
username=buddyusername@gmail.com  ;;username of the peer your
                                  ;;calling or accepting calls from
disallow=all
allow=ulaw
context=google-in
connection=asterisk    ;;client or component in jabber.conf
                       ;;for the call to leave on.

extensions.conf: A sample dialplan

...
[google-in]
exten => s,1,NoOp( Call from Gtalk )
exten => s,n,Set(CALLERID(name)="From Google Talk")
exten => s,n,Dial(SIP/my_sip_phones)
...
[default]
...
exten => 100,1,JabberStatus(asterisk,buddyusername@gmail.com,STATUS)
exten => 100,2,GotoIf($[${STATUS}<6]?3:5)
exten => 100,3,JABBERSend(asterisk,buddyusername@gmail.com, Hi Buddy  ${CALLERID(name)} at extension ${CALLERID(num)} is calling you!)
exten => 100,4,Dial(gtalk/asterisk/buddyusername@gmail.com)
exten => 100,5,voicemail(100,u)

rtp.conf

; RTP Configuration
;
[general]
;
; RTP start and RTP end configure start and end addresses
;
; Defaults are rtpstart=5000 and rtpend=31000
;
rtpstart=1650   ;; Googletalk is using low RTP Port numbers than usual Asterisk server
rtpend=4560     ;; Please get the proper number by set 'Jabber debug' on asterisk  
                ;;console, and start gtalk to asterisk, then looking for the jabber 
                ;;negotiations of  RTP ports 
;
; Whether to enable or disable UDP checksums on RTP traffic
;
;rtpchecksums=no
;
; The amount of time a DTMF digit with no 'end' marker should be
; allowed to continue (in 'samples', 1/8000 of a second)

Crucial Tips:

  1. Port forwarding of RTP ports on the public facing router
  2. On WRTSL54GS, accept the RTP ports
  3. GoogleTalk client version 1.0.0.93 has been confirmed not to work properly with NAT, if your buddy is using googletalk 1.0.0.93 you will hear nothing or your own echoes, please encourage your buddy to upgrade to version 1.0.0.104, it works like a charm.
  4. Enjoy the freedom of free (as in speech) communication between your friends (by googletalk client) and you (by any means Asterisk can offer)!
Author: rhobb
July 30, 2010 - 10:32am

From ancient times man has given utter high priority to his security. From the Stone Age itself, man prepared various weapons to safe guard his surroundings.arizona security systems

Author: gaolin
July 30, 2010 - 6:28am

Patroski may coco chanel earrings be one of several women vacheron overseas to be hypnotized by Finnell, software adobe according to the lawsuit, although ugg knit boots she told ABCNews.com that she omega speedmaster replica doesn't know how many, if new chanel handbags any, were sexually assaulted.
I want omega constellation double eagle him stopped, she said. That's jlc master control what I want. I could chanel hair clip have gone away just quietly cartier ring and just not said anything watch raymond weil to anybody.

Author: Mcdaddy
July 29, 2010 - 1:28am

Scripts is kinda confusing for me.
phoenix pet spot removal

Author: atlas
July 28, 2010 - 5:50pm

Wish I have the luxury of time to consider using the benefits these site can offer.....

Cheap laptops for sale

Author: JamesChow
July 27, 2010 - 1:26am

Re: Configuring GoogleTalk with Asterisk 1.4.8 on OpenWRT whiterussian 0.9
I am happy to find so many useful information here in the post, This was actually what I was looking for, thanks for sharing. Excell Pressure Washer, Husky 1750 power washer, Campbell Hausfeld electric pressure washer.

Regards,
James

Author: star09
July 26, 2010 - 4:10pm

A person’s ascription outlook be able to have self-consequences. Less sure people may guilt themselves for incredible negative that happens to them, which earnings they be expecting it to keep on doing so. I suppose I have been vulnerable to this on juncture. tactical gear

Author: star09
July 25, 2010 - 2:37pm

1GB Flash drive installed in the USB2 port, as Asterisk 1.4.8 core, plus the sounds files, and MOH files altogether exceed 25MB. payday loans canada

Author: lehua999
July 22, 2010 - 9:16pm

For some reasons Replica Watches are thought to be one of the best in their way. Replica Watches,Swiss Replica Watches, Cheap Watches, Wholesale Watches, Rolex Watches, A.Dunhill Watches, A.Lange&Sohne Watches, Alain Silberstein Watches, Audemars Piguet Watches, B.R.M Watches, For the ladies is designed in chic styles and designs and there shiny appearance enhances ladies elegance. Baume & Mercier Watches, Bell&Ross Watches, Blancpain Watches, BMW Watches, Breguet Watches, Breitling Watches, Burberry Watches, Bvlgari Watches, Calvin Klein Watches, Carl F. Bucherer Watches, Are definitely a excellent decision if you're looking for higher excellent watches with captivating look. Cartier Watches, Chanel Watches, Chopard Watches, Christian Dior Watches, Chronoswiss Watches, Concord Watches, Corum Watches, D&G Watches, De Witt Watches. All real E-Sprit Watches are sold at heavy prices that go far beyond the spending budget of many widespread people. Ebel Watches, Emporio Armani Watches, Fendi Watches, Ferrari Watches, Fossil Watches, Franck Muller Watches. New Girard Perregaux Watches – L.U.C Tourbillon Tech Steel Wings. Glashutte Watches, Graham Watches, Gucci Watches, Guess Watches, Hamilton Watches, Harry Winston Watches, Hermes Watches, Is one of its most popular and one of the most unique men's watches available today.

Author: star09
July 20, 2010 - 4:27pm

if your body is using googletalk 1.0.0.93 you will hear nothing or your own echoes, please encourage your buddy to upgrade to version 1.0.0.104, it works like a charm. paragard

Author: star09
July 18, 2010 - 4:10pm

Turning the knob gently, he looked in and saw his daughter fingering herself, lost in her own pleasure free porn videos. The sight of his little girl's fingers sliding effortlessly in and out of her love nest cause an immediate erection free sex videos body armor

Author: QQQ
July 12, 2010 - 9:00am

Turning the knob gently, he looked in and saw his daughter fingering herself, lost in her own pleasure free porn videos. The sight of his little girl's fingers sliding effortlessly in and out of her love nest cause an immediate erection free sex videos. Butterflies appeared in his stomach and his knees felt weak as he wondered what she was imagining. His own thoughts were running rampant as he watched her, noticing how large her clit was as she rubbed it furiously hairy bush, reminding him once again how much Etienne reminded him of her mother hairy collection. ABB728019390 порно

Author: jake0022
July 12, 2010 - 3:26am

Nicest post ever man! This is good man!
Get my mechanical watch and my skeleton watch here or these new ceramic watches with a cool 32 lcd tv and a cool 50 inch tv!! LCD TVs and watches are coolest!

Author: jake0022
July 12, 2010 - 3:24am

This is a good post mate! nice!
Check out the ceramic watches and get a ceramic watch now! Or get a white ceramic watch with all the white ceramic watches and one automatic watch now! Watches!!

Author: atlas
June 21, 2010 - 5:05pm

Wish I have the luxury of time to consider using the benefits these site can offer.....

Whelen

Author: john100
June 21, 2010 - 3:17am

Dear Datuk Seri I guess a congratulation is in order. A small one until the people responsible for this scandalous HP0-J34 thing are punished. It is a tribute to you to take the cover off this thing. I think this sent a message of what People First, Performance Now means. Action is better than words. And I hp0-m15 dump think it will sent message that you mean business. This will be good for you and for MCA. As a member of the public, I am interested to find out who planned the scam and who were involved. There will not be any closure until these people are punished and punished severely. This must be done quickly else the anger HP0-S19 will mount. As it is we see one law for the rich and powerful and another law for the ordinary people. I hope you can emphasize to MACC not to drag its feet. Otherwise the stigma of cows and cars will bear home. The government have a lot of thing to do correctly to gain back credibility and trust. I hope you will not let HP0-S20 this be one of the thing that got lost along the way. It should not be an item in the next election. The faster this get disposed the better it will be. a small congratulation

Author: edwin111
May 24, 2010 - 5:12am

How To Build Your Own IPTV-VoD System By Alexander Cameron cheap ftp hosting, Managing Director, Digital TX Ltd. There's a secret many people in the IPTV/VoD industry don't want you to know. Setting up an IPTV network is actually incredibly easy. In fact, almost anyone can do it video web hosting. But if you knew that, you'd build your own and no-one would make any money by selling you proprietary products with huge mark-ups. IPTV networks are basically intranets, only the web browser isn't on a PC, it is on a set-top box cheap wordpress hosting. If you've set up an intranet or public website, you can set up your own IPTV network and do what you want with it. You don't need massive and expensive servers, specialised set-top boxes or overly large development teams working with complex software php web hosting. With the right hardware and software, it should take you less than a few hours

Author: marrydavidson101
June 22, 2010 - 6:09am

security+With the right hardware and software, it should take you less than a few hoursteradata trainingWith the right hardware and software, it should take you less than a few hoursvcp examWith the right hardware and software, it should take you less than a few hoursVCP-410

Author: Matt John
May 19, 2010 - 3:39am

when i used to add a gtalk account dilogue box appear with title “Enter password for default keyring to unlock” with message “The application empathy (/usr/bin/emapathy) wants acces to the default keyring but its locked

now how to unlock this key nd wht is password for to unlock tht keyring

Matt John
web hosting service!

Author: star09
July 14, 2010 - 5:05pm

ndividual gifts make up the majority of our budget. See ways to help KQED produce and present the content you love. canadian pharmacy

Author: desprado7 (not verified)
April 22, 2010 - 6:42am

asfsd

Author: star09
July 24, 2010 - 8:27pm

Where Filename is the full path and name of the Excel file (surrounded by double quotes if it contains spaces), and HDR=Yes or HDR=No is used to indicate whether the first row of the worksheets contain the column names. military supply