Call

GSM_Error GSM_DialVoice(GSM_StateMachine *s, char *Number, GSM_CallShowNumber ShowNumber)

Dials number and starts voice call.

Parameters:
  • s – State machine pointer.

  • Number – Number to dial.

  • ShowNumber – Whether we want to display number on phone.

Returns:

Error code

GSM_Error GSM_DialService(GSM_StateMachine *s, char *Number)

Dials service number (usually for USSD).

Parameters:
  • s – State machine pointer.

  • Number – Number to dial.

Returns:

Error code

GSM_Error GSM_AnswerCall(GSM_StateMachine *s, int ID, gboolean all)

Accept current incoming call.

Parameters:
  • s – State machine pointer.

  • ID – ID of call.

  • all – Whether to handle all call and not only the one specified by ID.

Returns:

Error code

GSM_Error GSM_CancelCall(GSM_StateMachine *s, int ID, gboolean all)

Deny current incoming call.

Parameters:
  • s – State machine pointer.

  • ID – ID of call.

  • all – Whether to handle all call and not only the one specified by ID.

Returns:

Error code

GSM_Error GSM_HoldCall(GSM_StateMachine *s, int ID)

Holds call.

Parameters:
  • s – State machine pointer.

  • ID – ID of call.

Returns:

Error code

GSM_Error GSM_UnholdCall(GSM_StateMachine *s, int ID)

Unholds call.

Parameters:
  • s – State machine pointer.

  • ID – ID of call.

Returns:

Error code

GSM_Error GSM_ConferenceCall(GSM_StateMachine *s, int ID)

Initiates conference call.

Parameters:
  • s – State machine pointer.

  • ID – ID of call.

Returns:

Error code

GSM_Error GSM_SplitCall(GSM_StateMachine *s, int ID)

Splits call.

Parameters:
  • s – State machine pointer.

  • ID – ID of call.

Returns:

Error code

GSM_Error GSM_TransferCall(GSM_StateMachine *s, int ID, gboolean next)

Transfers call.

Parameters:
  • s – State machine pointer.

  • ID – ID of call.

  • next – Switches next call and ignores ID.

Returns:

Error code

GSM_Error GSM_SwitchCall(GSM_StateMachine *s, int ID, gboolean next)

Switches call.

Parameters:
  • s – State machine pointer.

  • ID – ID of call.

  • next – Switches next call and ignores ID.

Returns:

Error code

GSM_Error GSM_GetCallDivert(GSM_StateMachine *s, GSM_CallDivert *request, GSM_MultiCallDivert *result)

Gets call diverts.

Parameters:
  • s – State machine pointer.

  • request – Which diverts to get.

  • result – Storage for diversions information.

Returns:

Error code

GSM_Error GSM_SetCallDivert(GSM_StateMachine *s, GSM_CallDivert *divert)

Sets call diverts.

Parameters:
  • s – State machine pointer.

  • divert – Diversions information to set.

Returns:

Error code

GSM_Error GSM_CancelAllDiverts(GSM_StateMachine *s)

Cancels all diverts.

Parameters:
  • s – State machine pointer.

Returns:

Error code

GSM_Error GSM_SetIncomingCall(GSM_StateMachine *s, gboolean enable)

Activates/deactivates noticing about incoming calls.

Parameters:
  • s – State machine pointer.

  • enable – Whether to enable notifications.

Returns:

Error code

GSM_Error GSM_SendDTMF(GSM_StateMachine *s, char *sequence)

Sends DTMF (Dual Tone Multi Frequency) tone.

Parameters:
  • s – State machine pointer.

  • sequence – Sequence to press.

Returns:

Error code

enum GSM_CallStatus

Enum with status of call.

Values:

enumerator GSM_CALL_IncomingCall

Somebody calls to us

enumerator GSM_CALL_OutgoingCall

We call somewhere

enumerator GSM_CALL_CallStart

Call started

enumerator GSM_CALL_CallEnd

End of call from unknown side

enumerator GSM_CALL_CallRemoteEnd

End of call from remote side

enumerator GSM_CALL_CallLocalEnd

End of call from our side

enumerator GSM_CALL_CallEstablished

Call established. Waiting for answer or dropping

enumerator GSM_CALL_CallHeld

Call held

enumerator GSM_CALL_CallResumed

Call resumed

enumerator GSM_CALL_CallSwitched

We switch to call

struct GSM_Call

Call information.

Public Members

GSM_CallStatus Status

Call status.

int CallID

Call ID

gboolean CallIDAvailable

Whether Call ID is available.

int StatusCode

Status code.

unsigned char PhoneNumber[(GSM_MAX_NUMBER_LENGTH + 1) * 2]

Remote phone number.

enum GSM_Divert_DivertTypes

Defines when diversion is active.

Values:

enumerator GSM_DIVERT_Busy

Divert when busy.

enumerator GSM_DIVERT_NoAnswer

Divert when not answered.

enumerator GSM_DIVERT_OutOfReach

Divert when phone off or no coverage.

enumerator GSM_DIVERT_AllTypes

Divert all calls without ringing.

enum GSM_Divert_CallTypes

Which type of calls should be diverted.

Values:

enumerator GSM_DIVERT_VoiceCalls

Voice calls.

enumerator GSM_DIVERT_FaxCalls

Fax calls.

enumerator GSM_DIVERT_DataCalls

Data calls.

enumerator GSM_DIVERT_AllCalls

All calls.

struct GSM_CallDivert

Call diversion definition.

Public Members

GSM_Divert_DivertTypes DivertType

When diversion is active.

GSM_Divert_CallTypes CallType

Type of call to divert.

unsigned int Timeout

Timeout for diversion.

unsigned char Number[(GSM_MAX_NUMBER_LENGTH + 1) * 2]

Number where to divert.

struct GSM_MultiCallDivert

Multiple call diversions.

enum GSM_CallShowNumber

How to handle number when initiating voice call.

Values:

enumerator GSM_CALL_ShowNumber

Show number.

enumerator GSM_CALL_HideNumber

Hide number.

enumerator GSM_CALL_DefaultNumberPresence

Keep phone default settings.