Wednesday, February 29, 2012

Obtaining the Source Files | Installing Asterisk



The very first step we must undertake is to obtain the source files. When obtaining the source code, we have two major choices. We can either download the latest version through Digium's web site from http://www.asterisk.org/downloads or use svn to obtain the latest stable release. The maintainers of Asterisk have been doing a good job of keeping the stable releases available on the FTP servers, so we will use this method.
The commands we issue to download Asterisk's source files are:
# mkdir -p /usr/src/asterisk

# cd /usr/src/asterisk

# wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-
1.6.1-current.tar.gz

# wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-
addons -1.6.1-current.tar.gz

# wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/
dahdi-1inux-complete-current.tar.gz

# wget http://downloads.digium.com/pub/libpri/libpri-1.4-current.tar.gz
The download may take anywhere from about one minute on an extremely fast connection, to a couple of hours on a slow connection. When the download is complete, we will need to unpack the tarballs.
For unpacking the tarballs, you will want to issue a tar -xvzf [name of file] (without the brackets):
# tar -zxf dahdi-linux-complete-current.tar.gz
# tar -zxf asterisk-1.6.1-current.tar.gz
# tar -zxf libpri-1.4-current.tar.gz
# tar -zxf asterisk-addons-1.6.1-current.tar.gz
In the next three sections, we'll compile and install the source distributions we've just downloaded. Note that we should install DAHDI first, then LibPRI, and finally Asterisk.

Saturday, February 25, 2012

Preparing to Install Asterisk



In order to install Asterisk, we will need a computer with Linux installed. It's a good idea to ensure your system is up-to-date, for instance, by using the yum tool. Once we have installed our distribution of choice, we need to make sure we have a few additional packages installed. The required extra packages over a base installation are:
  • Bison, and associated -devel (1.0.X only) gcc
  • Kernel-source
  • Libtermcap-devel
  • ncurses, and associated -developenssl, and associated -develzlib, and associated -devel
Once we have installed these packages, we are ready to install Asterisk. We should not run an X server or any windowing software on our Asterisk machine, as the resources it consumes are almost guaranteed to delay our voice processing, and therefore negatively impact our sound quality. So, you may save a little time and disk space by choosing not to install any such frontend.
One note here—we should prepare to manage our server. We must keep in mind that we will not be able to rely on graphical tools on the server to manage users, file systems, and other aspects of the day-to-day maintenance that all the systems will need. Unless particularly comfortable with command-line configuration, you should probably consider installing a web-based set of tools such as Webmin, available at www.webmin.com in order to configure Linux. The graphical configuration options for Asterisk that are available are mostly web based. So, we may at some point decide to install these under a web server too, in order to enable graphical configuration.
The commands used to install Webmin are as follows:
# wget http://voxel.dl.sourceforge.net/sourceforge/webadmin/webmin-1.470-
1.noarch.rpm

# rpm -U webmin-1.470-1.noarch.rpm
Once webmin is installed, the default address to access webmin from your browser is https://<IP of Asterisk server>:10000.

Tuesday, February 21, 2012

Choosing the Extension Length



