How now do so:
There are 3 groups of users:
1 - manual.
2 - 1 users
3 - 2 users.
You must configure:
1. User Group 1 (manual) should see the rest of the group (1,2,3) and send them messages.
2. User Group 2 (ordinary workers 1 office) should only see a group of management and not one more, even members of their own group.
3. User Group 3 (ordinary workers 2 offices) should only see a group of management and not one more, even members of their own group.
(This setting is on ejabberd is very easy)
OpenFire set to Windows 2008 r2, base SQLEXXPRES 2012