TCCC Agent API
TCCCCode.h
1//
2// TCCCCode.h
3// tccc-workstation-sdk
4//
5// Created by gavinwjwang on 2022/7/19.
6//
7
8#ifndef TCCCCode_h
9#define TCCCCode_h
10namespace tccc {
12//
13// 错误码
14//
16
20enum TCCCError {
22 //
23 // 基础错误码
24 //
27 ERR_SIP_SUCCESS = 200,
28
30 ERR_NONE = 0,
31
33 ERR_HTTP_REQUEST_FAILURE = -10001,
34
36 ERR_HTTP_TOKEN_ERROR = -10002,
37
39 ERR_HTTP_GETSIPINFO_ERROR = -10003,
40
42 ERR_NETWORK_CANNOT_RESET = -10004,
43
45 ERR_HAD_LOGGEDOUT = -10005,
46
48 ERR_UNRIGIST_FAILURE = 20001,
49
51 ERR_ANSWER_FAILURE = 20002,
52
54 ERR_SIPURI_WRONGFORMAT = 20003,
55
57 ERR_SEND_DTMF_FAILURE = 20004,
58
60 // SIP相关错误码
62
64 ERR_SIP_BAD_REQUEST = 400,
65
67 ERR_SIP_UNAUTHORIZED = 401,
68
70 ERR_SIP_PAYMENTREQUIRED = 402,
71
73 ERR_SIP_FORBIDDEN = 403,
74
76 ERR_SIP_NOTFOUND = 404,
77
79 ERR_SIP_NOTALLOWED = 405,
80
82 ERR_SIP_NOTACCEPTABLE = 406,
83
85 ERR_SIP_AUTHENTICATION_REQUIRED = 407,
86
88 ERR_SIP_REQUESTTIMEOUT = 408,
89
91 ERR_SIP_GONE = 410,
92
94 ERR_SIP_PRECONDITION_FAILED = 412,
95
97 ERR_SIP_TOO_LARGE = 413,
98
100 ERR_SIP_URI_TOO_LONG = 414,
101
103 ERR_SIP_UNSUPPORTED_MEDIA = 415,
104
106 ERR_SIP_UNSUPPORTED_SCHEME = 416,
107
109 ERR_SIP_BAD_EXTENSION = 420,
110
112 ERR_SIP_EXTENSION_REQUIRED = 421,
113
115 ERR_SIP_SESSION_TOO_SMALL = 422,
116
118 ERR_SIP_TOO_BRIEF = 423,
119
121 ERR_SIP_FLOW_FAILED = 430,
122
123 // /// First Hop Lacks Outbound Support
124 // ERR_SIP_439 = 439,
125
127 ERR_SIP_TEMPORARILY_UNAVAILABLE = 480,
128
130 ERR_SIP_NOT_EXIST = 481,
131
133 ERR_SIP_LOOP_DETECTED = 482,
134
136 ERR_SIP_TOO_MANY_HOPS = 483,
137
139 ERR_SIP_ADDRESS_INCOMPLETE = 484,
140
142 ERR_SIP_AMBIGUOUS = 485,
143
145 ERR_SIP_BUSY_HERE = 486,
146
148 ERR_SIP_REQUEST_TERMINATED = 487,
149
151 ERR_SIP_NOT_ACCEPTABLE_HERE = 488,
152
153 // ///"Event Package Not Supported
154 // ERR_SIP_489 = 489,
155
157 ERR_SIP_REQUEST_PENDING = 491,
158
160 ERR_SIP_UNDECIPHERABLE = 493,
161
163 ERR_SIP_SERVER_ERROR = 500,
164
166 ERR_SIP_NOT_IMPLEMENTED = 501,
167
169 ERR_SIP_BAD_GATEWAY = 502,
170
172 ERR_SIP_SERVICE_UNAVAILABLE = 503,
173
175 ERR_SIP_SERVER_TIMEOUT = 504,
176
178 ERR_SIP_VERSION_NOT_SUPPORTED = 505,
179
181 ERR_SIP_MESSAGE_TOO_LARGE = 513,
182
184 ERR_SIP_BUSY_EVERYWHERE = 600,
185
187 ERR_SIP_DECLINE = 603,
188
190 ERR_SIP_NOT_EXIST_ANYWHERE = 604,
191
193 ERR_SIP_NOT_ACCEPTABLE = 606,
194
196 // 音频相关错误码
198
201 ERR_MIC_START_FAIL = -1302,
202
204 ERR_MIC_NOT_AUTHORIZED = -1317,
205
207 ERR_MIC_SET_PARAM_FAIL = -1318,
208
210 ERR_MIC_OCCUPY = -1319,
211
213 ERR_MIC_STOP_FAIL = -1320,
214
217 ERR_SPEAKER_START_FAIL = -1321,
218
220 ERR_SPEAKER_SET_PARAM_FAIL = -1322,
221
223 ERR_SPEAKER_STOP_FAIL = -1323,
224
226 ERR_AUDIO_PLUGIN_START_FAIL = -1330,
227
229 ERR_AUDIO_PLUGIN_INSTALL_NOT_AUTHORIZED = -1331,
230
232 ERR_AUDIO_PLUGIN_INSTALL_FAILED = -1332,
233
235 ERR_AUDIO_PLUGIN_INSTALLED_BUT_NEED_RESTART = -1333,
236
238 ERR_AUDIO_ENCODE_FAIL = -1304,
239
241 ERR_UNSUPPORTED_SAMPLERATE = -1306,
242
244 // 网络相关错误码
246
248 ERR_RTC_ENTER_ROOM_FAILED = -3301,
249
252 ERR_RTC_REQUEST_IP_TIMEOUT = -3307,
253
255 ERR_RTC_CONNECT_SERVER_TIMEOUT = -3308,
256
258 ERR_RTC_ROOM_PARAM_NULL = -3316,
259
261 ERR_RTC_INVALID_SDK_APPID = -3317,
262
264 ERR_RTC_INVALID_ROOM_ID = -3318,
265
267 ERR_RTC_INVALID_USER_ID = -3319,
268
270 ERR_RTC_INVALID_USER_SIG = -3320,
271
273 ERR_RTC_ENTER_ROOM_REFUSED = -3340,
274
275};
276
278//
279// 警告码
280//
281//> 不需要特别关注,但您可以根据其中某些感兴趣的警告码,对当前用户进行相应的提示
282//
284
287enum TCCCCWarning {
288
290 // 音频相关警告码
292
294 WARNING_MICROPHONE_DEVICE_EMPTY = 1201,
295
297 WARNING_SPEAKER_DEVICE_EMPTY = 1202,
298
300 WARNING_MICROPHONE_NOT_AUTHORIZED = 1203,
301
303 WARNING_MICROPHONE_DEVICE_ABNORMAL = 1204,
304
306 WARNING_SPEAKER_DEVICE_ABNORMAL = 1205,
307
309 WARNING_AUDIO_FRAME_DECODE_FAIL = 2102,
310
312 WARNING_AUDIO_RECORDING_WRITE_FAIL = 7001,
313
315 WARNING_MICROPHONE_HOWLING_DETECTED = 7002,
316};
317} // namespace tccc
318#endif /* TCCCCode_h */