/** * Fired when a call ends * * @param evt CallEvent */ public void callEnded(CallEvent evt) { AudioMediaSession audioMediaSession = evt.getSourceCall().getAudioMediaSession(); if (audioMediaSession != null) { audioMediaSession.close(); } VideoMediaSession videoMediaSession = evt.getSourceCall().getVideoMediaSession(); if (videoMediaSession != null) { videoMediaSession.stopTrasmit(); videoMediaSession.stopReceive(); } }
/** * Fired when a call is received * * @param evt CallEvent */ public void callReceived(CallEvent evt) { try { Call call = evt.getSourceCall(); Interlocutor interlocutor = new Interlocutor(); interlocutor.setCall(call); guiManager.addInterlocutor(interlocutor); call.addStateChangeListener(this); // handleAnswerRequest(interlocutor); } catch (Exception e) { Log.error("callReceived", e); } }