A Quick Guide to VoIP on-the-cheap with asterisk

Source: Internet
Author: User
Tags failover dell r710 broadvoice digium microsoft outlook
Document directory
  • ABCs of VoIP
  • Keeping with Protocol
  • Private branch exchange
  • PBX hardware and software
  • Can you hear me now? Codec compatibility
  • Application in the real world
  • Workplace Integration
  • Best practices
  • Conclusions

 

Http://arstechnica.com/business/news/2010/01/a-quick-guide-to-voip-on-the-cheap-with-asterisk.ars/

 

With the advent of voice-over-IP (VoIP) technology, there has been a dramatic movement toward IP-only telecommunications, leaving the twisted pair of yesteryear in the dust. lower costs, fig, centralized monitoring, and sort of call routing are just a few of the advantages that a good VoIP implementation can bring to a workplace. but must businesses have been held back from jumping on the VoIP bandwagon because it can seem daunting or expensive to set up. the reality of VoIP is that some very modest hardware and a suite of free software tools can make for an enterprise-class VoIP system that can serve up to 1,000 office users in a single building.

In this article, we'll walk through the basics of doing VoIP with asterisk, an open-source, software private branch exchange (PBX ). note that this isn't a detailed how-to-It's more of a overview of the basics of building a VoIP system, with some notes on best practices. after reading this article, you shoshould have a sense of what's involved in a moderately sized VoIP setup, and of what such a setup can do for your business.

Note: This article revisits the same topic as our similarly titled 2005 article by Kurt huchinson. But given the progress since then, we thought it was time for an update/expansion.

ABCs of VoIP

Most people don't know what goes on behind the scenes when they place a call on their telephone at home or at work. historically, the phone line consisted of a single circuit from your desk to a closet on your floor or section of your building (whether your office building, apartment building, or even your house ). callwere then punched over to what are called "House pairs," or the internal wiring of the building that's permanent and isn't moved or modified. in most multi-story office buildings, these house pairs were arranged in blocks, and they went down into a master closet where the phone service provider had brought in either circuits or trunks for each of the individual phones.

In recent years, callhave been multiplexed into some sort of digital solution such as ISDN or pris on a T1, DS3, or a similar digital connection. when you dial a call, you're dialing on a switch in the nearest calling office, which then routes the callthrough the varous telecommunications switches between you and your calling destination. sometimes the call is routed over the Internet, but on private circuits. your call is "attended" during the entire duration, which means that, while you're on the phone, the switch through which it's routed has a busy circuit and one less resource that can be used, because it's maintaining a single complete circuit from handset to handset.

Credit: Kurt huchinson

This approach makes perfect sense if you're in an office in Boston and you're calling an office in Miami, but what if you're calling downstairs? When it comes to inter-office CILS, You're inefficiently using up two switch ports in your private branch exchange (PBX) for that phone call, when those ports cocould instead be used to switch inbound or outbound cballs.

VoIP, in contrast, uses an all-digital network between both call endpoints (using a VoIP Phone or analog telephone adapter ). this makes VoIP very dynamic, because it can be set up and moved without causing any disturbance to the current building infrastructure. voIP uses the same logical structure as an analog PBX, but does it in a much more efficient and far more cost-valid tive manner, by implementing that structure with standard data networking equipment.

In a VoIP scenario, if you're in Boston and you call Miami, you pick up the phone and dial the number. your VOIP phone contacts the Call Manager or proxy that it is registered with and requests that number. the Call Manager comes back and essential says, "Yes, I have a path. hold on, let me set it up for you. "The Call Manager then handles the protocol and CODEC negotiation for the call and makes the call to the remote gateway, whether to the telco's gateway on its analog network or to the destination's VoIP gateway. most call managers then attend the call, meaning your audio traffic will pass through and even be processed by the Call Manager for the entire duration of the call, especially if both sides can't use the same audio codec for some reason, which means that the call will need to be transcoded in real-time. (more on that later .)

Credit: Kurt huchinson

If you make a call to your friend downstairs, though, the call goes to the PBX for setup and, once the connection is made, the PBX often steps out of the picture and directly connects both handsets together. there are times when the PBX wouldn't do this, such as conference calling or when a specific feature on the PBX is needed (call recording, etc ). these types of scenarios wocould be specific to the application being used and the environment that it resides in.

Keeping with Protocol

As most anyone who has ever been involved with VoIP knows, SIP is the protocol of choice for processing reasons, but first and foremost because it has the widest cross-platform device support. the device support ranges from soft phones (pieces of computer software that act as a phone) to Cisco enterprise-class desktop phones, wireless handsets for use at home, and phones that support simultaneous real-time video and audio. SIP is the most extensible and network-friendly protocol, due to its ability to add multimedia to the equation, which is key to its success in the telecommunications world.

