You didn’t mention if there is a firewall between the SPA400 and the internet, or if VitalPBX is on the same LAN as the SPA400, and/or if there is a firewall between those.
Another thing you could try is to lower the thresholds in the SPA400 for reregister or keep-alive values.