Link 2 PBX servers

Hello everyone. I have a FreePBX server on a cloud VPS. It works perfectly, and I have a trunk set up with VOIP.ms, which is a great service for incoming calls but not good for outgoing calls as it is very expensive.

Since at home I have a Vodafone connection with a fixed number and the ability to make unlimited free outgoing calls, Vodafone provides SIP details to connect and use the number as VOIP. The problem with Vodafone is that it limits SIP connections to local only, so obviously I can’t add the Vodafone trunk to my FreePBX server hosted on DigitalOcean.

I have therefore decided to host a second FreePBX instance locally on a virtual machine, and it works perfectly. I have connected the Vodafone SIP to the local FreePBX and I can make calls.

I have opened ports 5060, 80, and 10000-20000 on my router.

Now I wanted to ask you how I can connect the two PBX servers together. Let me explain:
Server 1 (DigitalOcean) should communicate with Server 2 (Local) only to make outgoing calls with Vodafone (which is connected to the local server 2). Is there a way to do this?

Just of the top of my head, you’d need to create a VPN connection between both servers. Tailscale should work fine. Then on the remote (vps) machine, you create a trunk (over the VPN) to the “local” machine (possibly as an extension on the local machine). Then configure outbound routes on the VPS server to route outbound calls through this new VPS trunk. They maybe someway to creat an IAX trunk between both , but that’s not something I’ve ever done so can’t comment about it

Edit: Here’s the Sangoma KB article for interconnecting FreePBX using IAX2 trunks: https://sangomakb.atlassian.net/wiki/spaces/PG/pages/39060298

I’d have those setup over the VPN between both servers

I don’t want to set up a VPN on the server to avoid issues. Since I have installed FreePBX locally and opened the ports, I can access it from outside and make calls from outside using the Vodafone trunk that only works locally. So, I wanted to know if there was a way to set up a trunk on FreePBX hosted on DigitalOcean that connects to my local FreePBX and then configure the outbound rules for calls.

Already answered

feel free to substitute pj-sip trunks

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