Book Image

Asterisk 1.6

Book Image

Asterisk 1.6

Overview of this book

Asterisk is a powerful and flexible open source framework for building feature-rich telephony systems. As a Private Branch Exchange (PBX) which connects one or more telephones, and usually connects to one or more telephone lines, Asterisk offers very advanced features, including extension-to-extension calls, queues, ring groups, line trunking, call distribution, call detail rerecords, and call recording. This book will show you how to build a telephony system for your home or business using this open source application. 'Asterisk 1.6' takes you step-by-step through the process of installing and configuring Asterisk. It covers everything from establishing your deployment plan to creating a fully functional PBX solution. Through this book you will learn how to connect employees from all over the world as well as streamline your callers through Auto Attendants (IVR) and Ring Groups.This book is all you need to understand and use Asterisk to build the telephony system that meets your need. You will learn how to use the many features that Asterisk provides you with. It presents example configurations for using Asterisk in three different scenarios: for small and home offices, small businesses, and Hosted PBX. Over the course of ten chapters, this book introduces you to topics as diverse as Public Switched Telephony Network (PSTN), Voice over IP Connections (SIP / IAX), DAHDI, libpri, through to advanced call distribution, automated attendants, FreePBX, and asterCRM. With an engaging style and excellent way of presenting information, this book makes a complicated subject very easy to understand.
Table of Contents (15 chapters)
Asterisk 1.6
Credits
About the Authors
About the Reviewer
Preface

What's new in Asterisk 1.6?


Most of the changes in Asterisk 1.6 are enhancement changes that improve the reliability and scalability of Asterisk. The new features of Asterisk 1.6 are:

  • New Bridge feature: In this release, a new Bridge action has been created, which allows a user to connect two existing channels. This functionality will enable the use of advanced features such as in-call announcements and call center monitoring, by a third party.

  • Improved NAT support and support for STUN: This provides improved connectivity capability with phones located behind a router or firewall.

  • Improved reporting: A new call event logging capability was developed to give a more complete tracking of events that take place during a call. This will provide more details than traditional CDR (Call Detail Recording) and allow more granular tracking and auditing.

  • Support for asynchronous events: This enables modules in Asterisk to communicate with each other across a cluster. For example, MWI events could be allowed to be distributed among multiple Asterisk servers. This means it is now possible to have SIP endpoints registered to a different server rather than the one holding their mailboxes.

For a complete list of changes since Asterisk 1.4, visit: http://svn.digium.com/svn/asterisk/tags/1.6.0/CHANGES.

Asterisk is a PBX

Asterisk is a Private Branch Exchange (PBX). A Private Branch Exchange (PBX) can be thought of as a private phone switchboard connecting to one or more telephones on one side, and usually connecting to one or more telephone lines on the other. This is usually more cost effective than leasing a telephone line for each telephone needed in a business.

Extension-to-Extension calls

First, as a PBX, Asterisk offers extension-to-extension calls. This means users can dial from one phone to another phone. While this seems obvious, elementary phone systems are available (often referred to as Key Systems) that support multiple phones and multiple lines, and allow each phone to use any line.

In operation, the handsets do not have individual extensions that can be dialed, and so there is no way to initiate a call from one handset to another. These systems can usually be identified by having a blinking light for all outgoing lines on every telephone. Unlike Key Systems, Asterisk allows for extension-to-extension calls, allowing directed internal communications.

In the previous diagram, each extension (meaning everything to the left of the PBX) can connect to any other extension by dialing it directly. This means if a modem were to send a fax to a local fax machine, it would be done by creating a direct connection between the devices through the PBX.

Line trunking

Secondly, Asterisk offers line trunking. In its simplest form, line trunking simply shares access to multiple telephone lines. These telephone lines are usually used to connect to the global telephone network, known as the Public Switched Telephone Network (PSTN). However, they can also be used as private lines for other phone systems.

These connections can be a single analog trunk, multiple analog trunks, or high-capacity digital connections that allow multiple concurrent calls to be carried on a single connection.

Telco features

