You can programmatically subscribe to 3CX Call Control API events. These real-time events include when an extension is changed in some way. Presence changes are an example of a change that will fire the event. Unfortunately, the event does not tell you what property of the extension changed, so you have to independently track what the previous property values were and compare that to the new property values to identify what has changed. That's what we do with our tools to track presence status changes, We write these changes to a database so you can report on presence status changes.
We can track Presence Status changes so you can report, for example, how much time an agent has been in each presence status. This presence status reporting capability is included in our 3CX Custom Presence and 3CX Competitive Wallboard tools