Setting Up VoicePulse SIP Trunking On Elastix
- Creating a SIP Trunk to two VoicePulse sites (A primary and backup)
- Creating an outbound route that will send calls to those trunks
- Create an extension with voicemail enabled
- Create an inbound route that sends calls to the extension
First, log into the web interface for your Elastix PBX.
From the main page, click the “PBX” tab at the top.
The PBX tab contains everything you need to control your phones. Everything from creating extensions and IVRs to call routing logic is handled by the pages in this tab.
Quick side note. After submitting changes on each of these steps, you’re going to see a pink bar appear at the top of the page labeled “Apply Configuration Changes”. Clicking this bar tells Elastix to reload the underlying Asterisk configs so Asterisk will recognize the changes. Until this is done, your changes aren't actually applied.
Once you’re on the PBX tab, the first thing you’ll see is the “Add an Extension” page. We’ll get to that in a little bit, but first we’re going to setup SIP Trunks to two VoicePulse sites. A SIP Trunk is essentially a communication channel between your PBX and VoicePulse call servers. We’ll need to create the trunks one at a time, so you’ll need to repeat the steps in this section to create both. To get started creating the trunks, click the “Trunks” link in the left hand column.
After clicking Trunks, you’ll want to click “Add SIP Trunk” to create your trunk to VoicePulse.
Now we can begin entering information for the VoicePulse trunk. There are 5 key sections that need to be filled in when creating the trunk.
To make it easier for you, you can copy and paste the list of default recommended settings below into your Elastix GUI.
- Trunk Name – This can be anything you like, however since the name will be used in other sections of the PBX, it’s best to use something descriptive. In this example, we’re going to use “SIP-VP-JFKA” to indicate that it’s a SIP Trunk, through VoicePulse, connecting to the JFK-Primary site. (Note that Trunk Name needs to be entered twice on the page.)
- Outbound Caller ID – By default, this field is simply a fallback Caller ID to pass in case the Caller ID isn’t set on the extension. You can change this behavior by changing the CID Options field. You probably want to set this field to your company's main number. In this example, we’re setting the Caller ID to an invalid number, so if any extension doesn’t have a Caller ID set, it will display as “Unknown” or “Anonymous” to the receiver.
Dialed Number Manipulation Rules – These rules take care of formatting the dialed number before sending it out to VoicePulse. When a call is sent to VoicePulse, it should be formatted with the Country Code first, followed by the number. This is true for both US and International calls. Each rule consists of 3 parts:
- Prepend – This is a string that should be prepended to the dialed number. It does not need to be dialed by your extensions.
- Prefix – This is a string that should be stripped from the front of the dialed number. It would be dialed by your extensions. (A common one is 011 for international calls.) If the prefix is not at the beginning of the dialed number, the rule will not match.
- Match Pattern – This is a pattern that is used to match the number that is dialed. Details for what can be used in the pattern can be found by hovering over the “Dialed Number Manipulation Rules” heading in the Elastix GUI.
For one of these rules to be applied, it must match both the Prefix and Match Pattern combined. Once a match is found, the rule will be applied and all subsequent rules will be ignored. You’ll see here that we have 4 rules created:
- The first rule is for international calling. The combined Prefix and Match Pattern here is “011.” The dot is a wildcard character which will match one or more characters. This rule will match any number dialed that begins with 011 and has any number of digits after it. It will strip the 011 from the number before sending the call to VoicePulse.
- The second rule is for 11 digit NANPA (USA and North America) dialing. This rule will match any valid NANPA number beginning with a 1. The N character matches any number between 2 and 9, and the X character matches and number between 0 and 9. This rule will not modify the number before sending it to VoicePulse.
- The third rule is for 10 digit NANPA dialing. This rule will match any valid NANPA number and prepend the 1 before sending it to VoicePulse.
- The fourth rule is for 7 digit NANPA dialing. This rule allows users to use 7 digit dialing and automatically adds their area code before sending the call to VoicePulse. When you enter this rule, you should replace 732 with your local area code.
- Peer Details – This is where you define the settings Elastix will use to connect to and establish calls with VoicePulse. There are several settings here that you will need to adjust. The “<USERNAME>” and “<PASSWORD>” values should be replaced with the username and password listed in your VoicePulse account center. The “disallow” and “allow” lines control which codecs your PBX advertises to VoicePulse when establishing calls. The default settings listed here will only allow ulaw (g.711), but you can change this to your liking.
- Register String – This string tells Elastix that it needs to register with VoicePulse. In simplest terms, registration is basically your PBX “logging in” to the VoicePulse servers so we know where to route your inbound calls. The registration string uses the same username and password that you entered above in the peer details. Note that there is a colon between the username and password. That colon must be present or your PBX will not be able to register with VoicePulse.
Once those items are filled in, click “Submit Changes” at the bottom of the page.
After you’re done with the first trunk, don’t forget to go back and repeat these steps for your backup trunk. All of the settings are the same, however you should replace “jfk-primary.voicepulse.com” with “jfk-backup.voicepulse.com” and “SIP-VP-JFKA” with “SIP-VP-JFKB”. This way, if there is a problem with our primary servers, your phone calls won’t be affected!
Creating Outbound Routes
Now that your Trunks are created, let’s create an outbound route so we can direct outbound calls to the Trunks. First, click on “Outbound Routes” in the column on the left.
After clicking this link, you’ll be taken directly to the “Add Route” screen. In comparison to the Trunk, this is much simpler to configure.
- Give it a name. In this example, we’re using “VP-OUT”.
- Select a Route Position. Elastix comes with a default route named “9_outside” which we’ll want to put behind this route. In the Route Position drop down box, select the option that says “First before 9_outside”.
- Set the dial patterns. These Dial Patterns are designed the same way as the Dial Patterns on the Trunks. However, you’ll notice that here we’re only using Match Patterns and not adding anything to the Prepend and Prefix portion of the rules. This is merely a matter of preference. Technically, we could have left the dial patterns in the trunks blank, placed those manipulation rules here, and calls would still complete. However that limits our flexibility going forward. By keeping any manipulation rules limited to the trunks, we have the option of easily adding trunks from multiple providers to the same outbound route.
One exception to this way of thinking would be something like requiring users to dial "9" before placing an outbound call. If you wanted to require that of your users, simply place a 9 in the prefix field for each dial pattern.
- Select the trunk sequence. Now all that’s left to do is select the trunks we created earlier. Simply pick the trunks from the drop down boxes in the order that you want them to be tried. If the first trunk in the list fails for some reason, Elastix will try each trunk in the list until it either completes the call, or runs out of trunks to try.
On a side note, you'll notice that the Dial Patterns here have an added CallerId field that wasn't present in the trunks. When I first saw this field, I didn't immediately see much of a use for it, however it recently helped solve a little problem I came across. One of our clients was using a Hosted PBX and had several business locations connecting to it. They wanted a way to have each location's calls be routed through a separate trunk, the solution to which wasn't immediately obvious. A quick search on Google brought me here, where I found a nice little way of utilizing this field to accomplish exactly what we needed.
Now click “Submit Changes” at the bottom. That’s it! Your PBX is all set up for outbound calling. But before we can test it, we’ll need an extension to make calls from. So let’s go do that now.
Creating an Extension
An extension represents an actual phone in your PBX. Generally, an extension will be one of three things:
- An IP Phone
- An Analog Telephone Adapter (ATA)
- A softphone
All three of those options are very popular and widely used, (although ATAs are probably losing ground to IP phones pretty rapidly at this point) and there are many different options available for all 3. Because there are so many options, we cannot cover all of them in this guide. However the general principle is the same for all. For basic functionality, you’ll need to give your device a username/password, and point it to your Elastix system.
In our example, we’re going to use Counterpath’s X-Lite, because it’s free, reliable, and available for both Windows and Mac. If you want to follow along, you can go here and click the download link to get X-Lite.
Before we can configure X-Lite, we’ll need to setup an extension in Elastix. To get started, click “Extensions” in the left hand column.
That will take you to the “Add an Extension” page. On this page, select “Generic SIP Device” from the drop down menu and click Submit.
Now you’ll be taken to the “Add SIP Extension” page. This page has a lot of options, however for basic functionality, we only need to configure a few of them.
- The first thing to do when creating an extension is to give it an extension number. In the User Extension field, enter the number you wish to use. This number will be used both for authentication information, and call routing purposes.
It's generally a good idea to put a little bit of thought into assigning extension numbers. If you just random pick numbers out of thin air, or even just go in numerical order every time you add a new extension, things can eventually become pretty messy. Here's a few tips that can help keep things easier for you to manage:
- Extensions should be 3 or 4 digits. This keeps them easy to remember and gives most companies enough room for future growth.
- If you're going to use the "dial 9 for outside" rule, it's best to avoid having extensions that start with 9, just to prevent confusion for your users
- If your company has sequential phone numbers (e.g. 555-2200 through 555-2249), and you plan on assigning those numbers to users, consider making user extensions match their direct line. (use extensions 200-249)
- Consider splitting up extensions into ranges by purpose. (Users are 2xx, call parking is 29x, IVRs and 30x, queues are 32x, etc)
- The Display Name isn’t necessary, but having it makes things a lot easier later on, especially if you’re going to have a lot of extensions.
- Next, set the Outbound CID field. Remember, back when we configured the trunk we decided to leave Caller ID assignment to the extensions, so if there isn’t a valid number entered here your outbound calls won’t have Caller ID information.
- If you have an inbound number that you know you’d like routed directly to this extension, you can enter it in the “Add Inbound DID” field and Elastix will automatically create the inbound route for you. However we’re going to manually create an inbound route in a few minutes, so you can leave that blank for now.
- Now we need to create a secret for the extension. This is the password that your phone will use to authenticate with your PBX. Always make sure you use strong passwords when creating extensions! Even if you’re just testing, even if it’s only a temporary extension, use a secure password! If you use something simple to guess like “password” or just the extension number, anyone with a SIP client can register as your extension and place phone calls through your trunks. Hackers constantly scan the Internet for new PBX systems with simple passwords, and will likely find yours within a matter of hours or even minutes. Using secure extension passwords is a great way to defend against them. Five seconds of convenience is not worth the risk of someone halfway around the world potentially running up your phone bill.
That covers the very basic requirements, but we’re going to make one more change on this page before proceeding. We’re going to enable Voicemail on our extension. This is as simple as scrolling down to the Voicemail & Directory section, and changing the Status dropdown box to Enabled. After that, set a default Voicemail Password and you’re good to go.
Once that’s done, click Submit at the bottom of the page. Now we need to configure X-Lite to connect as this extension.
After X-Lite has been downloaded and installed, (Again, you can grab the setup from here) launch the app and go to Softphone -> Account Settings.
This will bring up the SIP Account panel, where you can enter the details for the extension you created earlier. You’ll need to enter the following:
- User ID – This is the number you chose for User Extension earlier.
- Domain – This is the IP Address (or DNS Name) of your Elastix server.
- Password – This is the secret you created for the extension.
- Authorization name – This should again, be the number you chose for User Extension.
- Register with domain and receive calls – This should be checked by default, but just in case it isn’t, check that box, and select Domain in the radio buttons below.
Once these settings are entered, click OK at the bottom. You should briefly see a message that says “Account Enabled. The phone is ready” indicating that you softphone successfully registered with your PBX.
Your phone is now ready to make outbound calls or calls to systems on your PBX. Try placing a call to your Voicemail by dialing *97 or calling out to your cell phone!
Configuring Inbound Routes
Now that we can make outbound calls, let’s setup an inbound route so we can receive calls too. To complete this step, you’re going to need a DID on your VoicePulse SIP Trunking account. You can see the DIDs on your account under the “Setup” tab in the VoicePulse account center.
To get started, click on Inbound Routes in the left hand column.
This will bring you to the “Add Incoming Route” page. At its most basic, an inbound route requires only a DID and a destination. Everything else on this page is optional. In this example we’re going to point a phone number directly to our test extension, however you can create inbound routes that point to IVRs, Ring Groups, Call Queues, Conference Rooms, etc.
To create our inbound route, let’s enter the following information:
- Description – This isn’t required, but it’s nice to have a name for each inbound route. It makes things much easier down the road when you have inbound routes for multiple DIDs, so you can know right away what each one is for.
- DID Number – This is the phone number that you have with VoicePulse. When creating an inbound route, it’s important to enter the DID exactly as it will be sent to you from your provider. VoicePulse sends all inbound calls as an 11 digit DID, meaning it will be 1 followed by the area code and number.
- Destination – This is where you want the call to go after it reaches your PBX. For now, select “Extensions” from the first drop down box, then select the extension you created earlier in the one that appears next to it.
Now click submit to save the inbound route.
That’s it! You have successfully configured your Elastix PBX with VoicePulse SIP Trunking. You now have an X-Lite softphone registered as an extension, which is able to make and receive calls through your trunk. This guide only covered getting very basic functionality up and running, but hopefully it showed you that configuring a PBX isn’t as complicated as it might sound. I’ve always found that the best way to get familiar with something is to experiment with it, so go ahead and try out different options!