Tutorial on Linux + Asterisk +MySQL + Java – part 1

This part of the tutorial is an introduction about the combined use of Asterisk, Java and MySQL on a Linux box.

In the internet era Linux has a very important role for the famous LAMP stack: Linux + Apache + MySQL + PHP.

But I am not a web-type; I had some of the greatest fun working with VoIP/PBX, more specifically with Asterisk, so I decided to share my experience, and I named the environment I have worked with LAMJ, which stands for Linux + Asterisk + MySQL + Java.
I won’t talk about Linux and MySQL, but I will give a very brief introduction about PBX.

PBX is the acronym of Private Branch Exchange. It could refer to a hardware device or to a software running on a computer. Asterisk is one of the most diffused software PBX, but there are also others, like Callweaver and FreeSWITCH (well, FreeSWITCH is not exactly a PBX, it’s author describe it as a soft switch in his comparison with Asterisk).
VoIP stands for Voice Over IP.
Technically VoIP and PBX are not dependent one to the other. A PBX could be connected only to a PSTN or only to a VoIP network. The third option, the one that I found most interesting, is that a PBX could be connected to both a PSTN and a VoIP network, acting as a sort of bridge between the twos.
This is not to be confused with PSTN/VoIP Gateway, where the communication is forwarded from PSTN to VoIP (and the other way around).
A software PBX could be connected to communication channel(s) in one or more of the following ways:

  1. with the computer’s internet connection
  2. with an internal card (Digium, Sangoma, Rhino, etc)
  3. with a Channel bank
  4. with a Gateway (internal or from an external provider) to which it is connected via ethernet/internet.

Currently there are different VoIP protocols, the most known being SIP, IAX, and H.323.
Probably SIP protocol is the most widely used, at least for connection between end-user device/software and PBX, even if it may require some tweaking to overcome NAT issues, while IAX maybe has better performance, but it is used mostly for inter-PBX communication.
Please keep in mind that I am a developer, not a network/VoIP engineer, so feel free to correct me if I wrote something wrong in the above introduction.

In the next part we will cover the Realtime configuration. C YA!!!