Geek Gang Signs

This was one of those funny pics that turned up on the web 🙂


Asterisk PBX on Debian Stable Part 1

What this guide is:

This is basically a step by step reference of an Asterisk PBX quick start setup for anybody who wants to try it out, or if you are going to work for a company which sets up Asterisk PBX telephone systems.

What this guide isn’t:

This is by no means a complete guide, although it is an ongoing reference which I will add to it as I see fit.

Asterisk Docs and Info:

Asterisk is a hugely versatile and complete Open Source telephony system which already has its own documentation, man pages (man asterisk), support forums and wiki.


This guide supposes that you have Debian Stable (Currently Lenny) installed, either as your main OS or as a server on the network.

Install and test Asterisk: (Do all the following as root, not with sudo)

apt-get install asterisk asterisk-dev asterisk-dbg asterisk-h323 asterisk-mp3 libasterisk-agi-perl asterisk-doc

We use Perl scripts for automated dialers and other advanced options, so I have added the Perl modules, that’s up to you. You may also like to do an “apt-cache search asterisk” if you need any language-specific files. As I am in Spain, I also add “asterisk-prompt-es”.

Test Asterisk (still as root)

asterisk -vvvvc

As I already have Asterisk installed, it automatically loads at boot, so the message I get is that it is already running:

ricpru:~# asterisk –vvvvc
Asterisk already running on /var/run/asterisk/asterisk.ctl.  Use ‘asterisk -r’ to connect.

So I do as it says:

ricpru:~# asterisk -r
Asterisk, Copyright (C) 1999 – 2008 Digium, Inc. and others.
Created by Mark Spencer
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to
Connected to Asterisk currently running on ricpru (pid = 1844)

And I am left with the Asterisk prompt:


Asterisk is installed and working!

So now what?

First you need to get used to the config files. Then you need to select a phone. Asterisk works with Softphones , Analogue phones, IP phones, Mobile phones, Fax machines, basically anything that can be connected to a network or has an IP address and can make a call or send data.

Where are the config files?

ls /etc/asterisk

Yup, they all end in .conf and there are loads of them! Don’t panic! We are only going to start with a IAX/SIP Software Phone, which is the most basic to configure.

adsi.conf cdr_odbc.conf  features.conf  logger.conf  phone.conf  skinny.conf adtranvofr.conf  cdr_pgsql.conf   festival.conf  manager.conf  privacy.conf  sla.conf agents.conf         cdr_tds.conf  followme.conf  manager.d  queues.conf  smdi.conf alarmreceiver.conf  codecs.conf  func_odbc.conf  meetme.conf  res_odbc.conf  telcordia-1.adsi alsa.conf           dnsmgr.conf  gtalk.conf  mgcp.conf  res_pgsql.conf   udptl.conf amd.conf  dundi.conf   h323.conf  misdn.conf  res_snmp.conf  users.conf asterisk.adsi enum.conf  http.conf       modules.conf  rpt.conf  voicemail.conf asterisk.conf  esel.conf  iax.conf musiconhold.conf  rtp.conf  vpb.conf cdr.conf  extconfig.conf   iaxprov.conf  muted.conf  say.conf  watchdog.conf cdr_custom.conf  extensions.ael   indications.conf  osp.conf  sip.conf  zapata.conf cdr_manager.conf  extensions.conf  jabber.conf  oss.conf        sip_notify.conf

Software SIP/IAX phones:

Skype, Ekiga, etc etc….. there are loads, Google them and choose what you want. Personally I prefer VoixPhone. It’s easy to install and has a lot of features including IAX and SIP, but it’s all a matter of personal choice. The reason I want a phone with IAX is that we also use those configs for Hard Phones such as the Thomson ST2030 IP phone.

Download VoixPhone from HERE, Unpack it, Chmod -x it, and ./ Install it.

*HINT* I installed VoixPhone to /usr/local/bin as opposed to /usr/local which is the default and created a launcher called voix. This way I can launch the VoixPhone executable as voix from the command line.

