Gammu internals  1.38.0
Call

Data Structures

struct  GSM_Call
 

Enumerations

enum  GSM_CallStatus {
  GSM_CALL_IncomingCall = 1, GSM_CALL_OutgoingCall, GSM_CALL_CallStart, GSM_CALL_CallEnd,
  GSM_CALL_CallRemoteEnd, GSM_CALL_CallLocalEnd, GSM_CALL_CallEstablished, GSM_CALL_CallHeld,
  GSM_CALL_CallResumed, GSM_CALL_CallSwitched
}
 
enum  GSM_CallShowNumber { GSM_CALL_ShowNumber = 1, GSM_CALL_HideNumber, GSM_CALL_DefaultNumberPresence }
 

Functions

GSM_Error GSM_DialVoice (GSM_StateMachine *s, char *Number, GSM_CallShowNumber ShowNumber)
 
GSM_Error GSM_DialService (GSM_StateMachine *s, char *Number)
 
GSM_Error GSM_AnswerCall (GSM_StateMachine *s, int ID, gboolean all)
 
GSM_Error GSM_CancelCall (GSM_StateMachine *s, int ID, gboolean all)
 
GSM_Error GSM_HoldCall (GSM_StateMachine *s, int ID)
 
GSM_Error GSM_UnholdCall (GSM_StateMachine *s, int ID)
 
GSM_Error GSM_ConferenceCall (GSM_StateMachine *s, int ID)
 
GSM_Error GSM_SplitCall (GSM_StateMachine *s, int ID)
 
GSM_Error GSM_TransferCall (GSM_StateMachine *s, int ID, gboolean next)
 
GSM_Error GSM_SwitchCall (GSM_StateMachine *s, int ID, gboolean next)
 
GSM_Error GSM_SetIncomingCall (GSM_StateMachine *s, gboolean enable)
 
GSM_Error GSM_SendDTMF (GSM_StateMachine *s, char *sequence)
 

Detailed Description

Call entries manipulations.

Enumeration Type Documentation

§ GSM_CallShowNumber

How to handle number when initiating voice call.

Enumerator
GSM_CALL_ShowNumber 

Show number.

GSM_CALL_HideNumber 

Hide number.

GSM_CALL_DefaultNumberPresence 

Keep phone default settings.

Definition at line 192 of file gammu-call.h.

§ GSM_CallStatus

Enum with status of call.

Enumerator
GSM_CALL_IncomingCall 

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

Definition at line 34 of file gammu-call.h.

Function Documentation

§ GSM_AnswerCall()

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

Accept current incoming call.

Parameters
sState machine pointer.
IDID of call.
allWhether to handle all call and not only the one specified by ID.
Returns
Error code

Accept current incoming call.

Definition at line 871 of file api.c.

References GSM_Phone_Functions::AnswerCall, CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

