Step 2: Select Your Computer Hardware
Asterisk can run on virtually any modern computer, but when building a production telephony application server you should follow a few basic best-practice guidelines. Click the "More" link below to learn the basic requirements for a solid Asterisk server.Telephony systems are generally mission-critical components and therefore need to be as reliable as possible. So while you can build an Asterisk server using a Start with a reasonably powerful and reliable server-class system as your platform. While not required, it's generally a good idea to use a system with redundancy features including mirrored hard disk drives (RAID 1, 5 or 10) and dual power supplies.
Cooling is also an important issue. PSTN interface cards can add to the overall heat load of the server. Failure to provide proper ventillation can cause stability issues and can lead to premature failure of critical components.
CPU and memory requirements vary depending on the application. Small systems can be built on embedded processors using only a few megabytes of memory. Large scale system that process thousands of simultaneous calls require significantly more horsepower and memory. The safest bet is to go with the most powerful CPU and the most memory that fits within your budget.
If your application calls for TDM hardware, be sure that your server includes the correct type of card slot. Cards are available in PCI and PCI Express form factors and at a variety of voltages. See the "Select Your Telephony Hardware" section for more information on the various interconnect formats.
Step 3: Install Linux & Asterisk
Once you have your Asterisk hardware the next step is software. You will either need to install Linux or use a ready-to-run distribution to install Linux, Asterisk and various related software packages. Since these application tutorials are intended to help you create custom telephony applications we will start with a generic installation of CentOS 5.3 and then install Asterisk from the Yum repository. This make it relatively easy to keep Asterisk up to date and avoids the complexities of hand compiling the Asterisk source code.Download CentOS Linux 5.3
The first step is to download a copy of the CentOS 5.3 installation image. There are two supported system architectures available, a 32-bit version of Linux and can run on either 32-bit or 64-bit systems, and a 64-bit version that runs only on x86_64 hardware. If in doubt, download the 32-bit version. Most CentOS mirrors offer the distribution as either 5 CD images or a single DVD image. Either method works for the purposes of this tutorial. Use the CentOS 5 mirrors list to select a mirror. Most mirrors host the CD images and a BitTorrent seed file for downloading the DVD image. To download the DVD image use a BitTorrent client.Download or copy the .iso image to a computer with a CD or DVD burner (writer). Keep in mind that the images are roughly 700 MB each and the DVD image is over 3 GB.
Burn The CentOS .iso To CDs or DVD
Use your CD or DVD burner software to burn the ISO image to an actual CD. Note that if you are installing on virtual machine you can generally use the ISO image without burning it to physical media.Install CentOS
To install CentOS Linux, insert the newly burned CD in the CD or DVD drive of the target computer and boot. Be sure that your system is set to boot from the CD or DVD drive. (You can either adjust the boot order in the system BIOS or use a one-time boot menu if your system supports it.)Full details of the CentOS installation are beyond the scope of this tutorial. Several excellent quick-start tutorials can be found at Howto Forge, including this one. For more detailed installation instructions you can also refer to the CentOS Installation Guide . In general it is safe to select the default options throughout the installation process. Be sure to select a secure root password when prompted. IP Telephony systems are a frequent target for hackers and maintaining system security is extremely important.
Note that the installation of graphical environments (Gnome, KDE, etc.) is perfectly acceptable on systems used for development or unit testing. When building production servers or systems designed for load testing it is recommended that the graphical interfaces and subsystems (frame buffers) be omitted.
Add Asterisk Yum Repositories
After the install is complete and your new CentOS Linux system is up and running, log in as the root user with the password you set during the installation. (Note that you generally want to avoid logging in as root. Create a non-privileged user account for day to day operations.)Now, use the text editor of your choice to create a new file named "centos-asterisk.repo" in the "/etc/yum.repos.d" folder. Add the following text to the file:
[asterisk-tested] name=CentOS-$releasever - Asterisk - Tested baseurl=http://packages.asterisk.org/centos/$releasever/tested/$basearch/ enabled=0 gpgcheck=0 #gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium [asterisk-current] name=CentOS-$releasever - Asterisk - Current baseurl=http://packages.asterisk.org/centos/$releasever/current/$basearch/ enabled=1 gpgcheck=0 #gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-DigiumSave the new file and create another named "centos-digium.repo" and insert the following text:
[digium-tested] name=CentOS-$releasever - Digium - Tested baseurl=http://packages.digium.com/centos/$releasever/tested/$basearch/ enabled=0 gpgcheck=0 #gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium [digium-current] name=CentOS-$releasever - Digium - Current baseurl=http://packages.digium.com/centos/$releasever/current/$basearch/ enabled=1 gpgcheck=0 #gpgkey=http://packages.digium.com/RPM-GPG-KEY-DigiumNow you should be ready to install Asterisk. To start the installation, open a terminal window and type the following:
[root@localhost~]# yum install asterisk16 asterisk16-configs asterisk16-voicemail dahdi-linux dahdi-tools libpriThe system will connect with the Asterisk and Digium yum servers, download the necessary packages for Asterisk 1.6 and install them. For a detailed view of sample output from the install see the Yum installation page.
When the installation is complete, reboot your system to activate Asterisk and DAHDi. By default DAHDi will start automatically. To enable auto-start of Asterisk, run the following command:
[root@localhost~]# chkconfig asterisk onTo manually start Asterisk you can use the following:
[root@localhost~]# service asterisk startTo stop Asterisk, execute:
[root@localhost~]# service asterisk stop
Test Your Asterisk Installation
Once the Asterisk service is started you should be able to access the Asterisk command line interface from the Linux command line as follows:[root@localhost~]# asterisk -rThe system should respond with something similar to:
Asterisk 1.6.0.15, Copyright (C) 1999 - 2009 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. ========================================================================= Connected to Asterisk 1.6.0.15 currently running on localhost (pid = 3052) Verbosity is at least 3 localhost*CLI>Congratulations, you now have Asterisk installed and running. To exit from the Asterisk CLI, simply type 'exit'.
2 comments:
I constantly emailed this webpage post page to
all my associates, for the reason that if like to read it
afterward my links will too.
my website - luxury outside furniture
It's really a cool and helpful piece of info.
Post a Comment
Note: only a member of this blog may post a comment.