SIP Endpoint SDK for OS X
 All Classes Functions Properties
GSEnums.h
1 //
2 // GSEnums.h
3 // SipEndpoint
4 //
5 // Copyright (c) 2011-2018 Genesys Telecommunications Laboratories, Inc. All rights reserved.
6 //
7 
11 static const int GSSipSuccessCode = 200;
12 
16 typedef enum GSEndpointState {
17  Inactive,
18  Activating,
19  Active,
20  Deactivating
21 } GSEndpointState;
22 
26 typedef enum GSConnectionState {
27  Unregistered,
28  Registering,
29  Registered,
30  Standalone,
31  Failed,
32  Unregistering,
33 } GSConnectionState;
34 
38  typedef enum GSConnectivityState {
39  ConnectivityNone, // connectivity is not (yet) configured // 0
40  ConnectivityStandalone, // standalone mode (no SIP registration) // 1
41  ConnectivityDisabled, // connectivity disabled (e.g. domain.invalid)
42  ConnectivityTrying, // not registered, still trying
43  ConnectivityFailed, // SIP registration failed
44  ConnectivityReady, // connectivity Ok, ready for work
45  ConnectivityShutdown // closing connectivity (normal termination)
46  } GSConnectivityState;
47 
51 typedef enum GSSubscriptionState {
52  Unsubscribed,
53  Subscribing,
54  Subscribed,
55 } GSSubscriptionState;
56 
60 typedef enum GSResult {
61  GSResultOK,
62  GSResultFailed,
63  GSResultUnsupportedOperation,
64  GSResultOperationInvalidForState,
65  GSResultInvalidArgument,
66  GSResultAlreadyInitialized
67 } GSResult;
68 
72 typedef enum GSSessionState {
73  Unknown, //0
74  Alerting, //1
75  Connected, //2
76  Disconnected, //3
77  InProgress, //4
78  Held, //5
79  Retrieve = Connected,
80  MediaOffer = 6, //6 media offer received from remote side
81  //
82  // new states added in 8.5.1 for voice-to-video escalation feature:
83  //
84  OfferWaiting, //7 got media offer, waiting for manual accept
85  MediaAccepted, //8 our media offer has been accepted
86  MediaRejected, //9 our offer has been rejected, or video has been removed by other side
87  Ringing = 10, //10
88  MediaOffering, //11
89  VQAlarm, //12 MOS decreased below configured threshold
90  VQAlarmOff //13 MOS increased above threshold
91 } GSSessionState;
92 
96 typedef enum GSDeviceRoute {
97  GSDeviceRouteDefault = 0,
98  GSDeviceRouteEarpiece = 1,
99  GSDeviceRouteSpeakerphone = 2,
100  GSDeviceRouteBluetooth = 4
101 } GSDeviceRoute;
102 
106 typedef enum GSMediaType {
107  GSMediaTypeAudio,
108  GSMediaTypeVideo
109 } GSMediaType;
110 
114 typedef enum GSDeviceArrayComparisonType {
115  GSDeviceArrayComparisonTypeRemovedDevices,
116  GSDeviceArrayComparisonTypeAddedDevices
117 } GSDeviceArrayComparisonType;
118 
119 typedef enum GSDeviceType {
120  GSDeviceTypeMicrophone = 1,
121  GSDeviceTypeSpeaker = 2,
122  GSDeviceTypeHeadset = 3,
123  GSDeviceTypeCamera = 4,
124  GSDeviceTypeCameraMicrophone = 5,
125  GSDeviceTypeCameraSpeaker = 6,
126  GSDeviceTypeEverything = 7
127 } GSDeviceType;
128 
129 typedef enum GSDeviceAction {
130  GSDeviceListChanged,
131  GSDeviceLocalVideoStarted,
132  GSDeviceInitFailed, // generated when session becomes active (connected or retrieved)
133  GSDeviceLocalAudioStarted //
134 } GSDeviceAction;
135 
139 typedef struct GSDeviceEvent {
140  GSDeviceAction action;
141  int deviceTypeBitmask;
142 } GSDeviceEvent;
143 
147 typedef enum GSStatus {
148  GSStatusSuccess,
149  GSStatusAlreadyInitialized,
150  GSStatusInvalidArg,
151  GSStatusCallNotConnectedToBridge, // OBSOLETE
152  GSStatusFailure,
153  GSStatusDEviceBusy,
154  GSStatusDisabled = 6
155 } GSStatus;
156 
160 typedef enum GSVideoState {
161  GSVideoStateInactive = 0,
162  GSVideoStateActive,
163  GSVideoStatePaused,
164  GSVideoStateUnknown = -1
165 } GSVideoState;
166 
170 typedef enum GSDtmfMethod {
171  GSDtmfMethodInbandRtp,
172  GSDtmfMethodRfc2833,
173  GSDtmfMethodInfo
174 } GSDtmfMethod;
175 
176 typedef enum GSMediaStatisticType {
177  GSMediaStatisticTypePacketsReceived,
178  GSMediaStatisticTypePacketsLost,
179  GSMediaStatisticTypePacketsDropped
180 } GSMediaStatisticType;
181 
182 typedef enum GSFlagState {
183  GSFlagStateFalse,
184  GSFlagStateTrue,
185  GSFlagStateUnknown = -1
186 } GSFlagState;
187 
188 typedef enum EndpointPolicyQuery {
189  UserAgent, // string Read Only policy
190  AudioQos, // int
191  VideoQos, // int
192  SignalingQos, // int
193  SipPortMin, // int
194  SipPortMax, // int
195  RtpPortMin, // int
196  RtpPortMax, // int
197  RtpInactivityTimeout, // int
198  VqReportPublish, // int publish VQ report: 0=never, 1=end-of-call
199  VqReportCollector, // string URI address of collector (if NULL/empty => publish to proxy)
200  VideoMaxBitrate, // (int) kbps 0=unlimited, negative=default=2000kbps(2mbps)
201  SipTransactionTimeout, // (int) default=32sec, min=4sec, max=32sec
202  IncludeOsVersionInUserAgentHeader, // int 1 include OS version in the user agent header
203  IncludeSdkVersionInUserAgentHeader, // int 1 include SDK version in the user agent header
204  AnswerSdpPriority, // string 'config' or empty (default) (first codec from a config), 'offer' (first codec from an SDP)
205  SipPortBinding, // int 0 or empty (default) SIP port is opened to listen on any interface
206  // (binding to 0.0.0.0 for IPv4 and [::] for IPv6)
207  // 1 SIP port bound to the interface specified by "public_address" setting
208  // (i.e.to listen only on that IP address)
209  ReferToProxy, // (int) 0:default, 1:true
210  // added in 9.0.002:
211  TcpPortMin, // (int) client-side TCP
212  TcpPortMax, // (int) port range
213  IncludeMacAddress, // (int) 0:default, 1:yes
214  EndpointPolicyQueryCount
215 } EndpointPolicyQuery;
216 
217 typedef enum SessionPolicyQuery {
218  DtmfType, // string
219  ShouldAnswer, // int
220  AutoAcceptVideo, // int
221  RejectSessionWhenHeadsetNa, // int
222  SipCodeWhenHeadsetNa, // string
223  AgcMode, // int 0, 1
224  DtxMode, // int 0, 1
225  VadLevel, // int 0, 1, 2, 3
226  EchoControl, // int 0, 1
227  NoiseSuppression, // int 0, 1
228  RingingTimeout, // int 0, >0 value in sec
229  RingingEnabled, // int 0=event Ringing disabled (default value); 1=event Ringing enabled;
230  // 2=play ringtone internally (event Ringing disabled); 3=play ringtone internally and event Ringing enabled
231  RingingFile, // string
232  RestartAudioIfStuck, // int 0 or Empty (default value) disable auto restart stuck audio
233  // 1 enable auto restart stuck audio
234  IsVideoCodecAvailable, // int 1=video codec available
235  AutoAnswerDelay, // int delay in msec
236  RejectSessionWhenBusy, // int 0 (default) disable rejection session if busy; 1 rejection enabled
237  NumberSessionsForBusy, // int 1 (default) or any positive value the number of session before busy; 0 invalid value should be converted to 1
238  SipCodeWhenBusy, // int 486 or Empty (default value); Any valid SIP error response code in ranges: 4xx, 5xx, 6xx
239  SessionPolicyQueryCount
240 }SessionPolicyQuery;
241 
242 typedef enum DevicePolicyQuery {
243  UseHeadset, // int
244  AudioInDevice, // string
245  AudioOutDevice, // string
246  HeadsetDevice, // string
247  CaptureDevice, // string
248  RingerDevice, // string
249  DevicePolicyQueryCount
250 }DevicePolicyQuery;
251 
252 typedef enum GSAction {
253  GSActionRegister,
254  GSActionUnregister,
255  GSActionSubscribe,
256  GSActionUnsubscribe,
257  GSActionMwi_update
258 } GSAction;
259 
260