From 8fdd10d1c2723ead1d2c3b232f64f292ba3ce1cc Mon Sep 17 00:00:00 2001 From: che_shuai <che_shuai@massclouds> Date: 星期一, 24 七月 2023 14:10:46 +0800 Subject: [PATCH] 修复在国标级联选择通道时,如果添加通道到跟平台根目录(即平台本身),无法触发目录变更事件问题.详见 https://github.com/648540858/wvp-GB28181-pro/issues/958 --- src/main/java/com/genersoft/iot/vmp/gb28181/bean/SubscribeInfo.java | 78 ++++++++++++++++++++++----------------- 1 files changed, 44 insertions(+), 34 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/SubscribeInfo.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/SubscribeInfo.java index 956e93e..07176f2 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/SubscribeInfo.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/SubscribeInfo.java @@ -1,58 +1,60 @@ package com.genersoft.iot.vmp.gb28181.bean; -import com.genersoft.iot.vmp.utils.SerializeUtils; +import gov.nist.javax.sip.message.SIPRequest; +import gov.nist.javax.sip.message.SIPResponse; -import javax.sip.Dialog; -import javax.sip.RequestEvent; -import javax.sip.ServerTransaction; import javax.sip.header.*; -import javax.sip.message.Request; public class SubscribeInfo { - public SubscribeInfo(RequestEvent evt, String id) { + public SubscribeInfo(SIPRequest request, String id) { this.id = id; - Request request = evt.getRequest(); - ExpiresHeader expiresHeader = (ExpiresHeader)request.getHeader(ExpiresHeader.NAME); - this.expires = expiresHeader.getExpires(); + this.request = request; + this.expires = request.getExpires().getExpires(); EventHeader eventHeader = (EventHeader)request.getHeader(EventHeader.NAME); this.eventId = eventHeader.getEventId(); this.eventType = eventHeader.getEventType(); - this.transaction = evt.getServerTransaction(); - this.dialog = evt.getDialog(); + } private String id; + + private SIPRequest request; private int expires; - private String callId; private String eventId; private String eventType; - private ServerTransaction transaction; - private Dialog dialog; + private SIPResponse response; + + /** + * 浠ヤ笅涓哄彲閫夊瓧娈� + * @return + */ + private String sn; + private int gpsInterval; public String getId() { return id; - } - - public int getExpires() { - return expires; - } - - public String getCallId() { - return callId; } public void setId(String id) { this.id = id; } - public void setExpires(int expires) { - this.expires = expires; + public SIPRequest getRequest() { + return request; } - public void setCallId(String callId) { - this.callId = callId; + public void setRequest(SIPRequest request) { + this.request = request; + } + + public int getExpires() { + return expires; + } + + public void setExpires(int expires) { + this.expires = expires; } public String getEventId() { @@ -71,19 +73,27 @@ this.eventType = eventType; } - public ServerTransaction getTransaction() { - return transaction; + public SIPResponse getResponse() { + return response; } - public void setTransaction(ServerTransaction transaction) { - this.transaction = transaction; + public void setResponse(SIPResponse response) { + this.response = response; } - public Dialog getDialog() { - return dialog; + public String getSn() { + return sn; } - public void setDialog(Dialog dialog) { - this.dialog = dialog; + public void setSn(String sn) { + this.sn = sn; + } + + public int getGpsInterval() { + return gpsInterval; + } + + public void setGpsInterval(int gpsInterval) { + this.gpsInterval = gpsInterval; } } -- Gitblit v1.8.0