Asterisk supports all of the standard features we would expect from any telephone company (or telco). Asterisk supports sending and receiving caller ID and even allows us to route calls based on the caller ID. Using caller ID with the PSTN requires us to subscribe to that feature with our PSTN connection provider.

As expected, Asterisk also supports other features such as call waiting, call return (*69), distinctive ring, transferring calls, call forwarding, and so on. These basic features and more are provided by Asterisk.

Advanced Call Distribution

Asterisk can receive a phone call, look at attributes of the call, and based on that make routing decisions. If enough information is not supplied by our PSTN connection provider, we can ask the caller to input the information using a touch-tone phone.

Once we make a decision on how to route a call, we can send it to a single extension, a group of extensions, a recording, a voicemail box, or even a group of telephone agents who can roam from phone to phone. We can use call queues to serve our customers more effectively while maintaining operational efficiency.

This flexibility gives us the ability to move from having just a phone system, to creating powerful solutions that are accessed through the telephone. Advanced Call Distribution (ACD) empowers us to serve our customers in the best way possible.

One major differentiating factor between Asterisk and other PBX systems that support ACD is that Asterisk does not require the purchase of a special license to enable any of these features. For example, the limit on how many calls can be queued at a time is determined only by the hardware we use.

Call Detail Records

Asterisk keeps complete Call Detail Records (CDR). We can store this information in a flat file or preferably a database for efficient look up and storage. Using this information, we can monitor the usage of the Asterisk system, looking for patterns or anomalies that may have an impact on business.

We can compare these records to the bill that the phone company sends out. They allow us to analyze call traffic, say to run a report to find the ten most commonly-dialed phone numbers. We can also determine the exchange that calls us most frequently so that we can target our marketing to the right area.

Moreover, we can look at the time duration of each call. We can count the number of calls a specific agent answers and compare it with the average. There are many uses of this feature.

Using this information, we can also identify abuses of our long-distance calling service. Employees all around the world misuse long-distance call facilities provided by employers. Asterisk gives us the tools to detect possible misuse. The importance of calling records should not be underestimated. This information is invaluable for a variety of business functions. As many countries operate a national do-not-call list, we can quickly determine if we have called anyone on the list to ensure that our verification and checking processes are adequate.

Call recording

Asterisk gives us the ability to record calls that are placed through the PBX. We can use this to provide training material, as examples of calls that went badly or went well. This can also be used to provide call content to satisfy customers or partners, which could potentially be helpful in a legal situation. It's important to consider this feature when setting up your Asterisk service, as you may have substantial hardware and storage issues to address if your PBX is destined to handle and record a substantial number of calls.

Asterisk provides this feature and it is up to us to determine if it is legal, appropriate, and helpful to use in particular circumstances.

Call parking

For users still used to the old Key Systems, call parking is a great feature that allows you to take a call, place it into a parked slot, and then allow another person in the office to pick up that line by accessing the slot. This process mimics the old Key System approach where you pick up a call, place the caller on hold, and then communicate the line number to another person in the office. Instead of a line number, call parking will give an employee a slot number, which if dialed will allow you to pick up that parked call. The slot number will be communicated to the user transferring the caller into call parking, which is accessed by dialing the call parking feature code.

For example, let's say you receive a call in the front office, but you need to check on something in the back. You don't want to transfer the call to the back office because if nobody is there then the caller might end up in voicemail before you reach the phone. Call parking allows you to place the caller into a parked slot. A slot number will be communicated to you. Now you can take your time to go to the back office, pick up a phone, and dial the slot number. Once it is dialed, you will be reconnected with the caller.

Call barging

This is an excellent feature for managers who are training new employees or for those who want to conduct quality assurance. Call barging allows a user to listen to another conversation currently in progress on the Asterisk server. Through Whisper mode, a manager can even communicate to his employee without the remote user hearing the conversation. This allows the manager to coach the employee on a live call without the customer knowing it.

Asterisk is an IVR system

Interactive Voice Response (IVR) revolutionizes just about every business it touches. The power and flexibility of a programmable phone system gives us the ability to respond to our customers in meaningful ways.

