^^ That’s your problem. The symptom of the call only being usable within a short time is because the NAT ‘automatic’ forwarding is timing out. Ensure that you MANUALLY FORWARD THE REQUIRED PORTS (udp, ports 5060 and 10000-20000 inclusive) directly to the VoIP server.
Following the above advice I opened up the required ports started receiving all the incoming calls I tested. Within hours the server was attacked, trying to initiate sip connections from two different IPs.
I changed the sip binding port. Again incoming created problems, working sometimes.
Opened the above port in the firewall and incoming started to work again.
I have no external user / extension, why do I have to open the sip port for incoming connections?
If I configure the trunk directly on an IP / Soft phone it works without any port forwarding.
If there isn’t any other way without opening the ports, what are the best options to avoid such attacks?