Trunking 3 FreePBXs together

Hello everyone .

Im trying to make a interconnection between our 3 offices that run FreePBX as the phone system and i cannot come upt with the Correct solution .

Lets explain our cfg .

all 3 offices have the “public” number that our customers can call , provided from our ISP , Comes in as a trunk that i register , then with inbount routes and ring-hunt grups the correct extention gets dialed. easy .

And we want to add the ability to have internal calls (eg Sales from Office one (ext 101 ) to call technicians of office 3 (ext 101) etc

all 3 offices have ipsec tunnels connecting their networks and we can share resources .

Now , have read the docs about how this is usualy done , but honestly i got confused.
Confused on both how to make the trunks , how i could handle calles within the company etc .

Firstly i found out about IAX , based on the name seemd appropriate for the job (Inter-Asterisk eXchange) i made a iax2 trunk based on info i found online and i was able to call extention 101 from Office one to 301 of the 3rd office . i though i was done but some posts i found online said that iax2 is deprecated will soon be removed and in the future this trunking sould be implemented with SIP .

Changed over my test System to SIP and i had issues , where the trunk would not register back up after a outage ( i had a couple of times that our IPsec tunnel whent down , and the only way i was able to get the 2 PBXs to “talk” was to reset firewall states on all the routers involed …

Can you guide-point me to how to implement this the correct way / reliably , plus give me some more info that i could read into to get a better understanding of the implementation .

Thanks in advance .

I had a similar situation before, where I had 3 PBXs all connected via a trunk. I actually just consolidated them last summer. The main difference was mine was built without common extensions so there were no duplicates.

I can’t speak to your network setting so much, but the SIP trunking should reliably communicate back and forth. Are you building Chan SIP or PJSIP trunks? It would be interesting to see your settings either way.

I believe an option you could use:
Office 1 PBX has trunks to Office 2 and Office 3
after the trunks are up, head to outbound routes and name a new route Office 2
once in there set the sequence match to be the office 2 trunk you created.
Then, go to Dial Patterns and enter a prefix For example: “9” and a match pattern of “1XX”
Then do the same for Office 3 just using a different prefix like “8”.

Essentially doing the same thing amongst the other systems respectively, you can use any prefix that works for you assuming you avoid pattern conflicts, and rank your outbound routes ahead of others, you may also mark the extensions as intra-company which will preserve the internal CID. Can’t think of if there is a way to also preface the CID like: : “Off. 1 - 101” if it were to call office 3. It may just display as 101.

PJSIP Trunks are super simple, you just enter the IP of the partner PBX.

If you want to continue using IAX, see the documentation here:

Most people who connect multiple PBXes, usually avoid using the same extension numbers on more than one system, for this exact reason. For example, they would use 1XX on PBX-A, 2XX on PBX-B and 3XX on PBX-C.

What you can do is, say you are on PBX-A and want to dial 101 that is on PBX-B, then you can have users dial 2101 and on the outbound route to PBX-B remove the leading 2.

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