// connect to the XMPP server. Don't log in yet.
XMPPConnection connection = new XMPPConnection( host );
connection.connect();
// derive stun and turn server addresses from the connection:
StunTurnAddress sta = StunTurnAddress.getAddress( connection );
// create an ice agent using the stun/turn address. We will need this to figure out
// how to connect our clients:
final IceAgent iceAgent = new IceAgent(true, sta);
// setup our jingle stream manager using the default audio and video devices:
final JingleStreamManager jsm = new JingleStreamManager(CreatorEnum.initiator);