Solved SIP trunks do not register on startup until firewall checker is run

Status
Not open for further replies.

dj403

Free User
Joined
Feb 13, 2020
Messages
14
Reaction score
1
3CX 16.0.493 running on Debian, provider trunk does not come up automatically on a restart or power up. Provider is VoIP.ms. After running the firewall checker trunk comes up and stays up, everything else works great. We have dynamic IP internet service and 3CX is configured for it. FQDN resolves to the correct IP address and it shows same in the dashboard.

In the logs found this entry after restart and before running firewall checker::
-----------
STUN server stun-us.3cx.com:3478 could not be reached (host name is not resolved).
It could be that the STUN server you are using is down or a network problem is preventing STUN resolutions.
-----------
 
Hello @dj403

Your issue might suggest that not all services are running when the trunk tries for register after a reboot.
Next time this happens check that all 3CX services are running through the dashboard and then navigate to SIP Trunks, select your SIP trunk and click on "Refresh Registration".
Refresh the page and check if the trunk is now registered.
Also does the firewall checker pass?
 
Verified that all services are running after reboot -all are green - when the trunk is not up. 'Refresh Registration' did not make any difference. Ran the firewall check and trunk came up.

The firewall checker passes everything except the tunnel proxy on 5090 but we do not have the port open because we have no outside phones or sites. We have tried opening the port a few days ago to see if it made a difference but it does not.
 
I also verified that stun-us.3cx.com can be resolved correctly from the shell prompt after reboot when the trunk is still down.
 
You mention running Debian but not what the hardware/VM is or whether it's vanilla Debian with manual 3CX install, install from 3CX ISO, or if it is dedicated to 3CX or there is something else on the box.
 
Install is from the 3CX ISO and it is the only application on the box.

Hardware is a Lenovo M92Tiny. i5,8gb,128gb SSD. Mix of Yealink T42 and T46 phones 10 in total.
 
Does the activity log / Event log say anything regarding the trunk registration after the reboot? Also try restarting the SIP service through the management console (no the entire machine) next time this happens and see if that solves the issue. If it does it might point us to the right direction.
 
Restarting the SIP service in the management console brought the trunk up.

There is nothing in the logs about the trunk in the logs after the reboot when it is not working. I noticed that when trunk is not registered there are no failed attempt to register on the trunk.
 
It sounds like the network interface is not yet up at the time of the SIP server startup.

Restarting the SIP server allows it to re-bind to the active network interface (hence it starts working).

You may have to delay the startup of 3CX services in this case to allow some time for the interfaces to be ready in case this is something that always happens at reboot.
 
How can we delay the service(s) on startup?
 
Please take a look at this older post here and add the line for sleep 60, and see if this helps. If not, then revert the change.
https://www.3cx.com/community/threads/sbc-on-debian-8-how-to-delay-service-start.51099/

Make sure you take a backup off the machine first before any modification is made, just to be on the safe side

Note: This delay will also affect you if you restart services, while the system is running under normal conditions.
 
Last edited:
The startup delay fixed it.

Rebooted the server several times including cold/power off and the trunk now consistently comes up with the server.

Thanks!
 
Glad to hear!
 
Status
Not open for further replies.

Forum statistics

Threads
111,938
Messages
589,836
Members
164,821
Latest member
M_R