FreePBX Cluster

  • Status: planning

This should probably be a module, that would be somewhat integrated with trunks. The idea is you can link to another FreePBX server, and it would share the dialplan. When you view extensions, it should show extensions from all linked servers, but greyed out or otherwise indicating "from server 2".

The goal is to support connecting a bunch of branch offices, not to provide 'hot backup' or high-availability failover. Each SIP/whatever device is still connected to only one freepbx system, it's just that the freepbx systems can all talk to each other - route calls, directly call extensions on other boxes, etc.

It would be possible to set any target (timeout of an IVR, ring group, etc) to point to anything on the other servers, not just locally. It should also link in the directory application, so it will provide names from any server.

Please keep this goal in mind while developing modules so that it's not a ton of work to rewrite stuff later to support this.

DUNDi

Would it be appropriate to use DUNDi for this? A DUNDiModule is being discussed

--

It would be nice if the interface for this is extremely simple: the module generates a key pair for your system automatically.. when you want to cluster two systems, from either one of them you tell it how to get to the main freepbx web page (http://site2.com/admin). it then goes out and grabs a specific page (ie, http://site2.com/admin/cluster.php?origin=site1&action=add) that does two things: grabs all the peering info required to add a dundi peer (the public key), and sends the same info to site2. They can use this method to exchange routes/extensions (it doesn't seem possibleusing the dundi manager interface).

Security will be an issue, so we'll have to figure out how to handle that.. provide a username/password for site2.com would probably be the simplest.. or we could implement a queue, so when you log into site2, it says "site1 requested being added to a cluster. allow? yes/no". Password thing would work well for a bunch of sites where one person has admin access on all the boxes, queue would be better for different people being administrators and not having access to each other's systems..

To clarify, we are talking about sharing dialplans between servers, in a multiple branch office-type setting. Extensions could dial each other, calls could be placed out routes on other systems, incoming calls could be transferred to extensions on other systems, etc. A device could NOT just connect to any server in the cluster, only to the specific machine it's assigned to.

Examples from the manager interface for DUNDi:

pbx01*CLI> dundi show peer 00:0c:29:31:3b:1e
Peer:    00:0c:29:31:3b:1e
Model:   Symmetric
Host:    66.xx.x.xxx
Dynamic: no
KeyPend: no
Reg:     No
In Key:  xxxxxxxx
Out Key: yyyyyyy
Include logic:
-- include priv
Query logic:
-- permit priv
Last few query times:
-- 1. 2101@priv (48 ms)
-- 2. 2001@priv (49 ms)
-- 3. 2001@priv (74 ms)
Average query time: 57 ms
pbx01*CLI> dundi query 00:0c:29:31:3b:1e@priv
DUNDi Query EID succeeded:
Department:      Family
Organization:    xxxxxxxx
City/Locality:   Wilson
State/Province:  NC
Country:         US
E-mail:          xxxx@xx.xx.com
Phone:           +1252xxxxxxx
IP Address:      66.xx.x.xxx

What needs to be done?

  • GUI interface for configuring the freepbx cluster (setup key pairs, relevant info)
  • Remote API for connecting to another box and getting keys and info needed to setup DUNDi peer
  • FreepbxClusterSharing for getting available extensions and routes, keeping them updated and inserting them into local dialplan

My customer needs it NOW! [DundiClusterHack] - nicotine's saga to get a cluster working prior to framework being in place.