While creating our phone system, we will need to create a set of extensions. Although Asterisk has no such requirement, all these extensions should probably have the same length to give comfort to our users. We must determine the length that we will use for all of our extensions.
When creating extensions, it is often advantageous to group certain extensions together. For example, all sales extensions could be in 200s, support in 300s, management in 100s, and so on. Or we could go further and say that all first-tier support will be in 3100s, the second-tier support in 3200s, third-tier support in 3300s, and so on.
We should keep in mind that it is easier to add extensions when there is an available number than it is to renumber all extensions in a building, because we have filled up all of our available dial strings. For instance, suppose we chose 1-digit extensions and have the following phone list:
0—Operator
1—Reception desk
2—Break room
3—Conference room
4—John
5—Sally
6—Jennifer
7—Fax machine
8—Voicemail Access
9— Outgoing calls
This system will work fine until we add another extension. When we add another extension, we will have to give new extension numbers to all of our users.
Now consider the following phone list:
1000000—Kitchen
2000000—Bedroom
3000000—Office
8000000—Voicemail
In this house, for someone in the kitchen to call the office (think "Dinner's ready, will you please leave that computer and come eat?!"), the user has to dial seven digits to accomplish what could have been done with one.
Therefore, we need to be smart about how long we make our extensions. Often, if we are replacing a phone system, we should just adopt the numbering already in place to make the transition a little easier for our users. Some phone systems may not have had extension numbers before, such as old analog key systems. All lines were simply visible from all stations. In such instances, we should be sensitive to the new learning that will have to take place and make the length of the extension number as small as possible.
We also need to consider some special instances. First, most people do not want an extension that begins with a 0. Simply put, nobody likes to be a nothing and having a leading 0 for anybody but the operator makes them feel emotionally put down. Also, we should reserve all extensions beginning with a 9 as outgoing telephone calls. Add to that the need to provide services such as call recording, conferencing, and voicemail access. We will give all such services a prefix, such as 8. Thus, we see that we have already lost 30 percent of all of the available extensions.
A good rule of thumb in computing is to take what we believe we will use and triple it, and then round up. Thus, if we believe that at the height of our system, we will have 100 users, we should assume that we will have 300 users. If we believe we will never have more than 10 users, we should assume 30.
With this in mind, here is a table of what we will need:
Expected number of extensions
Our assumed number of extensions
Length to use for extensions
2
7
1
22
70
2
222
700
3
2222
7000
4
Keep in mind when reading this chart that it is much easier to have people dial an extra digit than it is to make them learn all new extension numbers. Thus, if we are a border case, we should go ahead and move on up to the next extension length.
Another idea that we can take advantage of is using an extension that gives a lot of information about the destination. Take for instance, a corporation with seven locations. The first digit in the extension could designate the location. Then the second digit can designate the department, and the remaining digit(s) can designate which member of the group is sought. Thus, knowing the structure and an extension can give an idea of where that person is and what he or she does.
In some environments, such information is not desirable. For instance, in a college campus, some employees work very late at night. If the extension gives their precise location, stalking and threats of physical harm can prove problematic. Therefore, we need to be sensitive to such concerns.
One alternative to these layouts is to use the last few digits of a phone number to refer to each extension. This can work very well if all of such digit strings are unique. However, it can cause problems. Suppose we chose a 4-digit extension and have the phone numbers 555-1234 and 777-1234. Which one is extension 1234? Or suppose we use 7 digit extensions and have (800) 555-1234 and (866) 555-1234. Which one is extension 5551234? Thus, some organizations have moved to a full 10-digit extension length. While this allows 1010 extensions, it can cause some users to complain about usability and convenience.
With the flexibility of Asterisk, we can choose many different ways to allocate extensions, all of which will influence our decision on extension length. We must balance our users’ expectations along with our desire to leave room to grow. By doing so, we can create extensions that are easy to maintain and user friendly.

Friday, February 17, 2012

How Much Hardware do I Need? | Asterisk 1.6



This is probably one of the questions most frequently asked by those who are new to the world of Asterisk. The answer depends largely on what we are going to do with our system.
Conversations that bridge between codecs (called transcoding) take maximum power to handle. Voice over IP conversations seem to take a little more processing power than straight Time-Division Multiple-Access (TDM) calls. Having our server run scripts to find information will take more power than if we define everything statically. How many different conversations we have going at a time will affect how much horsepower we need our server to have as well as the features we use.
Do you see the complexity of answering this question? We have to figure out what we are going to use before we can figure out how big a server we will need. That said, there are some good rules of thumb we can start off with.
First, while we can run an Asterisk server on an old Pentium 90 with 64 MB of RAM, why would we want to? We are creating a robust phone system. We do not have to pay to license the use of the software and we do not have to pay per extension. We can go spend some of the money we saved and buy a decently powerful server. Most would recommend that a small deployment should have a CPU of at least 2.4 GHz and 512 MB RAM; the hard drive space is not as important but typically 120 GB would suffice. The hard drive space greatly depends on how many voicemail messages you want to allow users to store on the server as well as whether you want to record incoming or outgoing conversations. Voicemails and recordings are stored on the server, and without limitation or careful planning you can run out of space. For larger deployments you might want to get a Dual CPU solution as well as an increase in RAM (that is, 2 to 3 GB RAM). As we select the components for our server, we need to remember that we are not building an email server or a web server. We are creating a PBX that people are going to expect to be running all the time. We should select a stable chipset, with an up-to-date BIOS, and match it with other current high-quality components. By using high-quality components, we increase the likelihood of ending up with a high-availability phone system.
On another note, we should select a server with as much redundancy as possible. A RAID-1 controller could save our phone system in the event of a hard drive failure. A pair of RAID-1 controllers that are mirrored could save our phone system in the event of a controller failure or a PCI slot failure. A server with redundant power supplies will help us in the event of power failure or a power supply failure. Of course, our phone system should be on an Uninterrupted Power Supply (UPS). This is not only for protection from power failures; it will also protect from spikes, and often even lightning.
Depending on the reliability requirements, we might need a redundant server. There are hardware devices that will detect if a PRI is down, and automatically failover. Then again, for most installations, this is overkill.
The most important lesson to keep in mind is that people have grown to depend on phone systems. We should not skimp on hardware, as doing so could cost us dearly in the long run. With the unique pricing structure of Asterisk, all we will have to pay for is any additional hardware to get increased reliability and capacity.
Along with hardware, the question often asked is—which distribution of Linux should I use? If you already have experience with some distribution of Linux, you should be able to make Asterisk work with that distribution. Asterisk is very flexible and has been built with commonly available dependencies, and any distribution of Linux should work. That said, some distributions will require more effort to enable some features such as automatically starting Asterisk when the server boots. As each distribution treats startup scripts differently, most distributions will require a minor amount of tweaking.
Also check the wiki at http://www.voip-info.org for more information on the distribution you intend to use. It has up-to-date notes on compatibility problems, caveats, known issues, and often workarounds for those issues.

