Liblinphone
5.3.0
|
Managing call logs. More...
Typedefs | |
typedef enum _LinphoneCallDir | LinphoneCallDir |
Enum representing the direction of a call. | |
typedef enum _LinphoneCallStatus | LinphoneCallStatus |
Enum representing the status of a call. | |
typedef struct _LinphoneCallLog | LinphoneCallLog |
Object used to keep track of all calls initiated, received or missed. More... | |
Enumerations | |
enum | _LinphoneCallDir { LinphoneCallOutgoing = 0, LinphoneCallIncoming = 1 } |
Enum representing the direction of a call. More... | |
enum | _LinphoneCallStatus { LinphoneCallSuccess = 0, LinphoneCallAborted = 1, LinphoneCallMissed = 2, LinphoneCallDeclined = 3, LinphoneCallEarlyAborted, LinphoneCallAcceptedElsewhere = 5, LinphoneCallDeclinedElsewhere = 6 } |
Enum representing the status of a call. More... | |
Functions | |
const bctbx_list_t * | linphone_core_get_call_logs (LinphoneCore *core) |
Get the list of call logs (past calls). More... | |
bctbx_list_t * | linphone_core_get_call_history_2 (LinphoneCore *core, const LinphoneAddress *peer_address, const LinphoneAddress *local_address) |
Get the list of call logs (past calls). More... | |
LinphoneCallLog * | linphone_core_get_last_outgoing_call_log (LinphoneCore *core) |
Get the latest outgoing call log. More... | |
LinphoneCallLog * | linphone_core_find_call_log_from_call_id (LinphoneCore *core, const char *call_id) |
Get the call log matching the call id, or NULL if can't be found. More... | |
LinphoneCallLog * | linphone_core_find_call_log (LinphoneCore *lc, const char *call_id, int limit) |
Get the call log matching the call id, or NULL if can't be found. More... | |
void | linphone_core_clear_call_logs (LinphoneCore *core) |
Erase the call log. More... | |
int | linphone_core_get_missed_calls_count (LinphoneCore *core) |
Get the number of missed calls. More... | |
void | linphone_core_reset_missed_calls_count (LinphoneCore *core) |
Reset the counter of missed calls. More... | |
void | linphone_core_remove_call_log (LinphoneCore *core, LinphoneCallLog *call_log) |
Remove a specific call log from call history list. More... | |
LinphoneCallLog * | linphone_call_log_ref (LinphoneCallLog *call_log) |
Acquire a reference to the call log. More... | |
void | linphone_call_log_unref (LinphoneCallLog *call_log) |
Release a reference to the call log. More... | |
const char * | linphone_call_log_get_call_id (const LinphoneCallLog *call_log) |
Get the call ID used by the call. More... | |
LinphoneCallDir | linphone_call_log_get_dir (const LinphoneCallLog *call_log) |
Get the direction of the call. More... | |
int | linphone_call_log_get_duration (const LinphoneCallLog *call_log) |
Get the duration of the call since connected. More... | |
const LinphoneAddress * | linphone_call_log_get_from_address (const LinphoneCallLog *call_log) |
Get the origin address (ie from) of the call. More... | |
float | linphone_call_log_get_quality (const LinphoneCallLog *call_log) |
Get the overall quality indication of the call. More... | |
const char * | linphone_call_log_get_ref_key (const LinphoneCallLog *call_log) |
Get the persistent reference key associated to the call log. More... | |
const LinphoneAddress * | linphone_call_log_get_local_address (const LinphoneCallLog *call_log) |
Get the local address (that is from or to depending on call direction) More... | |
const LinphoneAddress * | linphone_call_log_get_remote_address (const LinphoneCallLog *call_log) |
Get the remote address (that is from or to depending on call direction). More... | |
void | linphone_call_log_set_remote_address (LinphoneCallLog *call_log, LinphoneAddress *address) |
Set the remote address (that is 'from' or 'to' depending on call direction). More... | |
time_t | linphone_call_log_get_start_date (const LinphoneCallLog *call_log) |
Get the start date of the call. More... | |
LinphoneCallStatus | linphone_call_log_get_status (const LinphoneCallLog *call_log) |
Get the status of the call. More... | |
const LinphoneAddress * | linphone_call_log_get_to_address (const LinphoneCallLog *call_log) |
Get the destination address (ie to) of the call. More... | |
void | linphone_call_log_set_ref_key (LinphoneCallLog *call_log, const char *refkey) |
Associate a persistent reference key to the call log. More... | |
bool_t | linphone_call_log_video_enabled (const LinphoneCallLog *call_log) |
Tell whether video was enabled at the end of the call or not. More... | |
char * | linphone_call_log_to_str (const LinphoneCallLog *call_log) |
Get a human readable string describing the call. More... | |
bool_t | linphone_call_log_was_conference (LinphoneCallLog *call_log) |
Tells whether that call was part of a conference. More... | |
const LinphoneErrorInfo * | linphone_call_log_get_error_info (const LinphoneCallLog *call_log) |
When the call was failed, return an object describing the failure. More... | |
void * | linphone_call_log_get_user_data (const LinphoneCallLog *call_log) |
Get the user data associated with the call log. More... | |
void | linphone_call_log_set_user_data (LinphoneCallLog *call_log, void *user_data) |
Assign a user data to the call log. More... | |
LinphoneConferenceInfo * | linphone_call_log_get_conference_info (LinphoneCallLog *call_log) |
Retrieves the conference info associated to this call log in DB. More... | |
LinphoneCallLog * | linphone_core_create_call_log (LinphoneCore *core, LinphoneAddress *from, LinphoneAddress *to, LinphoneCallDir dir, int duration, time_t start_time, time_t connected_time, LinphoneCallStatus status, bool_t video_enabled, float quality) |
Creates a fake LinphoneCallLog. More... | |
Managing call logs.
typedef struct _LinphoneCallLog LinphoneCallLog |
Object used to keep track of all calls initiated, received or missed.
It contains the call ID, date & time at which the call took place and it's duration (0 if it wasn't answered). You can also know if video was enabled or not or if it was a conference, as well as it's average quality.
If needed, you can also create a fake LinphoneCallLog using linphone_core_create_call_log(), otherwise use linphone_core_get_call_logs() or even linphone_call_get_call_log() to get the log of an ongoing call.
enum _LinphoneCallDir |
enum _LinphoneCallStatus |
Enum representing the status of a call.
const char* linphone_call_log_get_call_id | ( | const LinphoneCallLog * | call_log | ) |
Get the call ID used by the call.
call_log | LinphoneCallLog object |
LinphoneConferenceInfo* linphone_call_log_get_conference_info | ( | LinphoneCallLog * | call_log | ) |
Retrieves the conference info associated to this call log in DB.
call_log | LinphoneCallLog object. |
LinphoneCallDir linphone_call_log_get_dir | ( | const LinphoneCallLog * | call_log | ) |
Get the direction of the call.
call_log | LinphoneCallLog object |
int linphone_call_log_get_duration | ( | const LinphoneCallLog * | call_log | ) |
Get the duration of the call since connected.
call_log | LinphoneCallLog object |
const LinphoneErrorInfo* linphone_call_log_get_error_info | ( | const LinphoneCallLog * | call_log | ) |
When the call was failed, return an object describing the failure.
call_log | LinphoneCallLog object |
const LinphoneAddress* linphone_call_log_get_from_address | ( | const LinphoneCallLog * | call_log | ) |
Get the origin address (ie from) of the call.
call_log | LinphoneCallLog object |
const LinphoneAddress* linphone_call_log_get_local_address | ( | const LinphoneCallLog * | call_log | ) |
Get the local address (that is from or to depending on call direction)
call_log | LinphoneCallLog object |
float linphone_call_log_get_quality | ( | const LinphoneCallLog * | call_log | ) |
Get the overall quality indication of the call.
call_log | LinphoneCallLog object |
const char* linphone_call_log_get_ref_key | ( | const LinphoneCallLog * | call_log | ) |
Get the persistent reference key associated to the call log.
The reference key can be for example an id to an external database. It is stored in the config file, thus can survive to process exits/restarts.
call_log | LinphoneCallLog object |
const LinphoneAddress* linphone_call_log_get_remote_address | ( | const LinphoneCallLog * | call_log | ) |
Get the remote address (that is from or to depending on call direction).
call_log | LinphoneCallLog object |
time_t linphone_call_log_get_start_date | ( | const LinphoneCallLog * | call_log | ) |
Get the start date of the call.
call_log | LinphoneCallLog object |
LinphoneCallStatus linphone_call_log_get_status | ( | const LinphoneCallLog * | call_log | ) |
Get the status of the call.
call_log | LinphoneCallLog object |
const LinphoneAddress* linphone_call_log_get_to_address | ( | const LinphoneCallLog * | call_log | ) |
Get the destination address (ie to) of the call.
call_log | LinphoneCallLog object |
void* linphone_call_log_get_user_data | ( | const LinphoneCallLog * | call_log | ) |
Get the user data associated with the call log.
call_log | LinphoneCallLog object |
LinphoneCallLog* linphone_call_log_ref | ( | LinphoneCallLog * | call_log | ) |
Acquire a reference to the call log.
call_log | LinphoneCallLog object |
void linphone_call_log_set_ref_key | ( | LinphoneCallLog * | call_log, |
const char * | refkey | ||
) |
Associate a persistent reference key to the call log.
The reference key can be for example an id to an external database. It is stored in the config file, thus can survive to process exits/restarts.
call_log | LinphoneCallLog object |
refkey | The reference key string to associate to the call log. |
void linphone_call_log_set_remote_address | ( | LinphoneCallLog * | call_log, |
LinphoneAddress * | address | ||
) |
Set the remote address (that is 'from' or 'to' depending on call direction).
It allows to fill more information that the SDK doesn't have. A use case can be to fill the display name (coming from an external address book) into a call log on incoming call. When the call end, the database will take account of the new information and can be used later
call_log | LinphoneCallLog object |
address | LinphoneAddress object |
void linphone_call_log_set_user_data | ( | LinphoneCallLog * | call_log, |
void * | user_data | ||
) |
Assign a user data to the call log.
call_log | LinphoneCallLog object |
user_data | The user data to associate with the call log. |
char* linphone_call_log_to_str | ( | const LinphoneCallLog * | call_log | ) |
Get a human readable string describing the call.
call_log | LinphoneCallLog object |
void linphone_call_log_unref | ( | LinphoneCallLog * | call_log | ) |
Release a reference to the call log.
call_log | LinphoneCallLog object |
bool_t linphone_call_log_video_enabled | ( | const LinphoneCallLog * | call_log | ) |
Tell whether video was enabled at the end of the call or not.
call_log | LinphoneCallLog object |
bool_t linphone_call_log_was_conference | ( | LinphoneCallLog * | call_log | ) |
Tells whether that call was part of a conference.
call_log | LinphoneCallLog object |
void linphone_core_clear_call_logs | ( | LinphoneCore * | core | ) |
Erase the call log.
core | LinphoneCore object |
LinphoneCallLog* linphone_core_create_call_log | ( | LinphoneCore * | core, |
LinphoneAddress * | from, | ||
LinphoneAddress * | to, | ||
LinphoneCallDir | dir, | ||
int | duration, | ||
time_t | start_time, | ||
time_t | connected_time, | ||
LinphoneCallStatus | status, | ||
bool_t | video_enabled, | ||
float | quality | ||
) |
Creates a fake LinphoneCallLog.
core | LinphoneCore object |
from | LinphoneAddress of caller |
to | LinphoneAddress of callee |
dir | LinphoneCallDir of call |
duration | call length in seconds |
start_time | timestamp of call start time |
connected_time | timestamp of call connection |
status | LinphoneCallStatus of call |
video_enabled | whether video was enabled or not for this call |
quality | call quality |
LinphoneCallLog* linphone_core_find_call_log | ( | LinphoneCore * | lc, |
const char * | call_id, | ||
int | limit | ||
) |
Get the call log matching the call id, or NULL if can't be found.
core | LinphoneCore object |
call_id | Call id of the call log to find |
limit | Search limit of the most recent call logs to find |
LinphoneCallLog* linphone_core_find_call_log_from_call_id | ( | LinphoneCore * | core, |
const char * | call_id | ||
) |
Get the call log matching the call id, or NULL if can't be found.
core | LinphoneCore object |
call_id | Call id of the call log to find |
bctbx_list_t* linphone_core_get_call_history_2 | ( | LinphoneCore * | core, |
const LinphoneAddress * | peer_address, | ||
const LinphoneAddress * | local_address | ||
) |
Get the list of call logs (past calls).
At the contrary of linphone_core_get_call_logs, it is your responsibility to unref the logs and free this list once you are done using it. Requires ENABLE_DB_STORAGE to work.
core | LinphoneCore object. |
peer_address | The remote LinphoneAddress object. |
local_address | The local LinphoneAddress object |
const bctbx_list_t* linphone_core_get_call_logs | ( | LinphoneCore * | core | ) |
Get the list of call logs (past calls).
core | LinphoneCore object |
LinphoneCallLog* linphone_core_get_last_outgoing_call_log | ( | LinphoneCore * | core | ) |
Get the latest outgoing call log.
Conference calls are not returned by this function! Requires ENABLE_DB_STORAGE to work.
core | LinphoneCore object |
int linphone_core_get_missed_calls_count | ( | LinphoneCore * | core | ) |
Get the number of missed calls.
Once checked, this counter can be reset with linphone_core_reset_missed_calls_count().
core | LinphoneCore object. |
void linphone_core_remove_call_log | ( | LinphoneCore * | core, |
LinphoneCallLog * | call_log | ||
) |
Remove a specific call log from call history list.
This function destroys the call log object. It must not be accessed anymore by the application after calling this function.
core | LinphoneCore object |
call_log | LinphoneCallLog object to remove. |
void linphone_core_reset_missed_calls_count | ( | LinphoneCore * | core | ) |
Reset the counter of missed calls.
core | LinphoneCore object. |