Package org.linphone.core
Interface CallLog
public interface CallLog
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
, otherwise use
the log of an ongoing call.
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(org.linphone.core.Address, org.linphone.core.Address, org.linphone.core.Call.Dir, int, long, long, org.linphone.core.Call.Status, boolean, float)
, otherwise use
Core.getCallLogs()
or even Call.getCallLog()
to getthe log of an ongoing call.
-
Method Summary
Modifier and TypeMethodDescriptionGets the call ID used by the call.Returns the chat room associated with this call-log, if any.Retrieves the conference info associated to this call log in DB.getDir()
Gets the direction of the call.int
Gets the duration of the call since it was connected.When the call was failed, return an object describing the failure.Gets the origin address (ie from) of the call.Gets the local address (that is from or to depending on call direction)
long
Gets the native pointer used by this class to make native method calls.float
Gets the overall quality indication of the call.Gets the persistent reference key associated to the call log.Gets the remote address (that is from or to depending on call direction).long
Gets the start date of the call.Gets the status of the call.Gets the destination address (ie to) of the call.Gets the object stored in this object user's databoolean
Tells whether video was enabled at the end of the call or not.void
Associates a persistent reference key to the call log.void
setRemoteAddress
(Address address) Sets the remote address (that is 'from' or 'to' depending on call direction).void
setUserData
(Object data) Sets the object to store in this object user's datatoStr()
Gets a human readable string describing the call.toString()
boolean
Tells whether that call was part of a conference.
-
Method Details
-
getCallId
Gets the call ID used by the call.
- Returns:
- The call ID used by the call as a string.
-
getChatRoom
Returns the chat room associated with this call-log, if any.
This method is typically useful in order to retrieve an IM conversation
associated with a past conference call.- Returns:
- The
ChatRoom
associated.
-
getConferenceInfo
Retrieves the conference info associated to this call log in DB.
- Returns:
- The
ConferenceInfo
associated.
-
getDir
Call.Dir getDir()Gets the direction of the call.
- Returns:
- The
Call#Dir
of the call.
-
getDuration
int getDuration()Gets the duration of the call since it was connected.
- Returns:
- The duration of the call in seconds.
-
getErrorInfo
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 null.
-
getFromAddress
Gets the origin address (ie from) of the call.
- Returns:
- The origin
Address
(ie from) of the call.
-
getLocalAddress
Gets the local address (that is from or to depending on call direction)
- Returns:
- The local
Address
of the call
-
getQuality
float getQuality()- Returns:
- The overall quality indication of the call.
-
getRefKey
Gets 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
null if none has been associated.
-
setRefKey
Associates 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:
refkey
- The reference key string to associate to the call log.
-
getRemoteAddress
Gets the remote address (that is from or to depending on call direction).
- Returns:
- The remote
Address
of the call.
-
setRemoteAddress
Sets 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:
address
-Address
object
-
getStartDate
long getStartDate()Gets the start date of the call.
- Returns:
- The date of the beginning of the call.
-
getStatus
Call.Status getStatus()Gets the status of the call.
- Returns:
- The
Call#Status
of the call.
-
getToAddress
Gets the destination address (ie to) of the call.
- Returns:
- The destination
Address
(ie to) of the call.
-
isVideoEnabled
boolean isVideoEnabled()Tells 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.
-
toStr
Gets 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.
-
wasConference
boolean wasConference()Tells whether that call was part of a conference.
- Returns:
- true if the call was part of a conference, false otherwise.
-
setUserData
Sets the object to store in this object user's data- Parameters:
data
- the object to store
-
getUserData
Object getUserData()Gets the object stored in this object user's data- Returns:
- the object store if any, null otherwise
-
getNativePointer
long getNativePointer()Gets the native pointer used by this class to make native method calls.- Returns:
- the nativer pointer, as long
-
toString
String toString()
-