How to create Third Party Chat Control application?

Hi

I want to create a Third Party Chat Control Application using Smack API, just as there is a Third Party Call Control in SIP.

This would mean, that user A, can initiate a chat session between User B and User C. While User B and User C are chatting, User A will not chat, but should be able to get to know when the chat has been finished between the users and should also be able to get all chat messages. But, User A should not be visible to User B and C.

I hope this explains my problem. Please suggest the approach I should use to achieve this.

TIA.

Regards,

Aman