phoneCellMO.getWorldBounds().getCenter(center);
center.setY((float).5);
new Orb(listing.getContactName(), listing.getContactName(),
externalCallID, center, .1, listing.simulateCalls());
}
if (listing.simulateCalls() == false) {
//Place the calls audio at the phones position
Vector3f location = new Vector3f();
location = phoneCellMO.getWorldTransform(null).getTranslation(location);
externalPlayer.moved(location.x, location.y, location.z, 0);
}
/*
* Send PLACE_CALL_RESPONSE message back to all the clients
* to signal success.
*/
sender.send(clientID, new PlaceCallResponseMessage(
phoneCellMO.getCellID(), listing, true));
logger.fine("back from notifying user");
return;
}
if (msg instanceof JoinCallMessage) {
//Our phone cell wants us to join the call into the world.
if (listing.simulateCalls() == false) {
//Stop any current ringing.
try {
softphoneCall.stopTreatment("ring_tone.au");
} catch (IOException e) {
logger.fine("Unable to stop treatment to " + softphoneCall + ": "
+ e.getMessage());
}
AudioGroup defaultLivePlayerAudioGroup = parameters.livePlayerAudioGroup;
defaultLivePlayerAudioGroup.addPlayer(externalPlayer,
new AudioGroupPlayerInfo(true,
AudioGroupPlayerInfo.ChatType.PUBLIC));
AudioGroup defaultStationaryPlayerAudioGroup = parameters.stationaryPlayerAudioGroup;
defaultStationaryPlayerAudioGroup.addPlayer(externalPlayer,
new AudioGroupPlayerInfo(false,
AudioGroupPlayerInfo.ChatType.PUBLIC));
softphonePlayer.attenuateOtherGroups(audioGroup,
AudioGroup.DEFAULT_SPEAKING_ATTENUATION,
AudioGroup.DEFAULT_LISTEN_ATTENUATION);
audioGroup.removePlayer(externalPlayer);
audioGroup.removePlayer(softphonePlayer);
vm.removeAudioGroup(audioGroup);
}
listing.setPrivateClientName("");
//Inform the PhoneCells that the call has been joined successfully
sender.send(clientID, new JoinCallResponseMessage(
phoneCellMO.getCellID(), listing, true));
Vector3f center = new Vector3f();
phoneCellMO.getWorldBounds().getCenter(center);
center.setY((float).5);
new Orb(listing.getContactName(), listing.getContactName(), externalCallID,
center, .1, false);
return;
}
if (msg instanceof EndCallMessage) {