Tuesday, February 14, 2012

Choosing a Device | Asterisk 1.6



Now that we have seen the broad offerings of terminal devices, we will see how difficult it can be to choose one to meet our needs. After choosing a type of device, we have to choose a manufacturer and model. This task can be daunting. Let's take a few minutes and discuss how we will make the best decision based on the available information.

Features, Features, and More Features

As we review available phone handsets, we will be inundated with all the features that manufacturers can throw at us. These lists are overwhelming, even to the most seasoned experts. It is very difficult to compare two handsets solely on features, as some features have different names.
Determining the usability of a particular phone handset should be a straightforward process. This process has four major steps—requirement elicitation, prioritization, and documentation, followed by handset testing.
Requirement Elicitation
This is the brainstorming step. We should go to each user and determine what his or her needs are. We ask the user what features he or she uses on the current phone. We observe the person working for a period of time to get a good sampling of what he or she actually does.
We should then go to the user's manager and see what a person in that position is expected to do. We add these features to our list. While this list will be unique to each user, many will be very similar. We should see patterns of usage emerge between groups of employees.
Requirement Prioritization
In this step, we take our requirements list from the previous step and, working with the user and manager, determine which features are used most, which are most important to that user's role in the organization, and which features are simply nice to have. We should also attempt to recognize any deficiencies in the current technology. Changes are often embraced if the change adds value to the user by making a task easier or in some cases removing a task entirely. It's important that we recognize all nuances of the current system in order to provide the user with a replacement that will suit them.
We should then create a quantitative scale for each feature. For example, if we were working with an operator, a Transfer button would be a value of 10, while a Do Not Disturb button will probably be a value of 1. If we had a phone handset with both of these abilities, then we add these scores together and it would score an 11. By putting numbers on the required features, we can come up with a quantitative answer to a very subjective issue.
Requirement Documentation
This step is the most important of all of the steps so far, especially for consultants. We take the list of requirements and their weights, and write them in a short document. We then have the user and the manager sign it to indicate their agreement.
This may seem a little formal for picking a telephone handset, but it is an effective method of communicating expectations and plans between you, the implementer, and the users. This can help in preventing surprises or differing recollections of what was promised.
Phone Testing
This is the final step. After comparing the available handsets against the document we created in the previous step, we choose the highest scoring handset. We then take a handset of that type to the user and have him or her use it (if we have a test system installed by this point) or at least sign off on it conceptually.
Again, this is an opportunity to ensure our users’ expectations are reasonable, that commitments are clearly defined, and that our users are kept informed during the decision-making process. It can also help us get a buy-in from the users as we make the major adjustments that will invariably accompany a new phone system.

Determining True Cost

When we look at which handsets to compare our requirements document with, the issue of cost also will have to be looked at. Before we offer a handset that would not be possible under our project budget, we should determine that the handset meets all of the requirements of the business, which includes the element of cost.
The issue of cost is not as simple as looking at the retail price of a handset. Each type of phone will have multiple types of cost. These costs will usually fall into one of the following categories:
  • Handset cost: This is the easiest cost to determine. It is the actual amount of money that will have to be spent to acquire the telephone.
  • Port cost: This cost is the element of what the phone connects to on the other end. For instance, on a VoIP phone this could be a portion of the cost of a new network switch that supports Quality of Service (QoS) to enable reliable voice communications.
  • Headset cost: If a phone will require a headset, then we should consider the cost of that headset as we choose the phone. Different connectors are available depending on the model.
  • Software license cost: Some phones will require the purchase of G.729 license. Other phones may require a license for the software on the phone (usually referred to as firmware). We should not fail to consider this cost while computing the cost of the phone.
  • Installation cost: The time required to install different phones differs. This time translates into cost.
By considering each of these factors for each different handset, we get an idea about the true cost of each particular phone. With all of these costs defined, we can see which phones are within our budget and which are simply too expensive.

Compatibility with Asterisk

Not all handsets interoperate equally with Asterisk. Referring to the Asterisk Users Mailing List archive, we can ensure that no serious incompatibilities have been discovered. Also, a Wiki is available at http://www.voip-info.org. A vast array of useful information about Asterisk is available there. This site is searchable and is constantly updated.
We do not have to select a single protocol for all VoIP phones. Instead, we can mix and match protocols to our best advantage, thanks to the flexibility and power of Asterisk.

