"Roaming" extensions between two FreePBX/Asterisk systems


What I’m trying to do is create an environment where two FreePBX/Asterisk boxes can exist with the same set of defined extensions. A given user extension can then register itself with either of the systems.

That part is easy enough - worst case, define everything twice.

The next requirement is to have a user extension on system A be able to dial a user extension that may be on either system A or system B. The dial plan will have to check first to see if the user is present on system A. If so, it proceeds. If not, it needs to check a trunk that is established with system B to see if the user is present there.

Ideally I’d like to do this within FreePBX so that the GUI is available for all of the other configuration aspects. But, I’m willing to accomplish this manually with Asterisk if that’s what it takes.



check the extension state


then perhaps conditionally use channelredirect


You could also use callforward-unavalable but either way your problem will always be one of preventing “call looping” and the GUI solution pretty well guarantees that will happen. You would need to add a counter to the asterisk database for those extensions and query the state of the “loop count” to choose voicemail instead of a possible infinite loop. Arbitrating between two asynchronous systems as to who gets what I will leave as an exercise, I suggest you might want to explore a real Sip Proxy (Kamailio perhaps) for how it can be done “properly” , (yes you can happily have a proxy in front of both of your Back2Back Asterii, just register both your roamers and your PBX’s against the proxy, it is simple and seemless.