Great addons for Asterisk based Trixbox : Gtalk Skype KDE VNC HUD
* Set up Linux GUI in Trixbox ( CentOS )
People having less experience with Linux can use its GUI for Trixbox basic understanding, and if you have hands on shell expertise you can skip the GUI setup.
Procedure:
Install Basic Window System and then KDE
To connect to the Linux server GUI install vnc server# yum groupinstall "X Window System" "KDE (K Desktop Environment)"
If you dont have it installed, you can install vncserver by selecting appropriate package from above list# yum list vnc*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
.
.
Installed Packages
vnc-server.x86_64 4.1.2-14.el5_5.4 installed
Available Packages
vnc.x86_64 4.1.2-14.el5_5.4 updates
Once its installed you can start vnc server by following, it may ask you for a password to connect to vnc# yum install vnc-server.x86_64
NOTE: KDE Wont start itself, to start it at the time of VNC connection make appropriate changes in file /root/.vnc/xstartup# vncserver
[root@cent52 ~]# vncserver
New 'cent52:1 (root)' desktop is cent52:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/cent52.server.com:1.log
[root@cent52 ~]#
Now you must be able to connect to your server via vnc#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
startkde &
kdesktop &
You can use tightvnc as vnc viewer.
So now our initial step is done hence we can move ahead.
* Set up Hud Lite Server in Trixbox.
With HUDLite you can see the status of all of the extensions on your phone system.
HUD Lite server basically runs with an asterisk manager and an IRC client. So you’re asterisk must be running as basic.
Go to web Trixbox admin panel of you’re server via web. ( http://<ip> )[trixbox ~]# ps aux | grep "asterisk"
root 20994 0.0 0.0 4504 548 ? S Apr03 0:00 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk
asterisk 20999 0.0 1.2 52956 22860 ? Sl Apr03 0:00 /usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c
asterisk 21066 0.0 0.0 4508 568 ? S Apr03 0:00 bash -c cd /var/www/html/panel && /var/www/html/panel/safe_opserver &
asterisk 21067 0.0 0.0 4504 1056 ? S Apr03 0:00 sh /var/www/html/panel/safe_opserver
asterisk 21069 0.0 0.4 12132 8324 ? S Apr03 0:00 /usr/bin/perl /var/www/html/panel/op_server.pl
asterisk 23058 0.0 0.6 33364 12472 ? S 04:02 0:00 /usr/sbin/httpd
asterisk 23060 0.0 0.6 33828 11536 ? S 04:02 0:00 /usr/sbin/httpd
asterisk 23062 0.0 0.6 33276 11216 ? S 04:02 0:00 /usr/sbin/httpd
asterisk 23063 0.0 0.6 33568 12112 ? S 04:02 0:00 /usr/sbin/httpd
asterisk 23064 0.0 0.6 33392 11784 ? S 04:02 0:00 /usr/sbin/httpd
asterisk 23067 0.0 0.6 33392 11520 ? S 04:02 0:00 /usr/sbin/httpd
asterisk 23068 0.0 0.5 29360 9228 ? S 04:02 0:00 /usr/sbin/httpd
asterisk 23069 0.0 0.3 27976 5740 ? S 04:02 0:00 /usr/sbin/httpd
root 32553 0.0 0.0 3936 700 pts/0 S+ 06:26 0:00 grep asterisk
[trixbox ~]#
Go to packages and click on install for the following packages
and Install them as both packages are necessary"hudlite-server"
"tbm-hudadmin"
Now this is a tricky part for HUD
You can check now that HUD Lite server and ircd server is running[trixbox ~]# mkdir /etc/asterisk/hud
[trixbox ~]# chown asterisk.asterisk /etc/asterisk/hud
[trixbox ~]# service hudlite-server start
[trixbox ~]# Starting hudlite-server: [ OK ]
You can check service stability by doing[trixbox ~]# netstat -a | grep 6600
tcp 0 0 *:6600 *:* LISTEN
tcp 0 0 trixbox:43466 trixbox:6600 ESTABLISHED
tcp 0 0 trixbox:6600 trixbox:43466 ESTABLISHED
[trixbox ~]# ps aux | grep "ircd"
ircd 21415 0.0 0.6 15172 10956 ? Ss Apr03 0:00 ircd
root 32599 0.0 0.0 3932 688 pts/0 S+ 06:33 0:00 grep ircd
[trixbox ~]#
Now you can check your server status in web GUI, It must show HUD Server Running[trixbox ~]# /etc/init.d/ircd restart
[trixbox ~]# /etc/init.d/hudlite-server restart
From WEB GUI go to PBX -> HUDLite Admin
The extensions and their passwords are kept here.
Configuring HUD clients.
Start you’re HUD client and go in the connection properties
Put User name as sip1001 if you’re extension is 1001
Put password as given in web GUI for the extension
Put IP of you’re Trixbox server in Server
Password is password
Port no. 6600
And you must be able to connect to server.
Whoooaaaaa one more Trixbox Addon done !!!
* Set up gTalk in 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.
Carefully follow given instruction as wrong configuration will only last in hair loss.
Install start up modules
gtalk's jingle protocol runs over TLS hence we need to add TLS support in our server.# cd /etc/asterisk/
# yum update
# yum install gcc*
# yum install theo*
# yum install ikse*
# yum install gnutls*
# yum install xmlsec*
# yum install speex*
You can verify whether the TLS has been installed properly or not by writing following simple C program
gtalk-tls.c
Compile it and runCode:#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; }
Now we will check the config file for gtalk and jabbergcc -l iksemel -o gtalk-tls gtalk-tls.c
# ./gtalk-tls
Checking server for TLS
Yes !! We have TLS.
Now we need to configure gtalk audio conection protocol "Jingle"# vi /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
# vi /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=”This is an Asterisk server proudly hosted at eukhost.com”
timeout=10
You have to add custom context in order to integrate gtalk with asterisk, Trixbox# vi /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
Now lets apply everything and get our fingers crossed.# vi /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.
[googleout]
exten => 200,1,Dial(gtalk/asterisk/mybestfriend@gmail.com) ; If any extension dials 200 the call will be placed to friend using gtalk.
exten => 300,1,Dial(gtalk/asterisk/anotherfriend@gmail.com)
# vi /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.
The jingle capable:1 shows that both users can talk with each other.[Trixbox $] # asterisk -r
Trixbox CLI> reload
Trixbox CLI> jabber test
Trixbox CLI> reload
Trixbox CLI> jabber test
User: mybestfriend@gmail.com
Resource: 1A945032
client: *******
version: ANYTHING
Jingle Capable: 1
Priority: 1
Status: 1
Message: Speeding up !!!
* Set up Skype for SIP in Asterisk
Note: Configuring Skype for SIP will require you to purchase a SIP account from skype.com
Once you get the username and password details from skype.com, configure it as a trunk in your asterisk.
SKYPE Trunk Settings for using Skype over SIP for Asterisk.
Go to your FreePBX Trunks setting
Say "Add SIP Trunk" and fill in following details
Maximum Channels: ; Set this to your purchased maximum number of channels.
Dial Rules: ; Set your appropriate dial rule.
Outgoing Settings
-----------------
Trunk Name : 99999999999999 ; Give some trunk name, e.g your skype id.
PEER Details ; Fill in your PEER details to make outgoing calls using Skype.
username=99999999999999
type=friend
srvlookup=yes
secret=xxxxxxxxxxxxxxx
nat=no ; You will need to set it to yes if your PBX is on private network.
insecure=very
host=sip.skype.com
fromuser=99999999999999
fromdomain=sip.skype.com
disallow=all
context=default
canreinvite=no
allowoverlap=no
allow=ulaw&alaw&g729
Incoming Settings
-----------------
USER Context : ; Give some name here
USER Details: ; Fill in your USER details to receive incoming calls over Skype SIP.
username=99999999999999
secret=xxxxxxxxxxxxxxx
nat=no
host=sip.skype.com
Registration ; This is necessary to get yourself registered at Skype SIP.
-----------
Register String:
99999999999999xxxxxxxxxxxxxx@sip.skype.com/xxxxxxxxxxxxxxx
Now you should be able to use this skype trunk for outbound dialing
I hope you will surely like these four super-cool add-ons with Trixbox.
---------------------------------------------------------------------------------------
Regards,
x3n31 aka xenei
Proud User of Eukhost



LinkBack URL
About LinkBacks



Reply With Quote
to Eukhost community forums & thank you very much for sharing this information

Bookmarks