648540858
2022-10-17 82fd369ce554467f794c9aa66e453adecefc73a9
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/MobilePositionNotifyMessageHandler.java
@@ -81,8 +81,12 @@
                    try {
                        Element rootElementAfterCharset = getRootElement(sipMsgInfo.getEvt(), sipMsgInfo.getDevice().getCharset());
                        if (rootElementAfterCharset == null) {
                            logger.warn("[ 移动设备位置数据通知 ] content cannot be null, {}", sipMsgInfo.getEvt().getRequest());
                            responseAck(getServerTransaction(sipMsgInfo.getEvt()), Response.BAD_REQUEST);
                            try {
                                logger.warn("[ 移动设备位置数据通知 ] content cannot be null, {}", sipMsgInfo.getEvt().getRequest());
                                responseAck(getServerTransaction(sipMsgInfo.getEvt()), Response.BAD_REQUEST);
                            } catch (SipException | InvalidArgumentException | ParseException e) {
                                logger.error("[命令发送失败] 移动设备位置数据通知 内容为空: {}", e.getMessage());
                            }
                            continue;
                        }
                        MobilePosition mobilePosition = new MobilePosition();
@@ -133,7 +137,11 @@
                        }
                        storager.updateChannelPosition(deviceChannel);
                        //回复 200 OK
                        responseAck(getServerTransaction(sipMsgInfo.getEvt()), Response.OK);
                        try {
                            responseAck(getServerTransaction(sipMsgInfo.getEvt()), Response.OK);
                        } catch (SipException | InvalidArgumentException | ParseException e) {
                            logger.error("[命令发送失败] 移动设备位置数据回复200: {}", e.getMessage());
                        }
                        // 发送redis消息。 通知位置信息的变化
                        JSONObject jsonObject = new JSONObject();
@@ -147,7 +155,7 @@
                        jsonObject.put("speed", mobilePosition.getSpeed());
                        redisCatchStorage.sendMobilePositionMsg(jsonObject);
                    } catch (DocumentException | SipException | InvalidArgumentException | ParseException e) {
                    } catch (DocumentException e) {
                        e.printStackTrace();
                    }