21
Setting up a small office or home office VOIP system with Asterisk PBX – Part 1 It used to be that having a phone system in your office that consisted of multiple extensions, phone numbers, and digital receptionists was a massively complex and expensive project. In fact, most offices still operate on those types of analog systems which quickly become a nightmare to maintain. With an analog phone system, every phone extension requires its own separate phone line run to its destination. This is probably in addition to a data line and maybe another phone port or two; it adds up in a hurry.

Setting Up a Small Office or Home Office VOIP System With Asterisk PBX

Embed Size (px)

Citation preview

Page 1: Setting Up a Small Office or Home Office VOIP System With Asterisk PBX

Setting up a small office or home office VOIP system with Asterisk PBX – Part 1It used to be that having a phone system in your office that consisted of multiple extensions, phone numbers, and digital receptionists was a massively complex and expensive project. In fact, most offices still operate on those types of analog systems which quickly become a nightmare to maintain. With an analog phone system, every phone extension requires its own separate phone line run to its destination. This is probably in addition to a data line and maybe another phone port or two; it adds up in a hurry.

If you’ve worked in IT at a small to medium company, you’ve likely seen patch panels similar to this:

Page 2: Setting Up a Small Office or Home Office VOIP System With Asterisk PBX

Our company recently moved out of an office where we were running a hosted VOIP solution attached to a slow DSL that was our only option for data. The system was set up by a full service voip operation who managed everything. The system was cumbersome and at around $500/month, expensive, but it worked. We’ve since moved to a new office, and this time I had full control over what services went into it and how the network was structured.

The space came pre-wired for a full analog phone system, which made it tempting to just use it, but knowing the potential cost savings with an in-house voip system I decided to venture in that direction. It also didn’t hurt that we had plenty of Mitel 5224 VOIP phones left over from the old office, which saved us a significant amount of money out of the gate. The first step was to figure out what exactly I needed to make this work on my own. I knew some of the basics, but being new to this I was unsure of which components were mandatory for the set of features we require.

The features that we need:

N number of extensions A Digital Receptionist / IVR (Interactive Voice Response) system Direct dialing to extensions Voice mail Dial Groups Follow-Me Multiple phone numbers Inbound call routing Caller ID Manipulation Call Waiting Call Transfers Conferencing Fax

Pretty standard stuff for an office.

In Part 2 of this series I’ll detail the network components, the network layout, the software chosen, and the initial set up of the system. Until then, have a look at the website http://www.voip-info.org which has a wealth of knowledge about PBX and VOIP.

Page 3: Setting Up a Small Office or Home Office VOIP System With Asterisk PBX

In part one of this series on setting up a SOHO Voip solution, I detailed the requirements that we had for choosing the components of our system. In this section I’ll get into the network and hardware components required to set this system up, along with their layout.

Surprisingly during my research for this project, I had a difficult time finding a clear outline of what exactly was needed to set up this system. It turned out that I needed much less than most guides lead me to believe. Of course this depends on your requirements but in my scenario I wanted a strictly voip system with SIP phones and would not tie at all into an analog provider or telephone line. That greatly reduces the complexity of the system and lowers the requirements.

What you need

Broadband internet connection. The more call volume you have the higher the bandwidth you will need. We have low call volume and are using a 7Mbps/700Kbps connection, this has been plenty of bandwidth for us.

Wired Ethernet router. You have a ton of options here but your budget will likely decide this one. I’d suggest a decent VPN router that has QoS and a good amount of concurrent connection volume. The VPN function will come in handy if you want to use your VOIP system from a remote office or home office. We went with the ZyXEL ZyWALL 5 Internet Security Firewall Applianceand have been very pleased. It is an excellent value.

A computer to act as the PBX Server. The requirements for this system are very low unless you have a lot of phone users. Our machine is modest and has still been overkill, it has a 3Ghz P4 processor, 1 GB RAM, 10/100 Ethernet, and 120 GB Hard drive. We bought it for $80 through Geeks.com and it works perfectly.

IP Phones. There are a slew of IP phones out there from full color touch screen ones to wifi cordless ones. Just double check that the phones you choose are compatible with the PBX server you choose. We have about a dozen Mitel 5224 IP Phone (Dual Mode) – VoIP phone – SIPphones operating in SIP mode that work great with our system.

PBX Server Software. The PBX software is what gets installed on your server to act as the brains of your local phone network. It allows you to do everything you can imagine with your phone system. We are using the Asterisk PBX system with Free PBX as the user interface. Both are free and can be installed together in about 15

Page 4: Setting Up a Small Office or Home Office VOIP System With Asterisk PBX

minutes by using the AsteriskNow .iso image available at Asterisk.org.

VOIP Provider. This is a service that you need to subscribe to, much like a normal phone company, that allows you to actually make and receive calls outside of your office. Without one of these you’re only able to dial other extensions within your office. We went with a provider named Callcentric for no real reason other than they are cheap and let you set up an account for free to make sure your system is working first before you subscribe. We currently pay $8.95/month for unlimited incoming calls and we use the Pay-as-you-go plan for outgoing which is pretty common for this type of service. So far we’ve spent a whopping $1 on outgoing calls.

The network layout for this system looks like this:

VOIP Network Diagram

Notice how the PBX server doesn’t connect to anything directly? In the next part of this series I’ll discuss the setup of these components to get the system up and running.

Page 5: Setting Up a Small Office or Home Office VOIP System With Asterisk PBX
Page 6: Setting Up a Small Office or Home Office VOIP System With Asterisk PBX

Setting up a small office or home office VOIP system with Asterisk PBX – Part 3Part Three of this series assumes that you have your hardware in place, including your phones and PBX system. As I mentioned in part two, we chose to go with a Asterisk PBX system with Free PBX as the user interface.

The Network

VOIP Network Diagram

In part two I provided a network diagram that shows an overview of the hardware layout for a our VOIP installation. The main cause of much of my trouble understanding the network configuration for a VOIP system before this install came from never seeing a diagram like this. I assumed that the phones would need to interface directly with the PBX box with

Page 7: Setting Up a Small Office or Home Office VOIP System With Asterisk PBX

some type of hard connection and that I might need analog phone cards in the PBX system to make and receive calls outside of the office. It turns out that things are a lot simpler than that for a pure VOIP system.

Page 8: Setting Up a Small Office or Home Office VOIP System With Asterisk PBX

PBX Hardware

As you can see in the diagram, the PBX computer merely sits on your network like any other device. The IP Phones, as long as they are on the same network, can use the SIP (Session Initiation Protocol) to discover and be discovered by the PBX system.

The PBX system needs only to be connected to your network via a standard network interface card (NIC) and be assigned a static IP address. Some guides that I read suggested that you install your entire VOIP network under a separate sub-net, but I decided to just leave the whole network on the same sub-net for ease of configuration.

IP Phones

I’m going to assume that the phones being used are SIP phones, if not, you’ll need to read the documentation on the particular protocol required for your devices. To connect your IP phone to the network, you only need to connect it via an Ethernet cable (some also require a power-over-Ethernet adapter) to the same network that the PBX is on. Once the phone has begun booting, it will attempt to locate a PBX system to pair with.

The Router

Your router will probably require some minor configuration in order to work properly with VOIP services. Some basic changes you’re likely to make are:

Enable UPnP support Enable NAT Open Firewall port UDP:4569 to your PBX static IP Forward Ports 5060 – 5060 to your PBX static IP Forward Ports 10001 – 20000 to your PBX static IP Forward Ports 4569- 4569 to your PBX static IP

The Software

Hopefully now that you’re this far along in your install, the network and hardware setup are much less mysterious, or at least less difficult seeming. I say hopefully because the software configuration is probably going to leave you bewildered. I have by no means got it all figured out, I’ve basically reached a point where the phone system is working and I mostly understand how to make the basics happen.

Page 9: Setting Up a Small Office or Home Office VOIP System With Asterisk PBX

I started to write the next steps for the software configuration and realized that it will take too much explaining to cram into this post. I’ll devote all of part 4 to the software configuration and aim to complete this series then.

Page 10: Setting Up a Small Office or Home Office VOIP System With Asterisk PBX

Setting up a small office or home office VOIP system with Asterisk PBX – Part 4Part four of this series has our hardware and network all set up and ready for software configuration. This can be the most confusing part of the set up, even for a technical person, if you are not familiar with PBX systems. This post will barely scratch the surface of the configuration for Free PBX on Asterisk but hopefully will give you enough to get started.

To begin, log into your PBX server by entering the IP address you chose when installing the Asterisk software on your system. The default username and password for an AsteriskNow FreePBX install are freepbx / fpbx.

Once you’re into the dashboard you’ll see a screen similar to this:

Set up your VOIP Provider

The first thing you’re going to want to do is configure your server to communicate with the outside world via your chosen VOIP provider. Without doing this, your network will only be able to communicate internally, which I recommend trying out to get some sense of progress (it’s nice to hear a dial tone).

As previously mentioned, we chose CallCentric as our VOIP provider and have been reasonably satisfied.

Page 11: Setting Up a Small Office or Home Office VOIP System With Asterisk PBX

The TRUNK

First we’ll set up the TRUNK, which is the basis for communication between your network and your VOIP provider. Click on the Trunk menu item on the left side navigation.  The values you will enter here depend on your provider. The VOIP provider should provide these values to you when you subscribe to their service. Note that you can hover your mouse over most of the field titles to get some helpful information about what you should be entering.

