Adding a node to a cluster: Difference between revisions

From MiRTA PBX documentation
Jump to navigation Jump to search
No edit summary
No edit summary
Line 19: Line 19:
ps_contacts => odbc,asterisk2,ps_contacts_srv01,2
ps_contacts => odbc,asterisk2,ps_contacts_srv01,2
</pre>
</pre>
* Reload the extconfig module, if needed
* Edit Admin/PBX Nodes and add the new node.
* Edit Admin/PBX Nodes and add the new node.
* Edit /var/lib/asterisk/agi-bin/devstate.conf.php on all the nodes and list all the nodes IP. Restart devstatesender and devstatereceiver on all nodes.
* Edit /var/lib/asterisk/agi-bin/devstate.conf.php on all the nodes and list all the nodes IP. Restart devstatesender and devstatereceiver on all nodes.

Revision as of 10:20, 7 August 2020

if you want to add a node to an existing cluster, proceed in installing the new node as usual. The new node needs to share the same database as the other nodes. You can install a MySQL Multimaster with the other nodes or just connect to their database. Once done, these are the steps to do:

  • Configure manager.conf to allow connection from all other nodes. You need to configure the manager.conf on the new nodes with the IP of the other nodes and add the new node IP to manager.conf in other nodes.
  • Configure sip.conf to allow connection from all other nodes. You need to configure the sip.conf on the new nodes with the Peers from other nodes and add the new node Peer to sip.conf in other nodes.
  • Enable sipregs configuring it in include/db.inc.php
  • Edit /etc/asterisk/extconfig.conf and configure the sipregs hookup like the following. srv01 in this case is the short name for the server
sipregs => odbc,asterisk1,sipregs_srv01,1
sipregs => odbc,asterisk2,sipregs_srv01,2
  • Edit /etc/asterisk/extconfig.conf and configure the queue hookup like the following. srv01 in this case is the short name for the server
queue => odbc,asterisk1,queue_srv01,1
queue => odbc,asterisk2,queue_srv01,2
  • Edit /etc/asterisk/extconfig.conf and configure the ps_contact hookup like the following. srv01 in this case is the short name for the server
ps_contacts => odbc,asterisk1,ps_contacts_srv01,1
ps_contacts => odbc,asterisk2,ps_contacts_srv01,2
  • Reload the extconfig module, if needed
  • Edit Admin/PBX Nodes and add the new node.
  • Edit /var/lib/asterisk/agi-bin/devstate.conf.php on all the nodes and list all the nodes IP. Restart devstatesender and devstatereceiver on all nodes.