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.

Return:

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.

Return:

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.

Return:

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.

Return:

Error code

GSM_Error GSM_HoldCall(GSM_StateMachine * s, int ID)

Holds call.

Parameters:
  • s -

    State machine pointer.

  • ID -

    ID of call.

Return:

Error code

GSM_Error GSM_UnholdCall(GSM_StateMachine * s, int ID)

Unholds call.

Parameters:
  • s -

    State machine pointer.

  • ID -

    ID of call.

Return:

Error code

GSM_Error GSM_ConferenceCall(GSM_StateMachine * s, int ID)

Initiates conference call.

Parameters:
  • s -

    State machine pointer.

  • ID -

    ID of call.

Return:

Error code

GSM_Error GSM_SplitCall(GSM_StateMachine * s, int ID)

Splits call.

Parameters:
  • s -

    State machine pointer.

  • ID -

    ID of call.

Return:

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.

Return:

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.

Return:

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.

Return:

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.

Return:

Error code

GSM_Error GSM_CancelAllDiverts(GSM_StateMachine * s)

Cancels all diverts.

Parameters:
  • s -

    State machine pointer.

Return:

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.

Return:

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.

Return:

Error code

GSM_CallStatus enum

Enum with status of call.

Values:

  • GSM_CALL_IncomingCall = 1 -

    Somebody calls to us

  • GSM_CALL_OutgoingCall -

    We call somewhere

  • GSM_CALL_CallStart -

    Call started

  • GSM_CALL_CallEnd -

    End of call from unknown side

  • GSM_CALL_CallRemoteEnd -

    End of call from remote side

  • GSM_CALL_CallLocalEnd -

    End of call from our side

  • GSM_CALL_CallEstablished -

    Call established. Waiting for answer or dropping

  • GSM_CALL_CallHeld -

    Call held

  • GSM_CALL_CallResumed -

    Call resumed

  • GSM_CALL_CallSwitched -

    We switch to call

struct GSM_Call
#include <gammu-call.h>

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.

GSM_Divert_DivertTypes enum

Defines when diversion is active.

Values:

  • GSM_DIVERT_Busy = 0x01 -

    Divert when busy.

  • GSM_DIVERT_NoAnswer -

    Divert when not answered.

  • GSM_DIVERT_OutOfReach -

    Divert when phone off or no coverage.

  • GSM_DIVERT_AllTypes -

    Divert all calls without ringing.

GSM_Divert_CallTypes enum

Which type of calls should be diverted.

Values:

  • GSM_DIVERT_VoiceCalls = 0x01 -

    Voice calls.

  • GSM_DIVERT_FaxCalls -

    Fax calls.

  • GSM_DIVERT_DataCalls -

    Data calls.

  • GSM_DIVERT_AllCalls -

    All calls.

struct GSM_CallDivert
#include <gammu-call.h>

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.

char Number[(GSM_MAX_NUMBER_LENGTH+1)*2]

Number where to divert.

struct GSM_MultiCallDivert
#include <gammu-call.h>

Multiple call diversions.

Public Members

int EntriesNum

GSM_CallDivert Entries[GSM_MAX_CALL_DIVERTS]

GSM_CallShowNumber enum

How to handle number when initiating voice call.

Values:

  • GSM_CALL_ShowNumber = 1 -

    Show number.

  • GSM_CALL_HideNumber -

    Hide number.

  • GSM_CALL_DefaultNumberPresence -

    Keep phone default settings.

Previous topic

Callback

Next topic

Category

This Page