Trunk Name: The name of your provider Outbound CallerID: Your new VOIP phone number you were

assigned CID Options: Set to Allow Any CID for now to make sure you get up

and running. Once you are in business, I’d recommend changing this to block foreign CID’s as we’ve seen some vulnerability in allowing call forward requests from outside your network.

Dialed Number Manipulation: Can skip for now PEER Details: This is important and complicated. Your provider

should give you the exact text to insert into this field. Incoming Settings: This was not needed for my provider Register String: This is important. This is usually going to be

information that authenticates your network with your provider by supplying an account ID along with a password or secret key.

Page 13: Setting Up a Small Office or Home Office VOIP System With Asterisk PBX

Save the trunk. You will notice an orange box appears at the top of the screen that says “Apply Changes”. You’ll need to click this and reload Asterisk for the changes to take effect. This happens frequently and you should watch for it.

INBOUND ROUTES

Next you’ll set up an inbound route to receive calls from the outside world. Click on the link for “Inbound Routes” on the left side. You can set up as many inbound routes as you want, each should represent a different phone number you want your network to handle.

Description: Title this incoming phone number DID Number: Your incoming phone number (important) CID name prefix: This will prefix the caller id for someone calling

you. For example, if someone calls us on this phone number it will show up on our phone as CYPRESS-716-XXX-XXXX. This is very handy if you have other incoming numbers so you know which one is ringing you at the moment.

Set Destination: Where do you want someone calling this number to be directed? Ours is set to an IVR (Digital Receptionist) that has a simple welcome message and instructions. You may want to set your to go directly to an extension such as a receptionist.

When you’re done, click Submit to save the inbound route.

You’re now configures to make and receive calls with the outside world.

Extensions

Now that you are able to reach outside your office, you’ll want to configure some phones and extensions to use them. This is usually a two part process, configuring the PBX extensions and then configuring the phone itself. I can only providedetails on the PBX side because every phone setup will be different. Usually your phone has a web admin feature that you can reach by entering the phones IP address into a browser. From there you’ll need to specify the extension, password you set up, and IP address of the PBX server at a minimum.

To create an extension on the PBX side, click the “Extensions” link in the left navigation. Choose “Generic SIP Device” (unless you know otherwise) and click Submit.

Page 14: Setting Up a Small Office or Home Office VOIP System With Asterisk PBX

You can leave most of the default values as they are on this screen and pick through the vast amount of settings for things you might need/want. At a minimum you should set:

Extension: The extension number e.g. 102 Display Name: Name of the person at this extension Secret: This is a password you will need to enter both here and on the

phone itself Voicemail: Turn this on if you’d like a voicemail box set up for this

extension. You can then set VM options like adding a password and an e-mail address (which will e-mail you the recording in .wav form if you choose).

Optional Destinations: What do you want to happen when nobody answers.

Press submit to save this extension. You should now configure the phone to match.

Outbound Routes

You should be able to receive calls now and you’re almost ready to make calls. You just need to set a couple of outbound route rules so the system knows how to handle different dialing scenarios. The two basic scenarios that we’ll set up are dialing an internal extension and dialing an outside phone number.

Internal Dialing Route

Click on “Outbound Routes” on the left side navigation and click Add Route.

Route Name: Internal Route Type: Intra-Company Time Group: Permanent Route Dial Pattern: Enter in the “Match Pattern” field: ZZZ

Click Submit to save this route. This will tell the system that when someone dials a 3 digit number, it should go to an extension internally. Add or subtract Z’s if your extensions have more or less digits.

External Dialing Route

Click on “Outbound Routes” on the left side navigation and click Add Route.

Page 15: Setting Up a Small Office or Home Office VOIP System With Asterisk PBX

Route Name: Outbound Route Type: None Checked Time Group: Permanent Route Dial Patterns:These are the patterns we are using, all through the

same route. You can set up additional routes if for each trunk if you have a different provider for long distance etc.

1. 011.   (matches any number starting with 011)2. 1800NXXXXXX (Matches Toll Free 800 numbers)3. 1866NXXXXXX (Toll Free)4. 1877NXXXXXX (Toll Free)5. 1888NXXXXXX (Toll Free)6. Prepend: 1 Match Pattern: NXXNXXXXXX (This is for long

distance dialing. Prepending 1 removes the need to dial 1 before an area code)

7. Prepend: 716 Match Pattern: NXXXXXX (Local dialing. Prepending your area code allows you to just dial the main number)

Trunk Sequence: Choose your VOIP Trunk

Click Submit to save this route.

Page 16: Setting Up a Small Office or Home Office VOIP System With Asterisk PBX

Finish

If everything went well, you should now be able to make and receive calls so give it a try.