5 * Call data and functions.
12 * Call entries manipulations.
15 #include <gammu-types.h>
16 #include <gammu-limits.h>
17 #include <gammu-error.h>
18 #include <gammu-statemachine.h>
21 * \defgroup Divert Divert
22 * Diversion entries manipulations.
26 * Enum with status of call.
32 * Somebody calls to us
34 GSM_CALL_IncomingCall
= 1,
38 GSM_CALL_OutgoingCall
,
44 * End of call from unknown side
48 * End of call from remote side
50 GSM_CALL_CallRemoteEnd
,
52 * End of call from our side
54 GSM_CALL_CallLocalEnd
,
56 * Call established. Waiting for answer or dropping
58 GSM_CALL_CallEstablished
,
82 GSM_CallStatus Status
;
88 * Whether Call ID is available.
90 gboolean CallIDAvailable
;
96 * Remote phone number.
98 unsigned char PhoneNumber
[(GSM_MAX_NUMBER_LENGTH
+ 1) * 2];
102 * Defines when diversion is active.
110 GSM_DIVERT_Busy
= 0x01,
112 * Divert when not answered.
116 * Divert when phone off or no coverage.
118 GSM_DIVERT_OutOfReach
,
120 * Divert all calls without ringing.
123 } GSM_Divert_DivertTypes
;
126 * Which type of calls should be diverted.
134 GSM_DIVERT_VoiceCalls
= 0x01,
142 GSM_DIVERT_DataCalls
,
147 } GSM_Divert_CallTypes
;
150 * Call diversion definition.
156 * When diversion is active.
158 GSM_Divert_DivertTypes DivertType
;
160 * Type of call to divert.
162 GSM_Divert_CallTypes CallType
;
164 * Timeout for diversion.
166 unsigned int Timeout
;
168 * Number where to divert.
170 char Number
[(GSM_MAX_NUMBER_LENGTH
+ 1) * 2];
174 * Multiple call diversions.
180 GSM_CallDivert Entries
[GSM_MAX_CALL_DIVERTS
];
181 } GSM_MultiCallDivert
;
184 * How to handle number when initiating voice call.
192 GSM_CALL_ShowNumber
= 1,
198 * Keep phone default settings.
200 GSM_CALL_DefaultNumberPresence
201 } GSM_CallShowNumber
;
204 * Dials number and starts voice call.
206 * \param s State machine pointer.
207 * \param Number Number to dial.
208 * \param ShowNumber Whether we want to display number on phone.
214 GSM_Error
GSM_DialVoice(GSM_StateMachine
* s
, char *Number
,
215 GSM_CallShowNumber ShowNumber
);
217 * Dials service number (usually for USSD).
219 * \param s State machine pointer.
220 * \param Number Number to dial.
226 GSM_Error
GSM_DialService(GSM_StateMachine
* s
, char *Number
);
229 * Accept current incoming call.
231 * \param s State machine pointer.
232 * \param ID ID of call.
233 * \param all Whether to handle all call and not only the one specified
240 GSM_Error
GSM_AnswerCall(GSM_StateMachine
* s
, int ID
, gboolean all
);
243 * Deny current incoming call.
245 * \param s State machine pointer.
246 * \param ID ID of call.
247 * \param all Whether to handle all call and not only the one specified
254 GSM_Error
GSM_CancelCall(GSM_StateMachine
* s
, int ID
, gboolean all
);
259 * \param s State machine pointer.
260 * \param ID ID of call.
266 GSM_Error
GSM_HoldCall(GSM_StateMachine
* s
, int ID
);
271 * \param s State machine pointer.
272 * \param ID ID of call.
278 GSM_Error
GSM_UnholdCall(GSM_StateMachine
* s
, int ID
);
281 * Initiates conference call.
283 * \param s State machine pointer.
284 * \param ID ID of call.
290 GSM_Error
GSM_ConferenceCall(GSM_StateMachine
* s
, int ID
);
295 * \param s State machine pointer.
296 * \param ID ID of call.
302 GSM_Error
GSM_SplitCall(GSM_StateMachine
* s
, int ID
);
307 * \param s State machine pointer.
308 * \param ID ID of call.
309 * \param next Switches next call and ignores ID.
315 GSM_Error
GSM_TransferCall(GSM_StateMachine
* s
, int ID
, gboolean next
);
320 * \param s State machine pointer.
321 * \param ID ID of call.
322 * \param next Switches next call and ignores ID.
328 GSM_Error
GSM_SwitchCall(GSM_StateMachine
* s
, int ID
, gboolean next
);
333 * \param s State machine pointer.
334 * \param request Which diverts to get.
335 * \param result Storage for diversions information.
341 GSM_Error
GSM_GetCallDivert(GSM_StateMachine
*s
, GSM_CallDivert
*request
, GSM_MultiCallDivert
*result
);
346 * \param s State machine pointer.
347 * \param divert Diversions information to set.
353 GSM_Error
GSM_SetCallDivert(GSM_StateMachine
* s
, GSM_CallDivert
* divert
);
356 * Cancels all diverts.
358 * \param s State machine pointer.
364 GSM_Error
GSM_CancelAllDiverts(GSM_StateMachine
* s
);
367 * Activates/deactivates noticing about incoming calls.
369 * \param s State machine pointer.
370 * \param enable Whether to enable notifications.
376 GSM_Error
GSM_SetIncomingCall(GSM_StateMachine
* s
, gboolean enable
);
379 * Sends DTMF (Dual Tone Multi Frequency) tone.
381 * \param s State machine pointer.
382 * \param sequence Sequence to press.
388 GSM_Error
GSM_SendDTMF(GSM_StateMachine
* s
, char *sequence
);
392 /* Editor configuration
393 * vim: noexpandtab sw=8 ts=8 sts=8 tw=72: