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 invalid input: '&' 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 get
the log of an ongoing call.

## Method Summary

Modifier and Type
Method
Description
`int`
`fromJson(String jsonText)`
Update the call log from a text in Json.
`String`
`getCallId()`
Gets the call ID used by the call.
`ChatRoom`
`getChatRoom()`
Returns the chat room associated with this call-log, if any.
`ConferenceInfo`
`getConferenceInfo()`
Retrieves the conference info associated to this call log in DB.
`Call.Dir`
`getDir()`
Gets the direction of the call.
`int`
`getDuration()`
Gets the duration of the call since it was connected.
`ErrorInfo`
`getErrorInfo()`
When the call was failed, return an object describing the failure.
`Address`
`getFromAddress()`
Gets the origin address (ie from) of the call.
`Address`
`getLocalAddress()`
Gets the local address (that is from or to depending on call direction)
`long`
`getNativePointer()`
Gets the native pointer used by this class to make native method calls.
`float`
`getQuality()`
Gets the overall quality indication of the call.
`String`
`getRefKey()`
Gets the persistent reference key associated to the call log.
`Address`
`getRemoteAddress()`
Gets the remote address (that is from or to depending on call direction).
`long`
`getStartDate()`
Gets the start date of the call.
`Call.Status`
`getStatus()`
Gets the status of the call.
`Address`
`getToAddress()`
Gets the destination address (ie to) of the call.
`Object`
`getUserData()`
Gets the object stored in this object user's data
`boolean`
`isVideoEnabled()`
Tells whether video was enabled at the end of the call or not.
`void`
`setRefKey(String refkey)`
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 data
`String`
`toJson()`
Gets a Json representation of the call log.
`String`
`toStr()`
Gets a human readable string describing the call.
`String`
`toString()`
`boolean`
`wasConference()`
Tells whether that call was part of a conference.

## Method Details

### getCallId

String getCallId()
Gets the call ID used by the call.

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

### getChatRoom

ChatRoom 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

ConferenceInfo 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
  invalid reference

      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

ErrorInfo 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

Address getFromAddress()
Gets the origin address (ie from) of the call.

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

### getLocalAddress

Address getLocalAddress()
Gets the local address (that is from or to depending on call direction)

Returns:
  The local `Address` of the call

### getQuality

float getQuality()
Gets the overall quality indication of the call.
see: `Call.getCurrentQuality()`

Returns:
  The overall quality indication of the call.

### getRefKey

String 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

void setRefKey(String refkey)
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

Address getRemoteAddress()
Gets the remote address (that is from or to depending on call direction).

Returns:
  The remote `Address` of the call.

### setRemoteAddress

void setRemoteAddress(Address address)
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
  invalid reference

      Call#Status

  of the call.

### getToAddress

Address 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.

### fromJson

int fromJson(String jsonText)
Update the call log from a text in Json.

Parameters:
  `jsonText` - the Json to parse
Returns:
  -1 if json_text couldn't be parsed else 0.

### toJson

String toJson()
Gets a Json representation of the call log.
see: `fromJson(java.lang.String)` for details.

Returns:
  A Json format string describing the call.

### toStr

String 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

void setUserData(Object data)
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()

Overrides:
  `toString` in class `Object`