We can use Asterisk to provide 24-hour service while reducing the workload for our employees at the same time. Asterisk allows us to play back files, read text, and even retrieve information from a database. This is the type of technology you come across in telephone banking or bill payment systems. When you call your bank, you hear a variety of recordings and issue commands usually using a touch-tone telephone. For example, you may hear greetings and status messages, along with the messages asking you to type in your account number and other personal information or authentication credentials. You will also often hear personalized information such as your last few transactions or your account balance, which will be retrieved from a database. Systems such as this can be and have been implemented using Asterisk.

Asterisk is a call center system

Through the use of queues, call detail records, and its open source nature, Asterisk has become a popular choice among call centers. Queues allow call centers to handle calls in a controlled fashion by placing callers in a holding pattern until an agent is free to take the call. Music on hold can be customized to play messages that further help advertise a company's products or services while the caller is waiting. Other features such as approximate wait time, position in line, and ability to play an IVR with options (such as allowing a caller to leave a voicemail) are some of the enhanced features a call center will need.

Call detail records can also aid call centers as they contain data that can be sorted and put together by queue statistic applications. Some of these open source statistic applications can identify strengths and weaknesses in a call center's routing strategies. For example, the call detail records can record when a caller has hung up and left the queue before an agent has answered the call. This data can be useful as it can identify average wait time and how often callers become impatient and hang up.

Asterisk, being open source has also opened doors for other open source call center applications to be developed for it. For example, today you will find many CRM and predictive dialing applications working with Asterisk.

Asterisk is a voicemail system

Asterisk has a fully-functional voicemail system included. The voicemail system is surprisingly powerful. It supports voicemail contexts so that multiple organizations can be hosted from the same server. It supports different time zones so that users can track when their phone calls come in. It even provides the option to notify the recipient of new messages through email. In fact, we can even attach the message audio.

Asterisk is a Voice over IP (VoIP) system

Asterisk gives us the ability to use the Internet Protocol (IP) for phone calls, in tandem with more traditional telephone technologies.

Choosing to use Asterisk does not mean that we can use only Voice over Internet Protocol (VoIP) for calls. In fact, many installations of Asterisk do not use it at all. But each of those systems has the ability to add Voice over IP easily, any time, and with no additional cost.

Most companies have two networks—one for telephones and the other for computers. What if we could merge these two networks? What would the savings be? The biggest savings are realized by reducing the administrative burden for Information Technology staff. We can now have a few experts on computing and networking. As telephony will run on a computer and over our IP network, the same core knowledge will empower our staff to handle the phone system.

We will also realize benefits from decreased equipment purchasing in the long run. Computer equipments get progressively cheaper while proprietary phone systems seem to remain nearly constant in price. Therefore, we may expect the cost for network switches, routers, and other data network equipments to continue to decrease in price.

In most current phone systems, extensions can only be as far away as the maximum cabling length permitted by the telephone system manufacturer. While this seems perfectly reasonable, sometimes we would like it not to be so. When using VoIP we can have multiple users using the same Asterisk service from a variety of locations. We can have users in the local office using PSTN phones or IP phones, we can have remote VoIP users, we can even have entire Asterisk systems operated and run separately but with integrated routing.

One way to slash overhead cost is to reduce the amount of office space required. Many businesses use telecommuting for this purpose. This often creates a problem—which number do we use to reach a telecommuter? Imagine the flexibility if telecommuting employees could simply use the same extension when at home as when in the office or even when using their mobile.

VoIP allows us to have an extension anywhere we have a reasonably fast Internet connection. This means employees can have an extension on the phone system at home if they have a broadband connection. Therefore, they will have access to all of the services provided in the office, such as voicemail, long distance calling, and dialing other employees by extension.

Just as we can bring employees into the PBX from their homes, we can do the same for remote offices. In this way, employees at multiple locations can have consistent features accessed exactly the same way, helping to ease the burden of training employees.

But this is not all that VoIP can give us. We can use an Asterisk server in each office and link them. This means each office can have its own local lines, but office-to-office communications are tunneled over the Internet. The savings to be realized by avoiding call tolls can be significant. But there's more.

