Devices lose connection to logged in user

We have recently switched from extension mode to useranddevice mode. Everything is working fine, but after a while some of the devices lose their connection/relation to the user that is logged in to that device.

When you make a phonecall from such device, the receiving party will see the name of the device and not the name of the user that is logged in to that device.

When you call the user, the device will ring as if everything is fine. Querying which user is logged in, returns the users extension.

We have checked the Asterisk database and that is showing the following.

/AMPUSER/2119/device : 1317
/DEVICE/1317/default_user : none
/DEVICE/1317/dial : SIP/1317
/DEVICE/1317/type : adhoc
/DEVICE/1317/user : none

/AMPUSER/2111/device : 1336
/DEVICE/1336/default_user : none
/DEVICE/1336/dial : SIP/1336
/DEVICE/1336/type : adhoc
/DEVICE/1336/user : 2111

As you can see, for user 2111 everything is fine, where for user 2119 there isn’t a link to the user at device level.

So looking at the different macro´s, those are exactly doing what they should according to the Asterisk DB.

Where should we start to look to find out who/what is changing these database entries?

Nobody ever experienced this same problem and/or knows were to start looking?

Thanks in advance!