3cx on two ISP lines

Status
Not open for further replies.

Sensei

Free User
Joined
Jan 22, 2021
Messages
7
Reaction score
0
We have first ISP #1 with static outer address, that never changes. 3cx is commercial and working well. But sometimes our ISP #1 fails. We now have second ISP #2 line with dynamic address that always changes. We made automatically switch internet in our router (Mikrotik) - is takes about 30 seconds to change ISP line from #1 to #2 (and back). Outer IP address also changes, of course. After ISP #1 recovers from crash - then ISP line #2 (inside - 192.168.2.1/24, outer address - dynamic) changes back to ISP line #1 (inside 192.168.0.1/24, outer static). QUESTION: How to make 3cx to work on reserve line (at least receive and send calls) and then back on restored main line? Thank you beforehand.
 
Move it to the cloud :)
 
  • Like
Reactions: Sensei
Move it to the cloud :)
Good idea in fact, but... I also want everything to work inside company without Internet, we are industrial factory with hardware phones (and several soft-phones, but these are not so important while crash time). Personally I think, that access to Internet - is not stable thing. And my internal network and server room - are much-much better then any cloud. While no Internet - we can call each other. This like on war :)))) enemies are outside :)))) If to say true, we do not have any cable connected to the factory. All by air - that are not so stable, as fiber. We are in the real field (I see forest and tractors from my windows) and no any wires in 5 km from us. So, we use WiFi bridge and LTE Bridge. WiFi better, LTE not so stable, has not so good ping etc, speed vary from people's load. But LTE is the best reserve channel (#2). For current time I even do not know if LTE provider can give us static address.
 
Last edited:
The TTL for 3CX hostnames for Enterprise licenses is 5 minutes I believe, vs. 6 hours for Pro and Standard.

When the Internet fails over is 3CX not connecting your SIP trunk? I would think that part would work for everyone in the office, and the issue would be people outside the office trying to connect using the hostname that is still pointing to the old IP.

We host our clients in our data center so the IP doesn't change.
 
The TTL for 3CX hostnames for Enterprise licenses is 5 minutes I believe, vs. 6 hours for Pro and Standard.

When the Internet fails over is 3CX not connecting your SIP trunk? I would think that part would work for everyone in the office, and the issue would be people outside the office trying to connect using the hostname that is still pointing to the old IP.

We host our clients in our data center so the IP doesn't change.
I not tried still. Today will forward ports on the ISP#2 line. Maybe it will reconnect successfully via ISP#2. The problem would only be the dynamic IP. But I have cloud address of the new Microtic (I think, it will change quickly), so I can add it as "out of office" address in 3cx software client (as you know, there is possible to add internal and external address, but internal I also can give as FQDN name because of I added to DNS its name inside organisation, so inside and outside address by ISP #1 line are the same strings, and I can use second string for the second ISP#2 dynamic cloud name. May be...only minds. Will try. The purpose of my post is to find correct way of how people do this and not to design bicycle.
 
I have a question, you SIP Trunk is it Registration-based (you need username and password) or IP-based?
Also will your SIP Trunl provider allow you to make/receive calls from any IP? Because if you switch to ISP #2, the IP will be random.

This is the first and most important question.
 
I have a question, you SIP Trunk is it Registration-based (you need username and password) or IP-based?
Also will your SIP Trunl provider allow you to make/receive calls from any IP? Because if you switch to ISP #2, the IP will be random.

This is the first and most important question.

My VoIP provider require registration. My provider allows me to connect from other IP-adresses (ISP). My IP by second line (ISP #2) is random, yes.
 
Added.
I forwarded ports on router from ALL WAN interfaces group (ISP#1 and ISP#2) to 3cx server PC, so settings inside are the same by two lines. By ISP#1 line I can open RDP connection from outside to router on it's static address (it is set as FQDN now), but by ISP#2 line - I cannot - by it's dynamic cloud IP, which changes enough quickly (this is Mikrotik cloud). Why I cannot paththrough my LTE (ISP #2) device - I do not know still, working on this. Of, course, it should be exact "clear" line to reach 3cx server from outside phones, like 3cx software mobile clients.
 
So you have priority #1, make sure NAT/Port Forwarding works correctly for both ISP#1 and ISP#2. The way you could do this is:
  • Make sure your Mikrotik is using ISP#1 --> Run Firewall Checker
  • Make sure your Mikrotik is using ISP#2 --> Run Firewall Checker
Both need to pass. Firewall Checker information can be found here: https://www.3cx.com/docs/troubleshooting-firewall-checker/

Once you can get this sorted out and everything is green, what you could do is go to Settings --> Network --> Public IP tab, and here switch to "Dynamic Public IP".
I would suggest setting the Query STUN interval at 300s (5 minutes).

This means that if the Mikrotik switches to ISP#2, it will take up to 5 minutes to detect the new IP, and then you need to also wait for your SIP Trunk to re-register (depends on SIP Trunk re-registration interval).

Note: DO NOT set the interval any lower because you are in danger of our STUN server blacklisting you for too much traffic.
 
Status
Not open for further replies.