Sound Quality Analysis

Sound quality is a very subjective thing. Each user will have a personal threshold between acceptable and unacceptable.
Each phone will have a varying sound quality. The variables that can affect the quality of a call are staggering. Network latency can significantly affect sound quality, but so can configurations of the phone. Determining what the cause of low sound quality is can be difficult to do.
Build quality from a manufacturer can also affect quality. When wide variations are allowed from one phone to the next, the result is usually inconsistent from handset to handset. Thus, we have to choose a manufacturer we can trust.
While there is no absolute, the quality of sound on telephone handsets, from highest to lowest, is usually as follows—analog hard phone, VoIP hard phone, analog soft phone, VoIP soft phone. If you are doing a comparison between different handsets, the main things to pay attention to are the amount of background noise (or hiss), distortion, drop outs, popping, and highly digitized voice. If we have users who are extremely sensitive to sound quality, analog will probably be our best bet. For those users who are a little more forgiving, VoIP allows us to use one network for our phones and computers.
When determining what terminal equipment to use, we need to consider the sound quality of each device and match it against the needs and expectations of our users, and weigh that with the cost of that device as compared to the budget.

Usability Issues

The world's most advanced VoIP handset is absolutely useless if our users cannot figure out how to use it. As we decide what equipment to provide for our users, we should consider where they are at in the continuum of technological awareness. While VoIP hard phones with context-sensitive buttons are useful for most users, some people find the interface confusing and frustrating.
This is one big issue that we need to address in the handset testing that we do after eliciting the requirements that our user has for a new phone. We have a duty to ensure that our users can use the handsets we choose. We must be careful not to assume that they will figure it out, as doing so often causes hurt feelings and resistance to change. The success of Asterisk will be largely measured by the response of our users.

Thursday, February 9, 2012

Analog Adapters | Types of Terminal Devices



Dedicated communication devices such as modems and fax machines are still very prevalent in business today. Although these devices could be replaced with more modern, reliable, and faster technologies, the new technologies have not yet been embraced.
Therefore, in order to use these existing technologies, analog adapters allow companies to continue using legacy devices such as traditional fax machines. An analog adapter usually consists of an Ethernet jack with which the device will connect to your network and an FXS port (telephone jack) which will connect to your traditional communication device (such as a fax machine).
Another common use of an analog adapter is to connect a cordless phone for those requiring mobility around the office. Granted there are WIFI SIP phones in the market, often users will find that the WIFI signals interfere with other frequency emitting devices. Such interference can cause distortion or the calls to drop.
One issue with analog adapters is their use with traditional fax machines. For years the reliability of faxing over an adapter was poor at best. Today analog adapters are becoming equipped with T.38 capability. This protocol allows regular faxes to be sent over UDP. The use of T.38 dramatically improves the reliability of faxing. However, keep in mind—your VSP as well as your PBX must also support T.38 in order for the fax to be transmitted using this protocol. As of version 1.4, Asterisk now supports T.38 negotiation for SIP users and the related pass through of UDPTL T.38 data. Please note that Asterisk currently cannot terminate T.38 calls or act as a T.38 PSTN gateway without external support.
One extra note about faxing—Asterisk supports receiving and sending faxes through an add-on called SpanDSP. With this Asterisk can receive a fax and turn it into a TIFF file. This TIFF file can then be further processed to become a PostScript or PDF file and be emailed to the proper recipient. Another notable fax detection solution is NVFaxDetect. The installation of this add-on is not covered here, as it is changing rapidly.
These communication devices are usually supported for legacy reasons. We should continually strive to reduce outdated technologies and replace them with up-to-date solutions.

Another PBX

We can connect PBXs together to provide services to users hosted on another PBX. We can use SIP, PRI, T1, H.323, or IAX to connect the PBXs.
If we are connecting multiple Asterisk PBXs, we should use IAX. The IAX protocol has a number of features with this specific use in mind, such as the ability to have multiple conversations trunked into the same UDP stream yielding greater efficiency.

Monday, February 6, 2012

Soft Phones | Types of Terminal Devices