Once we have our offices linked in such a way, we can handle calls seamlessly, irrespective of which office the employees are in. For instance, if a customer calls Office A to ask about their account, and the accounting department is in Office B, we simply transfer the call to the appropriate person in the other office. We don't have to care about where that other office is. As long as they have a reliable Internet connection, they don't even have to be in the same country.

We can route calls based on cost. If it is more cost effective, we can send our calls to another office, where the remote Asterisk server will then connect them with the regular phone network. This is commonly referred to as toll bypass.

Another benefit of linking our phone systems together is that we can route calls based on time. Imagine we have two offices in different time zones. Each office will probably be open at different times. In order to handle our customers effectively, we can transfer calls from a closed office to the one that is open. Again, as we are using an Internet connection to link the offices, there is no additional expense involved in doing so.

By linking our offices together using VoIP, we can increase our customer service while decreasing our expenses—a true win-win situation.

The existence of all these options doesn't necessarily mean we should be using them. With the versatility of Asterisk, we may use or ignore options as it suits our requirements. If we were to use every single line type and feature that Asterisk supports, it could lead to a very complicated and difficult-to-administer system. We should choose the subset that fits our requirements and would function well within our current communications setup.

Asterisk 1-2-3

Setting up Asterisk and working with configuration files without a database is not intended for a beginner. Originally, Asterisk was not considered an off-the-shelf PBX. However, in recent years all of this has changed.

For those who are looking for an off-the-shelf Asterisk PBX system, Digium created the Asterisk Appliance, a feature-rich PBX solution that's easy to install and manage. The Asterisk Appliance allows users to use traditional analog lines as well as a VoIP service provider.

For those who are just beginners, there is a packaged solution called Trixbox CE (www.trixbox.org). Trixbox CE offers a free single CD installation that installs Linux, Asterisk, a database (MySQL), as well as an easy-to-use web-based interface to create and manage your PBX settings. The installation takes approximately 30-60 minutes and once complete, you have a VoIP server ready to go. However, if you want to connect traditional analog lines to your server, you will need to purchase an FXS/FXO card. Please note that for connecting standard POTS (Plain Old Telephone Service) lines to your Asterisk PBX, you will need to purchase an FXO expansion card called Fonality.

For those of you who are a bit more technically inclined and desire to install each piece of Asterisk individually, you may still want an easy-to-manage interface for your deployment. FreePBX is an easy-to-use GUI (graphical user interface) that controls and manages Asterisk (www.freepbx.org).

Another great resource for those interested in FreePBX is the book called FreePBX 2.5 Powerful Telephony Solutions. You may also visit:

http://www.packtpub.com/freepbx-2-5-powerful-telephony-solutions

Asterisk scalability

In the past, Asterisk was not a solution for those requiring 100 SIP devices or more. However, in recent years major releases have dramatically increased reliability, scalability, and capacity. Today Asterisk servers can support hundreds of extensions and up to 240 simultaneous calls. For example, Asterisk Business Edition has been tested to handle up to 240 simultaneous calls without any issues. However, it being computerized, the speed, capacity, and reliability is fully dependent on the parts that make up the system. For this reason, ensure you have enough hard drive space, RAM, and CPU power to run your Asterisk server. Those of you who will be using a VoIP service provider for origination (receiving incoming calls) and also termination (outgoing calls) supporting SIP/IAX devices on remote networks, please ensure you have enough bandwidth from your ISP.

Asterisk does not run on Windows

At one point, Asterisk had a demonstration CD that worked with Windows. However, Asterisk offered direct from Digium does not run on the Microsoft platform. Asterisk requires near real-time access to system resources. It also requires hooks into certain resources. Actually, Asterisk is built to use Linux, the open source *NIX operating system.

AsteriskWin32 (http://www.asteriskwin32.com) is an open source project that has managed to get Asterisk 1.2.26.2 compiled for Windows. However, it is highly recommended that you stick with Linux as you will find more support for it in the Asterisk community.