Interconnecting two FreePBX systems using SIP Trunks

Ok guys, what am I doing wrong?

I was unable to get IAX2 trunks working between two of my freepbx systems. Others have commented that perhaps this is due to one server being FreePBX 13, and one being FreePBX 14. They suggested I try SIP trunks.

Neither of my servers are behind our office firewall, although our telephony provider provides NAT for our phone servers.

I have a user setup on each server, named ‘ToAB’ with the same secret.

I have an SIP trunk on each server with only outgoing info.

The two servers can communicate over VPN (I can ping, and also get to web GUI for freepbx, from each office)

Server 1: 10.25.1.5 port 5160
Server 2: 10.0.1.69 port 5061

This is what I have for my trunk settings:

Server 1: 10.25.1.5

Trunk name: ToAB

PEER details:

host=10.0.1.69
Bindport=5061
username=ToAB
fromuser=ToAB
secret=<this is the secret of the user, ToAB>
type=friend
qualify=yes
context=from-internal


Server 1: 10.0.1.69

Trunk name: ToAB

PEER details:

host=10.25.1.5
Bindport=5160
username=ToAB
fromuser=ToAB
secret=<this is the secret of the user, ToAB>
type=friend
qualify=yes
context=from-internal

I also have an outbound route that looks for a dial like either 33XX or 22XX. The extensions on server 1 are all 200 extensions. The extensions on server 2 are all 300 extensions. The goal is that someone at Office 1 can call 3301 to get extension 301 at office 2. And someone at Office 2 can dial 2201 and get extension 201 at office 1. The outbound route uses the trunk I’ve setup, and is set to intercompany route.

When I attempt to call, I get a message: “The number is not answering”… or “all circuits are busy now”

Here is what the flow sequence shows from the source server:

I have also tried using port= instead of bindport=

I am now getting ‘All Circuits are busy’

Also, in SIP settings on both servers, NAT is set to yes with both having a static IP.

Also - here is the output of ‘SIP show peers’.

ToAB/ToAB 10.0.1.69 Yes Yes 5061 OK (39 ms)

ToAB/ToAB is my internal SIP trunk, and cbeyond-in is our provider.

On the other server:

ToAB/ToAB 10.25.1.5 Yes Yes 5160 OK (39 ms)

OK - It is working now, although not sure why.

However, When I set a dial pattern as prefix: 3 and 3XX it works. (Dialing 3301 gets extension 301 at the other office).

When I remove the 3 prefix, it doesn’t work. I get a busy signal.

Could it be that you already have 301 assigned to another extension/task on the sytem you are dialling from?
Personally i would just put a full stop (peroid) in the dialling plan for testing purposes as this allows anything, but only whilst you are testing!

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