liusuyi
2026-05-06 99ab0d46d30b095d0e1c9d31349f42e0cefc9881
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
package com.ard.gb28181.api.domain;
 
import com.ard.gb28181.api.bean.SipTransactionInfo;
import com.ard.gb28181.api.common.InviteSessionType;
import gov.nist.javax.sip.message.SIPResponse;
import lombok.Data;
 
import java.io.Serializable;
 
@Data
public class SsrcTransaction implements Serializable {
 
    /**
     * 设备编号
     */
    private String deviceId;
 
    /**
     * 上级平台的编号
     */
    private String platformId;
 
    /**
     * 通道编号
     */
    private String channelId;
 
    /**
     * 会话的CALL ID
     */
    private String callId;
 
    /**
     * 关联的流应用名
     */
    private String app;
 
    /**
     * 关联的流ID
     */
    private String stream;
 
    /**
     * 使用的流媒体
     */
    private String mediaServerId;
 
    /**
     * 使用的SSRC
     */
    private String ssrc;
 
    /**
     * 事务信息
     */
    private SipTransactionInfo sipTransactionInfo;
 
    /**
     * 类型
     */
    private InviteSessionType type;
 
    public static SsrcTransaction buildForDevice(String deviceId, String channelId, String callId, String app, String stream,
                                                 String ssrc, String mediaServerId, SIPResponse response, InviteSessionType type) {
        SsrcTransaction ssrcTransaction = new SsrcTransaction();
        ssrcTransaction.setDeviceId(deviceId);
        ssrcTransaction.setChannelId(channelId);
        ssrcTransaction.setCallId(callId);
        ssrcTransaction.setApp(app);
        ssrcTransaction.setStream(stream);
        ssrcTransaction.setMediaServerId(mediaServerId);
        ssrcTransaction.setSsrc(ssrc);
        ssrcTransaction.setSipTransactionInfo(new SipTransactionInfo(response));
        ssrcTransaction.setType(type);
        return ssrcTransaction;
    }
    public static SsrcTransaction buildForPlatform(String platformId, String channelId, String callId, String app,String stream,
                                                 String ssrc, String mediaServerId, SIPResponse response, InviteSessionType type) {
        SsrcTransaction ssrcTransaction = new SsrcTransaction();
        ssrcTransaction.setPlatformId(platformId);
        ssrcTransaction.setChannelId(channelId);
        ssrcTransaction.setCallId(callId);
        ssrcTransaction.setStream(stream);
        ssrcTransaction.setApp(app);
        ssrcTransaction.setMediaServerId(mediaServerId);
        ssrcTransaction.setSsrc(ssrc);
        ssrcTransaction.setSipTransactionInfo(new SipTransactionInfo(response));
        ssrcTransaction.setType(type);
        return ssrcTransaction;
    }
 
    public SsrcTransaction() {
    }
}