Search in sources :

Example 11 with Client

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

the class ConnectionManager method getUsers.

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

Example 12 with Client

use of org.freeswitch.esl.client.inbound.Client in project openhab1-addons by openhab.

the class FreeswitchBinding method connect.

/**
     * Connect inbound client to freeswitch
     *
     * @throws InboundConnectionFailure
     */
private void connect() throws InboundConnectionFailure {
    disconnect();
    logger.debug("Connecting to {} on port {} with pass {}", host, port, password);
    inboudClient = new Client();
    inboudClient.connect(host, port, password, 10);
    inboudClient.addEventListener(this);
    inboudClient.setEventSubscriptions("plain", String.format("%s %s %s", CHANNEl_CREATE, CHANNEL_DESTROY, MESSAGE_WAITING));
    logger.debug(String.format("Connected"));
    initMessageItems();
}
Also used : Client(org.freeswitch.esl.client.inbound.Client)

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