Results 1 to 6 of 6
  1. #1
    x3n31 is offline Forum Member
    Join Date
    Jul 2010
    Posts
    2

    Default Install Linux GUI (KDE), HUD, Gtalk all in one Asterisk based Trixbox

    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

    # yum groupinstall "X Window System" "KDE (K Desktop Environment)"
    To connect to the Linux server GUI install vnc server

    # 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
    If you dont have it installed, you can install vncserver by selecting appropriate package from above list

    # yum install vnc-server.x86_64
    Once its installed you can start vnc server by following, it may ask you for a password to connect to vnc

    # 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 ~]#
    NOTE: KDE Wont start itself, to start it at the time of VNC connection make appropriate changes in file /root/.vnc/xstartup

    #!/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 &
    Now you must be able to connect to your server via vnc
    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.
    [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 web Trixbox admin panel of you’re server via web. ( http://<ip> )
    Go to packages and click on install for the following packages

    "hudlite-server"
    "tbm-hudadmin"
    and Install them as both packages are necessary

    Now this is a tricky part for HUD
    [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 now that HUD Lite server and ircd server is running
    [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 ~]#
    You can check service stability by doing

    [trixbox ~]# /etc/init.d/ircd restart
    [trixbox ~]# /etc/init.d/hudlite-server restart
    Now you can check your server status in web GUI, It must show HUD Server Running

    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

    # cd /etc/asterisk/
    # yum update
    # yum install gcc*
    # yum install theo*
    # yum install ikse*
    # yum install gnutls*
    # yum install xmlsec*
    # yum install speex*
    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


    gtalk-tls.c
    Code:
    #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;
    }
    Compile it and run

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

    # ./gtalk-tls

    Checking server for TLS
    Yes !! We have TLS.
    Now we will check the config file for gtalk and jabber
    # 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

    Now we need to configure gtalk audio conection protocol "Jingle"

    # 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
    You have to add custom context in order to integrate gtalk with asterisk, Trixbox

    # 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.
    Now lets apply everything and get our fingers crossed.

    [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 !!!
    The jingle capable:1 shows that both users can talk with each other.

    * 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

  2. #2
    apalastix is offline Forum Member
    Join Date
    Sep 2010
    Posts
    2

    Smile Successfully installed KDE over CentOs

    Thanks a lot for such a wonderful information regarding Trixbox.

    I am new user to asterisk and just installed the KDE GUI on my recent CentOS from your post. KDE is running fine but I want to install Trixbox packages on centos. ( I hope that's possible )

    Will ask you if I start pulling my hairs.

    Apalastix

  3. #3
    apalastix is offline Forum Member
    Join Date
    Sep 2010
    Posts
    2

    Thumbs up Elastix HUD

    Hi,

    I have been dreaming Elastix and HUD go hand in hand. Do you have any good documentation on that ?

    By following your steps I have been successful with gtalk on elastix but now I'm trying with HUD.

    Also there are lot of broken links on internet for this topic.

    Thanks.

  4. #4
    x3n31 is offline Forum Member
    Join Date
    Jul 2010
    Posts
    2

    Cool

    Hi,

    Nice to hear that post helped :)

    I have been dreaming Elastix and HUD go hand in hand. Do you have any good documentation on that ?
    I have not done it yet but will try to work on elastix and hud.

    In the mean time I was working on DAHDI installation with asterisk, its pretty simple though I would like to share it with all the readers,

    DAHDI is a driver's name for running TDM cards in asterisk. I used Digium PRI TE121 card for integrating the E1 line.

    Important Note: Before inserting the card in the system, please check whether the jumper on the card is at correct line type. For example refer card installation manual for E1 or T1 settings.
    You can start your asterisk server and you have to change your country settings.

    [trixbox ~]# vi /etc/dahdi/genconf_parameters


    lc_country XX
    Then let the system generate your server configuration

    [trixbox ~]# dahdi_genconf
    Now reboot the server and execute following command.

    If the card gets correctly configured then you should see the "alarms=OK".

    [trixbox ~]# dahdi_scan

    [1]
    active=yes
    alarms=OK
    description=Wildcard TE121 Card 0
    name=WCT1/0
    manufacturer=Digium
    devicetype=Wildcard TE121 with VPMADT032
    location=PCI Bus 03 Slot 09
    basechan=1
    totchans=31
    irq=169
    type=digital-E1
    syncsrc=1
    lbo=0 db (CSU)/0-133 feet (DSX-1)
    coding_opts=HDB3
    framing_opts=CCS,CRC4
    coding=HDB3
    framing=CCS
    [trixbox ~]#


    Now you can use this DAHDI trunk for your outbound and inbound calling. You will need to set appropriate inbound and outbound routes in FreePBX for DAHDI.


    Hope this helps. !!!

    ---------------------------------------------------------------------------------------
    Regards,
    x3n31 aka xenei
    Proud User of Eukhost

  5. #5
    Rock's Avatar
    Rock is offline Technical Support (eUKhost.com)
    Join Date
    Oct 2006
    Location
    localhost
    Posts
    3,686

    Default

    Hi Xenei / Greek-Guest

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

    I've no idea on the Linux trixbox setup, have been using 3CX (free version) until now, but will try this once I reach home

    Thanks once again !

    Rock _a.k.a._ Jack
    Windows Hosting || Windows Reseller Hosting
    Cloud Hosting 100% UPTIME! || Powerful Dedicated Servers
    Follow eUKhost on Twitter || Join eUKhost Community on Facebook

    For complaints, grievances or suggestions kindly email our FeedBack Dept.
    Proper action will be taken accordingly & instantaneously!

  6. #6
    vzAddict's Avatar
    vzAddict is offline System Administrator(eUKhost.com)
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    163

    Default

    Wow Great tutorial... Thanks for sharing such valuable information....

    Also welcome to eukhost forums !!!
    vzAddict || Mike
    http://eUKHost.com
    eUKHost on Twitter || Facebook Group || Facebook Fanpage

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Disclaimer of Liability

The opinions or views posted on our forum by users do not necessarily represent the opinions or views of eUKhost Limited.

Our forum may contain hyperlinks to external websites not under our control and ownership. We do not endorse the content found on any external websites and we cannot guarantee the accuracy, reliability, availability and suitability of such websites and the content of those websites. Your access and use of any external websites is at your sole risk and responsibility. Please also be aware external websites will have differing terms and conditions, privacy and cookie usage policies to our website.