Liblinphone  5.3.0
Public Member Functions | List of all members
linphone::CallLog Class Reference

Object used to keep track of all calls initiated, received or missed. More...

#include <call_log.hh>

Inheritance diagram for linphone::CallLog:

Public Member Functions

LINPHONECXX_PUBLIC CallLog (void *ptr, bool takeRef=true)
 
LINPHONECXX_PUBLIC _LinphoneCallLog * cPtr ()
 
LINPHONECXX_PUBLIC std::string getCallId () const
 Get the call ID used by the call. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::ConferenceInfogetConferenceInfo ()
 Retrieves the conference info associated to this call log in DB. More...
 
LINPHONECXX_PUBLIC linphone::Call::Dir getDir () const
 Get the direction of the call. More...
 
LINPHONECXX_PUBLIC int getDuration () const
 Get the duration of the call since connected. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::ErrorInfogetErrorInfo () const
 When the call was failed, return an object describing the failure. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::AddressgetFromAddress () const
 Get the origin address (ie from) of the call. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::AddressgetLocalAddress () const
 Get the local address (that is from or to depending on call direction) More...
 
LINPHONECXX_PUBLIC float getQuality () const
 Get the overall quality indication of the call. More...
 
LINPHONECXX_PUBLIC std::string getRefKey () const
 Get the persistent reference key associated to the call log. More...
 
LINPHONECXX_PUBLIC void setRefKey (const std::string &refkey)
 Associate a persistent reference key to the call log. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::AddressgetRemoteAddress () const
 Get the remote address (that is from or to depending on call direction). More...
 
LINPHONECXX_PUBLIC void setRemoteAddress (const std::shared_ptr< linphone::Address > &address)
 Set the remote address (that is 'from' or 'to' depending on call direction). More...
 
LINPHONECXX_PUBLIC time_t getStartDate () const
 Get the start date of the call. More...
 
LINPHONECXX_PUBLIC linphone::Call::Status getStatus () const
 Get the status of the call. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::AddressgetToAddress () const
 Get the destination address (ie to) of the call. More...
 
LINPHONECXX_PUBLIC bool videoEnabled () const
 Tell whether video was enabled at the end of the call or not. More...
 
LINPHONECXX_PUBLIC std::string toStr () const
 Get a human readable string describing the call. More...
 
LINPHONECXX_PUBLIC bool wasConference ()
 Tells whether that call was part of a conference. More...
 

Detailed Description

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 CallLog using Core::createCallLog(), otherwise use Core::getCallLogs() or even Call::getCallLog() to get the log of an ongoing call.

Member Function Documentation

◆ getCallId()

LINPHONECXX_PUBLIC std::string linphone::CallLog::getCallId ( ) const

Get the call ID used by the call.

Returns
The call ID used by the call as a string.

◆ getConferenceInfo()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::ConferenceInfo> linphone::CallLog::getConferenceInfo ( )

Retrieves the conference info associated to this call log in DB.

Returns
The ConferenceInfo associated.

◆ getDir()

LINPHONECXX_PUBLIC linphone::Call::Dir linphone::CallLog::getDir ( ) const

Get the direction of the call.

Returns
The Call::Dir of the call.

◆ getDuration()

LINPHONECXX_PUBLIC int linphone::CallLog::getDuration ( ) const

Get the duration of the call since connected.

Returns
The duration of the call in seconds.

◆ getErrorInfo()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::ErrorInfo> linphone::CallLog::getErrorInfo ( ) const

When the call was failed, return an object describing the failure.

Returns
ErrorInfo about the error encountered by the call associated with this call log or nullptr.

◆ getFromAddress()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::CallLog::getFromAddress ( ) const

Get the origin address (ie from) of the call.

Returns
The origin Address (ie from) of the call.

◆ getLocalAddress()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::CallLog::getLocalAddress ( ) const

Get the local address (that is from or to depending on call direction)

Returns
The local Address of the call

◆ getQuality()

LINPHONECXX_PUBLIC float linphone::CallLog::getQuality ( ) const

Get the overall quality indication of the call.

Returns
The overall quality indication of the call.

◆ getRefKey()

LINPHONECXX_PUBLIC std::string linphone::CallLog::getRefKey ( ) const

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.

Returns
The reference key string that has been associated to the call log, or nullptr if none has been associated.

◆ getRemoteAddress()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::CallLog::getRemoteAddress ( ) const

Get the remote address (that is from or to depending on call direction).

Returns
The remote Address of the call.

◆ getStartDate()

LINPHONECXX_PUBLIC time_t linphone::CallLog::getStartDate ( ) const

Get the start date of the call.

Returns
The date of the beginning of the call.

◆ getStatus()

LINPHONECXX_PUBLIC linphone::Call::Status linphone::CallLog::getStatus ( ) const

Get the status of the call.

Returns
The Call::Status of the call.

◆ getToAddress()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::CallLog::getToAddress ( ) const

Get the destination address (ie to) of the call.

Returns
The destination Address (ie to) of the call.

◆ setRefKey()

LINPHONECXX_PUBLIC void linphone::CallLog::setRefKey ( const std::string &  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.

Parameters
refkeyThe reference key string to associate to the call log.

◆ setRemoteAddress()

LINPHONECXX_PUBLIC void linphone::CallLog::setRemoteAddress ( const std::shared_ptr< linphone::Address > &  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

Parameters
addressAddress object

◆ toStr()

LINPHONECXX_PUBLIC std::string linphone::CallLog::toStr ( ) const

Get a human readable string describing the call.

Note
: the returned string must be freed by the application (use ms_free()).
Returns
A human readable string describing the call.

◆ videoEnabled()

LINPHONECXX_PUBLIC bool linphone::CallLog::videoEnabled ( ) const

Tell whether video was enabled at the end of the call or not.

Returns
A boolean value telling whether video was enabled at the end of the call.

◆ wasConference()

LINPHONECXX_PUBLIC bool linphone::CallLog::wasConference ( )

Tells whether that call was part of a conference.

Returns
true if the call was part of a conference, false otherwise.

The documentation for this class was generated from the following file: