Setting up a small office or home office VOIP system with Asterisk PBX – Part 4

small-business

Be sure to check out parts one, two, and three of this series.

Part 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.

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.

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.

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.

  • 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.

Finish

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

Categories: Uncategorized

19 Comments

  1. Author's Headshot
    john December 21, 2012
    Reply

    YOU ROCK! This is exactly what I was searching for so I can do this myself. I am barely computer literate so your step by step is very very much appreciated.

  2. Author's Headshot
    Mark January 8, 2013
    Reply

    Thank you very Much... Finally. This is a tutorial i was waiting for ages... i wanted to switch to my own long time ago, but i didn't know how and what needed. thank you very much.

  3. Author's Headshot
    Sam September 24, 2013
    Reply

    Awesome guide!

    Are you able to program the buttons on the Mitel phones?

    • Author's Headshot
      Matthew Mombrea September 25, 2013

      Yes, for the most part they work out of the box. I did have to upgrade the firmware on them to get the mute button working again.

    • Author's Headshot
      Sam September 25, 2013

      That's good. Are you still using the FreePBX and Mitel phones setup?
      Also, how did you program the buttons on the phones?

      We will likely be getting 10-15 of these phones with 5 different phone numbers. Are you able to program one of these buttons for each phone number so we know which specific one of our numbers is ringing?

      Thanks!
      Sam

    • Author's Headshot
      Matthew Mombrea September 25, 2013

      Sam,

      Yeah, that's still the setup we're using. We've also added SIP phone apps to some of our mobile devices so that employee cell phones can be used as their "desk" phone when their in the office over wi-fi (see here).

      To program the Mitel phones you log into the web interface of the phone by browsing to its IP address from a PC. The username/pass is usually admin/[phoneModel] i.e. admin/5224. From there you can configure the phone to connect up to your PBX system, program all the keys, and much more.

    • Author's Headshot
      Sam September 25, 2013

      Matthew-

      So do you know if we multiple lines, will we be able to chose which lines we're dialing from with one of the programmable buttons?

      Also, have you been able to setup a Mitel phone offsite that connects to your PBX over the internet?

      Thanks again!
      Sam

    • Author's Headshot
      Matthew Mombrea September 25, 2013

      Yes, this is a function of the PBX not the phone though. You can set up a dial out code in the PBX to choose which trunk line you'd like to use, so the phone call might start with #9 xxx-xxx to access a specific line. Then you can program the phone keys to start by dialing #9 when you press it, then enter the number you'd like to call afterward. You can set another key to start by dialing #0 to get a different line etc.

      For setting up the phone outside the office it's just a matter of entering your WAN accessible host name or IP address of your PBX system when you're configuring the phone through the web interface. If your PBX or office network are not WAN accessible, then you have a different networking related task to complete first.

  4. Author's Headshot
    Sam September 25, 2013
    Reply

    Ok. Thanks for clearing that up.
    How would you tell which number is ringing? Would the light on that button flash?
    Also, can you setup specific phones to only ring when specific numbers are called?
    Finally, how is paging working for you?

    Sorry for so many questions!

    Thanks
    Sam

    • Author's Headshot
      Matthew Mombrea September 26, 2013

      These are function of the PBX. You can prefix an incoming call with letters or numbers to show which line it's coming from on the caller ID of the phone. Ringing specific phones is set up via Ring Groups in the PBX. Paging is set up via the PBX as well.

  5. Author's Headshot
    Sam October 17, 2013
    Reply

    Hi,
    I've got my server setup and my phones now, but they are having trouble connecting to the server. I have the 5224's set into SIP mode . Can you send me a screenshot or tell me where all the information goes in the phone configuration page?

    Thanks,
    Sam

    • Author's Headshot
      Sam October 17, 2013

      Ok, everything is actually connecting to the server now, but the top of phones still say "Page Not Found". Do you know why?

      Thanks,
      Sam

    • Author's Headshot
      Matthew Mombrea October 18, 2013

      Sam,

      No, I've not seen that issue before. The only reason I can think of that it would be looking for a page would be for a firmware upgrade. You might want to check those settings under the Firmware Update menu.

    • Author's Headshot
      Sam October 26, 2013

      This message is still appearing on our phones. It is the top line on the 5224 phones. What do your Mitel 5224 phones say at the top?

    • Author's Headshot
      Sam October 26, 2013

      I actually figured it out- it was the RSS/branding feature under "Advanced Features". You must specify a webpage here and it will display the title of the webpage on the phone.

  6. Author's Headshot
    Marcelo Saavedra March 16, 2015
    Reply

    Excellent VoIP guide! Thank you. What Do I should do if wants to use PSTN lines into my VoIP network? Currently, I have 4 PSTN Lines connected to a Panasonic Pbx. Thanks.

  7. Author's Headshot
    Devin August 13, 2015
    Reply

    Is a static IP address required for the internet broadband connection? Or will a dynamic IP work?

  8. Author's Headshot
    Mimi K August 24, 2016
    Reply

    This is amazing Matthew! Thank you so much!
    Do I need to get a dedicated PC just for the phone server? Can I just install the FreePBX software on my laptop that I use for other things?

    • Author's Headshot
      Mimi K August 24, 2016

      If my laptop is fine to use as the phone server, does it need to be wired to the router or can it be connected through wifi?
      Also, my laptop is Windows. Does it need to be linux?

Leave a Reply

Your email address will not be published. Required fields are marked *

Meet the Author

mmombrea-headshot
CTO / Partner

Matthew Mombrea

Matt is our Chief Technology Officer and one of the founders of our agency. He started Cypress North in 2010 with Greg Finn, and now leads our Buffalo office. As the head of our development team, Matt oversees all of our technical strategy and software and systems design efforts.

With more than 19 years of software engineering experience, Matt has the knowledge and expertise to help our clients find solutions that will solve their problems and help them reach their goals. He is dedicated to doing things the right way and finding the right custom solution for each client, all while accounting for long-term maintainability and technical debt.

Matt is a Buffalo native and graduated from St. Bonaventure University, where he studied computer science.

When he’s not at work, Matt enjoys spending time with his kids and his dog. He also likes to golf, snowboard, and roast coffee.