SPA3102 periodically switches to random port

I have Asterisk running on my Ubuntu server (which runs remotely at a data centre). I have 5 Linksys SPA3102 units running at 5 locations all connecting to Asterisk through different ADSL routers. Having read endless guides and howtos etc it now all works (most of the time).

However, for no apparent reason, every now and again one of the SPA3102s (not always the same one - and sometimes two at the same time) will suddenly switch port causing it to in effect go offline.

I know this because I run ‘sip show peers’ and where as working devices will show PORT 5060 & 5061, any devices which have mysteriously gone offline will show some random port number usually in the RTP range 50,000 that sort of thing.

Once this happens, the only way to bring it back online is to reboot both the SPA3102 and the Router. This maybe a NAT issue, but it works 99% of the time. The units go offline perhaps once or twice every couple of days.

Please help me, I’m so close to having an excellent phone system!