forked from yuqingbin/GB28181-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSipClientObject.h
76 lines (65 loc) · 1.28 KB
/
SipClientObject.h
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
#pragma once
#include "../Common/APTS_Task_Base.h"
#include "../Common/SipAdapter/SIP/include/eXosip2/eXosip.h"
#include "SipDefine.h"
#include <string>
using namespace std;
class CallInviteInfo
{
public:
CallInviteInfo(void)
:did(0)
,tid(0)
,cid(0)
,call_status(STATUS_IDLE)
,smsdid(0)
,smscid(0)
{
sdp = "";
}
~CallInviteInfo()
{
}
int did;
int tid;
int cid;
string from;
string to;
string dstid;
string srcid;
string sdp;
string ssrc;
//媒体服务器信息、媒体接收者
string recvip;
string recvport;
int smsdid;
int smscid;
//媒体发送者
string sendip;
string sendport;
int devdid;
int devcid;
int call_status;
};
class CSipClientObject
{
public:
CSipClientObject(void)
:registerstate(SIP_UNREGISTERED)
,clienttype(0)
,keepalivetime(0)
{
};
~CSipClientObject(void);
void insertcall(int cid,CallInviteInfo* cinfo);
CallInviteInfo* getcallinfobycid(int cid);
public:
int clienttype;
int registerstate; //0:未注册 1:已注册
string username; //登录ID
string host; //客户端IP地址
long port;
time_t keepalivetime;
ACE_Recursive_Thread_Mutex callinvite_lock_;
map<int,CallInviteInfo*> callinvite_map;
};