Incorrect call routing

I have a Freepbx version 16.0.40.11 Asterisk version 18.20.0. It has about 280 yealink phones, all setup as pjsip. Intermittantly the phones (not all) will drop off and reregister. After that a call that is for one of the phones that went offline will be routed to a different phone. The original phone is able to place a call but not recieve a call. The really interesting part is that if there is a Clearly Anywhere app paired with this phone the app will get the incoming call. the desk phone does not react at all to an incoming call. After some indeterminate time the deskphone will start to work again. This issue is totally random throughout the system. We have been unable to catch this in a pcap. CDR shows the call as normal. Has anyone seen anything like this. The AOR appears normal as well.

Thanks

Check your registration timeout on the yealinks and make sure it is less than the max timeout for the pbx. By default I think they may match which means no time for a delayed or sluggish registration. Ill verify the setting when I am at my desk sometime but just trim the reg time on the yealink so it happens well before it actually expires on obx side .

Are the phones remote to the PBX?

Yes the system is in a cloud.

Sounds like NAT/firewall is causing the issues.