Much as hard phones are phones implemented in hardware, soft phones are phones implemented in software. Using all the same protocols available to hard phones, soft phones are far less expensive to implement. By using the general-purpose computing resources of a personal computer, the expensive proposition of replacing all telephones in a building can be avoided.
Before going further, we should recognize that most hard phones are in reality soft phones combined with bit of special-purpose hardware. The computing power of a hard phone is not as vast as that of a PC, and unlike a PC, is specially tuned for carrying voice. Thus, we should not dismiss the use of hard phones immediately.
The sound quality experienced on a soft phone will depend greatly on the available resources on the PC, the quality of the software used, and the quality of the data network between the PC and our Asterisk server.
Soft phones will have a hard time being accepted by some users. In addition to the political issue of having people use their computer to talk on the phone, we also have to address disaster planning. If we lose power, keeping a computer up that draws in excess of 400 watts will be far more difficult and costly than keeping power to a hard phone that draws 15 watts, especially for prolonged outages.
The most significant advantage of the soft phone is cost and portability. In most businesses, desks contain a computer and phone at least. If you can remove the phone there is an obvious reduction in hardware costs. There are a variety of soft phone products available and most operating systems come with a basic soft phone package by default. Also the portability aspect of a softphone can be very appealing to companies that have employees who travel a lot. Imagine you're staying in a hotel that offers high speed access. Simply open your laptop, put on your headset, and you're able to make as well as receive calls as if you were in the office. There are also a variety of open source products available. Some companies such as Counterpath (www.counterpath.com) and Zoiper (www.zoiper.com) offer free clients for Windows, Linux, and Mac.
If you decide to go with a softphone also be sure to invest in a decent headset with noise cancellation. Headsets that have their own DSP and are USB driven are a good choice. This removes most audio processing resources from the PC so that other work done on the PC does not affect voice quality. The choice of product, soft or hard, is equally important as the PBX. You must be sure that the users will use the device and be sure that it will be reliable and supportable.

Thursday, February 2, 2012

Asterisk : Hard Phones | Types of Terminal Devices



The term hard in hard phones is the short form of hardware. Hardware phones are physical devices that act as a telephone handset. Hard phones are available for POTS (as used in the typical household) or VoIP. Hard phones will typically deliver the highest quality among types of terminal equipment. The most popular hard phones in the market today are:
  • Grandstream GXP Series
  • Linksys SPA Series
  • Aastra 57 Series
  • Cisco IP Phones (7940 & 7960)
  • Polycom SoundPoint Series
Voice over IP uses various protocols depending on the handset, PBX, and the requirements. The major protocols supported by Asterisk are as follows.
H.323
The first protocol we will be looking at is H.323. Formally known as ITU-T Recommendation H.323, Packet-based multimedia communications systems, this is a suggestion on how to accomplish conferencing over IP, which includes voice, video, and data. This recommendation actually came at about the same time as SIP but has been more widely implemented.
The H.323 standard enjoys full backward compatibility. Currently H.323v5 is out, and v6 is being discussed. Each new release keeps all the pieces of the previous version. This gives a clear upgrade path and some assurance that the equipment won't be quickly antiquated.
H.323 equipment is widely available. From gateways to telephone handsets, all of the needed equipment is relatively easy to find. Most of the telephone handsets are full-featured because the H.323 protocol has a robust feature set.
While the H.323 standard was not designed for wide area networks, a whole set of rules allowing cross-domain addressing have been created. A system for reporting Quality of Service (QoS) back to a server has also been developed, allowing such information to be used to route future calls.
Finally, H.323 as a standard supports call intrusion. New endpoints can be added dynamically to any conference (that is, a call) at any time.
Asterisk support for H.323 is not built in. Instead, an additional package, asterisk-oh323, must be installed. After installation, H.323 handsets and gateways can be addressed much like any other channel in Asterisk.
SIP
The Session Initiation Protocol (SIP), is another method of signaling VoIP calls. SIP is a part of the default installation of Asterisk.
Most of the new VoIP equipment supports SIP. SIP has a number of advantages. One such advantage is that the code is smaller. The reason for this is that SIP only supports very basic features. All advanced features are supported through separate Internet standards. Another reason for its small footprint is that, as features are deprecated, the code to implement them is ousted.
Another advantage of SIP's design is its modular nature. As such, extending the protocol is easier to do. It also scales better and was designed with a large network in mind.
SIP seems to be the future of VoIP. There are many features that H.323 has, but are not available on SIP. This includes handset conference control, better Media Gateway definitions, and data sharing. However, SIP is a very good protocol for simple phone calls. Also, as we are using Asterisk, conferences are controlled by Asterisk, not the handsets. Asterisk is a clear Media Gateway, and when used as such, the ambiguity in SIP is not an issue.
IAX
The Inter-Asterisk eXchange (IAX) protocol is a protocol created by the programmers who brought us Asterisk. Due to the limitations of SIP and H.323, they chose to create a new de facto standard that would allow Asterisk servers to accomplish many things that are simply impossible with the other standards. They also support some features that are extremely difficult to do in SIP and H.323.
First, IAX pierces Network Address Translation (NAT) easily. Most firewalls and home Internet gateways use NAT, as well as some service providers. SIP and H.323 have worked hard to develop standards to allow them to break through the different types of NAT. However, IAX can work through most NAT devices right out of the box.
IAX is more configurable than the other protocols when dealing with Asterisk. As the source code is available, we can modify it if we so desire, and then submit those changes to be evaluated for inclusion in future versions of Asterisk. As IAX is not currently an Internet standard per se, there is no standard body to work through, allowing more rapid improvement and growth.
IAX supports the trunking of calls. This means that multiple calls can be combined through a single stream. Through the trunking capability, a significant amount of bandwidth can be saved by not having the overhead of multiple streams.
IAX connections between servers support the switch command with which information on how a call is routed can be efficiently shared between Asterisk servers.
IAX supports a large number of codecs. Any codec supported in Asterisk can be used with channels of this type.
As IAX is an Asterisk-created protocol, there are not many handsets and gateways available. However, as time passes, more and more devices are supporting the IAX protocol.
Just as a note, we sometimes see IAX and IAX2 differentiated. IAX2 has been merged into IAX, and IAX has been deprecated. Thus, if a device claims to support IAX2, it should really be supporting IAX.

