Difference between revisions of "Additional Asterisk Server"

From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with 'In order to add an additional Asterisk server to your system: <br><br> '''1) Create a new MySQL User in Database server for the Asterisk:''' CREATE USER 'mor'@'IP_OF_ADDITIONAL_…')
 
m
Line 10: Line 10:
  mcedit /etc/asterisk/mor.conf
  mcedit /etc/asterisk/mor.conf
''hostname=localhost''  change to  ''hostname=IP_OF_DATABASE_SERVER''
''hostname=localhost''  change to  ''hostname=IP_OF_DATABASE_SERVER''
<br>
''server_id=1''    change to  ''server_id=2''
''server_id=1''    change to  ''server_id=2''


Line 17: Line 18:
  mcedit /var/lib/asterisk/agi-bin/mor.conf
  mcedit /var/lib/asterisk/agi-bin/mor.conf
''host = localhost''  change to  ''host = IP_OF_DATABASE_SERVER''
''host = localhost''  change to  ''host = IP_OF_DATABASE_SERVER''
<br>
''server_id = 1''  change to  ''server_id = 2''
''server_id = 1''  change to  ''server_id = 2''
   
   

Revision as of 06:22, 25 August 2015

In order to add an additional Asterisk server to your system:

1) Create a new MySQL User in Database server for the Asterisk:

CREATE USER 'mor'@'IP_OF_ADDITIONAL_ASTERISK_SERVER' IDENTIFIED BY 'mor';

GRANT ALL PRIVILEGES ON `mor`.* TO 'mor'@'IP_OF_ADDITIONAL_ASTERISK_SERVER' WITH GRANT OPTION ;

Change the IP_OF_ADDITIONAL_ASTERISK_SERVER to your Asterisk server IP.

2) Change Asterisk configuration files on Asterisk server:

mcedit /etc/asterisk/mor.conf

hostname=localhost change to hostname=IP_OF_DATABASE_SERVER
server_id=1 change to server_id=2

mcedit /etc/asterisk/res_mysql.conf (do not need to edit in fresh X5 installs)

dbhost = 127.0.0.1 change to dbhost = IP_OF_DATABASE_SERVER

mcedit /var/lib/asterisk/agi-bin/mor.conf

host = localhost change to host = IP_OF_DATABASE_SERVER
server_id = 1 change to server_id = 2

mcedit /etc/asterisk/res_config_mysql.conf

dbhost = 127.0.0.1 change to dbhost = IP_OF_DATABASE_SERVER

mcedit /etc/mor/system.conf

server_id = 1 change to server_id = 2

mcedit /etc/asterisk/manager.conf

after line "permit=127.0.0.1/255.255.255.0" add line permit=IP_OF_GUI_SERVER/255.255.255.0

3) Add the Asterisk server to GUI:

Open MOR GUI and go to SETTINGS > Billing > Servers. Add the Asterisk server here. All values can be left the same as MAIN server, but ID, Hostname and Server IP should be changed.