Search in sources :

Example 26 with IConnection

use of org.red5.server.api.IConnection in project bigbluebutton by bigbluebutton.

the class Application method streamPublishStart.

@Override
public void streamPublishStart(IBroadcastStream stream) {
    String clientId = Red5.getConnectionLocal().getClient().getId();
    String userid = getUserId();
    String username = getUsername();
    log.debug("{} has started publishing stream [{}]", username + "[uid=" + userid + "][clientid=" + clientId + "]", stream.getPublishedName());
    System.out.println("streamPublishStart: " + stream.getPublishedName());
    IConnection conn = Red5.getConnectionLocal();
    String peerId = (String) conn.getAttribute("VOICE_CONF_PEER");
    if (peerId != null) {
        super.streamPublishStart(stream);
        sipPeerManager.startTalkStream(peerId, clientId, stream, conn.getScope());
    //	    	recordStream(stream);
    }
}
Also used : IConnection(org.red5.server.api.IConnection)

Example 27 with IConnection

use of org.red5.server.api.IConnection in project bigbluebutton by bigbluebutton.

the class Application method streamBroadcastClose.

@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) {
        sipPeerManager.stopTalkStream(peerId, clientId, stream, conn.getScope());
        super.streamBroadcastClose(stream);
    }
}
Also used : IConnection(org.red5.server.api.IConnection)

Example 28 with IConnection

use of org.red5.server.api.IConnection in project bigbluebutton by bigbluebutton.

the class SipPhoneApplication method streamPublishStart.

public void streamPublishStart(IBroadcastStream stream) {
    loginfo("Red5SIP Stream publish start: " + stream.getPublishedName());
    IConnection current = Red5.getConnectionLocal();
}
Also used : IConnection(org.red5.server.api.IConnection)

Example 29 with IConnection

use of org.red5.server.api.IConnection in project bigbluebutton by bigbluebutton.

the class SipPhoneApplication method appConnect.

@Override
public boolean appConnect(IConnection conn, Object[] params) {
    IServiceCapableConnection service = (IServiceCapableConnection) conn;
    loginfo("Red5SIP Client connected " + conn.getClient().getId() + " service " + service);
    return true;
}
Also used : IServiceCapableConnection(org.red5.server.api.service.IServiceCapableConnection)

Example 30 with IConnection

use of org.red5.server.api.IConnection in project bigbluebutton by bigbluebutton.

the class VoiceConferenceApplication method login.

private void login(String obproxy, String uid, String phone, String username, String password, String realm, String proxy, int sipport, int rtpport) {
    System.out.println("Red5SIP login " + uid);
    IConnection conn = Red5.getConnectionLocal();
    IServiceCapableConnection service = (IServiceCapableConnection) conn;
    ConnectionClientMethodInvoker rtmpConnection = new ConnectionClientMethodInvoker(service, conn.getScope());
    String userid = getSipUserId();
    sipManager.createSipUser(userid, rtmpConnection, sipport, rtpport);
    sipManager.login(userid, obproxy, phone, username, password, realm, proxy);
}
Also used : ConnectionClientMethodInvoker(org.red5.app.sip.ConnectionClientMethodInvoker) IServiceCapableConnection(org.red5.server.api.service.IServiceCapableConnection) IConnection(org.red5.server.api.IConnection)

Aggregations

IConnection (org.red5.server.api.IConnection)33 HashMap (java.util.HashMap)8 IScope (org.red5.server.api.scope.IScope)7 Gson (com.google.gson.Gson)6 Matcher (java.util.regex.Matcher)4 IServiceCapableConnection (org.red5.server.api.service.IServiceCapableConnection)4 ClientBroadcastStream (org.red5.server.stream.ClientBroadcastStream)4 ArrayList (java.util.ArrayList)2 ISharedObject (org.red5.server.api.so.ISharedObject)2 IStreamListener (org.red5.server.api.stream.IStreamListener)2 ExecutionException (java.util.concurrent.ExecutionException)1 TimeoutException (java.util.concurrent.TimeoutException)1 IoBuffer (org.apache.mina.core.buffer.IoBuffer)1 ScreenshareStreamListener (org.bigbluebutton.app.screenshare.ScreenshareStreamListener)1 PeerNotFoundException (org.bigbluebutton.voiceconf.sip.PeerNotFoundException)1 ConnectionClientMethodInvoker (org.red5.app.sip.ConnectionClientMethodInvoker)1 RTMPMinaConnection (org.red5.server.net.rtmp.RTMPMinaConnection)1 VideoData (org.red5.server.net.rtmp.event.VideoData)1