This article was written some time ago; some details may no longer be current but the general approach remains sound.

Introduction

VoIP offers opportunities for improved telephony functions and closer integration with other business systems and is seen as a key technology in improving business efficiency in the near future.

PABX vendors have been promoting their VoIP capabilities for some time, but these are essentially an add-on to their proprietary hardware offerings. The Asterisk software PABX has a different design goal – it is free to use and interoperates with equipment from many different vendors.

Asterisk is a particularly compelling alternative for small to medium sized enterprises that typically use key systems, such as Commanders, which are cheap but have only limited functionality.

Asterisk is also effective for distributed organisations that wish to take advantage of existing wide area network (WAN) capacity to reduce inter-office call costs.

So what is this Asterisk thing?

Asterisk is a piece of software that runs on a Linux server.

The Asterisk software is free to obtain and use – it can be downloaded from the Asterisk home page [Asterisk].

That a piece of software can be a PABX is not as revolutionary as it may sound; PABXs also rely on proprietary software to support their operations – the big differences are cost and openness.

Who makes it?

The core Asterisk software is made by Digium [Digium], a US company that makes interface hardware and provides commercial Asterisk support.

Because the Asterisk software is open source there are many other developers around the world that have contributed packages to support additional functions beyond those provided by the core Asterisk software.

Why is it free?

Digium make money from selling their hardware and support services related to Asterisk. This means that they can continue to develop Asterisk and make it available to the community.

Planning Process

Although Asterisk is ‘just’ a piece of software, a production implementation needs to be planned in the same way as you would plan for a traditional PABX (except for the bit where you have to pay for it).

The following sections cover some of the planning issues that must be addressed before you start installing.

Internal Interfaces

The internal interfaces to a PABX are about the handsets. What are the things that your staff will pick up and into which they speak?

There are several options:

Analogue phones

These are standard phones that connect to a normal phone outlet. The advantages of these handsets are cost (cheap) and availability (you may already have some).

But there are some disadvantages:

  • You need to provide an analogue port on your Asterisk server for each phone; this adds to the cost of the Asterisk hardware.
  • Analogue phones may not support some of the features you desire such as call transfer or remote pickup.

You can also support analogue phones through an analogue telephone adaptor (ATA) which converts an analogue interface to a network interface; the analogue phone then looks like a SIP phone to Asterisk.

SIP phones

A SIP phone looks much like any other phone except that it plugs into a local area network (LAN) connection rather than a phone line.

Session Initiation Protocol [SIP] is the standard way in which this type of phone communicates with a PABX to make and receive calls.

Different SIP phones offer various features such as programmable speed-dial keys, LCD displays, speakers etc. Some come with an uplink LAN port which means that you only require one network connection for both the phone and a computer.

SIP phones require no special hardware in the Asterisk server and are comparable in price to the handsets available with traditional PABXs.

Soft Phones

A soft phone is a piece of software that makes your desktop computer act like a SIP phone.

Provided that your have a sound card with appropriate speaker and microphone connections, you can make and receive calls directly on your computer with no additional hardware.

Depending on your requirements, you may wish to complement a soft phone with a custom headset or microphone.

External Interfaces

The external interfaces to a PABX are the outside lines normally provided by a carrier such as Telstra or Optus. These are sometimes called trunks.

Asterisk supports the usual external interfaces as well as VoIP trunks for network connections.

Analogue Trunks

This is the service to which you would normally connect your analogue phone.

Your carrier provides analogue trunks as a single pair of wires for each line.

Asterisk requires a separate port for each analogue trunk – the analogue interface cards support up to four ports each.

Digital Trunks

A digital trunk is an ISDN service, these are available in 2, 10, 20 and 30 channel configurations (OnRamp 2, OnRamp 10 etc).

The two-channel line uses a different interface to the 10/20/30 version (basic rate rather than primary rate) – so you have to buy different interface cards.

Virtual Trunks

A virtual trunk is a connection to another PABX or service provider that uses your local or wide area network to communicate.

Virtual trunks can be used to connect between Asterisk PABX’s in two sites or to route long distance calls through a VoIP provider.

Preparing your LAN

If you implement an Asterisk PABX, or any other VoIP PABX, you are placing additional load on your LAN infrastructure (the hubs, switches and routers that carry the network traffic).

If your network is overloaded or poorly configured you may experience poor voice quality from your VoIP calls.

The first and simplest solution is to looks at your LAN cabling and switching and ensure that there are the fewest possible ‘hops’ between your phones and your Asterisk server. You should also be using high-speed switches rather than hubs (most LANs will already be using switches).

The next step is to consider separating your phone LAN from your data LAN by dedicating different cabling and switches to each. This can be very effective but demands two network cables to each desk (one for the phone, one for the computer).

If you’re really keen you can look at quality of service (QoS) switches and routers.

If you plan to use any WAN links, either between offices or to a VoIP service provider, you should consider how your voice traffic will affect your wan/internet links and perhaps install traffic shaping equipment to ensure that voice traffic takes priority over data traffic.

Hardware

Having considerer the interfaces, you now need to think about the hardware on which your Asterisk server will run.

