Search in sources :

Example 1 with CommandResponse

use of org.freeswitch.esl.client.transport.CommandResponse in project bigbluebutton by bigbluebutton.

the class Client method cancelLogging.

/**
     * Disable any logging previously enabled with setLogLevel().
     * 
     * @return a {@link CommandResponse} with the server's response.
     */
public CommandResponse cancelLogging() {
    checkConnected();
    InboundClientHandler handler = (InboundClientHandler) channel.getPipeline().getLast();
    EslMessage response = handler.sendSyncSingleLineCommand(channel, "nolog");
    return new CommandResponse("nolog", response);
}
Also used : EslMessage(org.freeswitch.esl.client.transport.message.EslMessage) CommandResponse(org.freeswitch.esl.client.transport.CommandResponse)

Example 2 with CommandResponse

use of org.freeswitch.esl.client.transport.CommandResponse in project bigbluebutton by bigbluebutton.

the class Client method close.

/**
     * Close the socket connection
     * 
     * @return a {@link CommandResponse} with the server's response.
     */
public CommandResponse close() {
    checkConnected();
    InboundClientHandler handler = (InboundClientHandler) channel.getPipeline().getLast();
    EslMessage response = handler.sendSyncSingleLineCommand(channel, "exit");
    return new CommandResponse("exit", response);
}
Also used : EslMessage(org.freeswitch.esl.client.transport.message.EslMessage) CommandResponse(org.freeswitch.esl.client.transport.CommandResponse)

Example 3 with CommandResponse

use of org.freeswitch.esl.client.transport.CommandResponse in project bigbluebutton by bigbluebutton.

the class Client method deleteEventFilter.

/**
     * Delete an event filter from the current set of event filters on this connection.  See  
     * {@link Client.addEventFilter}   
     * 
     * @param eventHeader   to remove
     * @param valueToFilter to remove
     * @return a {@link CommandResponse} with the server's response.
     */
public CommandResponse deleteEventFilter(String eventHeader, String valueToFilter) {
    checkConnected();
    InboundClientHandler handler = (InboundClientHandler) channel.getPipeline().getLast();
    StringBuilder sb = new StringBuilder();
    if (eventHeader != null && !eventHeader.isEmpty()) {
        sb.append("filter delete ");
        sb.append(eventHeader);
    }
    if (valueToFilter != null && !valueToFilter.isEmpty()) {
        sb.append(' ');
        sb.append(valueToFilter);
    }
    EslMessage response = handler.sendSyncSingleLineCommand(channel, sb.toString());
    return new CommandResponse(sb.toString(), response);
}
Also used : EslMessage(org.freeswitch.esl.client.transport.message.EslMessage) CommandResponse(org.freeswitch.esl.client.transport.CommandResponse)

Example 4 with CommandResponse

use of org.freeswitch.esl.client.transport.CommandResponse in project bigbluebutton by bigbluebutton.

the class Client method sendMessage.

/**
     * Send a {@link SendMsg} command to FreeSWITCH.  This client requires that the {@link SendMsg}
     * has a call UUID parameter.
     *  
     * @param sendMsg a {@link SendMsg} with call UUID
     * @return a {@link CommandResponse} with the server's response.
     */
public CommandResponse sendMessage(SendMsg sendMsg) {
    checkConnected();
    InboundClientHandler handler = (InboundClientHandler) channel.getPipeline().getLast();
    EslMessage response = handler.sendSyncMultiLineCommand(channel, sendMsg.getMsgLines());
    return new CommandResponse(sendMsg.toString(), response);
}
Also used : EslMessage(org.freeswitch.esl.client.transport.message.EslMessage) CommandResponse(org.freeswitch.esl.client.transport.CommandResponse)

Example 5 with CommandResponse

use of org.freeswitch.esl.client.transport.CommandResponse in project bigbluebutton by bigbluebutton.

the class Client method cancelEventSubscriptions.

/**
     * Cancel any existing event subscription.
     * 
     * @return a {@link CommandResponse} with the server's response.
     */
public CommandResponse cancelEventSubscriptions() {
    checkConnected();
    InboundClientHandler handler = (InboundClientHandler) channel.getPipeline().getLast();
    EslMessage response = handler.sendSyncSingleLineCommand(channel, "noevents");
    return new CommandResponse("noevents", response);
}
Also used : EslMessage(org.freeswitch.esl.client.transport.message.EslMessage) CommandResponse(org.freeswitch.esl.client.transport.CommandResponse)

Aggregations

CommandResponse (org.freeswitch.esl.client.transport.CommandResponse)9 EslMessage (org.freeswitch.esl.client.transport.message.EslMessage)9