Automated failover - Script help

jebsworth

Silver Partner
Advanced Certified
Joined
Jul 17, 2023
Messages
6
Reaction score
0
Hey guys,

Just asking this in case someone has experience with this before I spend hours researching.

We currently have a Failover set up on our 3cx Servers. However our SIP trunk requires each node to report to a different IP address, so the SIP trunk knows which server is the active node.
However the backup/restore process overwrites the registrar/server IP on the SIP trunk, meaning if a failover happens, the SIP trunk cannot authenticate and will not failover traffic.

Does anyone know of a script we can run that will update the registrar/server IP automatically when a failover occurs. It's just 1 field that prevents this being seamless!

SIP trunk detail to update.jpg

If anyone has experience I will be greatly appreciative.
 
Hello @jebsworth,

You could try this:
Do not use an IP adres, but use an FQDN name as trunk reference.
Both will be the same, because of the backup/restore.
In the OS, add the FQDN name to the 'hosts' file, where the servers each will have differend IP addresses :)

Paulo
 
Hi,

Well @paulodagraca really should have you covered there, but as a thought just in case hosts file or internal DNS cannot be manipulated, it might be possible to have two trunks configured, each to a different IP of the provider, with each 3CX authorized for one of them. Setting outbound rules with both trunks as options in routing would be the only major config change needed. DIDs need only be on one.
 

Latest Posts

Forum statistics

Threads
111,961
Messages
589,953
Members
164,862
Latest member
ARTipsadmin