Dear Ecki,
I understand what you say. The reason i didn't implemented this is because of the following scenario in our production floor:
- Agents log in using the Genesys Agent Desktop (lets assume here that it is sending the custom KVP here)
- Stat server acknowledges the same and increases the count of total number of agents logged in
- When the agent wants to log out, he has two options, press Logout button on Genesys Agent Desktop or press the "Hook" button/ Headset button on the AVAYA phone because it too triggers logout event via ACD
- If the agent presses the Logout button ---- NO ISSUES, as we can again send a KVP for stat server to decrement the count
- If the agent presses the "hook" button or the headset button, the agent still logs out (called Hard logout) but our stat server does not receives any custom KVP to understand that a Genesys agent has logged out.

Another scenario is where, lets say, there was a PC problem and the softphone was terminated forcefully.
So here in this scenario, the count on stat server increases but on logout, we might not be able to decrease the count.
Please note, i have about 1600 seats with a total of about 3500 agents working in shifts. And about 99% of agents use Hard logout instead of using the logout button on softphone.
CHEERS!!