Same user connecting to different servers

Hello, All!

I’m designing system with some XMPP servers (one per office) each behind firewall with only s2s ports opened.

Also all users visit all offices and need to be able to communicate each other.

How can I allow each user to connect any server and get online??

How will be message/stanza routing between user, his “guest server”, his “home server” and any of his contact server?

All connections from users computers are allowed only to local office server and are prohibited to other servers.

My thoughts after some reading and searching:

  1. I need using domain and subdomains for trusting servers each other.

  2. Each user should have a different resource for his communication from each office.

  3. Also I need to be available DNS service for all servers with all server records.

  4. Authentication will be proceeded at “home server”.

Thank you.