Create an empty launcher file:

vim /usr/local/bin/voix

Insert this text:

# cat >/usr/local/bin/voix <<EOF

Then make it executable:

chmod 755 /usr/local/bin/voix

*64bit Hint* VoixPhone is a 32bit app. If you are running a 64bit system, install the ia32 libs:

apt-get install ia32-libs ia32-libs-gtk

Part 2 – Configuring Asterisk and your new VoixPhone:

PART 2 Coming soon………………………

In the meantime, have a read of this PDF Handbook and My Asterisk Bible 🙂

Asterisk PBX Manager

Monitoring Asterisk and Executing Commands

The manager is a client/server model over TCP. With the manager interface, you’ll be able to control the PBX, originate calls, check mailbox status, monitor channels and queues as well as execute Asterisk commands.

AMI is the standard management interface into your Asterisk server. You configure AMI in manager.conf. By default, AMI is available on TCP port 5038 if you enable it in manager.conf.

Events, Actions and Responses

AMI receive commands, called “actions”. These generate a “response” from Asterisk. Asterisk will also send “Events” containing various information messages about changes within Asterisk. Some actions generate an initial response and data in the form list of events. This format is created to make sure that extensive reports do not block the manager interface fully.

Management users are configured in the configuration file manager.conf and are given permissions for read and write, where write represents their ability to perform this class of “action”, and read represents their ability to receive this class of “event”.

Asterisk Documentation:

How to redirect old website url to new url including page links

The situation is that you have an old domain with a website or even various websites and sub-domains. You have moved all your files to another server or web address but you don’t want to lose the traffic from all the people who have bookmarked or link to you.

You want to lead to

In fact, you want ALL old links to go to the exact same place on the new server. This is how you redirect everything all in one go permanently with the htaccess file.

Creat a .htaccess file (don’t forget the DOT before it, it’s hidden from public view)

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^ [nc]
rewriterule ^(.*)$$1 [r=301,nc]

Upload it to the root of your website, usually where your index.html or index.php files are and you are all set. Google some of your old links and see where they take you. It should be to the same page on the new website.

One thing to remember is this will only work on a Linux Apache webserver which allows the Mod Rewrite function.

PS: If you are on a Windows Server, try Googling the html redirect method.

That’s it, now all incoming links from any of the old posts/pages will be forwarded to the new site 🙂

How to Linux quick, easy, file sharing server with one command

Don’t install a server, just issue one command!

So, you want to share a file with a friend. It could be a document, a song, a directory of photos, anything.

Do you want to install and set up a server? NO!

Do you want to go to a directory and issue one command? YES!

Open your terminal and cd to the directory where you want to share the file(s) from:

cd /home/rich/shared

Now start the Python Simple HTTP Server:

python -m SimpleHTTPServer

That’s it! Open your browser and go to this url:

http://localhost:8000 or

Now you will see the files that you want to share. All you need to do is send a message to your friend with your IP address and port :8000 and he/she can download anything from your /shared directory.

You can get your external IP address by going to:

Once you have finished, go back to your terminal and hit Ctrl+C and the server will stop.

LxH is closing down

Goodbye Linux-Hardcore

After a lot of thinking, humming and hahing (is that how you spell it?), I have decided to finally shutdown my domain. I have spent the last few months handing other sites to friends who offered to take them over, and i’ve just shutdown the other sites which no longer served a purpose or weren’t getting any interest.

Samey Linux Community

There must be millions of Linux blogs and forums now, and whatsmore they all seem to have the same stuff. The newest theme for Ubuntu YAY! [/sarcasm], How to burn an iso [/yawn]….. but not much else. It just got so hard to find anything interesting, or to find a blog/forum with character or soul. Most forums now inflict so many rules that they just beat the members into submission, and blog after blog just repeat the news from everybody else, sometimes just blatantly copy ‘n’ pasting. I just lost interest completely.

