How to configure Gtalk on Trixbox

Configuring the gtalk account in Trixbox. This can really be your company DID for receiving and making gtalk to gtalk or gtalk to world calling.

Follow the below steps :-

1- Install start up modules
# yum update
# yum install gcc*
# yum install theo*
# yum install ikse*
# yum install gnutls*
# yum install xmlsec*
# yum install speex*

2- Gtalk’s jingle protocol runs over TLS hence we need to add TLS support in our server.
You can verify whether the TLS has been installed properly or not by writing following simple C program.

 

# cd /etc/asterisk/

# nano gtalk-tls.c

——————————————————————————————

#include <stdlib.h>
#include <stdio.h>
#include <iksemel.h>
int main()
{
printf(“Checking server for TLS\n\r”);
if(iks_has_tls())
printf(“Yes !! We have TLS.\n\r”);
else
printf(“Sorry !! I dont find it.\n\r”);
return 0;
}

—————————————————————————————–

Save the file and exit

3- Now compile the gtalk-tls.c

# gcc -l iksemel -o gtalk-tls gtalk-tls.c

4- Now run the  gtalk-tls.c

# ./gtalk-tls

Checking server for TLS
Yes !! We have TLS

5-  Now we will check the config file for gtalk and jabber

# nano  /etc/asterisk/gtalk.conf
[general]
context=googlein
allowguest=yes
bindaddr=LANIP ; If you are running on Public IP then
; bindaddr=PUBLICIP
externip=PUBLICIP

;
[guest]
disallow=all
allow=ulaw
context=googlein

[buddy]
username=mybestfriend@gmail.com

disallow=all
allow=ulaw
context=googlein
connection=asterisk

# nano  /etc/asterisk/jabber.conf
[general]
debug=yes
autoprune=no
autoregister=yes

[asterisk]
type=client
serverhost=talk.google.com
username=myaccount@gmail.com/Talk
secret=mypassword
port=5222
usetls=yes
usesasl=yes
buddy=mybestfriend@gmail.com
statusmessage=”Your status message ”
timeout=10

6-   Now we need to configure gtalk audio conection protocol “Jingle”

# nano /etc/asterisk/jingle.conf
[general]
context=googlein
allowguest=yes
bindaddr=LANIP ; If you are running on Public IP then
; bindaddr=PUBLICIP
externip=PUBLICIP

;
[guest]
disallow=all
allow=ulaw
context=googlein

[buddy]
username=mybestfriend@gmail.com

disallow=all
allow=ulaw
context=googlein
connection=asterisk

7-   You have to add custom context in order to integrate gtalk with asterisk, Trixbox for incoming and outgoing calls

For Incoming call to extension as Extension no 101  or replace with your extension no where you want to receive call.

 

# nano  /etc/asterisk/extension_custom.conf
[googlein]
exten => s,1,NoOp( Call from Gtalk )
exten => s,n,Set(CALLERID(name)=”From Google Talk”)
exten => s,n,Dial(SIP/1001) ; 1001 is the extension where I want to terminate the incoming call on my gtalk id.
For outgoing calls to your buddy list ,you will have to assign extension numbers to your friends . So when you will call that extension number Trix box will call your friends.

 

Go to extensions.conf and  under [from- internal]  add the extensions mapped to gtalk buddies

 

[from-internal]

include => from-internal-xfer

include => bad-number

;[googleout]

exten => 2000,1,Dial(gtalk/asterisk/friend-1@gmail.com)

exten => 2001,1,Dial(gtalk/asterisk/friend-2@gmail.com)

 

 

8- Configure RTP protocal

# nano  /etc/asterisk/rtp.conf

[general]
;
; RTP start and RTP end configure start and end addresses
;
rtpstart=10000 ; this is default range
rtpend=20000

rtpstart=1650 ; This is needed by gtalk
rtpend=4560

rtpstart=40000 ; This is the UDP port range from where the audio traffic will go.
rtpend=66000 ; This will also help you in debugging.

 

9- Now Restart the asterisk services

 

[Trixbox $] # asterisk -r
Trixbox CLI> reload

10 – Test the jabber
Trixbox CLI> jabber test

User: mybestfriend@gmail.com

Resource: 1A945032
client: *******
version: ANYTHING
Jingle Capable: 1
Priority: 1
Status: 1
Message: Speeding up !!!

11- Now your are done

 

Try to call  your friend buddy using there mapped extension number .

Test receiving calls .

This Post Has One Comment

  1. Buy Propecia

    We’re a group of volunteers and starting a new scheme in our community.

    Your web site offered us with valuable information to work on. You have done a formidable job and our entire
    community will be thankful to you.

Leave a Reply