Friday 25 November 2011

Asterisk


Asterisk

 (VoIP)


1. Overview

Telephone communication has not changed radically since the telephone was invented in the late 1800s. New technologies like digital circuits, DTMF (or, "touch tone"), and caller ID have improved on this invention, of course, but its basic functionality still remains the same. Over the years, service providers made a number of innovative changes in order to improve the kinds and types of services offered to subscribers, including toll-free numbers, call-return, and call-forwarding, etc. By and large, users did not know how these services worked, but they did know two things: the same old telephone is used, and the service provider charges for every incremental service addition introduced.

In the 1990s, a number of individuals in research environments, both in educational and in corporate institutions, began to take a serious interest in carrying voice and video over IP networks, especially over corporate Intranets and the Internet. This technology is commonly referred to today as Voice over Internet Phone (VoIP). It is the process of breaking up audio or video into small chunks, transmitting those chunks over an IP network, and reassembling those chunks at the far end so that two people can communicate using both audio and video.

The idea of VoIP is certainly not new, as there are research papers and patents dating back several decades; and demonstrations of the concept have been given at various times over the years. VoIP took center stage with the "information super highway" (or, the Internet) concept that was popularized by former US Vice President Al Gore in the 1990s. It was envisioned that the Internet would make it possible to interconnect every home and every business with a packet-switched data network. Before Al Gore's effort to grow the Internet, the Internet was generally limited to use in academic environments only, but the possibility of mass deployment of the Internet sparked renewed interest in VoIP.

2. Introduction

Asterisk© is a Linux-based IPBX application developed by Mark Spencer of Digium™, the company behind Asterisk. Asterisk@Home© evolved from the core of Asterisk. It is made up of several major components. These were developed under the GNU General Public License (GPL), supported relatively by the users themselves. It consists of applications, a provisioning system, an installer, and an operating system that, together, constitute a complete package ready-for-use as an out-of-the-box PBX.

For the purposes of this tutorial, the major components of Asterisk@Home© include:

1.   Asterisk, the core PBX
2.   Flash Operator Panel, a screen-based operator’s console
3.   Asterisk Management Portal (AMP), a web-based provisioning tool for Asterisk
4.   A report system - that part of the AMP which provides CDR reporting tools
5.   A maintenance system, also a part of the AMP, which provides low-level interfaces to some components, and real-time system information
6.   CentOS, a version of Linux related to Enterprise Linux (but without the branding and the support)

2.1. The Components

Two main components need to be set up:

  • An Asterisk-powered IP PBX
  • The phones (or softphones)
  • Network

2.1.1. The IP PBX

A dedicated PC is needed in order to run an IP PBX. The PC described below is sufficient enough to power an IPBX in a small office environment:

  • 600 Mhz Pentium III PC or better
  • 256 MB RAM – minimum
  • 10 GB hard disk space - minimum
  • 10/100 NIC
  • CD-ROM Drive
  • 10/100 4 or 8 ports Ethernet switch

2.1.2. Phones

You can use soft phones as well as hard phones from Planet, and Cisco, etc.

To get started, it is easiest to get a softphone, and run it on another computer. For details, see the section on how to install a softphone.

2.1.3. Network

A static IP address is needed to run Asterisk on a network (e.g. 192.168.0.12).

3. Installation and Configurations


  • Burn the downloaded ISO image onto a blank CD.
  • Ensure that your PC will boot from the CD. If necessary, change the BIOS settings to reflect this. Warning: This will erase all the data on the hard drives of the PC. If you have two drives, both may be erased as well - beware.
  • Boot your Asterisk PC with the CD in the CD drive, and press the “Enter” key. 


  • Press the “Enter” key to start the installation. It will take approximately 30 minutes for the installation to be complete ready for the configuration stage.
  • During this stage, you will see screens similar to the following.  Linux and the required files are being installed. Wait for the process to end.


  • After Linux is loaded, the CD will eject. Take the CD out, and wait for the system to reboot. You will then be presented with lines and lines of code. This process will take a while because it is building Asterisk.

Change Default Settings
Once Asterisk@Home has been installed, some default system changes need to be made to Asterisk.

Log in to your new Asterisk@Home box (user: root, password: password)


To get help, At the command-line, type:

            help-aah

A help list will be displayed:

Change the Linux Password

Note: Change your root password immediately by typing:
passwd

 
Change some of the other default passwords as well; set your date, and the IP address of your box to a static address.

Change the IP Address 

Change the Asterisk IP address from DHCP to static. At the command prompt, type:
netconfig



Select [Yes] to set up networking, and hit the “Enter” key.


Use the “Tab” key to switch between various fields. Enter the IP address that is to be allocated to the Asterisk box, the Netmask (sub-net mask), Default Gateway and Primary nameserver, as per the example given above. 
Select “OK”, and reboot the system.

 

Set Time Zone

Set the correct time zone. The following examples depend on whether you are setting up AAH 1.x or AAH 2.x.

For AAH 1.x type the following at the command-line:

redhat-config-date

You will get the screen on the left; choose an appropriate time zone. Check the system clock. Use UTC if you want to.

Choose “OK” to complete the process.


For AAH 1.5 and 2.x, type the following at the command-line:

config

You will get the prompt as per the screen on the right.

Press D.

You will then be presented with the time zone screen.

Choose your time zone to complete the process.