Crunchbang Linux & Community

This is probably the only place you’ll find me posting occasionally as Crunchbang Statler is an awesome distro, and the community is great. Not too big, not too small but always interesting, helpful and fun.

Thanks to the LxH Crew

It’s been a great 5 (ish) years and we’ve seen a lot of changes in the Linux community as well as formed part of many changes ourselves. Linux projects need a good team, and I was lucky enough to be a part of something that kept me learning and meeting new people practically every day over 5 years.

Thanks go out to djsroknrol, resa, machiner, palemoon, ch@dfluegge who stuck it out through thick and thin both on LxH and Dreamlinux Forums, thanks guys, it’s been a pleasure.

Bit of LxH History 2006 – 2010

LxH  started out as a small community forum hosted at Forumer in 2006, then went to it’s own Godaddy server in 2007. A year later it was moved to ICDSoft where it remains until the end of September 2010. It has had 3 domain names, but has settled on the LxH name, even though home and work-based firewall filters sometimes block the site for having the word “Hardcore” in the title. (I should have thought that one through a little better).

Why Create Yet Another Linux Support Forum?

We are/were all members of larger Linux distro support forums, and noticed that as forums become bigger, the community becomes more impersonal. Larger communities need stricter moderation, more rules and therefore more control. A smaller community needs practically no (people) moderation, only (site) administration. As we aren’t the public image for a company, we don’t have to censor what people post, and therefore the discussions are more “real life”, and permit free speech to a certain extent.

Forum Software

The forum has almost exclusively been run on the SMF forum script, apart from a short-lived experiment with PhPBB in 2007. There have been various designs, layouts and ideas, but basically has now gone with the easier route of having WordPress as a Frontpage due to it’s flexibility and custom plugins.

I tried various SMF portals, Joomla, Drupal cms’s, but none seemed to provide what we were looking for.  I even looked at vBulletin as an option until I realized that using proprietary forum software would be pretty hypocritical for a Linux/Foss based forum. Planet was also recently added to keep everybody updated with LxH members’ and friends’ blogs.


LxH currently has over 16,000 Posts in over 2,000 Topics. The Member List is “spring cleaned” regularly and any zero posters, or members who haven’t logged in for a while get removed. Many forums leave all members intact to look “busy” or “popular”, I prefer to keep things clean. It’s quality, not quantity that counts. Whatsmore, LxH is /home for a few “hardcore” friends and was never meant to be the size of Ubuntu Forums for example. LxH Distro-Tests, Howto Guides and Articles regularly attracted over 200,000 hits per month.

Other LxH Founded Sites

We set up and manage: Dreamlinux Forums, Fossunet (Facebook for Foss/Linux users), Linux Gaming News, Conky Hardcore!, LxH Clan Wars (A Travian style MORPG).

Max has moved Linux Gaming News to while he decides what to do with it. Good luck Max! It’s an awesome site.

Conky Hardcore! was taken over by machiner and is already back on its feet again. That is going to be another great site for Conky fans. Thanks for taking it on machiner, i’m sure you will make it a success!

I have moved my blog here to as well, as my final server and domain is laid to rest.

So that’s it, the end of an era for me.

Starting with Perl

I have started to use Perl regularly at work for network, server and telephony systems. Bearing in mind that before I got into Perl, my only other exposure to code was html/php/css for my websites and forums, configuring Conky and putting a few Bash scripts together.

Getting into Perl

Everybody learns differently, and I found it very difficult to grasp Perl just by reading books, man pages and websites. All of these will explain the history of Perl and give you links to everything it can do. This is all well and good until you need to do something specific.

Perl – Conky example

For me personally, to “get” something, I need to have an aim, and put it into action. It’s a bit like when you decide you want to display the weather on Conky with some fancy images, you Google “conky weather” and look for the code that will get the data, then show it at a certain position. You know what you want to do, then you look up how to achieve the goal. I went about learning Perl this way. Have a goal, and look for the way to do it.