In the enterprise, SIP works especially well because the overhead for call setup traffic is always Ally non-existent in a Gigabit Ethernet world.

Private branch exchange

When you pick up the phone and dial your co-worker's 4-digit extension, you're dialing through a miniaturized version of a phone company. internally, there isn't a need for 7 or 10 digits, so most places have 3 or 4 (and sometimes 5) digits. the brilliance of VoIP is that this can be completely arbitrary.

You do, however, need the hardware and the software to do this. no longer is a PBX a giant box with hundreds of switching cards in it, making it look like it may attempt to take over the world at any moment. now, it is simply one of the specified servers in your datacenter.

PBX hardware and software

For the purposes of this article, we'll only be using a single server to keep things simple (though redundancy wowould always call for a second or a backup server ). we will utilize the following hardware configuration:

  • Dell r710 rack mount Server
  • Dual quad-core Intel Xeon x5550's for up to 16 threads
  • 32 GB of RAM
  • 2 TB of disk space
  • 4 port Gigabit Ethernet

For software, we will use the bare-bones, free software PBX known as asterisk. asterisk is a Linux-based voice communications server software that is a one-step installation. you can install a bare version of Asterisk on top of a Linux distribution, but it can be problematic because Asterisk is typically distributed already pre-installed on pre-configured and compiled Linux distributions. it is the standard soft PBX implementation, and almost all other implementations are based on (or at the very least used red by) Asterisk

 

Asterisk, however, is only a part of the equation. to properly manage and configure the software, you need a front-end, of which there are attempting to choose from. digium, the company that makes asterisk, has a solution called asterisknow that performs GUI installion and a customizable configuration for asterisk. although it's free, it's really not viable in an enterprise environment.

Digium also makes switchvox, Which is essential an asterisk appliance with a Web Front-end which adds a multimedia concentrator, centralizing chat, voice, video, and fax. although this solution sounds great, switchvox isn't free, and there is a sub‑requirement for support. it's geared more toward non-VoIP nerds who need a solution right now.

In the free realm, there really is no comparison for trixbox ce, formerly asterisk @ home. trixbox CE is the Community edition of The trixbox front-end software and management system by fonality, which also makes enterprise and service provider-class Hardware Appliances and even back-end hosting of a VoIP PBX. trixbox CE is free to download and is feature-rich. it is a self-contained, single-instance installer that will handle the entire hardware and software configuration to get a basic asterisk setup up and running. the best setup feature of trixbox CE is the bulk extension tool (added in 2.6.1) that allows you to create a text file containing a format for each extension you want to add. this saves a ton of time if you have to add 1000 extensions, and it provides the ability to add all the extensions in one motion.

Trixbox also has media convergence features such as recording incoming and outgoing cals, emailing voicemail to users using Postfix, and, in the latest version, an updated Core Set of Asterisk code for maximum security and a more robust feature set. one of my absolute favorite features of trixbox is its endpoint Configuration Manager. it runs a tfpt server and can set up and configure Cisco IP phones (with SIP firmware) via the web interface just like Cisco CallManager does. you can even mass-upgrade firmware on Cisco phones simply by placing the appropriate configuration XML file and binary firmware file in the tfpt directory.

Can you hear me now? Codec compatibility

One of Asterisk's core features is its ability to work with and around und about the industry-standard VOIP audio codecs, even the specified cial ITU g.729. the importance of working with so far codecs is that not every endpoint supports every codec, and not every application callfor specific codecs. for instance, most cballs that have the luxury of copious amounts of bandwidth wowould benefit more from g.711, which is the clearer audio codec. this is obvious when you use a service such as broadvoice or Vonage and turn the call quality all the way up in the Web interface. this is the g.711 codec at work. when you use Skype over your 3G connection on your iPhone, you're most likely using the GSM codec, mostly used in mobile phones today on the carriers 'internal networks.

Asterisk has the ability to transcode audio in both directions in real-time, eliminating the need to coordinate endpoint compatibility. A good example wocould be interoffice phone CILS. let's say you have One asterisk shop running nothing but Cisco IP phones and g.711, but in the branch office out in the field they're forced to use GSM due to their limited connectivity. each office's local asterisk server wocould transcode the callfor each other's systems. all of this wocould be negotiated at call setup.

Application in the real world

