public String sendAsyncCommand(final String command) {
/*
Send synchronously to get the Job-UUID to return, the results of the actual
job request will be returned by the server as an async event.
*/
EslMessage response = sendSyncSingleLineCommand(command);
if (isTraceEnabled) {
log.trace("sendAsyncCommand command : {}, response : {}", command, response);
}
if (response.hasHeader(EslHeaders.Name.JOB_UUID)) {
return response.getHeaderValue(EslHeaders.Name.JOB_UUID);
} else {
log.warn("sendAsyncCommand command : {}, response : {}", command, EslHelper.formatEslMessage(response));
throw new IllegalStateException("Missing Job-UUID header in bgapi response");
}
}
freeswitch-esl/src/main/java/link/thingscloud/freeswitch/esl/inbound/handler/InboundChannelHandler.java
public String sendAsyncCommand(final String command) { /*
sendAsyncCommand 方法内部还是调用 sendSyncSingleLineCommand 的方法,这样岂不是异步调用的也是同步命令?