VoiceManager vm = AppContext.getManager(VoiceManager.class);
Player p = vm.getPlayer(callID);
Call call;
call = vm.createCall(callID, setup);
callID = call.getId();
PlayerSetup ps = new PlayerSetup();
if (p == null) {
ps.x = x;
ps.y = y;
ps.z = z;
} else {
ps.x = p.getSetup().x;
ps.y = p.getSetup().y;
ps.z = p.getSetup().z;
}
ps.orientation = direction;
ps.isLivePlayer = true;
Player player = null;
if(p==null) {
player = vm.createPlayer(callID, ps);
} else {
player = p;
}
call.setPlayer(player);
player.setCall(call);
vm.getVoiceManagerParameters().livePlayerAudioGroup.addPlayer(player,
new AudioGroupPlayerInfo(true, AudioGroupPlayerInfo.ChatType.PUBLIC));