public static void hangupOwner(String ownerId, String reason) { Vector callsToCancel = new Vector(); synchronized (activeCalls) { /* * Make a list of all the calls we want to cancel, then cancel them. * We have to cancel them while not synchronized or * we could deadlock. */ for (int i = 0; i < activeCalls.size(); i++) { CallHandler call = (CallHandler) activeCalls.elementAt(i); CallParticipant cp = call.getCallParticipant(); if (cp.getCallOwner().equals(ownerId)) { callsToCancel.add(call); } } } cancel(callsToCancel, reason, false); }
public void sendCallEventNotification(CallEvent callEvent) { if (cp.getCallId() != null) { callEvent.setCallId(cp.getCallId()); } else { callEvent.setCallId("CallIdNotInitialized"); } callEvent.setConferenceId(cp.getConferenceId()); callEvent.setCallInfo(cp.getCallOwner()); if (csa != null) { callEvent.setCallState(csa.getCallState()); } else { callEvent.setCallState(new CallState(CallState.UNINITIALIZED)); } synchronized (callEventListeners) { for (int i = 0; i < callEventListeners.size(); i++) { CallEventListener listener = (CallEventListener) callEventListeners.elementAt(i); listener.callEventNotification(callEvent); } } }