修复级联点播时tcp模式信令回复的错误
parent
55b15f8ba6
commit
31df0fb3ff
|
@ -727,6 +727,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
|
||||||
if ( parentPlatform ==null) {
|
if ( parentPlatform ==null) {
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
logger.info("[国标级联] 发送录像数据通道: {}", recordInfo.getChannelId());
|
||||||
String characterSet = parentPlatform.getCharacterSet();
|
String characterSet = parentPlatform.getCharacterSet();
|
||||||
StringBuffer recordXml = new StringBuffer(600);
|
StringBuffer recordXml = new StringBuffer(600);
|
||||||
recordXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n")
|
recordXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n")
|
||||||
|
@ -763,12 +764,14 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
|
||||||
|
|
||||||
recordXml.append("</RecordList>\r\n")
|
recordXml.append("</RecordList>\r\n")
|
||||||
.append("</Response>\r\n");
|
.append("</Response>\r\n");
|
||||||
|
logger.info("[国标级联] 发送录像数据通道:{}, 内容: {}", recordInfo.getChannelId(), recordXml);
|
||||||
// callid
|
// callid
|
||||||
CallIdHeader callIdHeader = sipSender.getNewCallIdHeader(parentPlatform.getDeviceIp(),parentPlatform.getTransport());
|
CallIdHeader callIdHeader = sipSender.getNewCallIdHeader(parentPlatform.getDeviceIp(),parentPlatform.getTransport());
|
||||||
|
|
||||||
Request request = headerProviderPlatformProvider.createMessageRequest(parentPlatform, recordXml.toString(), fromTag, SipUtils.getNewViaTag(), callIdHeader);
|
Request request = headerProviderPlatformProvider.createMessageRequest(parentPlatform, recordXml.toString(), fromTag, SipUtils.getNewViaTag(), callIdHeader);
|
||||||
sipSender.transmitRequest(parentPlatform.getDeviceIp(), request);
|
sipSender.transmitRequest(parentPlatform.getDeviceIp(), request, null, eventResult -> {
|
||||||
|
logger.info("[国标级联] 发送录像数据通道:{}, 发送成功", recordInfo.getChannelId());
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -396,7 +396,16 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
||||||
// 非严格模式端口不统一, 增加兼容性,修改为一个不为0的端口
|
// 非严格模式端口不统一, 增加兼容性,修改为一个不为0的端口
|
||||||
localPort = new Random().nextInt(65535) + 1;
|
localPort = new Random().nextInt(65535) + 1;
|
||||||
}
|
}
|
||||||
content.append("m=video " + localPort + " RTP/AVP 96\r\n");
|
if (sendRtpItem.isTcp()) {
|
||||||
|
content.append("m=video " + localPort + " TCP/RTP/AVP 96\r\n");
|
||||||
|
if (!sendRtpItem.isTcpActive()) {
|
||||||
|
content.append("a=setup:active\r\n");
|
||||||
|
} else {
|
||||||
|
content.append("a=setup:passive\r\n");
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
content.append("m=video " + localPort + " RTP/AVP 96\r\n");
|
||||||
|
}
|
||||||
content.append("a=sendonly\r\n");
|
content.append("a=sendonly\r\n");
|
||||||
content.append("a=rtpmap:96 PS/90000\r\n");
|
content.append("a=rtpmap:96 PS/90000\r\n");
|
||||||
content.append("y=" + sendRtpItem.getSsrc() + "\r\n");
|
content.append("y=" + sendRtpItem.getSsrc() + "\r\n");
|
||||||
|
|
|
@ -102,6 +102,7 @@ public class RecordInfoQueryMessageHandler extends SIPRequestProcessorParent imp
|
||||||
// 接收录像数据
|
// 接收录像数据
|
||||||
recordEndEventListener.addEndEventHandler(deviceChannel.getDeviceId(), channelId, (recordInfo)->{
|
recordEndEventListener.addEndEventHandler(deviceChannel.getDeviceId(), channelId, (recordInfo)->{
|
||||||
try {
|
try {
|
||||||
|
logger.info("[国标级联] 录像查询收到数据, 通道: {},准备转发===", channelId);
|
||||||
cmderFroPlatform.recordInfo(deviceChannel, parentPlatform, request.getFromTag(), recordInfo);
|
cmderFroPlatform.recordInfo(deviceChannel, parentPlatform, request.getFromTag(), recordInfo);
|
||||||
} catch (SipException | InvalidArgumentException | ParseException e) {
|
} catch (SipException | InvalidArgumentException | ParseException e) {
|
||||||
logger.error("[命令发送失败] 国标级联 回复录像数据: {}", e.getMessage());
|
logger.error("[命令发送失败] 国标级联 回复录像数据: {}", e.getMessage());
|
||||||
|
|
Loading…
Reference in New Issue