A PABX provides critical services to your organisation and must be reliable. Don’t expect to use a PC assembled from spare parts and achieve high availability.

There are many good quality computers available but you should consider:

  • Number and speed of the processors. The faster the CPU the less likely calls will be disrupted by poor server performance.
  • Memory. More is better – there are really good reasons for this which don’t bear detailing here.
  • Disk. Unless you are doing call recording you don’t need that much disk space but you should use fast, preferable SCSI or SATA disks. RAID might be overkill.
  • Expansion slots. You need one PCI slot for each interface card.

Interface cards can support 1 or 4 digital trunks or up to 4 analogue trunks.

Can I just put Asterisk on my file server?

No, and it’s the same answer for you web server, mail server, print server or any other server you happen to already have.

Installing Asterisk on a server that supports core functions (like file serving) will work, but is likely to cause quality problems with your calls.

If you just want to experiment a bit before doing the real installation you can – just be aware of the cause of the scratchy calls.

Features

So far we’ve only thought about the physical requirements of an Asterisk PABX.

One of the main advantages of Asterisk is the range of sophisticated PABX features available at no additional cost.

The following list represents only some of the main features available; you need to think about each of these and how (and if) you wish to make them available within your organisation.

  • Conference rooms. Do you need conferencing facilities? How will you control access and participation?
  • Call queues. Do you need queues for support or sales? How should a caller experience the queue wait?
  • Music on hold. What should it be? Are you licensed to use it?
  • Direct in-dial – which allows outside callers to dial directly to an extension rather than going through a receptionist
  • Reception. How are non-direct calls handled.
  • Call blocking. Do you need to block some extensions from making STD or IDD calls? What about calls to mobiles or 1900 services?
  • Outbound call routing. If you have virtual trunks to other offices or VoIP service providers, when and how should they be used?
  • Voicemail – which extensions, how will people access it?
  • Call logging for auditing/charging.

The list of available features is long.

Thinking about how you want your callers and staff to use you PABX can help in reducing frustration and training[1].

Paranoia

Your PABX is both a critical operational tool and a gateway to chargeable services.

There are a number of steps you can take to ensure that your PABX is available when needed but not easily exploited by hostile forces.

System Security

Asterisk runs on the Linux operating system. You should apply normal hardening practices to your Asterisk server (such as disabling unused services, strong passwords etc).

Dialplan Security

The dialplan is the set of rules that controls the services to which each extension or outside caller has access.

You should consider the availability of costed or premium services to your users (extensions). Outside callers should (generally) not be able to access charged services (eg outside lines).

For SIP phones, it may be appropriate to limit the network addresses allowed to access the PABX.

Backup and Disaster Recovery

You should have an independent backup of your Asterisk configurations.

If you collect call logs and/or voice records you must include the appropriate parts of the Asterisk server in your regular backups[2].

Codecs and Bandwidth

A codec (Coder, Decoder) is the algorithm for converting voice into data. Different codecs use different amounts of bandwidth and processing power.

Some of the most widely used codes are:

  • G.711 or PCM
    This codec is used by carriers to transmit standard voice calls.
    G.711 takes 64kbps
  • G.729
    This is an ITU [ITU] standard codec for compressed voice. It is widely supported by both hard and soft phones[3].
    G.729 takes 8kbps
  • GSM
    This is the codec used for mobile phones.
    GSM takes around 13kbps
  • Speex
    Speex is an open source codec designed for internet voice traffic and well supported in soft phones and some hard phones.
    Speex take between 2.2 and 44kbps depending on the options configured.

All codecs incur additional bandwidth for IP headers – typically around 20-25 kbps.

So What Codec Should I Use?

The choice of codec depends on the specific hardware (phones) and environment (LAN etc) in which are deploying Asterisk. You need to test a few to find what works best for you.

For LAN traffic (local extensions), I prefer G.711.

For WAN traffic (remote extensions, internet calls, virtual trucks), G.711 is still nice of you have the bandwidth, G.729, GSM or Speex if you want compression.

Support

Once your Asterisk server is installed you will probably want on-going support and maintenance

There are several Australian companies that can provide maintenance and/or configuration support.

Because Asterisk runs on Linux, configuration changes can usually be done remotely through an appropriately configured firewall. This could be an external support organisation or an internal resource supporting Asterisk in remote offices.

And you are doing backups aren’t you…

Conclusions

The Asterisk open source software PABX can provide advanced PABX features for a fraction of the cost of a traditional PABX.

If you are considering replacing your current PABX perhaps you should consider Asterisk.

References

[1] ‘The Principle of Least Surprise’ is a well-known programming design guide which applies well to PABX’s. Your phones should do what people ‘expect’ them to do.

[2] You do regular backups don’t you? Yes – good.

[3] Asterisk supports G.729 but requires an additional license of USD$10 per channel to use.

[Asterisk] The Open Source Linux PBX http://asterisk.org

[Digium] The Asterisk Telephony Company http://www.digium.com

[ITU] International Telecommunications Union http://www.itu.int/home/index.html

[SIP] Session Initiation Protocol, RFC3261 et al. http://www.ietf.org/rfc.html

IP:3.239.51.78