Compare commits

...

4 Commits

2 changed files with 5 additions and 3 deletions

View File

@ -222,7 +222,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
if (sendRtpItem.isTcpActive()) { if (sendRtpItem.isTcpActive()) {
MediaServer mediaServer = mediaServerService.getOne(sendRtpItem.getMediaServerId()); MediaServer mediaServer = mediaServerService.getOne(sendRtpItem.getMediaServerId());
try { try {
mediaServerService.startSendRtpPassive(mediaServer, sendRtpItem, 5); mediaServerService.startSendRtpPassive(mediaServer, sendRtpItem, 5*1000);
DeviceChannel deviceChannel = deviceChannelService.getOneForSourceById(sendRtpItem.getChannelId()); DeviceChannel deviceChannel = deviceChannelService.getOneForSourceById(sendRtpItem.getChannelId());
if (deviceChannel != null) { if (deviceChannel != null) {
redisCatchStorage.sendPlatformStartPlayMsg(sendRtpItem, deviceChannel, platform); redisCatchStorage.sendPlatformStartPlayMsg(sendRtpItem, deviceChannel, platform);

View File

@ -29,6 +29,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.DelayQueue; import java.util.concurrent.DelayQueue;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import static com.genersoft.iot.vmp.gb28181.utils.XmlUtil.getInteger;
import static com.genersoft.iot.vmp.gb28181.utils.XmlUtil.getText; import static com.genersoft.iot.vmp.gb28181.utils.XmlUtil.getText;
/** /**
@ -81,7 +82,8 @@ public class PresetQueryResponseMessageHandler extends SIPRequestProcessorParent
} }
return; return;
} }
int num = Integer.parseInt(presetListNumElement.attributeValue("Num")); Integer sumNum = getInteger(rootElement, "SumNum");
int num = sumNum == null ? Integer.parseInt(presetListNumElement.attributeValue("Num")) : sumNum.intValue();
List<Preset> presetQuerySipReqList = new ArrayList<>(); List<Preset> presetQuerySipReqList = new ArrayList<>();
if (num > 0) { if (num > 0) {
for (Iterator<Element> presetIterator = presetListNumElement.elementIterator(); presetIterator.hasNext(); ) { for (Iterator<Element> presetIterator = presetListNumElement.elementIterator(); presetIterator.hasNext(); ) {
@ -102,7 +104,7 @@ public class PresetQueryResponseMessageHandler extends SIPRequestProcessorParent
} }
} }
String sn = getText(element, "SN"); String sn = getText(element, "SN");
addCatch(cmdType + "_" + sn, num, rootElement, presetQuerySipReqList); addCatch(cmdType + "_" + sn, num, rootElement, presetQuerySipReqList);
try { try {
responseAck(request, Response.OK); responseAck(request, Response.OK);
} catch (InvalidArgumentException | ParseException | SipException e) { } catch (InvalidArgumentException | ParseException | SipException e) {