This is something that i cant figureout what is going on and its really driving me crazy.
I have a very simple setup, 2 gateways with diferent distance so it works as a failover, 2 networks and 2 switchs, one for each. Recently we started using a sip trunk on our 3CX server, i just cant use my main gateway for it, if it registers, it will only work for a few hours at best, and then will loss registration and will never connect again. It goes unreachable.
So im using a mangle rule to force all outbound traffic to the sip provider IP route via the 2nd gateway, this works, mostly, but every now and then it will losse connection refuse to register, afer several days.
For a time i belived this to be a issue with my 1st gateway, maybe something is blocking VOIP traffic for 5060 port, as the sip trunk is using the default port.
But now i realise im having a similar issue with some of my external extensions, some (not all) of the external extensions has a timeout problem attemping to connect to my 3cx server using UDP, offcourse im using not standart ports for VOIP. But this is the strange thing, it is random, it may work for a while and it does unregister and never register again, and at the same time, all other external extensions conecting to the same UDP port have no issue.
I see in the firewall the packets coming from outside from those extensions but they never get to the server... on the server it recives nothing.
And this is the fun part... as the voip server support both TCP and UDP, switching the transport type from those extensions from UDP to TCP fixed the issue.
I dont understand, the packets are getting dropped on the mikrotik nat? This is very strange.