Current sessions for a specific user

Hi all,

I’m trying to create an monitoring agent using smack. One of the goals of this agent is to list the amount of sessions (private talks between one user and others).

Is there a way to retrieve the number of sessions/chats, a specific user is having?

I’m using ejabberd.

best regards,