looks like it's working fine now, still need more testing with a large number of users; also GLOBAL_AUDIO_7* shouldn't appear in the users window

This commit is contained in:
Felipe Cecagno 2014-05-14 15:58:00 -03:00
parent 8573537873
commit b6855a95fa
2 changed files with 7 additions and 7 deletions

View File

@ -55,7 +55,7 @@ public class CallAgent extends CallListenerAdapter implements CallStreamObserver
private ClientConnectionManager clientConnManager;
private final String clientId;
private final AudioConferenceProvider portProvider;
private DatagramSocket localSocket;
private DatagramSocket localSocket = null;
private String _callerName;
private String _destination;
private Boolean listeningToGlobal = false;
@ -382,14 +382,12 @@ public class CallAgent extends CallListenerAdapter implements CallStreamObserver
}
private void cleanup() {
if (localSocket == null) return;
log.debug("Closing local audio port {}", localSocket.getLocalPort());
if (localSocket != null) {
if (!listeningToGlobal) {
localSocket.close();
}
} else {
log.debug("Trying to close un-allocated port {}", localSocket.getLocalPort());
}
}
/** Callback function called when arriving a BYE request */

View File

@ -157,7 +157,9 @@ public class SipPeer implements SipRegisterAgentListener {
ca.hangup();
boolean roomRemoved = GlobalCall.removeRoomIfUnused(destination);
log.debug("Should the global connection be removed? {}", roomRemoved? "yes": "no");
if (roomRemoved) {
log.debug("Hanging up the global audio call {}", destination);
CallAgent caGlobal = callManager.remove(destination);
caGlobal.hangup();
}