if (existName(name)) {
session.terminate(403, "User " + name + " is already in the room. "
+ "Please select another name and try again.");
} else {
WebRtcEndpoint endpoint = mp.newWebRtcEndpoint().build();
WebRTCParticipant participant = new WebRTCParticipant(
session.getSessionId(), name, endpoint, session);
participant.endpoint.connect(participant.endpoint);
session.start(participant.endpoint);
session.setAttribute("participant", participant);
participants.put(participant.getId(), participant);
notifyJoined(participant);
}
}