Saturday, January 28, 2012

Determining PSTN Needs | Asterisk


Determining Our Needs

Now that we have examined some of the options, we need to determine what our needs are. Requirements will vary quite a bit from site to site. Something to keep in mind is that, although the previous choices are distinct, they can be mixed in an Asterisk installation. We can have VoIP providers and POTS lines, as well as a PRI if we desire. It's very common to have this type of setup. For example, if we have an office in another country, we can call them using VoIP but all local calls could use POTS. It is important to understand the calls our system will be making and where they will be going, so that we can arrange for the necessary services and ensure that the calls are routed accordingly. If we have an existing telephony system, we can take a look at the calls it's making just now and our current costs so that we can determine what technologies will be of most use to our system's users.
Now is the time to begin documenting what our plan is. If Asterisk is to replace an existing system, then we should start by writing down all the current lines coming into our incumbent PBX. Once that is done, we need to look at our requirements.
First, we need to determine how many lines are needed. Telephone providers can generate a usage report that will tell us the maximum concurrent connections we have experienced in the last month. While they are able to do this, many providers are not very happy to run such a report. However, without that information we have nothing to gauge our needs other than gut feelings.
If we need more channels than we have, someone will get a busy/congested signal. Therefore, we should plan to have the maximum number of channels we have used plus a reasonable cushion. 125 percent of our current maximum is usually a reasonable cushion, this allows for instant 20-25 percent growth so that we can accommodate a sudden increase in calls without the system failing over, causing busy signals. If we do increase calling to this level for a relatively long period, we must consider an increase in lines to prevent congestion. These numbers are a guideline and they can change depending on circumstances. In a call center where the main business purpose is to make and receive calls, 150 percent may be a more satisfactory figure. We also should take into account the time it takes to get new lines set up from our local operator. If a significant event that generates a large number of calls occurs, we should have the capacity to handle this or be able to increase the capacity quickly.
Now that we have a number of lines, we need to determine the technology to use for each line. VoIP is usually the cheapest, especially for long-distance calls. PRI is usually the most reliable, and for incoming calls is often cheaper than VoIP.
While pricing the options, we need to remember that POTS lines usually have a single phone number only, while a PRI can have hundreds of phone numbers. If we are a business that receives only a few calls, but needs the calls to have different phone numbers, then a PRI probably makes the most sense. Also, with a PRI we can trunk more effectively, which may become essential.
Although a PRI can have hundreds of phone numbers, there is a charge for each number each month. Called DID (Directed Inward Dialing) numbers, these virtual numbers are usually sold in blocks of 10-20. If we do not order enough to begin with, it is usually not difficult to get new DIDs ordered. Often they can be available the same week, depending on the phone company. We assign these numbers to individual devices or groups of devices ourselves, once we have them allocated.
This means we can decommission or reallocate numbers as necessary. We may have campaign DIDs that are reassigned to different groups depending on the current campaign, personal DIDs for key staff, or our main DID, which would probably be assigned to a group of people responsible for handling these calls.
We should take this opportunity to write down what lines we want, what phone numbers we need, and get quotes if it differs from the currently installed PSTN connections.

Wednesday, January 25, 2012

The Public Switched Telephony Network (PSTN)



Most of the telephones in the world are connected to a vast network, enabling any telephone to reach any other. This network is called the Public Switched Telephony Network (PSTN). The phones that are on this network are reachable by dialing a number, which may include country codes, area codes, and telephone numbers.
While there are instances in which interconnection with the PSTN is inappropriate, most users of telephones have the expectation that they can reach the world at large. Therefore, we will consider interconnection to the PSTN as a requirement.

Connection Methods

There are a number of different methods to connect to the PSTN. Each has advantages and disadvantages, most of which we will touch on. As pricing varies depending on city or country, exact pricing will not be given. Pricing should be researched based upon the location of the Asterisk server.
We will handle each connection method one at a time.

Plain Old Telephone Service (POTS) Line

