Search in sources :

Example 1 with SendMsg

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

the class SimpleHangupOutboundHandler method hangupCall.

private void hangupCall(Channel channel) {
    SendMsg hangupMsg = new SendMsg();
    hangupMsg.addCallCommand("execute");
    hangupMsg.addExecuteAppName("hangup");
    EslMessage response = sendSyncMultiLineCommand(channel, hangupMsg.getMsgLines());
    if (response.getHeaderValue(Name.REPLY_TEXT).startsWith("+OK")) {
        log.info("Call hangup successful");
    } else {
        log.error("Call hangup failed: [{}}", response.getHeaderValue(Name.REPLY_TEXT));
    }
}
Also used : SendMsg(org.freeswitch.esl.client.transport.SendMsg) EslMessage(org.freeswitch.esl.client.transport.message.EslMessage)

Aggregations

SendMsg (org.freeswitch.esl.client.transport.SendMsg)1 EslMessage (org.freeswitch.esl.client.transport.message.EslMessage)1