Is your edge router/firewall/switch configured correctly creating a path to the PBX Server?
Can you ping the Sip Trunk server from within the PBX Server?
Have you done a trace-route from the 3cxPBX to your Sip provider?
Have you asked your sip provider to run a trace back to you? (this on is specially great!)
Here is how I resolved the issue
It happened to me also, make sure that your edge router/firewall is allowing ports 5060/5061... and so on through. I have to create a path thru our edge security to the internal switches and hit the 3cx PBX. Once I did that I had to contact my trunk provider to run a trace, to their server and it showed 3cx refuting connection due to credential disparate between the sip provider and 3cx.
My Environment:
Server-2019 (all service packs)
Cisco Edge
Cisco Switches/Routers
Isolated Virtual Net