872 {
873  GSM_Error err;
874 
876 
877  err = s->Phone.Functions->AnswerCall(s, ID, all);
878  PRINT_LOG_ERROR(err);
879  return err;
880 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373
GSM_Error(* AnswerCall)(GSM_StateMachine *s, int ID, gboolean all)
Definition: gsmstate.h:1003

§ GSM_CancelCall()

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

Deny current incoming call.

Parameters
sState machine pointer.
IDID of call.
allWhether to handle all call and not only the one specified by ID.
Returns
Error code

Deny current incoming call.

Definition at line 884 of file api.c.

References GSM_Phone_Functions::CancelCall, CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

885 {
886  GSM_Error err;
887 
889 
890  err = s->Phone.Functions->CancelCall(s, ID, all);
891  PRINT_LOG_ERROR(err);
892  return err;
893 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373
GSM_Error(* CancelCall)(GSM_StateMachine *s, int ID, gboolean all)
Definition: gsmstate.h:1007

§ GSM_ConferenceCall()

GSM_Error GSM_ConferenceCall ( GSM_StateMachine s,
int  ID 
)

Initiates conference call.

Parameters
sState machine pointer.
IDID of call.
Returns
Error code

Initiates a conference call.

Definition at line 923 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone_Functions::ConferenceCall, GSM_Phone::Functions, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

924 {
925  GSM_Error err;
926 
928 
929  err = s->Phone.Functions->ConferenceCall(s, ID);
930  PRINT_LOG_ERROR(err);
931  return err;
932 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Error(* ConferenceCall)(GSM_StateMachine *s, int ID)
Definition: gsmstate.h:1019
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_DialService()

GSM_Error GSM_DialService ( GSM_StateMachine s,
char *  Number 
)

Dials service number (usually for USSD).

Parameters
sState machine pointer.
NumberNumber to dial.
Returns
Error code

Dials service number (usually for USSD).

Definition at line 858 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone_Functions::DialService, GSM_Phone::Functions, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

859 {
860  GSM_Error err;
861 
863 
864  err = s->Phone.Functions->DialService(s, Number);
865  PRINT_LOG_ERROR(err);
866  return err;
867 }
GSM_Error
Definition: gammu-error.h:23
GSM_Error(* DialService)(GSM_StateMachine *s, char *Number)
Definition: gsmstate.h:999
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_DialVoice()

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

Dials number and starts voice call.

Parameters
sState machine pointer.
NumberNumber to dial.
ShowNumberWhether we want to display number on phone.
Returns
Error code

Dials number and starts voice call.

Definition at line 845 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone_Functions::DialVoice, GSM_Phone::Functions, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

846 {
847  GSM_Error err;
848 
850 
851  err = s->Phone.Functions->DialVoice(s, Number, ShowNumber);
852  PRINT_LOG_ERROR(err);
853  return err;
854 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373
GSM_Error(* DialVoice)(GSM_StateMachine *s, char *Number, GSM_CallShowNumber ShowNumber)
Definition: gsmstate.h:995

§ GSM_HoldCall()

GSM_Error GSM_HoldCall ( GSM_StateMachine s,
int  ID 
)

Holds call.

Parameters
sState machine pointer.
IDID of call.
Returns
Error code

Holds call.

Definition at line 897 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::HoldCall, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

898 {
899  GSM_Error err;
900 
902 
903  err = s->Phone.Functions->HoldCall(s, ID);
904  PRINT_LOG_ERROR(err);
905  return err;
906 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Error(* HoldCall)(GSM_StateMachine *s, int ID)
Definition: gsmstate.h:1011
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_SendDTMF()

GSM_Error GSM_SendDTMF ( GSM_StateMachine s,
char *  sequence 
)

Sends DTMF (Dual Tone Multi Frequency) tone.

Parameters
sState machine pointer.
sequenceSequence to press.
Returns
Error code

Sends DTMF (Dual Tone Multi Frequency) tone.

Definition at line 1040 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SendDTMF.

1041 {
1042  GSM_Error err;
1043 
1045 
1046  err = s->Phone.Functions->SendDTMF(s, sequence);
1047  PRINT_LOG_ERROR(err);
1048  return err;
1049 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373
GSM_Error(* SendDTMF)(GSM_StateMachine *s, char *sequence)
Definition: gsmstate.h:1055

§ GSM_SetIncomingCall()

GSM_Error GSM_SetIncomingCall ( GSM_StateMachine s,
gboolean  enable 
)

Activates/deactivates noticing about incoming calls.

Parameters
sState machine pointer.
enableWhether to enable notifications.
Returns
Error code

Activates/deactivates noticing about incoming calls.

Definition at line 1014 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SetIncomingCall.

1015 {
1016  GSM_Error err;
1017 
1019 
1020  err = s->Phone.Functions->SetIncomingCall(s, enable);
1021  PRINT_LOG_ERROR(err);
1022  return err;
1023 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373
GSM_Error(* SetIncomingCall)(GSM_StateMachine *s, gboolean enable)
Definition: gsmstate.h:1047

§ GSM_SplitCall()

GSM_Error GSM_SplitCall ( GSM_StateMachine s,
int  ID 
)

Splits call.

Parameters
sState machine pointer.
IDID of call.
Returns
Error code

Splits call.

Definition at line 936 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SplitCall.

937 {
938  GSM_Error err;
939 
941 
942  err = s->Phone.Functions->SplitCall(s, ID);
943  PRINT_LOG_ERROR(err);
944  return err;
945 }
GSM_Error(* SplitCall)(GSM_StateMachine *s, int ID)
Definition: gsmstate.h:1023
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_SwitchCall()

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

Switches call.

Parameters
sState machine pointer.
IDID of call.
nextSwitches next call and ignores ID.
Returns
Error code

Switches call.

Definition at line 962 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SwitchCall.

963 {
964  GSM_Error err;
965 
967 
968  err = s->Phone.Functions->SwitchCall(s, ID, next);
969  PRINT_LOG_ERROR(err);
970  return err;
971 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373
GSM_Error(* SwitchCall)(GSM_StateMachine *s, int ID, gboolean next)
Definition: gsmstate.h:1031

§ GSM_TransferCall()

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

Transfers call.

Parameters
sState machine pointer.
IDID of call.
nextSwitches next call and ignores ID.
Returns
Error code

Transfers call.

Definition at line 949 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::TransferCall.

950 {
951  GSM_Error err;
952 
954 
955  err = s->Phone.Functions->TransferCall(s, ID, next);
956  PRINT_LOG_ERROR(err);
957  return err;
958 }
GSM_Error(* TransferCall)(GSM_StateMachine *s, int ID, gboolean next)
Definition: gsmstate.h:1027
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_UnholdCall()

GSM_Error GSM_UnholdCall ( GSM_StateMachine s,
int  ID 
)

Unholds call.

Parameters
sState machine pointer.
IDID of call.
Returns
Error code

Unholds call.

Definition at line 910 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::UnholdCall.

911 {
912  GSM_Error err;
913 
915 
916  err = s->Phone.Functions->UnholdCall(s, ID);
917  PRINT_LOG_ERROR(err);
918  return err;
919 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373
GSM_Error(* UnholdCall)(GSM_StateMachine *s, int ID)
Definition: gsmstate.h:1015