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

And it should be similar to the following;

# 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;};  

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.

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**

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

<opt>  
<asterisk>  
<host></host>  
</asterisk>  
</opt>

<opt>  
<asterisk>  
<host>127.0.0.1</host></asterisk></opt><port>5038</port><irc>

  
<host>127.0.0.1</host></irc></p> <port>6600</port> <pass>PASSWORD</pass> <name>IRC to Asterisk command bot</name>  
<user>irc2asterisk_relay</user></p> 

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,

<opt>  
<call>  
<context></context>  
</call>  
</opt>

<opt></opt>

<call>  
<context>internal</context></call><priority>1</priority> <park> <context>internal</context></park> <priority>1</priority> <extension>700</extension><manager>

  
<name>hud</name>  
<secret>supersecretpasswordtomanagerinterface</secret>  
</manager>  
<opt><manager></manager></opt>  

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

# nano /etc/asterisk/manager.conf

Should have something like this;

[hud]

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

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:

So in our example;

<opt>  
<zap1-1> <e9></e9></zap1-1>  
</opt>

<opt></opt>

<zap1-1>  
<e9>PSTN-Trunk</e9>  
<e9>testuser</e9>  
<e9>abc123</e9>  
<e9>test@test.com</e9>  
<e9>buddyname</e9>  
<e9>6135551212</e9>  
<e9>10000</e9>  
</zap1-1>

<zap2-1>  
<e7000>Test User1</e7000>  
<e7000>testuser</e7000>  
<e7000>abc123</e7000>  
<e7000>test1@test.com</e7000>  
<e7000>buddyname</e7000>  
<e7000>6135551212</e7000>  
<e7000>10001</e7000>  
</zap2-1>

<zap3-1>  
<e7001>Test User2</e7001>  
<e7001>testuser2</e7001>  
<e7001>abc123</e7001>  
<e7001>test2@test.com</e7001>  
<e7001>buddyname</e7001>  
<e7001>6135551212</e7001>  
<e7001>10002</e7001>  
</zap3-1>

<zap4-1>  
<e7002>Test User3</e7002>  
<e7002>testuser3</e7002>  
<e7002>abc123</e7002>  
<e7002>test3@test.com</e7002>  
<e7002>buddyname</e7002>  
<e7002>6135551212</e7002>  
<e7002>10003</e7002>  
</zap4-1>

<sip7004>  
<e7004>Sip TEST </e7004>  
<e7004>testuser4</e7004>  
<e7004>abc123</e7004>  
<e7004>test4@test.com</e7004>  
<e7004>buddyname</e7004>  
<e7004>6135551212</e7004>  
<e7004>10004</e7004>  
</sip7004>

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

# 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

Comment by Chris Smith on 2006-07-26 15:18:55 -0500

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
*)

  1. Follow instructions as stated in preceding post.

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

  3. 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;
};

*)

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

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

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

  1. 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

Comment by Danilo on 2006-08-17 13:08:47 -0500

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

Danilo
from chile