Ejemplo n.º 1
0
 /** {@inheritDoc} */
 @SuppressWarnings("unchecked")
 public Collection<String> getPermissions(IConnection conn) {
   Collection<String> result = (Collection<String>) conn.getAttribute(PERMISSIONS);
   if (result == null) {
     result = Collections.emptySet();
   }
   return result;
 }
Ejemplo n.º 2
0
  @Override
  public void streamBroadcastClose(IBroadcastStream stream) {
    String clientId = Red5.getConnectionLocal().getClient().getId();
    String userid = getUserId();
    String username = getUsername();

    log.debug(
        "{} has stopped publishing stream [{}]",
        username + "[uid=" + userid + "][clientid=" + clientId + "]",
        stream.getPublishedName());
    IConnection conn = Red5.getConnectionLocal();
    String peerId = (String) conn.getAttribute("VOICE_CONF_PEER");
    if (peerId != null) {
      super.streamPublishStart(stream);
      sipPeerManager.stopTalkStream(peerId, clientId, stream, conn.getScope());
      super.streamBroadcastClose(stream);
    }
  }