Updating the server IP

The ADMIN_update_server_ip.pl script should be run to update the servers ip address. The interactive mode prompts you for 2 things:

  1. the old ip
  2. the new ip (current ip of the machine)

If your unsure of what the old ip is copy the queries in the section marked # check DB for old ip and paste into a mysql client. You should perform an interactive server ip update to the current ip of the machine for every different ip address you find from the query above even if it contains something like 127.0.0.1:MASK, the entire string should be used as the old ip.

If you want to perform this manually or in your own script you can make use of the queries in section #OR edit these and run in any mysql client to set ip manually.

# run this script in "interactive mode", say "y" when prompted", to update server ip
/usr/share/astguiclient/ADMIN_update_server_ip.pl

# check DB for old ip:
SELECT server_ip FROM servers;
SELECT server_ip FROM phones;
SELECT server_ip FROM inbound_numbers;
SELECT server_ip FROM server_updater;
SELECT server_ip FROM conferences;
SELECT server_ip FROM vicidial_conferences;
SELECT server_ip FROM vicidial_stations;
SELECT server_ip FROM vicidial_remote_agents;
SELECT server_ip FROM phone_favorites;
SELECT server_ip FROM vicidial_server_trunks;
SELECT server_ip FROM vicidial_server_carriers;
SELECT server_ip FROM vicidial_inbound_dids;
SELECT server_ip FROM vicidial_process_triggers;
SELECT server_ip FROM servers;

# OR edit these and run in any mysql client to set ip manually
UPDATE servers SET server_ip='129.232.154.247' where server_ip='129.232.154.247';
UPDATE phones SET server_ip='129.232.154.247' where server_ip='129.232.154.247';
UPDATE inbound_numbers SET server_ip='129.232.154.247' where server_ip='129.232.154.247';
UPDATE server_updater SET server_ip='129.232.154.247' where server_ip='129.232.154.247';
UPDATE conferences SET server_ip='129.232.154.247' where server_ip='129.232.154.247';
UPDATE vicidial_conferences SET server_ip='129.232.154.247' where server_ip='129.232.154.247';
UPDATE vicidial_stations SET server_ip='129.232.154.247' where server_ip='129.232.154.247';
UPDATE vicidial_remote_agents SET server_ip='129.232.154.247' where server_ip='129.232.154.247';
UPDATE phone_favorites SET server_ip='129.232.154.247' where server_ip='129.232.154.247';
UPDATE vicidial_server_trunks SET server_ip='129.232.154.247' where server_ip='129.232.154.247';
UPDATE vicidial_server_carriers SET server_ip='129.232.154.247' where server_ip='129.232.154.247';
UPDATE vicidial_inbound_dids SET server_ip='129.232.154.247' where server_ip='129.232.154.247';
UPDATE vicidial_process_triggers SET server_ip='129.232.154.247' where server_ip='129.232.154.247';
UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y';

Did you find this article useful?

Related Articles