Cisco UCM 9 to FreePBX(Asterisk 10) to Voicepulse
I’ve been a Voicepulse SIP subscriber of years. I love their SIP business service.
It gives me a 4 channel SIP trunk and DID service for about $12 a month plus usage. It’s cheap enough for me to use in my lab without breaking the bank. Initially when my lab was more physical and less virtual, I had the Voicepulse SIP trunks terminated on a Cisco 2801 running CME. From there, I would either register IP Phones directly or quasi-cube the connection to the occasional CUCM I would have spun up for testing. My home office phone ran off this and was mostly up when I wasn’t screwing with the setup. That was about 6-9 months ago before I completely re-did my lab footprint to run everything virtual on MAC Mini’s.
In order to terminate my trunks in a virtual-only environment, I needed something other than a physical Cisco ISR. (Hey Cisco!!! Virtualize a CUBE!!!) What I needed was a virtual appliance to act as a SBC. Voicepulse requires either a static IP (dont have) or SIP authentication (CUCM natively does not support). I’ve been wanting an excuse to play with Acme or Sonus but neither of those were an option for me at the moment. I had some familiarity networking CUCM with Asterisk so… Asterisk to the rescue! I decided I would try to terminate my Voicepulse SIP trunks to Asterisk, and create a SIP trunk between it and CUCM.
Asterisk 10 to Voicepulse Config
For my Asterisk server, I decided to use FreePBX. Asterisk can be installed and configured directly a top your Linux of choice, but for simplicity’s sake, FreePBX has a preconfigured installer ISO that builds the appliance for you. It’s essentially a customized CentOS load with the Asterisk packages all ready to go. You just open a browser to it’s IP when finished. For the FreePBX virtual machine, I built it as a single core with 2GB of RAM and a 16GB disk. I booted it off the FreePBX ISO and about 15 minutes later it was ready to go.
Voicepulse has a fairly decent guide on setting up with Asterisk. I used lot of that as my starting point. I had to tweak it a little for minor Asterisk 10 differences and lobotomize the dial-plan to support what I was wanting to accomplish with CUCM. Most of my configuration changes makes it so that Asterisk simply passes through information from CUCM and Voicepulse. I only needed to touch three sections in default Asterisk config. Trunks, inbound routes, and outbound routes.
First, create the SIP trunk to Voicepulse.
For outbound caller-id, I am leaving this blank and specifying it in CUCM (more on this later). If you wish to override this, you can do so here. For dial-plan,Voicepulse seems to want all numbers dialed as e.164. They don’t really say that in their config guides, but looking at their dial-plan examples and the plus(+) dialing in their configs, it seems so. I have only tried calling US numbers so I can’t confirm that 100%. All my Asterisk configs in this example will maintain the e.164 formats and expect CUCM to send a properly formatted e.164 number for outbound dialing. This is why the “Dialed Number Manipulation Rules” are blank here. For the register string, use “user:password@voicepulseserver” while replacing “user” with your VP username, “password” with your VP password, and “voicepulseserver” with the specific VP server you are registering this trunk to (i.e. jfk-primary.voicepulse.com). See the Voicepulse Asterisk setup guide on their website if this is vague.
Optionally, you can also create a secondary SIP trunk using the same setting above but placing the Voicepulse backup server (i.e. jfk-secondary.voicepulse.com) in the appropriate fields.
Next, you’ll want to create an outbound route for this trunk. This will route dialed numbers to the SIP trunk.
This should be fairly self explanatory. Since I am doing all my digit manipulation in CUCM, I am just routing +1NXXNXXXXXX to the SIP trunk(s) I created above. Other that matching on +1 NANP dialing plan only (no international) it is passing everything through from CUCM as dialed without discarding or prepending any digits.
Now on to the CUCM SIP Trunk…
Asterisk 10 to Cisco Unified Communications Manager 9 Config
This took a little more trial and error. I read few a guides and perused configs others had used and cobbled this together. It may have redundant or unnecessary options, but with all the testing I have done so far, everything seems to work as it should.
In Asterisk, create a trunk as follows.
Just like with Voicepulse trunks, you don’t need to specify any routes here as that will be done in either CUCM or through Asterisk routes. Note that the 192.168.10.46 is the IP address of my CUCM server. You must use the IP address of CUCM as the user context and fromdomain.
Next, create a inbound route to direct our Voicepulse DID to our CUCM.
I am specifying my exact DID here. Voicepulse presents me an 11 digit number and this “DID number” field has to match what they are sending me. I only have one DID with Voicepulse. If I had a block of DIDs, I wouldn’t necessarily need to create individual inbound routes because Asterisk supports wildcards in the form of X or N (where X = any number and N = 2-9) or bracket ranges ([1-4]). Example – if i had 17705551000 – 17705551099, I could use 177055510XX as my “DID Number” that I am routing to CUCM.
When the call gets to CUCM, Asterisk will pass this DID through.
Cisco Unified Communications Manager 9 to Asterisk 10 Config
If you are familiar with Cisco Communication Manager, you can probably skip some of this. In fact, I’m probably not going to go into a lot of detail here as the design on the CUCM side is so subjective to what you are using it for. I’ll briefly hit on my partitions and css’s along with my IP Phone config but that’s ancillary to this config.
For this example, I have 3 partitions on my CUCM server:
I also have 3 calling search spaces configured as follows:
Not too much you need to do on the phone, but I’ve included the parts that I used for this setup.
First, create a SIP Security Profile. You can either edit the default, or create a new one. I have created a new one. Make sure you pay close attention to the items circled in red.
Next, create the CUCM side of the SIP trunk to Asterisk.
Note that MTP is required. Make sure you have one in the null MRGL or in the MRGL you assign the trunk. I am using the Cisco software MTP that’s part of CUCM for my setup.
Make sure you specify the correct SIP Security profile and define the IP address where Asterisk is running. Save and reset the trunk.
Next create a route pattern pointing your outbound routes to this SIP trunk. This is where YMMV and where you will need to know how you want the Cisco IP phones to dial. Your desired end result is that you are sending a +1[2-9]XX[2-9]XXXXXX pattern to the SIP trunk. For my setup, I wanted to dial a 9 and get secondary dial-tone. followed by 10 digits for the local numbers in my area, or 1+10digits for long distance. The way I chose to do this was with 4 route patterns.
First the LD pattern. Pay close attention to the transformations.
And then 3 Local patterns matching on the 3 local area codes for Atlanta. (Only 404 shown in the screenshot)
Notice in both of these that “Use calling Party’s External Phone Number Mask” is selected. On the IP phone, I have my Voicepulse DID assigned as the “External Number Mask”. This checkbox on the route pattern is what forwards this information to the SIP trunk and eventually to Voicepulse. Doing it this way would allow me to have multiple Voicepulse DIDs in the future and allow me to send the number of the phone I am dialing from across the trunk to Voicepulse. This way the Caller-ID on the destination caller’s phone correctly matches the DID the call is coming from.
At this point, you should be able to make outbound calls from a Cisco attached IP Phone through Asterisk to Voicepulse. All that is remaining is routing the inbound DID to your IP phone of choice. To do this, add a translation pattern to translate the 11 digit DID from Asterisk to the extension inCUCM.
It will look something like this.
Notice here that the “Translation Pattern” is the 11 digit DID from Voicepulse and the “Called Party” is extension of the IP phone you want to route the call to.
At this point, you should be able to receive both inbound and outbound calls to your Cisco IP Phone.