Mitel 5340 rebooting

I have had my machine running for almost 2 years now and finally convinced the boss to let me migrate all of our phones off our Mitel 3300 to my FreePBX 13. For the most part everything has been smooth with one large exception. I have one phone that will work fine for a few days, then starts randomly rebooting. It is a Mitel 5340 running R8.0.1.06.00.13. I have one other of this same model that seams to be working fine, so here is the troubleshooting I have done.

Swapped the phone with a Mitel 5224, which works perfectly, and proves the network cable and PoE switch is OK.

Restored the phone to defaults and built a fresh config. I did this step from my house, the phone worked fine. Took it back and it worked for maybe a week before it randomly rebooted twice, then reboots every time as soon as it registers.

I have one other of this same model (5340) that has had zero issues, I swapped the two. The problem did not follow the phone, but the extension.

I reset the phone back to default and added it to my extension (running pjsip multiple endpoints on a single extension work beautifully) Phone worked fine on my extension. Simply changed the extension and password, phone reboots repeatedly as soon as it registers.

Brought the phone home, plugged it into my PoE switch, changed the IP address to the public so I can hit it from here, and its working fine again.

I suspect something is upseting the phone coming from the pjsip stack, but have no clue where to go to find it. The only thing I have seen in the log is endpoint unknown/endpoint available.

One other thing to note, I have a 5330 that worked flawlessly on my desk for months, once I changed over to pjsip is when it seams i started having reboot issues. I bought that phone off ebay, and have a cheap PoE switch on my desk so I chalked it up to one of those. Now I wondering if there is an issue with that phone and the pjsip protocol. I believe the 5340 and 5330 are the same phone with different number of buttons, same firmware.

If anyone has any insight with this issue please share, as the user that had this phone is begging for it back. I am scouring the googlebox looking for a way to pull logs out of the device itself and am coming up empty.