return;
}
CallSetup setup = new CallSetup();
CallParticipant cp = new CallParticipant();
setup.cp = cp;
String callID = info.getCallID();
if (callID == null) {
logger.fine("Can't place call to " + msg.getSipURL() + ". No cell for " + callID);
return;
}
VoiceManager vm = AppContext.getManager(VoiceManager.class);
Call call = vm.getCall(callID);
if (call != null) {
call.getSetup().ended = true; // make it look like it ended already
}
ScalableHashMap<String, ManagedReference<AudioCallStatusListener>> callIDListenerMap = callIDListenerMapRef.get();
ManagedReference<AudioCallStatusListener> audioCallStatusListenerRef = callIDListenerMap.remove(callID);
if (audioCallStatusListenerRef != null) {
audioCallStatusListenerRef.get().done();
}
AudioCallStatusListener audioCallStatusListener = new AudioCallStatusListener(clientID, callID);
audioCallStatusListenerRef = AppContext.getDataManager().createReference(audioCallStatusListener);
callIDListenerMap.put(callID, audioCallStatusListenerRef);
cp.setCallId(callID);
cp.setName(info.getUserID().getUsername());
cp.setPhoneNumber(msg.getSipURL());
setJoinConfirmation(cp);
cp.setCallEstablishedTreatment(JOIN_SOUND);
cp.setConferenceId(vm.getVoiceManagerParameters().conferenceId);
cp.setVoiceDetection(true);
cp.setDtmfDetection(true);
cp.setVoiceDetectionWhileMuted(true);
cp.setHandleSessionProgress(true);
sessionCallIDMapRef.get().put(clientID.getID(), callID);
try {
setupCall(callID, setup, msg.getX(), msg.getY(), msg.getZ(), msg.getDirection());