SIP Router for Multiple Sip Trunks when provider allows only 1 endpoint

Maybe Kamalio can help me?
I would like to know if anyone has any experience they are wiling to share regarding similar layouts. Please consider this a general request for information not a “help me please” or “show me how” though any nudges in the right direction are welcomed. Google is full of how to start your own Asterisk Cluster with integrate all the things functionality. That’s sounds likely a wonderfully fun 6 month to 10 year development project, but its not going to help with my current needs :smile:.

What I have:
3x FreePBX systems (1 of which is an HA system so 4 Physical Servers)
2x Plain Jane Asterisk servers
3x Sip Trunks

What I want to do:

  1. I want to use another server (or 2 for HA) and have all of my sip trunks connect to this one server.
  2. I want all of my Asterisk/FreePBX servers to connect to this new server as the Trunk
  3. I want to route inbound calls by DID to the appropriate FreePBX server [No Load Balancing just distribution]
  4. I want to load balance outbound calls across my sip trunks [Distribution would work just fine too]

Notes:
Sip Phones WILL NOT register through this endpoint. This is only for SIP Trunks.
That may come at a later date/time, but I’m not interested in doing it now.

Why:
Short Version: Problem Created by a Manager

Long Version: My sip trunk vendor is unable or unwilling to allow me to connect multiple endpoints for my SIP Trunks. I am unable to convince Management to change vendors. I need to add more servers to support operations, but am unable to add more endpoints for sip trunks. Testing has proven that my existing FreePBX servers are unable to support their existing load plus the additional traffic being adding by the 2 additional Asterisk Servers.

As I understand things it would be possible to do this with Asterisk or Kamailio.

A sip router/proxy can do that for you, absolutely Kamailio will be able to, also decent Cisco and other “regular” routers that speak SIP. Asterisk does not do that well as it is a “Back-toBack User Agent” . You can use Corosync/Pacemaker to present a cluster of Kamailii on one IP address or step up to BGP if necessary. Have your VSP’s send calls to that address and have your Asterii trunk to that ip, load-balancing, inbound DID routing and outbound routing would be handled by the Kamailio cluster as appropriate.

Corosync/Pacemaker were on my list to make the Server HA. There’s going to be a learning curve there :frowning:

I hadn’t thought of using a Cisco router for this.

I’ll add that to the list of options.

Thank You very much for that.