Probably the most common connection to the PSTN is a POTS line. This is an analog line provided by a telephone carrier. Each POTS line can carry only one conversation at a time.
For small installations, POTS lines are usually the most cost effective when connecting directly to our Local Exchange Carrier (LEC), a term used to refer to any company providing local telephone service. Eight lines is usually the point at which we should seriously look at another technology for our connection.
POTS lines from our LEC require a Foreign eXchange Office (FXO) interface to be usable in Asterisk. We will focus on Digium's offerings, namely the FXO module on a TDM410. Each TDM410 can use up to four modules. Therefore, if we have one line, we will have three empty module slots on the card.

Integrated Services Digital Network (ISDN)

ISDN is an all-digital network that has been available for over a decade. It is available in two major versions— Basic Rate Interface (BRI) and Primary Rate Interface (PRI).
ISDN divides a line into multiple channels. Each channel can contain either pay load (Bearing, or B channel) or signaling (Data, or D channel). A BRI has three channels—one D channel and two B channels. Therefore, two phone calls can be in progress at a time on a single BRI. A PRI has 24 channels—one D channel and 23 B channels, resulting in up to 23 simultaneous calls.
ISDN is not limited to voice alone. Each channel can carry 64k of data, if so configured with the LEC. This gives ISDN a lot of flexibility over POTS lines, as the channels can be reconfigured between voice and data on the fly.
With its separate D channel, ISDN is able to do things POTS cannot, such as setting custom caller ID, receiving dialed number information, on-the-fly redirection of calls, and a host of other cool features. Of course, all of these features require cooperation from the LEC, which is not always forthcoming.
BRI does not have high penetration in the United States market. Some accuse LECs of vicious pricing, while others claim consumers are to be blamed for fearing new technology. Either way, the result is the same—if we call our LEC and request a BRI, they will assume it is for data.
On the other hand, PRI is widely used in the US. It is the connection of choice for larger installations. PRIs are actually delivered over T1 connections, a proven and usually very reliable technology.

T1 or E1

Technically speaking, when ordering service from an LEC, we order a DS1, which is delivered over a line referred to as T1. However, this detail is usually overlooked. Therefore, we will refer to it in its vernacular—T1.
A T1 is a line with 24 channels. Each channel can contain a call. Therefore, a T1 can contain an additional call when compared with a PRI. In Europe, E1s are more common. In comparison to T1, they have 32 channels instead of 24. T1s signal the call through Robbed Bit Signaling, also referred to as CAS (Channel Associated Signaling) or flat T1. What this means is that a bit is robbed from time to time, as information needs to flow about the connection. While this is usually imperceptible to the human ear, it can be deleterious to data connections.
Using a T1 to deliver both data and voice is common. Some of the 24 channels are designated to be used for data and others are used for voice. There may even be unused channels. LECs are able to offer lower pricing when bundling services in this way, as a few channels may be used for voice, others for an Internet connection, and yet others could be used for a private data connection to another office.
LECs are able to send information about the number that was dialed at the beginning of the call. In this way, one advantage of the PRI has been matched by T1s. If we intend to have about 8 to 12 lines as well as a data connection, a T1 can be a good choice.
An excellent telephony interface card to connect your Asterisk to a T1/E1 connection is the Digium TE122. Today T1 connections can be split to accommodate data and voice. For example, your provider can offer 12 channels of voice as well as a data connection for your computers all on a single T1. The TE122 can support both modes and direct the voice channels to your Asterisk, while separately directing your data connection to the underlying Linux operating system, thus eliminating the need for an external router.

Voice over IP Connections

