添加 推流鉴权事件订阅 + ack 事件关联订阅

This commit is contained in:
zxb 2024-03-14 03:31:47 +08:00
parent c5b499a026
commit 39a1a84961
2 changed files with 8 additions and 6 deletions

View File

@ -143,11 +143,6 @@ public class AckRequestProcessor extends SIPRequestProcessorParent implements In
// }
// });
SipSubscribe.Event platformAckSubscribe = sipSubscribe.getOkSubscribe("ACK_" + callIdHeader.getCallId());
if(platformAckSubscribe != null) {
platformAckSubscribe.response(null);
}
// SipSubscribe.Event okSubscribe = sipSubscribe.getOkSubscribe("ACK_" + platformGbId + "_" + callIdHeader.getCallId());
// if( okSubscribe != null) {
// okSubscribe.response(new SipSubscribe.EventResult<>(evt));
@ -181,6 +176,13 @@ public class AckRequestProcessor extends SIPRequestProcessorParent implements In
// return;
// }
scheduledExecutorService.schedule(()->{
SipSubscribe.Event platformAckSubscribe = sipSubscribe.getOkSubscribe("ACK_" + callIdHeader.getCallId());
if(platformAckSubscribe != null) {
platformAckSubscribe.response(null);
}
}, 100, TimeUnit.MILLISECONDS);
String is_Udp = sendRtpItem.isTcp() ? "0" : "1";
MediaServerItem mediaInfo = mediaServerService.getOne(sendRtpItem.getMediaServerId());
logger.info("收到ACKrtp/{}开始向上级推流, 目标={}:{}SSRC={}, 协议:{}",

View File

@ -48,7 +48,7 @@ public class ZLMRESTfulUtils {
httpClientBuilder.connectionPool(new ConnectionPool(16, 5, TimeUnit.MINUTES));
if (logger.isDebugEnabled()) {
HttpLoggingInterceptor logging = new HttpLoggingInterceptor(message -> {
logger.debug("http请求参数" + message);
// logger.debug("http请求参数" + message);
});
logging.setLevel(HttpLoggingInterceptor.Level.BASIC);
// OkHttp進行添加攔截器loggingInterceptor