Multiple destinations for Inbound Route

I have a pair of FreePBX servers that act as call routers between PSTN SIP trunks and several other FreePBX servers.

I treat all the trunks as from-trunk and route the calls via Inbound Routes with trunks as the destination.

One of the issues I’ve found is that I can’t have a secondary destination (as I can with Outbound Routes). This can be a problem if the PSTN connection is full. I need a way to either route to an outbound route with multiple destinations or better yet have multiple destinations on the Inbound Route.

I have considered treating the calls from the other FreePBX servers as from-internal but I’d have to duplicate the tables in the Outbound Routes.

Any ideas would be helpful.

Thinking… You will need to set it to custom context which will change it to from-internal so it should automatically use the outbound route?

If I have to do that I’ll just change the trunk to from-internal. I just didn’t want to set up the dial patterns twice.

I’m not really familiar, i was just thinking out loud.

No worries. I’m just trying to save myself some extra work.

Are there too many other considerations in play to try something more purpose built for routing, like Kamailio?

https://www.kamailio.org/w/

I’ve been wanting to try out this purpose built router GUI for Kamailio, but haven’t yet.

That’s interesting. I never even considered anything else since I’m most familiar with FreePBX. I’ll take a look at it.

Several people here, including @dicko have some familiarity with this particular solution set. He, specifically, has some experience based recommendations.

If you go this route, please share back how it goes.

A cheap and cheerful solution with a minimal but functional kamailio behind a nice GUI might be

a little headsup at

https://www.kamailio.org/w/2017/07/dsiprouter-gui-for-kamailio-sip-trunking/

If you are thinking about a paid solution, wouldn’t it be cheaper to port your numbers and go with SIP Trunks?

1 Like

@tgross should clarify what he means by PSTN SIP Trunks, if DAHDI then not kamailio, if ATA based then yes, kamailio/dsiprouter.

The only workaround I have used for this situation and I think would accomplish you goal is as follows.

  1. The incoming route needs to go to a ring group “MyNewRignGroup” instead of to a Trunk destination
  2. The Ring Group can contain your multiple destinations including external destinations.
  3. The Outbound route would then be triggered based on the dial pattern that you have in the ring group.

***Note that as expected based on the incoming call to your “call router boxes” being sent back out as as Outbound call you will get 2 rows in CDR etc. 1 as the inbound call and one as the outbound call.

I’m thinking the easiest thing to do since I’m pretty heavily invested in this already is to simply change the SIP trunk contexts from my pbx boxes to from-internal and duplicate the dial patterns in the Outbound Routes.

@dicko forgive my use of PSTN as it was the wrong acronym. My SIP trunks come from the same provider as our POTS and PRI circuits so I was using the term generically.

Please let us know the results

So I duplicated the dial patterns in outbound routes and changed the trunks from my PBX servers to from-internal and it works just fine. Should have just done that from the beginning.

1 Like

What did you put in your Sip Settings>PEER Details for the trunk?

On the incoming tab I changed context=from-trunk to context=from-internal.

2 Likes

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