Top

Gentoo, Asterisk and HudLite Installation and Setup Howto

July 3, 2006

Greetings,

This weekend I had some free time, and decided I would try and get the Hudlite Call Manager working with my Asterisk Installation. This wasn't the easiest of processes since I do not run TrixBox, FreePBX, etc.

I have a stock Asterisk installation on Gentoo Linux, managed from command line, and realtime databasing. The Hudlite Call Manager was a little difficult to get working, hopefully this howto will help with getting it to work on your installation.

Note that I was using a Windows XP SP2 box to test the Hudlite Client interface, connecting to my Gentoo Linux box running Asterisk, Mysql, PHP, Apache, and various other utilities and tools required for Asterisk.

I would generally recommend to have a seperate web/mysql server but my funds are limited thus I'm running everything off the same box.

*NOTE* This howto uses some less than admirable methods to get it to work, this is due to the use of binary encoded Perl, and Gentoo Linux being several revisions ahead in that department.

*NOTE* And now, let's begin the howto:

First, we Should look through the original Howto for Installing on Scratch Asterisk Installs.This little tutorial will show how to install HudLite Server on your linux server running asterisk on Gentoo Linux with relative ease.

First we have to install some pre-requisites.We should begin by installing lsof, which is one of the dependencies the configuration page does not mention. I noticed that once I had all this working the binary wouldn't run because lsof wasn't present on the system. In order to accomplish this, we do:

# emerge lsof

We'll also need Net-DNS for this too

# emerge Net-DNS

Next we want to issue the following command

# echo "dev-perl/POE ~x86" >> /etc/portage/package.keywords

This enables version 34.01 to be installed which is required for hudlite The official documentation says to also install the POE-Component for Client-DNS. This module seems to be "a part" of the POE Perl module from what I can tell so I did not install it.Then we have to emerge perl XML-Parser.

# emerge -uvD XML-Parser

Then we emerge perl XML-Simple

# emerge -uvD XML-Simple

Next, we have to emerge ircd. We'll have to add the unstable keyword to the portage.keywords in order to install it.

# echo \"net-irc/ircd-hybrid ~x86\" >> /etc/portage/package.keywords

# emerge -uvD ircd-hybrid

Once that is finished, we should perform some basic configuration in the ircd configuration file. I managed to extract the configuration file from the rpm distribution that Hudlite provides, and modified their ircd.conf.

# mv /etc/ircd/ircd.conf /etc/ircd/ircd.conf.bak

# nano /etc/ircd/ircd.conf

[code]
# ircd.conf for HUD IRC serverlogging {
log_level = L_ERROR;};

serverinfo {
name=\"HUDserver\";
description=\"Server IRC\";
network_name=\"ExampleNet\";
network_desc=\"Example Network\";
hub=no;};

class {
name=\"users\";
ping_time=90 seconds;
number_per_ip=200;
max_number=200;
sendq=100000;};

class {
name=\"opers\";
ping_time=90 seconds;
number_per_ip=10;
max_number=10;
sendq=500000;};

class {
name=\"server\";
ping_time=5 minutes;
connectfreq=15 minutes;
max_number=5;
sendq=1 megabytes;};

# define what class and block for auth usersauth
{
user=\"*@*\";
class=\"users\";
password=\"password\";
can_flood = yes;
have_ident = no;
true_no_oper_flood = yes;
flags = exceed_limit, \\
can_flood, \\
can_idle, \\
true_no_oper_flood;};

listen {
port=6600;};

general {
default_floodcount = 1000000;
anti_nick_flood = no;
max_nick_time = 20 seconds;
max_nick_changes = 5;
anti_spam_exit_message_time = 0 minutes;
fname_userlog=\"/var/log/ircd/user.log\";
fname_operlog=\"/var/log/ircd/oper.log\";
fname_foperlog=\"/var/log/ircd/foper.log\";
warn_no_nline=yes;
pace_wait_simple = 0 second;
pace_wait = 00 seconds;
ping_cookie = yes;
no_oper_flood = yes;
true_no_oper_flood = yes;
max_targets = 999;
client_flood = 0;
use_help = yes;
throttle_time = 0;};
[/code]

Then we add ircd to the default runlevel to ensure it will still be around on system reboot.

# rc-update add ircd default

Then I started the server so it could be used immediately without rebooting.

# /etc/init.d/ircd start

This should run without any warnings or errors. If it doesn't, then we'll have to go back and check the configuration file to make sure no errors were made.Now that we have ircd configured and running, we can get on with the rest of the tutorial.

Go here to download the server from fonality/hudlite to install on your asterisk server - http://www.hudlite.org/modules/wfdownloads/viewcat.php?cid=3

Next we have to untar the file to a directory, I chose to create one off my root directory. Note the version number displayed here might change, make sure to download the newest version available at the uri listed above.

# mkdir ~/hudlite

# cd ~/hudlite

# tar xzvf hudlite-serverserver-0.9.tar.gz

# cd hudlite-serverserver-0.9

You should now be in the directory. It should look something like this:

# ls

INSTALL asterisk fonality rpms

Now we're going to move the fonality directory to /usr/local for running:

# mv fonality /usr/local

Then we need to edit the configuration for hudlite

# nano /usr/local/fonality/hud/conf/connect.xml

We want it to look something the following

[code]






127.0.0.1

5038
127.0.0.1

6600 PASSWORD IRC to Asterisk command bot
irc2asterisk_relay

[/code]

Now we want to edit context.xml to make sure it's got the correct settings:

# nano /usr/local/fonality/hud/conf/context.xml

We want it to look something the following,

[code]





internal

1 internal 1 700
hud
supersecretpasswordtomanagerinterface


[/code]

