SIP Endpoint SDK for OS X
 All Classes Functions Properties
GSEnums.h
1 //
2 // GSEnums.h
3 // SipEndpoint
4 //
5 // Copyright (c) 2011-2016 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,
74  Alerting,
75  Connected,
76  Disconnected,
77  InProgress,
78  Held,
79  Retrieve = Connected,
80  MediaOffer = 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, // got media offer, waiting for manual accept
85  MediaAccepted, // our media offer has been accepted
86  MediaRejected, // our offer has been rejected, or video
87  // has been removed by other side
88  Ringing = 10,
89  MediaOffering
90 } GSSessionState;
91 
95 typedef enum GSDeviceRoute {
96  GSDeviceRouteDefault = 0,
97  GSDeviceRouteEarpiece = 1,
98  GSDeviceRouteSpeakerphone = 2,
99  GSDeviceRouteBluetooth = 4
100 } GSDeviceRoute;
101 
105 typedef enum GSMediaType {
106  GSMediaTypeAudio,
107  GSMediaTypeVideo
108 } GSMediaType;
109 
113 typedef enum GSAudioDeviceCapability {
114  GSAudioDeviceCapabilityRouteToEarpiece,
115  GSAudioDeviceCapabilityRouteToSpeakerPhone,
116  GSAudioDeviceCapabilityRouteToBluetooth
117 } GSAudioDeviceCapability;
118 
122 typedef enum GSDeviceArrayComparisonType {
123  GSDeviceArrayComparisonTypeRemovedDevices,
124  GSDeviceArrayComparisonTypeAddedDevices
125 } GSDeviceArrayComparisonType;
126 
127 typedef enum GSDeviceType {
128  GSDeviceTypeMicrophone = 1,
129  GSDeviceTypeSpeaker = 2,
130  GSDeviceTypeHeadset = 3,
131  GSDeviceTypeCamera = 4,
132  GSDeviceTypeCameraMicrophone = 5,
133  GSDeviceTypeCameraSpeaker = 6,
134  GSDeviceTypeEverything = 7
135 } GSDeviceType;
136 
137 typedef enum GSDeviceAction {
138  GSDeviceListChanged,
139  GSDeviceLocalVideoStarted,
140  GSDeviceInitFailed, // generated when session becomes active (connected or retrieved)
141  GSDeviceLocalAudioStarted //
142 } GSDeviceAction;
143 
147 typedef struct GSDeviceEvent {
148  GSDeviceAction action;
149  int deviceTypeBitmask;
150 } GSDeviceEvent;
151 
155 typedef enum GSStatus {
156  GSStatusSuccess,
157  GSStatusAlreadyInitialized,
158  GSStatusInvalidArg,
159  GSStatusCallNotConnectedToBridge, // OBSOLETE
160  GSStatusFailure,
161  GSStatusDEviceBusy,
162  GSStatusDisabled = 6
163 } GSStatus;
164 
168 typedef enum GSVideoState {
169  GSVideoStateInactive = 0,
170  GSVideoStateActive,
171  GSVideoStatePaused,
172  GSVideoStateUnknown = -1
173 } GSVideoState;
174 
178 typedef enum GSDtmfMethod {
179  GSDtmfMethodInbandRtp,
180  GSDtmfMethodRfc2833,
181  GSDtmfMethodInfo
182 } GSDtmfMethod;
183 
184 typedef enum GSMediaStatisticType {
185  GSMediaStatisticTypePacketsReceived,
186  GSMediaStatisticTypePacketsLost,
187  GSMediaStatisticTypePacketsDropped
188 } GSMediaStatisticType;
189 
190 typedef enum GSFlagState {
191  GSFlagStateFalse,
192  GSFlagStateTrue,
193  GSFlagStateUnknown = -1
194 } GSFlagState;
195 
196 typedef enum EndpointPolicyQuery {
197  UserAgent, // string Read Only policy
198  AudioQos, // int
199  VideoQos, // int
200  SignalingQos, // int
201  SecureSignalingQos, // int
202  SipPortMin, // int
203  SipPortMax, // int
204  RtpPortMin, // int
205  RtpPortMax, // int
206  RtpInactivityTimeout, // int
207  VqReportPublish, // int publish VQ report: 0=never, 1=end-of-call
208  VqReportCollector, // string URI address of collector (if NULL/empty => publish to proxy)
209  VideoMaxBitrate, // (int) kbps 0=unlimited, negative=default=2000kbps(2mbps)
210  SipTransactionTimeout, // (int) default=32sec, min=4sec, max=32sec
211  WebrtcAudioLayer, // int 0 audio layer defines by env.var. "GCTI_AUDIO_LAYER" (valid values:1,2,3,4).
212  // If "GCTI_AUDIO_LAYER" is not set or empty then Core audio layer is used
213  // 1 Wave audio, 2 Core audio, 3 Alsa, 4 Pulse
214  IncludeOsVersionInUserAgentHeader, // int 1 include OS version in the user agent header
215  IncludeSdkVersionInUserAgentHeader, // int 1 include SDK version in the user agent header
216  AnswerSdpPriority, // string 'config' or empty (default) (first codec from a config), 'offer' (first codec from an SDP)
217  SipPortBinding, // int 0 or empty (default) SIP port is opened to listen on any interface
218  // (binding to 0.0.0.0 for IPv4 and [::] for IPv6)
219  // 1 SIP port bound to the interface specified by "public_address" setting
220  // (i.e.to listen only on that IP address)
221 } EndpointPolicyQuery;
222 
223 typedef enum SessionPolicyQuery {
224  DtmfType, // string
225  AutoAnswer, // int
226  ShouldAnswer, // int
227  AutoAcceptVideo, // int
228  RejectSessionWhenHeadsetNa, // int
229  SipCodeWhenHeadsetNa, // string
230  MessageWhenHeadsetNa, // string
231  AgcMode, // int 0, 1
232  DtxMode, // int 0, 1
233  VadLevel, // int 0, 1, 2, 3
234  EchoControl, // int 0, 1
235  NoiseSuppression, // int 0, 1
236  RingingTimeout, // int 0, >0 value in sec
237  RingingEnabled, // int 0=event Ringing disabled (default value); 1=event Ringing enabled;
238  // 2=play ringtone internally (event Ringing disabled); 3=play ringtone internally and event Ringing enabled
239  RingingFile, // string
240  CallWaitingFile, // string
241  RestartAudioIfStuck, // int 0 or Empty (default value) disable auto restart stuck audio
242  // 1 enable auto restart stuck audio
243  IsVideoCodecAvailable, // int 1=video codec available
244  AutoAnswerDelay, // int delay in msec
245  RejectSessionWhenBusy, // int 0 (default) disable rejection session if busy; 1 rejection enabled
246  NumberSessionsForBusy, // int 1 (default) or any positive value the number of session before busy; 0 invalid value should be converted to 1
247  SipCodeWhenBusy, // int 486 or Empty (default value); Any valid SIP error response code in ranges: 4xx, 5xx, 6xx
248 }SessionPolicyQuery;
249 
250 typedef enum DevicePolicyQuery {
251  UseHeadset, // int
252  AudioInDevice, // string
253  AudioOutDevice, // string
254  HeadsetDevice, // string
255  CaptureDevice // string
256 }DevicePolicyQuery;
257 
258 typedef enum GSAction {
259  GSActionRegister,
260  GSActionUnregister,
261  GSActionSubscribe,
262  GSActionUnsubscribe,
263  GSActionMwi_update
264 } GSAction;
265 
266