|
I'm a prolific Linux user, who not until recently regained an interest in Asterisk after a lengthy conversation with an associate about his accomplishment with his Asterisk setup. Personally I never took him as the avid Linux user, heck I don't take anyone who uses GUIs without understanding the fundamental workings of any Linux service seriously. No offense. This issue I'll take you down the rabbit hole to understand what Asterisk is and what it can offer to the hobbyist and more so in the hands of the commercial entities.
WHAT IS VOIP? VOIP, which is the acronym for Voice Over IP, or in basic terms phone service over the Internet. With a reasonable quality Internet connection you can get your phone service delivered through the Internet instead of the local phone company. In fact more phone companies no offer VoIP service as an alternative phone service. WHAT IS ASTERISK? Asterisk Handbook explains, Asterisk as an "Open Source Hybrid TDM and packet voice PBX and IVR platform with ACD functionality"; but I won't feed you the alphabet soup on Asterisk. "Asterisk is quite possibly the most powerful, flexible and extensible piece of integrated telecommunications software available. Its name comes from the asterisk symbol, *, which in UNIX (including Linux) and DOS environments represents a wildcard, matching any filename." Asterisk can, among other things, be used in any of these applications: - Heterogeneous Voice over IP gateway (MGCP, SIP, IAX, H.323)
- Private Branch eXchange (PBX)
- Custom Interactive Voice Response (IVR) server
- Softswitch
- Conferencing server
- Number translation
- Calling card application
- Predictive dialer
- Call queuing with remote agents
- Remote offices for existing PBX
More importantly it can fulfill all of those roles simultaneously and seamlessly between interfaces. WHO MADE ASTERISK? Asterisk was originally written by Mark Spencer of Digium dba Linux Support Services, Inc. Code has been contributed from Open Source coders around the world, and testing and bug-patches from the community have provided invaluable aid to the development of this software. GET STARTED ON ASTERISK If we have sparked some interests, then let's get started. Firstly, let's state the obvious, install a copy of Linux. I make no excuses or arguments for the chosen distribution Red Hat; I have no intention of discussing the pros or cons of the many distributions available. If you Don't like Red Hat, stop complaining and find a Windows user to torment. Hint: CentOS is another recommended distribution of Linux. There I said it. Assuming your installation of Linux is complete let's move on. Another Hint: Asterisk operates on a CLI, command line interface, so X-Windows is not required, but what ever makes you happy. Optional hardware requirements are a Digium card, such as X100P (discontinued but available on eBay and some distributors of Digium products), single analog PSTN connection and a VoIP phone with SIP (Cisco 7960/7940). Note that for technical reasons, you must have at least one Zaptel interface (of any kind) installed in your Asterisk system if you wish to use conferencing. Login to your server as the user you created during install; then right-click on the background and select "Open Terminal". Type "su" on the command line, then enter the root password when prompted. Download a copy of Asterisk source files from ftp://ftp.asterisk.org via anonymous FTP. Another way is to use 'wget' and the direct path to the files in FTP. You will need the following files: asterisk-1.0.9.tar.gz asterisk-addons-1.0.9.tar.gz asterisk-sounds-1.0.9.tar.gz libpri-1.0.9.tar.gz zaptel-1.0.9.1.tar.gz
Let's install these sources from the /usr/src directory: Install Libpri cd /usr/src tar -zvxf /path/to/files/libpri-1.0.9.tar.gz cd libpri make && make install Install Zaptel cd /usr/src tar -zvxf /path/to/files/zaptel-1.0.9.1.tar.gz cd zaptel make && make install Install Asterisk cd /usr/src tar -zvxf /path/to/files/asterisk-1.0.9.tar.gz cd asterisk make && make install Install Asterisk Sample files (optional) This will create .sample files that you use as references and experiment with. Make samples Install Asterisk-sounds cd /usr/src tar -zvxf /path/to/files/asterisk-addons-1.0.9.tar.gz cd asterisk-sounds make && make install Install Asterisk-addons cd /usr/src tar -zvxf /path/to/files/asterisk-addons-1.0.9.tar.gz cd asterisk-addons make && make install Start your Asterisk server with your asterisk command and the following hooks. This will show you what asterisk are doing in the foreground. /usr/sbin/asterisk -vvvgc Hint: The quick and dirt alternative is to download a copy of Asterisk@Home, but I'm not supporting that in this issue. However you will get the same results with a bit more hand holding with Asterisk@Home. Now you have Asterisk, installed and running, now what? START ASTERISK AT BOOT TIME Now we want Asterisk to start at boot time. You can either start Asterisk using /usr/sbin/asterisk command, or using the /usr/sbin/safe_asterisk script which will attempt to reload Asterisk after it crashes. For a Red Hat based systems you can add this to your /etc/rc.d/rc.local file, however this will not shutdown Asterisk very cleanly during a reboot or shutdown. For a Red Hat environment, you can use a working rc.d/init.d script by copying the script from the Asterisk source directory, located in /usr/src/asterisk/contrib./init.d/ cd /usr/src/asterisk/contrib./init.d/ cp rc.redhat.asterisk /etc/rc.d/init.d/asterisk Then run the /sbin/chkconfig --add asterisk command to add asterisk to the startup. THE ALPHABET SOUP EXPLAINED PBX - Private Bridge Exchange TDM - Time Division Multiplex PSTN - Public Switch Telephone Network POTS - Plain Old Telephony System VoIP - Voice-over-IP IVR - Interactive Voice Response SIP - Session Initiation Protocol IAX - Inter Asterisk Exchange VSP - VoIP Service Provider DTMF - Dual Tone, Multi-Frequency ASTERISK RESOURCES Digium http://www.digium.com VoIP Info http://www.voip-info.org Asterisk Guru http://www.asteriskguru.org Asterisk http://www.asterisk.org CONCLUSION Asterisk opens avenue with boundless possibilities, it also offers to hobbyist, a way to truly understand how phone systems work. This article is only a precursor to our discussion online. In closing I must thank a few people, Patrick Linton, for re-introducing Asterisk and the lengthy discussions on Asterisk, Mark Spencer and Scott Laird for answering my questions. |