Next we'll want to create this account for the management interface.

# nano /etc/asterisk/manager.conf

[code]

[hud]

secret=supersecretpasswordtomanagerinterface
permit=localhost
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user

[/code]

Next we'll have to go back to the original directory holding all the files from the original hudlite download and copy the appropriate files to the asterisk directory. This is accomplished by performing the following steps:

# cd /root/hudlite/hudlite-serverserver-0.9/

# cd asterisk

# cp extensions_hud.conf /etc/asterisk

# mkdir /etc/asterisk/hud

# cp hud/users.xml /etc/asterisk/hud/

Next we have to include the extensions_hud.conf into our extensions.conf

# echo "#include extensions_hud.conf" >> /etc/asterisk/extensions.conf

Next we have to edit the users.xml file and include one of our users. In our example we'll be using 4 zap extensions (one pstn trunk, 3 internal phones) and one SIP extension. IAX does not work at this point in time with Hudlite.

# nano /etc/asterisk/hud/users.xml
The format is:

Name:Client Username:Client Password:Email:BuddyName:Cell No.:Unique Number Identifier:

[code]



PSTN-Trunk
testuser
abc123
test@test.com
buddyname
6135551212
10000


Test User1
testuser
abc123
test1@test.com
buddyname
6135551212
10001


Test User2
testuser2
abc123
test2@test.com
buddyname
6135551212
10002


Test User3
testuser3
abc123
test3@test.com
buddyname
6135551212
10003


Sip TEST
testuser4
abc123
test4@test.com
buddyname
6135551212
10004

[/code]

Then we should be able to start up the server, by issuing the following. Notice you will have to create a symlink to an older non existant version of perl since the hud server is statically compiled and requires this. Hopefully this is changed in the future. We'll also need to link in the regular perl directory too.

*NOTE* this is that trickery I spoke of earlier

*NOTE*

# cd /usr/lib/perl5/vendor_perl

# ln -s 5.8.8 5.8.5

# cd /usr/lib/perl5

# ln -s 5.8.8 5.8.5

# cd /usr/lib/perl5/vendor_perl/5.8.5/Net

# ln -s ../i686-linux/Net/DNS.pm DNS.pm

#ln -s ../i686-linux/Net/DNS/ DNS

# cd /usr/local/fonality/hud

# ./hud_lite

Now if all goes well everything should be up and running.Continue on configuring the servers and clients to your liking, this details only the basic setup processes, nothing advanced here. Maybe in an upcoming article we'll describe more indepth configuration processes.

Comments

2 Responses to “Gentoo, Asterisk and HudLite Installation and Setup Howto”

  1. Chris Smith on July 26th, 2006 3:18 pm

    For Fedora Core 4:
    1. Install dependencies ( I used the dries repository which has Perl 5.8.6). I did not need the “echo” commands

    (*
    yum install perl
    yum install perl-POE
    yum install perl-POE-Component-Client-DNS
    yum install perl-XML-Parser
    yum install perl-XML-Simple
    yum install ircd-hybrid
    *)

    2. Follow instructions as stated in preceding post.

    3. I had to rm the existing perl5 5.8.5 folders before linking the new ones. Use 5.8.6 as the link.

    4. The ircd-hybrid version that i have (7.2.2-1.fc4) choked on some of the ircd.conf syntax… check your var/log/ircd folder. Here is the ircd.conf that worked for me:

    (*
    # ircd.conf for HUD IRC server

    logging {
    log_level = L_ERROR;
    };

    serverinfo {
    name=”Linux001″;
    description=”Server IRC”;
    network_name=”Hud”;
    network_desc=”Hud ircd network”;
    hub=no;
    };

    class {
    name=”users”;
    ping_time=90 seconds;
    number_per_ip=200;
    max_number=200;
    sendq=100000;
    };

    class {
    name=”opers”;
    ping_time=90 seconds;
    number_per_ip=10;
    max_number=10;
    sendq=500000;
    };

    class {
    name=”server”;
    ping_time=5 minutes;
    connectfreq=15 minutes;
    max_number=5;
    sendq=1 megabytes;
    };

    # define what class and block for auth users

    auth {
    user=”*@*”;
    class=”users”;
    password=”password”;
    can_flood = yes;
    have_ident = no;
    # true_no_oper_flood = yes;
    # flags = exceed_limit, can_flood, can_idle, true_no_oper_flood;
    };

    listen {
    port=6600;
    };

    general {
    default_floodcount = 1000000;
    anti_nick_flood = no;
    max_nick_time = 20 seconds;
    max_nick_changes = 5;
    anti_spam_exit_message_time = 0 minutes;
    # fname_userlog=”/var/log/ircd/user.log”;
    # fname_operlog=”/var/log/ircd/oper.log”;
    # fname_foperlog=”/var/log/ircd/foper.log”;
    warn_no_nline=yes;
    pace_wait_simple = 0 second;
    pace_wait = 00 seconds;
    ping_cookie = yes;
    no_oper_flood = yes;
    true_no_oper_flood = yes;
    max_targets = 999;
    client_flood = 0;
    # use_help = yes;
    throttle_time = 0;
    };

    *)

    5. Edit the password entry in the auth section to match your server.

    6. hud-lite seems to depend on a [from-internal] context which I added as an include from my Internal context:

    (* [from-internal]
    include => Internal
    *)

    7. Users and passwords seem to be scattered all over the place (user,xml, context.xml, connect.xml, ircd.conf, manager.xml) so I used the same one in all places to get things going. If anyone can bring order to this it would be helpful.

    Chris

  2. Danilo on August 17th, 2006 1:08 pm

    hi
    thank for the paper
    do you know howto meetme conference with hudlite…

    Danilo
    from chile

Bottom