MediaStatus 未找到对应信息时 依然需要向发送 bye 结束
防止某些设备未收到bye 不会自动结束一直卡死 无法后续点播
This commit is contained in:
parent
0c1860368c
commit
cdc726999b
@ -30,6 +30,8 @@ import java.text.ParseException;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import static com.genersoft.iot.vmp.gb28181.utils.XmlUtil.getText;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class MessageRequestProcessor extends SIPRequestProcessorParent implements InitializingBean, ISIPRequestProcessor {
|
public class MessageRequestProcessor extends SIPRequestProcessorParent implements InitializingBean, ISIPRequestProcessor {
|
||||||
|
|
||||||
@ -73,12 +75,24 @@ public class MessageRequestProcessor extends SIPRequestProcessorParent implement
|
|||||||
// 先从会话内查找
|
// 先从会话内查找
|
||||||
SsrcTransaction ssrcTransaction = sessionManager.getSsrcTransaction(null, null, callIdHeader.getCallId(), null);
|
SsrcTransaction ssrcTransaction = sessionManager.getSsrcTransaction(null, null, callIdHeader.getCallId(), null);
|
||||||
// 兼容海康 媒体通知 消息from字段不是设备ID的问题
|
// 兼容海康 媒体通知 消息from字段不是设备ID的问题
|
||||||
if (ssrcTransaction != null) {
|
// if (ssrcTransaction != null) {
|
||||||
deviceId = ssrcTransaction.getDeviceId();
|
// deviceId = ssrcTransaction.getDeviceId();
|
||||||
|
// }
|
||||||
|
// 查询设备是否存在
|
||||||
|
Device device = redisCatchStorage.getDevice(deviceId);
|
||||||
|
// 兼容海康 媒体通知 消息体中获取
|
||||||
|
if(device == null){
|
||||||
|
Element rootElement = null;
|
||||||
|
try {
|
||||||
|
rootElement = getRootElement(evt);
|
||||||
|
if (rootElement != null) {
|
||||||
|
deviceId = getText(rootElement, "DeviceID");
|
||||||
|
}
|
||||||
|
} catch (Exception ignore) {}
|
||||||
}
|
}
|
||||||
SIPRequest request = (SIPRequest) evt.getRequest();
|
SIPRequest request = (SIPRequest) evt.getRequest();
|
||||||
// 查询设备是否存在
|
// 查询设备是否存在
|
||||||
Device device = redisCatchStorage.getDevice(deviceId);
|
device = redisCatchStorage.getDevice(deviceId);
|
||||||
// 查询上级平台是否存在
|
// 查询上级平台是否存在
|
||||||
ParentPlatform parentPlatform = storage.queryParentPlatByServerGBId(deviceId);
|
ParentPlatform parentPlatform = storage.queryParentPlatByServerGBId(deviceId);
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user