Search in sources :

Example 1 with Client

use of org.freeswitch.esl.client.inbound.Client in project bigbluebutton by bigbluebutton.

the class ConnectionManager method hangUp.

public void hangUp(DeskShareHangUpCommand huCmd) {
    Client c = manager.getESLClient();
    if (c.canSend()) {
        System.out.println("ConnectionManager: send to FS: hangUp " + huCmd.getCommandArgs());
        EslMessage response = c.sendSyncApiCommand(huCmd.getCommand(), huCmd.getCommandArgs());
        huCmd.handleResponse(response, conferenceEventListener);
    }
}
Also used : EslMessage(org.freeswitch.esl.client.transport.message.EslMessage) Client(org.freeswitch.esl.client.inbound.Client)

Example 2 with Client

use of org.freeswitch.esl.client.inbound.Client in project bigbluebutton by bigbluebutton.

the class ConnectionManager method record.

public void record(RecordConferenceCommand rcc) {
    Client c = manager.getESLClient();
    if (c.canSend()) {
        EslMessage response = c.sendSyncApiCommand(rcc.getCommand(), rcc.getCommandArgs());
        rcc.handleResponse(response, conferenceEventListener);
    }
}
Also used : EslMessage(org.freeswitch.esl.client.transport.message.EslMessage) Client(org.freeswitch.esl.client.inbound.Client)

Example 3 with Client

use of org.freeswitch.esl.client.inbound.Client in project bigbluebutton by bigbluebutton.

the class ConnectionManager method broadcastRTMP.

public void broadcastRTMP(DeskShareBroadcastRTMPCommand rtmp) {
    Client c = manager.getESLClient();
    if (c.canSend()) {
        System.out.println("ConnectionManager: send to FS: broadcastRTMP " + rtmp.getCommandArgs());
        EslMessage response = c.sendSyncApiCommand(rtmp.getCommand(), rtmp.getCommandArgs());
        rtmp.handleResponse(response, conferenceEventListener);
    }
}
Also used : EslMessage(org.freeswitch.esl.client.transport.message.EslMessage) Client(org.freeswitch.esl.client.inbound.Client)

Example 4 with Client

use of org.freeswitch.esl.client.inbound.Client in project bigbluebutton by bigbluebutton.

the class ExampleClient method do_connect.

public void do_connect() throws InterruptedException {
    client = new Client();
    client.addEventListener(new EslEventListener());
    log.info("Client connecting ..");
    try {
        client.connect(host, port, password, 2);
    } catch (InboundConnectionFailure e) {
        log.error("Connect failed", e);
        return;
    }
    log.info("Client connected ..");
    //client.setEventSubscriptions( "plain", "heartbeat BACKGROUND_JOB CUSTOM" );
    client.setEventSubscriptions("plain", "all");
    client.addEventFilter("Event-Name", "heartbeat");
    client.addEventFilter("Event-Name", "custom");
    client.addEventFilter("Event-Name", "background_job");
}
Also used : Client(org.freeswitch.esl.client.inbound.Client) InboundConnectionFailure(org.freeswitch.esl.client.inbound.InboundConnectionFailure)

Example 5 with Client

use of org.freeswitch.esl.client.inbound.Client in project bigbluebutton by bigbluebutton.

the class ClientTest method do_multi_connects.

@Test
public void do_multi_connects() throws InterruptedException {
    Client client = new Client();
    log.info("Client connecting ..");
    try {
        client.connect(host, port, password, 2);
    } catch (InboundConnectionFailure e) {
        log.error("Connect failed", e);
        return;
    }
    log.info("Client connected ..");
    log.info("Client connecting ..");
    try {
        client.connect(host, port, password, 2);
    } catch (InboundConnectionFailure e) {
        log.error("Connect failed", e);
        return;
    }
    log.info("Client connected ..");
    client.close();
}
Also used : Client(org.freeswitch.esl.client.inbound.Client) InboundConnectionFailure(org.freeswitch.esl.client.inbound.InboundConnectionFailure) Test(org.junit.Test)

Aggregations

Client (org.freeswitch.esl.client.inbound.Client)12 EslMessage (org.freeswitch.esl.client.transport.message.EslMessage)7 InboundConnectionFailure (org.freeswitch.esl.client.inbound.InboundConnectionFailure)5 Test (org.junit.Test)3 IEslEventListener (org.freeswitch.esl.client.IEslEventListener)1 EslEvent (org.freeswitch.esl.client.transport.event.EslEvent)1 Name (org.freeswitch.esl.client.transport.message.EslHeaders.Name)1