The server that we have specified for this application has the ability to handle around und 1000 concurrent CILS through the gateway and enough storage for voicemail boxes for all users. CILS have no real effect on the server inside the PBX because of one of the amazing SIP features: reinvite. the reinvite feature allows the SIP proxy to set up the call and then directly connect the endpoints to each other for the audio flow. the server only hangs on for call control (for things such as call-waiting, caller ID, etc ). reinvite can only happen if both of the endpoints can agree on a codec, of course, because while deleting endpoints support multiple codecs, there are none that can perform any transcoding.

In order to connect this phone system to the outside world, we'll need a trunk or a path to the PSTN phone system. managing office buildings and companies will either use good old-fashioned twisted pair from the provider or ISDN/T1 PRI-BRI channels to handle these lines. this works well with asterisk, but more hardware is required to properly translate VoIP into one of these provider-based points of entry into the system.

The best method is simply using a SIP Trunk, which requires no additional hardware. there is a huge list of SIP Trunk providers that can provide you with 10 s, 100 s or even 1000 s of trunks with numbers and features, or simple bare-bones trunks, since asterisk provides all the calling features that any major provider can offer. for home MERs, Vonage, broadvoice, Verizon, Comcast, and at&t all serve as sip trunks with their voice options for their customers. some of these same companies have enterprise solutions that don't cost much more than their residential counterparts, especially in bulk. additionally, adding or removing lines is only a matter of going to the provider's website and provisioning a new trunk or removing one. gone are the days of having to have a service provider technician come out and run a pair to your house pairs.

Moving Lines from cubicle to cubicle is easier than ever. instead of having to repunch twisted pair at the block, you simply have the user take their phone when they move. when they plug it in, it's still their number, with their voicemail and all of their pre-programmed features. this takes work load off of system and infrastructure administration staff and makes massive space reconfigurations a nightmare of the past.

Workplace Integration

When using SIP endpoints, it's possible to integrate your SIP Phone System into your workstation software. for instance, you can give users the ability to receive their voicemail via email in a format compatible with a mobile device such as a Blackberry, windows mobile device or iPhone. additionally, there is a lot of potential for integration into Microsoft Outlook and office communicator. the ability to dial straight out of your outlook contacts or the global address list without ever having to touch the phone on the desk is powerful.

Asterisk can also be configured to support Bluetooth-based presence awareness, meaning that you cocould pair your Bluetooth phone with the PC in your office. when they can "hear" each other over Bluetooth, your CILS wocould go to your desktop phone naturally. shocould You Go Out of range of your computer, your cballs wocould automatically be forwarded to your mobile phone until the end of the work day, at which time they 'd go directly to voicemail or back to the desktop phone (or until you came back within range of your office computer ). this wocould be handled by a simple piece of client software running on the user's workstation to communicate the presence information back to the asterisk server.

Trixbox has a switchboard interface which adds the ability to have a exceptionist take and route cals, conference CILS together, and arrange dial-in conference rooms. the exceptionist can also use the Web interface to monitor call activity and see whether a user is busy or available.

There are even initiatives in place to allow a reasonably powerful server to transcribe the conversations held in a teleconference meeting using voice recognition software, break up the conversations by audio stream, and then identify the speaker in the transcript.

Employers who wish to monitor their employees 'usage can generate reports of a specific employee or group of employees, in usable and presentable formats.

For offices that don't need to provide each individual person their own trunk, they can have an auto-attendant handle incoming calland route them via a voice menu which can be recorded at the handset (or studio-recorded) and uploaded to the asterisk server.

These are just a few of the specified ways you can make your phone system a part of your overall environment.

Best practices

This scenario depicts only one server for enterprise use, but as most datacenter managers will tell you, for any high-availability service such as email or telephone, there has to be a way to back it up. asterisk doesn't inherently have this built in, but with a few simple scripts, it's quite simple to create failover or a load-balancing cluster of machines to minimize downtime.

Most of these implementations are open-sourced, community-based solutions, but they work well.

One of my favorites for redundancy is flip1405 (created by thiscoolsite), which is a scripted solution to failover asterisk services with only about 20-30 seconds of downtime. they have also crafted another one of my favorite solutions, safe1405, an automatic asterisk backup and auto-FTP system to back up your priceless configuration files. for massive deployments or in instances where you may not have any single server powerful enough for your user base, there is a fantastic open source load balancing software called opensips.

Implementing the update features of trixbox can keep your asterisk server healthy, safe, and up-to-date via the Web interface. you can remove and add features that didn't initially come with trixbox or your asterisk distribution, or even add new ones that were released to the Community since installation. the package manager is extensive and robust, and is updated regularly.

Conclusions

To maximize performance and reduce costs, asterisk proves to be a forward-thinking, formidable solution for almost any size environment. scalable and extensible, and with alternative options for integration into the workplace, VoIP and asterisk are a logical choice for a business on a budget that's looking to cut costs withocutting services.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.