Trunking question cucm <> freepbx <> itsp

Hi, I’ve been browsing these forums for a little while. I’m new to freepbx / Asterisk but have some experience with Cisco VOIP.

I am confused and going around in circles a bit, trying to translate knowledge of Cisco into the freepbx.

To put it simply, at the moment I have the following:
CUCM 2-node cluster <-> Cisco CUBE <-> SIP ITSP

And I am trying to achieve the following (basically swapping the CUBE for freepbx):
CUCM 2-node cluster <-> Freepbx <-> SIP ITSP

freepbx will not register any phones / endpoints at all.

I have inbound and outbound calls working via freepbx, so from ITSP to CUCM-registered phones and from the cucm phones to ITSP. But I am a bit confused about the trunk/inbound/outbound routes.
Freepbx does not register any endpoints here, it’s just allowing CUCM to send and receive calls from the ITSP.

Firstly I configured 3 x trunks on freepbx:

  1. SIP trunk to the ITSP
    2 I then configured 2 x SIP trunks to each cucm node.

After that I configured 2 x outbound routes. 1 to the ITSP with a string of XXXXXXXXXXX to match a 11-digit number. A 2nd outbound route, pointing to the CUCM trunks matching 5XXX for the internal 4-digit extensions.

I was then able to call from a cucm phone to a 11-digit number via freepbx.

So first question, does creating the outbound routes also then match as inbound call legs? Or is there a ‘default’ call leg?

Inbound calls from my mobile phone were not working at this point as expected. So I then created an inbound route, matching the DID of my ITSP phone number. The destination is set to “trunks” and I set the main active node of CUCM as the destination trunk (in Cisco, the active member isn;t normally the primary node fyi).
After doing this, inbound calls are now working which is great.

The next issue is that if the active node goes down for any reason, freepbx is configured only to point to that node so will no longer be able to route calls to the cucm cluster which may be up and working. I have googled around for this scenario and is the only way to achieve resilient trunking by using “ring groups” ?

For digit manipulation I am doing this in a few places and it is a bit confusing.
First place is on the trunk towards CUCM. On there I am matching the DID and replacing with a 4-digit extension which is registered to CUCM. The call goes through as expected. I am using the prefix and prepend fields for that.
In contrast, for calls towards the ITSP I am using the outbound route to remove the trunk code and leave the dialed number. Basically I am stripping the leading dialed digit and leaving the rest.

My only other question is for the digit matching for the outbound calls. At the moment I am using 11 X’s which only matches 11-digit numbers. I think that I would like to match any number here. Because the call will come in over a trunk from cucm, I shouldnt need to wait for an interdigit timeout (because the call is not accepted from an endpoint). How would I go about this? Could I simply use a dot ‘.’ in the match pattern? Or would it be better to use .X or X. (notice the position of the dot). Reason for this would be so at least a dialled number is matched but looking at the “dialed number manipulation rules” config page it says the . matches one or more and the X matches any single digit.

Thanks in advance and excuse the questions. If there’s some info contained in a document that I have obviously missed / not found, then please post here? I am happy to go away and read some docs.

Lastly, when trying to find out how to set the inbound trunk to route towards two destination internal trunks, I found some posts suggesting a SIP proxy might be more useful, given the above should I be looking at a SIP proxy instead?

Thanks
Tony

No. Inbound and outbound call processing are largely separate and distinct.

For testing, create an “any/any” inbound route (no DID, no CID) so that everything that hits from server from the ITSP will be handled.

You should be able to set up the outbound route(s) for the extensions to point to both clusters. If the call fails on the first cluster, the outbound route will try the next trunk(s) until it gets through or exhausts the trunk list.

For purposes of outbound routing and dial manipulation rules, you can use any of several approaches, including something like “XXXXXX.” so that your five digit extensions never match an outbound call. There are literally dozens of ways to get this working, none of which is really preferable to another.

A SIP Proxy might meet your needs if, and only if, the FreePBX server is only doing call routing. If you are doing anything else (like adding and implementing Chan-SCCP-B to support your Skinny phones directly) then something like a proxy might be the solution.

Hi Dave thanks for your reply!

I created an inbound route for internal to external calls, matching on the CID as you mention inbound routing needs to be explicitly defined.

Regarding the resilient outbound routing part, I have an outbound route pointing to both CUCM servers but it’s the inbound that’s the confusing part (inbound from the ITSP). I have created an inbound route and at the bottom of the first page there’s “destination”. The only viable option that I can understand there is a destination of “trunks” but it allows selecting only one trunk. I’ve tried having no destination set (inbound call fails) and I’ve tried to duplicate the inbound route so I can have different destinations but you cannot duplicate the route with the same number match pattern (DID/CID).

Regarding dial plan matching for any number, I’ve tested successfully the number pattern of ".X’ as well as “X.” . I think X. will be sufficient for this.

Thanks for the info around sip proxy / freepbx capability also! Very helpful :slight_smile:

So in summary I think I am about good to go, it’s just the inability at the moment to resiliently route inbound calls from the ITSP, towards the internal CUCM cluster. If anyone has any advice on this part I would be extremely grateful.

This is where that “ring group” might come in handy, although I don’t know if it would actually do what you are wanting.

If you set up a ring group with all of the extensions you want to send to calls to in it, you can use the normal “from-internal” context to send to calls to the outbound (local) trunks, which will then use the resiliency you are looking for. Set the outbound route up so that it chooses your local trunks and only sends call to your extensions.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.