private void join(final Conference conference, Direction direction) {
   // provider.addNotificationListener(this);
   try {
     mg.joinInitiate(direction, conference.getMixer(), null);
   } catch (MsControlException e) {
     logger.error("Error", e);
   }
 }
 @Override
 public void unmute(Conference conference) {
   try {
     mg.joinInitiate(Direction.DUPLEX, conference.getMixer(), null);
   } catch (MsControlException e) {
     logger.error("Error", e);
   }
   muted = false;
 }
  @Override
  protected void doAck(SipServletRequest req) throws ServletException, IOException {
    SipSession sipSession = req.getSession();

    MediaSession ms = (MediaSession) sipSession.getAttribute("MEDIA_SESSION");
    try {
      MediaGroup mg = ms.createMediaGroup(MediaGroup.PLAYER_RECORDER_SIGNALDETECTOR);
      mg.addListener(new MyJoinEventListener());

      NetworkConnection nc = (NetworkConnection) sipSession.getAttribute("NETWORK_CONNECTION");
      mg.joinInitiate(Direction.DUPLEX, nc, this);

    } catch (MsControlException e) {
      logger.error(e);
      // Clean up media session
      terminate(sipSession, ms);
    }
  }