From 4e3247e44e5d7a851a00e83995902e3876ae7cdc Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期四, 10 三月 2022 20:54:14 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/wvp-28181-2.0' into wvp-28181-2.0 --- src/main/java/com/genersoft/iot/vmp/gb28181/bean/SubscribeInfo.java | 37 +++++++++++++++++++++++++++++++++++-- 1 files changed, 35 insertions(+), 2 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 355edcc..373533a 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,13 +1,15 @@ package com.genersoft.iot.vmp.gb28181.bean; +import com.genersoft.iot.vmp.utils.SerializeUtils; + +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() { - } public SubscribeInfo(RequestEvent evt, String id) { this.id = id; @@ -21,6 +23,10 @@ EventHeader eventHeader = (EventHeader)request.getHeader(EventHeader.NAME); this.eventId = eventHeader.getEventId(); this.eventType = eventHeader.getEventType(); + ViaHeader viaHeader = (ViaHeader)request.getHeader(ViaHeader.NAME); + this.branch = viaHeader.getBranch(); + this.transaction = evt.getServerTransaction(); + this.dialog = evt.getDialog(); } private String id; @@ -30,6 +36,9 @@ private String eventType; private String fromTag; private String toTag; + private String branch; + private ServerTransaction transaction; + private Dialog dialog; public String getId() { return id; @@ -86,4 +95,28 @@ public void setEventType(String eventType) { this.eventType = eventType; } + + public String getBranch() { + return branch; + } + + public void setBranch(String branch) { + this.branch = branch; + } + + public ServerTransaction getTransaction() { + return transaction; + } + + public void setTransaction(ServerTransaction transaction) { + this.transaction = transaction; + } + + public Dialog getDialog() { + return dialog; + } + + public void setDialog(Dialog dialog) { + this.dialog = dialog; + } } -- Gitblit v1.8.0