In recent years, a new way to connect to the PSTN has cropped up. Companies are using PRIs, T1, and other technologies to connect to the PSTN, and then reselling those connections to consumers. The users connect to the companies offering these connections through Voice over IP technologies. By doing so, we can skip dealing with LECs completely.
This service is called origination and termination. Through these services, we can receive a real telephone number with the area code, depending on what the provider has access to. Not all providers can offer numbers in every locality. This means that our number could be long distance from our next-door neighbor, yet local to someone in the next state. However, the advantage of this is that the provider will route most of the calls over their VoIP infrastructure and will then use the PSTN when they get to their most local point at the receiving end. This can mean that long distance charges are dramatically reduced. If we call a variety of countries, states, or cities it can be worthwhile to research a provider that offers local PSTN access to the areas we call the most.
The rates per minute are usually very attractive. Often, long distance is at the same rate as local calls. One thing to watch out for is that some providers charge for incoming minutes much like on a cellular telephone, and some providers also charge for local calls.
Today there are VoIP carriers offering unlimited US packages for those running Asterisk. However, one thing to watch out for with unlimited packages is that the carrier usually restricts the number of simultaneous calls you can make or receive. When you inquire about an unlimited package be sure to ask how many channels you are receiving for origination and termination.
Another thing to be aware of is that some providers require you to use their Analog Terminal Adapter (ATA). This means that they will send you a box that you plug into the Internet, which uses Voice over IP. Then, you have a POTS line to connect a phone (or Asterisk) to. However, today many VSPs (VoIP Service Providers) are offering BYOD (Bring Your Own Device) in which they provide you with the SIP or IAX settings. Once you have these settings you can connect them to your Asterisk deployment.
Voice over IP makes sense in many installations. But for the quality to be acceptable, a reliable Internet connection with low latency is required. Another thing to watch out for is jitter. Jitter refers to the variation in latency from packet to packet. Most protocols can handle latency a lot better if it is constant throughout the call.
A good candidate for Voice over IP is a site where interruptions in service will not endanger life and will not irreparably harm the company. While VoIP providers strive to achieve very high availability, we also have to rely on the Internet at large and our VoIP provider's ISP, as well as our own ISP.
If our telecommunication needs are such that periodic downtime is tolerable, VoIP will probably be our least expensive option. It requires less hardware in our Asterisk system as well, increasing the savings. In order to use VoIP with Asterisk, all we need is a system capable of Internet access. We don't require any specialized telephony hardware.

Saturday, January 21, 2012

Return on Investment



The cost of owning a phone system is only one piece of the Return on Investment (ROI) puzzle. ROI attempts to quantify an expenditure's effect on the bottom line, usually used to justify a large capital outlay.
Just as an example, one phone system that I installed went into an existing business. Its existing phone system had an automated attendant that had the unfortunate habit of hanging up on customers if they pressed the 0 key, or if they didn't press any key for 5 seconds.
What was the ROI for moving to a new phone system? Not having angry customers who got hung up is a hard value to calculate. According to one of the owners of the business, that value was infinite. That made the cost of Asterisk very easy to justify!
ROI is basically the TCO subtracted from the quantification of the benefit (in money) to the business. Therefore, if we calculated that a new phone system would save $5000 and cost $4000, the ROI would be $1000.
Another interesting calculation to make, which is also categorized as ROI, is the time for the cost to be recouped. This calculation is the one that I find helpful in making a business case for Asterisk.
Suppose a phone system costs $5000 to install. Using toll bypass, you can save a net $500 per month. In 10 months, the cost of installing the system will be swallowed up in the savings.
These are simple examples, but ROI can help to justify replacing an existing phone system. By having these numbers prepared before proposing to replace the phone system, we can have a more professional appearance and be more likely to succeed in starting our Asterisk project.

Wednesday, January 18, 2012

Calculating Total Cost of Asterisk Ownership



Asterisk is distributed as free, open source software. The only costs involved with Asterisk are hardware, right? Well, maybe not.
As we have been discussing, Asterisk is very flexible. Determining how to use the flexibility in the best way can quickly become a huge time sink. Compatible handsets are also not free. If we are going to use the G.729 protocol, which compresses VoIP traffic by a factor of eight while maintaining excellent voice quality, we will also have to pay licensing fees.
With commercial phone systems, the costs are typically higher than with Asterisk. However, they are a fixed, known constant. Depending on the way we use Asterisk, costs can vary greatly.
The total cost of owning Asterisk can also include downtime. If we choose to support Asterisk on our own, and have to work to try to get Asterisk back up after a failure, there is an opportunity cost involved in the calls we should have received. This is why we should choose to support our phone system internally only if we have the appropriate resources to back that up.
Total Cost of Ownership (TCO) is not an easy calculation to make. It involves assumptions of how many times it will break, how long it will take us to get it up and running, and how much the consultants will charge us if we hire their services.
TCO is useful only when comparing phone systems to each other. The following elements should be included when comparing TCO of multiple phone systems:
  • Procurement cost: This is the cost to buy the PBX. In the case of Asterisk, it is only the cost of the hardware; other systems will include an element of licensing.
  • Installation cost: This is the cost to configure and deploy the PBX. Some companies choose to do the deployment in-house. In such instances, there is still a cost, and to enable fair comparisons it should be included.
  • Licensing cost (one-time): This is the cost of any one-time licensing fees. Some PBX systems will require a license to perform administration, maintenance, connection to a Primary Rate ISDN line (PRI), and so on. In Asterisk, this would include the G.729 licensing cost, if required.
  • Annual support cost: This is the estimated cost of ongoing maintenance. Of course some assumptions will have to be made. In order to keep the comparison fair, the same assumptions should be carried over between vendors.
  • Annual licensing cost: Some phone systems will have an annual cost to license the software on the handsets as well as a license to be able to connect those handsets to the PBX.
When we have created the table, we can calculate the TCO for one year, two years, and so on. We can then evaluate our business and decide what costs we're willing to incur for our phone system.

Popular Posts