private void onMute(Mute message, ActorRef self, ActorRef sender) { if (is(active) && (this.mediaMixer != null)) { try { this.networkConnection.join(Direction.RECV, this.mediaMixer); } catch (MsControlException e) { logger.error("Could not mute call: " + e.getMessage(), e); } } }
private void onUnmute(Unmute message, ActorRef self, ActorRef sender) throws Exception { if (is(active) && (this.mediaMixer != null)) { try { this.networkConnection.join(Direction.DUPLEX, this.mediaMixer); } catch (MsControlException e) { logger.error("Could not unmute call: " + e.getMessage(), e); } } }
private void onLeave(Leave message, ActorRef self, ActorRef sender) throws Exception { if (is(active) && (this.mediaMixer != null)) { try { // Leave conference or bridge this.networkConnection.unjoin(this.mediaMixer); this.mediaMixer = null; this.bridge = null; // Restore link with Media Group this.networkConnection.join(Direction.DUPLEX, this.mediaGroup); // Warn call the operation is complete call.tell(new Left(), self); } catch (MsControlException e) { logger.error(e, "Call could not leave Bridge. Failing..."); fsm.transition(e, failed); } } }
private void onJoinBridge(JoinBridge message, ActorRef self, ActorRef sender) throws Exception { if (is(active)) { try { // join call leg to bridge this.bridge = sender; this.mediaMixer = (MediaMixer) message.getEndpoint(); this.networkConnection.join(Direction.DUPLEX, mediaMixer); // alert call has joined successfully this.call.tell(new JoinComplete(), self); } catch (MsControlException e) { logger.error("Call bridging failed: " + e.getMessage()); fsm.transition(e, failed); } } }
private void onJoinConference(JoinConference message, ActorRef self, ActorRef sender) throws Exception { if (is(active)) { try { // join call leg to bridge // overlay configuration MediaAttributes ma = message.mediaAttributes(); if (!StringUtils.isEmpty(ma.getVideoOverlay())) { mediaSession.setAttribute("CAPTION", ma.getVideoOverlay()); } this.bridge = sender; this.mediaMixer = (MediaMixer) message.getEndpoint(); this.networkConnection.join(Direction.DUPLEX, mediaMixer); // alert call has joined successfully this.call.tell(new JoinComplete(), self); } catch (MsControlException e) { logger.error("Call bridging failed: " + e.getMessage()); fsm.transition(e, failed); } } }
sipServletRequest.send(); mg.getSignalDetector().addListener(new DTMFListener(mg, sipServletRequest.getSession(), MMSUtil.audioFilePath)); conn.join(Direction.DUPLEX, mg); } catch (UnsupportedOperationException uoe) { log.error("An unexpected exception occurred while trying to create the request for shipping call", uoe);
sipServletRequest.send(); mg.getSignalDetector().addListener(new DTMFListener(mg, sipServletRequest.getSession(), MMSUtil.audioFilePath)); conn.join(Direction.DUPLEX, mg); } catch (UnsupportedOperationException uoe) { log.error("An unexpected exception occurred while trying to create the request for checkout confirmation", uoe);
sipServletRequest.send(); mg.getSignalDetector().addListener(new DTMFListener(mg, sipServletRequest.getSession(), MMSUtil.audioFilePath)); conn.join(Direction.DUPLEX, mg); } catch (UnsupportedOperationException uoe) { log.error("An unexpected exception occurred while trying to create the request for delivery date", uoe);