Log off Linux and reboot. Asterisk will now start with the new IP address.

4. Connect to AMP from a Web Browser

Connect to http://ipaddress/ (e.g. http:192.168.1.7) to configure Asterisk@Home. You will be presented with an Asterisk Management Portal (AMP) as illustrated below:

4.1 Logging into an Asterisk Management Portal (AMP)

To log in to an Asterisk Management Portal (AMP) use the user: maint, and the password: password, unless you have changed the password during the initial set up.

Once you have logged into an AMP, you will be presented with the following screen:


Select the Setup tab and you will be presented with the following screen.

This is where you start configuring Asterisk@Home. Notice the selection options on the left hand side. Selecting each option will display a configuration screen for that particular function e.g. creating new extensions, creating new trunks, etc.

4.2. General Settings

Select General Settings, and set them up as illustrated below:


Hover your mouse over the corresponding field description. An amber underline will display the purpose of the fields.

In the Asterisk Dial command option, customize your preferences regarding Asterisk’s “behavior”, e.g. if you want the caller to hear music instead of the standard ringing sound, replace the “r” with an “m”. For further options, hover your mouse over the label, and you will be informed about other options. After setting up the General Settings, click on the “Submit Changes” button, and the red bar on the top of the screen for the changes to take place.

4.3. Extensions

The number of extensions to be set up depends upon you. You can have soft phones installed in four or five computers, or have a mixture of ATAs and SIP SoftPhones.

The following extension numbers should be avoided:

200 -                             Park notify
300-399 -                       Reserved for speed-dial
70-79 -                          Reserved for call-on-hold
80-89 -                          Reserved for meet-me and conference
800-899 -                       Reserved for meet-me and conference
8000-8999 -                   Reserved for meet-me and conference
80000-89999 -                Reserved for meet-me and conference

Select the type of trunk e.g. SIP, IAX2, ZAP or Custom, from the Create Extension main menu illustrated below:


The AAH v2.x’s screen, where you actually create an extension, is given below:



Click on the “Add Extension” button to add more extensions, e.g. 201, 202, 2000 and 2001.

Allocate the password in the numeric form. If you enabled Voicemail, allocate the same password as well. You may also nominate an e-mail address for Voicemail e-mail notification.

5. Setting the soft phone

Now that Asterisk is up, you need to setup up a soft phone. The following soft phones can be used with Asterisk:

2.     DIAX softphone
3.     eStara softphone
5.     FireFly softphone
6.     Iaxcomm softphone
9.     KIAX softphone

We will use the BOL SIPPhone. It is extremely simple to set up for use with Asterisk, and it also features a call-forwarding facility.

Obtain a copy of the BOL 2000 SIPPhone from http://www.bol2000.com/download/sipphone/

After downloading and set up, the following screen will be displayed when it runs:

5.1. Profile Tab

This is the only screen that is required to be filled in.

Account: <enter the extension number e.g. 201>
Password: <enter the password e.g. 201>


Domain/Realm: <leave it blank>
Proxy: Your Asterisk network address e.g. 192.168.1.7
Port: 5060

Check the Auto Login and Keep Password.
Click OK.

5.2. Audio and Video Tab

Click on the “Audio & Video” tab to ensure that the audio properties set is consistent with the audio card installed in your PC/Notebook.


  • Click on the Tuning Wizard to tune your audio input and output.
  • Check Auto Send Video, if you are using video. Check it anyway.
  • Check Auto Receive Video, if you are using video. Check it anyway.

Click OK.

5.3. Network Tab

Ensure that your Internet Connection Type is set to LAN.

Ignore the “Information of Network” field.

Click OK.

5.4. Call-forwarding

To forward an unanswered call to an extension, click on the “Call Forward” tab, and enter the telephone number you want to forward your incoming calls to. You have three options of call-forwarding – Always On, Busy, or No Answer. This facility is only available, however, if your PC is on, and the softphone is active.

Click OK.

You might want to set-up a couple of PCs with the softphone, after which you can start testing your new phone system by dialing each extension in turn.

If you use one of the softphones and dial 7777, Asterisk will simulate an incoming call.

Once done, test your softphone connection to Asterisk.

To check if Asterisk is running
Click on the “System Status” tab. You will be presented with the following screen:


5.5. Flash Operator Panel (FOP)

The Flash Operator Panel is a switchboard-type application for the Asterisk PBX. It runs on a web browser with the Flash plug-in. It is able to display information about your PBX activity in real-time. The layout is configurable (button sizes and colors, icons, etc). You can have more than 100 buttons active per screen.

It also supports contexts: you can have one server running, and many different client displays (for hosted PBX, different departments, etc).

It can integrate with CRM software, by popping up a web page (and passing the CLID) when a specified button is ringing.


The following information is displayed on the FOP:

  • Which extensions are busy, ringing, or available
  • Who is talking and to whom (CLID, context, priority)
  • SIP and IAX registration, and reach status
  • Queue status (the number of waiting users)
  • Message Waiting Indicator and count
  • Parked channels
  • Logged-in agents

Functions you can perform on FOP:

  • Hang-up a channel
  • Using drag-and-drop to transfer a call
  • Initiate calls by drag-and-drop
  • Barge in on a call using drag-and-drop
  • Set the caller ID when transferring or originating a call
  • Automatically pop-up a web page with customer details
  • Click-to-dial from a web page


No comments:

Post a Comment