Merge branch 'master' into 重构/1078

This commit is contained in:
lin
2025-04-09 12:17:22 +08:00
10 changed files with 55 additions and 8 deletions

View File

@@ -628,8 +628,13 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
request.getCallIdHeader().getCallId(), sendRtpItem.getApp(), sendRtpItem.getStream(), sendRtpItem.getSsrc(), sendRtpItem.getMediaServerId(), sipResponse, InviteSessionType.BROADCAST);
sessionManager.put(ssrcTransaction);
// 开启发流大华在收到200OK后就会开始建立连接
if (!device.isBroadcastPushAfterAck()) {
log.info("[语音喊话] 回复200OK后发现 BroadcastPushAfterAck为False现在开始推流");
if (sendRtpItem.isTcpActive() || !device.isBroadcastPushAfterAck()) {
if (sendRtpItem.isTcpActive()) {
log.info("[语音喊话] 监听端口等待设备连接后推流");
}else {
log.info("[语音喊话] 回复200OK后发现 BroadcastPushAfterAck为False现在开始推流");
}
playService.startPushStream(sendRtpItem, channel, sipResponse, parentPlatform, request.getCallIdHeader());
}

View File

@@ -103,7 +103,9 @@ public class ZLMHttpHookListener {
String mediaServerId = json.getString("mediaServerId");
MediaServer mediaServer = mediaServerService.getOne(mediaServerId);
if (mediaServer == null) {
return new HookResultForOnPublish(0, "success");
HookResultForOnPublish fail = HookResultForOnPublish.Fail();
log.warn("[ZLM HOOK]推流鉴权 响应:{}->找不到对应的mediaServer", param.getMediaServerId());
return fail;
}
ResultForOnPublish resultForOnPublish = mediaService.authenticatePublish(mediaServer, param.getApp(), param.getStream(), param.getParams());