Package org.linphone.core

# Interface Call

public interface Call
This object represents a call issued or received by the `Core`.
Linphone only allows at most one active call at any given time and it will be
in `Call.State.StreamsRunning`. However, if the core is locally hosting a
`Conference`, you may have some or all the calls in the conference in
`Call.State.StreamsRunning` as well as an additional active call outside of
the conference in `Call.State.StreamsRunning` if the local participant of the
`Conference` is not part of it.
You can get the `Call.State` of the call using `getState()`, it's current
`CallParams` with `getCurrentParams()` and the latest statistics by
calling `getAudioStats()` or `getVideoStats()`.
The application can receive the various kind of events occuring in a call
through the `CallListener` interface, see also `addListener(org.linphone.core.CallListener)`.

## Nested Class Summary

Nested Classes
Modifier and Type
Interface
Description
`static enum`
`Call.Dir`
`static enum`
`Call.State`
`static enum`
`Call.Status`

## Method Summary

Modifier and Type
Method
Description
`int`
`accept()`
Accepts an incoming call.
`int`
`acceptEarlyMedia()`
Accepts an early media session for an incoming call.
`int`
`acceptEarlyMediaWithParams(CallParams params)`
When receiving an incoming, accepts to start a media session as early-media.
`void`
`acceptTransfer()`
Accepts and execute a transfer (ie an incoming REFER request), to use when
[sip] 'auto_accept_refer' property is false.
`int`
`acceptUpdate(CallParams params)`
Accepts call modifications initiated by other end through an incoming reINVITE
or UPDATE request.
`int`
`acceptWithParams(CallParams params)`
Accepts an incoming call, with parameters.
`void`
`addListener(CallListener listener)`
`boolean`
`askedToAutoanswer()`
Tells whether a call has been asked to autoanswer.
`void`
`cancelDtmfs()`
Stops current DTMF sequence sending.
`void`
`checkAuthenticationTokenSelected(String selectedValue)`
Verifies that the half ZRTP short authentication string (SAS) selected by the
user is correct, and set the verification result accordingly.
`void`
`confirmGoClear()`
Method to be called after the user confirm that he/she is notifed of the on
going Go Clear procedure.
`Object`
`createNativeVideoWindowId()`
Create a native video window id where the video is to be displayed.
`Event`
`createNotify(String event)`
Create a `Event` in order to send NOTIFY requests through the SIP dialog
created by the call.
`int`
`decline(Reason reason)`
Declines a pending incoming call, with a reason.
`int`
`declineWithErrorInfo(ErrorInfo ei)`
Declines a pending incoming call, with a `ErrorInfo` object.
`int`
`deferUpdate()`
When receiving a `Call.State.UpdatedByRemote` state notification, prevent
`Core` from performing an automatic answer.
`CallStats`
`getAudioStats()`
Returns a copy of the call statistics for the audio stream.
`String`
`getAuthenticationToken()`
Returns the ZRTP authentication token to verify.
`boolean`
`getAuthenticationTokenVerified()`
Returns whether ZRTP authentication token is verified.
`float`
`getAverageQuality()`
Returns call quality averaged over all the duration of the call.
`CallLog`
`getCallLog()`
Gets the call log associated to this call.
`ChatRoom`
`getChatRoom()`
Obtain a chat room for real time messaging from a call if not already existing,
else return existing one.
`Conference`
`getConference()`
Returns the associated conference object if any.
`Core`
`getCore()`
Gets the core that has created the specified call.
`CallParams`
`getCurrentParams()`
Returns current parameters associated to the call.
`float`
`getCurrentQuality()`
Obtains real-time quality rating of the call.
`Call.Dir`
`getDir()`
Returns direction of the call (incoming or outgoing).
`Address`
`getDiversionAddress()`
Returns the diversion address associated to this call.
`int`
`getDuration()`
Returns call's duration in seconds.
`ErrorInfo`
`getErrorInfo()`
Returns full details about call errors or termination reasons.
`AudioDevice`
`getInputAudioDevice()`
Gets the current input device for this call.
`String`
`getLocalAuthenticationToken()`
Returns the local ZRTP authentication token to verify by the remote.
`String`
`getLocalTag()`
Returns the local tag of the `Call`.
`boolean`
`getMicrophoneMuted()`
Gets microphone muted state.
`float`
`getMicrophoneVolumeGain()`
Gets microphone volume gain.
`long`
`getNativePointer()`
Gets the native pointer used by this class to make native method calls.
`Object`
`getNativeVideoWindowId()`
Get the native window handle of the video window, casted as an unsigned long.
`AudioDevice`
`getOutputAudioDevice()`
Gets the current output device for this call.
`CallParams`
`getParams()`
Returns read-only local parameters associated with the call.
`Player`
`getPlayer()`
Gets a player associated with the call to play a local file and stream it to
the remote peer.
`float`
`getPlayVolume()`
Gets the mesured playback volume level (received from remote) in dbm0.
`Reason`
`getReason()`
Returns the reason for a call termination (either error or normal termination)
`float`
`getRecordVolume()`
Gets the mesured record volume level (sent to remote) in dbm0.
`Address`
`getReferredByAddress()`
Gets the referred-by address, which is set when an incoming call is received as
a consequence of a call transfer operation by a third party.
`String`
`getReferTo()`
Gets the refer-to uri (if the call was transferred).
`Address`
`getReferToAddress()`
Gets the refer-to uri (if the call was transferred).
`Address`
`getRemoteAddress()`
Returns the remote address associated to this call.
`String`
`getRemoteAddressAsString()`
Deprecated.
06/07/2020 use `getRemoteAddress()` instead.
`String[]`
`getRemoteAuthenticationTokens()`
Returns a list of 4 remote ZRTP authentication tokens.
`String`
`getRemoteContact()`
Returns the far end's sip contact as a string, if available.
`Address`
`getRemoteContactAddress()`
Returns the far end's sip contact as an address, if available.
`CallParams`
`getRemoteParams()`
Returns call parameters proposed by remote.
`String`
`getRemoteTag()`
Returns the remote tag of the `Call`.
`String`
`getRemoteUserAgent()`
Returns the far end's user agent description string, if available.
`Call`
`getReplacedCall()`
Returns the call object this call is replacing, if any.
`Address`
`getRequestAddress()`
The address to which the call has been sent, taken directly from the SIP
request-URI of the INVITE.
`boolean`
`getSpeakerMuted()`
Gets speaker muted state.
`float`
`getSpeakerVolumeGain()`
Gets speaker volume gain.
`Call.State`
`getState()`
Retrieves the call's current state.
`CallStats`
`getStats(StreamType type)`
Returns a copy of the call statistics for a particular stream type.
`int`
`getStreamCount()`
Returns the number of stream for the given call.
`CallStats`
`getTextStats()`
Returns a copy of the call statistics for the text stream.
`Address`
`getToAddress()`
Returns the to address with its headers associated to this call.
`String`
`getToHeader(String headerName)`
Deprecated.
27/10/2020.
`Call`
`getTransfererCall()`
Gets the transferer if this call was started automatically as a result of an
incoming transfer request.
`Call.State`
`getTransferState()`
Returns the current transfer state, if a transfer has been initiated from this
call.
`Call`
`getTransferTargetCall()`
When this call has received a transfer request, returns the new call that was
automatically created as a result of the transfer.
`Object`
`getUserData()`
Gets the object stored in this object user's data
`VideoSourceDescriptor`
`getVideoSource()`
Gets the video source of a call.
`CallStats`
`getVideoStats()`
Returns a copy of the call statistics for the video stream.
`boolean`
`getZrtpCacheMismatchFlag()`
Returns whether ZRTP cache mismatch.
`boolean`
`hasTransferPending()`
Returns if this calls has received a transfer that has not been executed yet.
`boolean`
`isCameraEnabled()`
Returns if camera pictures are allowed to be sent to the remote party.
`boolean`
`isEchoCancellationEnabled()`
Returns if echo cancellation is enabled.
`boolean`
`isEchoLimiterEnabled()`
Returns if echo limiter is enabled.
`boolean`
`isRecording()`
Deprecated.
15/09/2021 Use `CallParams.isRecording()` instead.
`boolean`
`mediaInProgress()`
Indicates whether an operation is in progress at the media side.
`void`
`notifyRinging()`
Starts the process of replying 180 Ringing.
`void`
`oglRender()`
Calls generic OpenGL render for a given call.
`int`
`pause()`
Pauses the call.
`int`
`redirect(String redirectUri)`
Deprecated.
27/10/2020.
`int`
`redirectTo(Address redirectAddress)`
Redirects the specified call to the given redirect Address.
`void`
`removeListener(CallListener listener)`
`void`
`requestNotifyNextVideoFrameDecoded()`
Requests the callback passed to linphone_call_cbs_set_next_video_frame_decoded
to be called the next time the video decoder properly decodes a video frame.
`int`
`resume()`
Resumes a call.
`int`
`sendDtmf(char dtmf)`
Sends the specified dtmf.
`int`
`sendDtmfs(String dtmfs)`
Sends a list of dtmf.
`int`
`sendInfoMessage(InfoMessage info)`
Sends an info message through an established call.
`void`
`sendVfuRequest()`
Requests remote side to send us a Video Fast Update.
`void`
`setAuthenticationTokenVerified(boolean verified)`
Sets the result of ZRTP short code verification by user.
`void`
`setBaudotDetectionEnabled(boolean enabled)`
Indicates whether received Baudot tones should be detected.
`void`
`setBaudotMode(BaudotMode mode)`
Defines the Baudot mode for the call.
`void`
`setBaudotPauseTimeout(int seconds)`
Set the Baudot significant pause timeout after which a LETTERS tone is
retransmitted before resuming transmission (in seconds).
`void`
`setBaudotSendingStandard(BaudotStandard standard)`
Defines the Baudot standard to use for sending Baudot tones in the call.
`void`
`setCameraEnabled(boolean enabled)`
Indicates whether camera input should be sent to remote end.
`void`
`setEchoCancellationEnabled(boolean enable)`
Enables or disables echo cancellation for this call.
`void`
`setEchoLimiterEnabled(boolean enable)`
Enables or disables echo limiter for this call.
`void`
`setInputAudioDevice(AudioDevice audioDevice)`
Sets the given `AudioDevice` as input for this call only.
`void`
`setMicrophoneMuted(boolean muted)`
Sets microphone muted state.
`void`
`setMicrophoneVolumeGain(float volume)`
Sets microphone volume gain.
`void`
`setNativeVideoWindowId(Object windowId)`
Set the native video window id where the video is to be displayed.
`void`
`setOutputAudioDevice(AudioDevice audioDevice)`
Sets the given `AudioDevice` as output for this call only.
`void`
`setParams(CallParams params)`
Sets call parameters - advanced and not recommended feature - use with caution.
`void`
`setSpeakerMuted(boolean muted)`
Sets speaker muted state.
`void`
`setSpeakerVolumeGain(float volume)`
Sets speaker volume gain.
`void`
`setUserData(Object data)`
Sets the object to store in this object user's data
`void`
`setVideoSource(VideoSourceDescriptor descriptor)`
Sets the video source of a call.
`void`
`skipZrtpAuthentication()`
If the user skips the ZRTP authentication check, stop the security alert.
`void`
`startRecording()`
Starts call recording.
`void`
`stopRecording()`
Stops call recording.
`int`
`takePreviewSnapshot(String filePath)`
Takes a photo of currently captured video and write it into a jpeg file.
`int`
`takeVideoSnapshot(String filePath)`
Takes a photo of currently received video and write it into a jpeg file.
`int`
`terminate()`
Terminates (ends) a call.
`int`
`terminateWithErrorInfo(ErrorInfo ei)`
Terminates a call with additional information, serialized as a Reason header.
`String`
`toString()`
`int`
`transfer(String referTo)`
Deprecated.
27/10/2020.
`int`
`transferTo(Address referTo)`
Performs a simple call transfer to the specified destination.
`int`
`transferToAnother(Call dest)`
Transfers a call to destination of another running call.
`int`
`update(CallParams params)`
Updates a running call according to supplied call parameters or parameters
changed in the LinphoneCore.
`void`
`zoom(float zoomFactor, float cx, float cy)`
Performs a zoom of the video displayed during a call.

## Method Details

### getAudioStats

CallStats getAudioStats()
Returns a copy of the call statistics for the audio stream.

Returns:
  a `CallStats` object for the audio stream or null if it isn't
  available.

### getAuthenticationToken

String getAuthenticationToken()
Returns the ZRTP authentication token to verify.

Returns:
  the authentication token to verify or null if ZRTP isn't enabled.

### getAuthenticationTokenVerified

boolean getAuthenticationTokenVerified()
Returns whether ZRTP authentication token is verified.
If not, it must be verified by users as described in ZRTP procedure. Once done,
the application must inform of the results with `setAuthenticationTokenVerified(boolean)`
.

Returns:
  true if authentication token is verifed, false otherwise.

### setAuthenticationTokenVerified

void setAuthenticationTokenVerified(boolean verified)
Sets the result of ZRTP short code verification by user.
If remote party also does the same, it will update the ZRTP cache so that
user's verification will not be required for the two users.

Parameters:
  `verified` - whether the ZRTP SAS is verified.

### getAverageQuality

float getAverageQuality()
Returns call quality averaged over all the duration of the call.
See `getCurrentQuality()` for more details about quality measurement.

Returns:
  the call average quality since tbe beginning of the call.

### setBaudotDetectionEnabled

void setBaudotDetectionEnabled(boolean enabled)
Indicates whether received Baudot tones should be detected.
The Baudot functionality is to be enabled first by calling
invalid reference

    Core#enableBaudot

.

Parameters:
  `enabled` - wether or not to detect received Baudot tones.

### setBaudotMode

void setBaudotMode(BaudotMode mode)
Defines the Baudot mode for the call.
The Baudot functionality is to be enabled first by calling
invalid reference

    Core#enableBaudot

.

Parameters:
  `mode` - The Baudot mode to use for the call.

### setBaudotPauseTimeout

void setBaudotPauseTimeout(int seconds)
Set the Baudot significant pause timeout after which a LETTERS tone is
retransmitted before resuming transmission (in seconds).
Default is 5s. The Baudot functionality is to be enabled first by calling
invalid reference

    Core#enableBaudot

.

Parameters:
  `seconds` - The significant pause timeout in seconds.

### setBaudotSendingStandard

void setBaudotSendingStandard(BaudotStandard standard)
Defines the Baudot standard to use for sending Baudot tones in the call.
The Baudot functionality is to be enabled first by calling
invalid reference

    Core#enableBaudot

.

Parameters:
  `standard` - The Baudot standard to use for sending Baudot tones.

### getCallLog

CallLog getCallLog()
Gets the call log associated to this call.

Returns:
  The `CallLog` associated with the specified `Call`.

### isCameraEnabled

boolean isCameraEnabled()
Returns if camera pictures are allowed to be sent to the remote party.

Returns:
  true if local video stream is being sent, false otherwise.

### setCameraEnabled

void setCameraEnabled(boolean enabled)
Indicates whether camera input should be sent to remote end.

Parameters:
  `enabled` - wether or not to send local video stream.

### getChatRoom

ChatRoom getChatRoom()
Obtain a chat room for real time messaging from a call if not already existing,
else return existing one.
No reference is given to the caller: the chat room will be deleted when the
call is ended. The call must have been accepted with a real time text stream
(see
invalid reference

    CallParams#enableRealtimeText

).

Returns:
  `ChatRoom` where real time messaging can take place or null if
  chat room couldn't be created.

### getConference

Conference getConference()
Returns the associated conference object if any.

Returns:
  A pointer on `Conference` or null if the call is not part of any
  conference.

### getCore

Core getCore()
Gets the core that has created the specified call.

Returns:
  The `Core` object that has created the specified call.

### getCurrentParams

CallParams getCurrentParams()
Returns current parameters associated to the call.

Returns:
  the current `CallParams` of this call.

### getCurrentQuality

float getCurrentQuality()
Obtains real-time quality rating of the call.
Based on local RTP statistics and RTCP feedback, a quality rating is computed
and updated during all the duration of the call. This function returns its
value at the time of the function call. It is expected that the rating is
updated at least every 5 seconds or so. The rating is a floating point number
comprised between 0 and 5.
4-5 = good quality 3-4 = average quality 2-3 = poor quality 1-2 = very poor
quality 0-1 = can't be worse, mostly unusable

Returns:
  The function returns -1 if no quality measurement is available, for
  example if no active audio stream exist. Otherwise it returns the quality
  rating.

### getDir

Call.Dir getDir()
Returns direction of the call (incoming or outgoing).

Returns:
  the `Call.Dir`

### getDiversionAddress

Address getDiversionAddress()
Returns the diversion address associated to this call.

Returns:
  the diversion address as `Address` or null.

### getDuration

int getDuration()
Returns call's duration in seconds.

Returns:
  the call's duration in seconds.

### isEchoCancellationEnabled

boolean isEchoCancellationEnabled()
Returns if echo cancellation is enabled.
see:
invalid reference

    Core#enableEchoCancellation

.

Returns:
  true if echo cancellation is enabled, false otherwise.

### setEchoCancellationEnabled

void setEchoCancellationEnabled(boolean enable)
Enables or disables echo cancellation for this call.
see:
invalid reference

    Core#enableEchoCancellation

.

Parameters:
  `enable` - wether to enable echo cancellation or not.

### isEchoLimiterEnabled

boolean isEchoLimiterEnabled()
Returns if echo limiter is enabled.
see:
invalid reference

    Core#enableEchoLimiter

.

Returns:
  true if echo limiter is enabled, false otherwise.

### setEchoLimiterEnabled

void setEchoLimiterEnabled(boolean enable)
Enables or disables echo limiter for this call.
see:
invalid reference

    Core#enableEchoLimiter

.

Parameters:
  `enable` - wether to enable echo limiter or not.

### getErrorInfo

ErrorInfo getErrorInfo()
Returns full details about call errors or termination reasons.

Returns:
  `ErrorInfo` object holding the reason error.

### getInputAudioDevice

AudioDevice getInputAudioDevice()
Gets the current input device for this call.

Returns:
  the `AudioDevice` used by this call as input or null if there is
  currently no soundcard configured (depending on the state of the call)

### setInputAudioDevice

void setInputAudioDevice(AudioDevice audioDevice)
Sets the given `AudioDevice` as input for this call only.

Parameters:
  `audioDevice` - The `AudioDevice`. null does nothing.

### isRecording

@Deprecated boolean isRecording()
Deprecated.
15/09/2021 Use `CallParams.isRecording()` instead.
Returns whether or not the call is currently being recorded.

Returns:
  true if recording is in progress, false otherwise

### getLocalAuthenticationToken

String getLocalAuthenticationToken()
Returns the local ZRTP authentication token to verify by the remote.

Returns:
  the local authentication token to verify or null if ZRTP isn't enabled.

### getLocalTag

String getLocalTag()
Returns the local tag of the `Call`.

Returns:
  the local tag.

### getMicrophoneMuted

boolean getMicrophoneMuted()
Gets microphone muted state.
Note that the microphone may be disabled globally if false was given to
invalid reference

    Core#enableMic

.

Returns:
  The microphone muted state.
  warning: This method returns state of the mute capability of the call passed as
  argument. If this call is part of a conference, it is strongly recommended to
  call `Conference.getMicrophoneMuted()` to know whether this device is muted
  or not.

### setMicrophoneMuted

void setMicrophoneMuted(boolean muted)
Sets microphone muted state.
The boolean value given is applied logical-and with the value given to
invalid reference

    Core#enableMic

.

Parameters:
  `muted` - The microphone muted state.
  warning: This method only mutes the call passed as argument. If this call is
  part of a conference, it is strongly recommended to call `Conference.setMicrophoneMuted(boolean)`
  to ensure that the setting is correctly apply across all participants and the
  conference callbacks are called.

### getMicrophoneVolumeGain

float getMicrophoneVolumeGain()
Gets microphone volume gain.
If the sound backend supports it, the returned gain is equal to the gain set
with the system mixer.

Returns:
  double Percentage of the max supported volume gain. Valid values are in
  [ 0.0 : 1.0 ]. In case of failure, a negative value is returned

### setMicrophoneVolumeGain

void setMicrophoneVolumeGain(float volume)
Sets microphone volume gain.
If the sound backend supports it, the new gain will synchronized with the
system mixer.

Parameters:
  `volume` - Percentage of the max supported gain. Valid values are in [ 0.0 :
  1.0 ].

### getNativeVideoWindowId

Object getNativeVideoWindowId()
Get the native window handle of the video window, casted as an unsigned long.
see: `Core.setNativeVideoWindowId(java.lang.Object)` for a general discussion about window
IDs.

Returns:
  the native video window id (type may vary depending on platform).

### setNativeVideoWindowId

void setNativeVideoWindowId(Object windowId)
Set the native video window id where the video is to be displayed.
For MacOS, Linux, Windows: if not set or 0 a window will be automatically
created, unless the special id -1 is given. see: `Core.setNativeVideoWindowId(java.lang.Object)`
for a general discussion about window IDs.

Parameters:
  `windowId` - the native video window id.

### getOutputAudioDevice

AudioDevice getOutputAudioDevice()
Gets the current output device for this call.

Returns:
  the `AudioDevice` used by this call as output or null if there is
  currently no soundcard configured (depending on the state of the call)

### setOutputAudioDevice

void setOutputAudioDevice(AudioDevice audioDevice)
Sets the given `AudioDevice` as output for this call only.

Parameters:
  `audioDevice` - The `AudioDevice`. null does nothing.

### getParams

CallParams getParams()
Returns read-only local parameters associated with the call.
This is typically the parameters passed at call initiation to `Core.inviteAddressWithParams(org.linphone.core.Address, org.linphone.core.CallParams)`
or `acceptWithParams(org.linphone.core.CallParams)`, or some default parameters if no `CallParams`
was explicitely passed during call initiation.

Returns:
  the call's local parameters.

### setParams

void setParams(CallParams params)
Sets call parameters - advanced and not recommended feature - use with caution.
Local call parameters applicable to an outgoing or incoming shall usually be
passed to `Core.inviteAddressWithParams(org.linphone.core.Address, org.linphone.core.CallParams)` or `acceptWithParams(org.linphone.core.CallParams)`.
However, in some cases it might be desirable from a software design standpoint
to modify local parameters outside of the application layer, typically in the
purpose of implementing a custom logic including special headers in INVITE or
200Ok requests, driven by a call_state_changed listener method. This function
accepts to assign a new `CallParams` only in `Call.State.OutgoingInit`
and `Call.State.IncomingReceived` states.

Parameters:
  `params` - the `CallParams` object

### getPlayVolume

float getPlayVolume()
Gets the mesured playback volume level (received from remote) in dbm0.

Returns:
  float Volume level in percentage.

### getPlayer

Player getPlayer()
Gets a player associated with the call to play a local file and stream it to
the remote peer.

Returns:
  A `Player` object.

### getReason

Reason getReason()
Returns the reason for a call termination (either error or normal termination)

Returns:
  the `Reason` of the call termination.

### getRecordVolume

float getRecordVolume()
Gets the mesured record volume level (sent to remote) in dbm0.

Returns:
  float Volume level in percentage.

### getReferTo

String getReferTo()
Gets the refer-to uri (if the call was transferred).

Returns:
  The refer-to uri of the call (if it was transferred).

### getReferToAddress

Address getReferToAddress()
Gets the refer-to uri (if the call was transferred).

Returns:
  The refer-to uri of the call (if it was transferred).

### getReferredByAddress

Address getReferredByAddress()
Gets the referred-by address, which is set when an incoming call is received as
a consequence of a call transfer operation by a third party.
The referred-by address is the sip identity of the one who initiated the
transfer.

Returns:
  The referred-by address

### getRemoteAddress

Address getRemoteAddress()
Returns the remote address associated to this call.

Returns:
  The `Address` of the remote end of the call.

### getRemoteAddressAsString

@Deprecated String getRemoteAddressAsString()
Deprecated.
06/07/2020 use `getRemoteAddress()` instead.
Returns the remote address associated to this call as a string.
The result string must be freed by user using ms_free().

Returns:
  the remote address as a string.

### getRemoteAuthenticationTokens

String[] getRemoteAuthenticationTokens()
Returns a list of 4 remote ZRTP authentication tokens.
The user needs to select one.

Returns:
  the authentication tokens to verify or null if ZRTP isn't enabled.

### getRemoteContact

String getRemoteContact()
Returns the far end's sip contact as a string, if available.

Returns:
  the remote contact or null.

### getRemoteContactAddress

Address getRemoteContactAddress()
Returns the far end's sip contact as an address, if available.

Returns:
  the remote contact as a `Address` or null.

### getRemoteParams

CallParams getRemoteParams()
Returns call parameters proposed by remote.
This is useful when receiving an incoming call, to know whether the remote
party supports video, encryption or whatever.

Returns:
  the `CallParams` suggested by the remote or null.

### getRemoteTag

String getRemoteTag()
Returns the remote tag of the `Call`.

Returns:
  the remote tag.

### getRemoteUserAgent

String getRemoteUserAgent()
Returns the far end's user agent description string, if available.

Returns:
  the remote user agent or null.

### getReplacedCall

Call getReplacedCall()
Returns the call object this call is replacing, if any.
Call replacement can occur during call transfers. By default, the core
automatically terminates the replaced call and accept the new one. This
function allows the application to know whether a new incoming call is a one
that replaces another one.

Returns:
  the `Call` object this call is replacing or null.

### getRequestAddress

Address getRequestAddress()
The address to which the call has been sent, taken directly from the SIP
request-URI of the INVITE.
Usually equal to the To field, except when e.g. using a fallback contact
address. You should probably use getToAddress() instead, unless you know what
you're doing.

Returns:
  the `Address` matching the URI of the INVITE request.

### getSpeakerMuted

boolean getSpeakerMuted()
Gets speaker muted state.

Returns:
  The speaker muted state.

### setSpeakerMuted

void setSpeakerMuted(boolean muted)
Sets speaker muted state.

Parameters:
  `muted` - The speaker muted state.

### getSpeakerVolumeGain

float getSpeakerVolumeGain()
Gets speaker volume gain.
If the sound backend supports it, the returned gain is equal to the gain set
with the system mixer.

Returns:
  Percentage of the max supported volume gain. Valid values are in [ 0.0
  : 1.0 ]. In case of failure, a negative value is returned

### setSpeakerVolumeGain

void setSpeakerVolumeGain(float volume)
Sets speaker volume gain.
If the sound backend supports it, the new gain will synchronized with the
system mixer.

Parameters:
  `volume` - Percentage of the max supported gain. Valid values are in [ 0.0 :
  1.0 ].

### getState

Call.State getState()
Retrieves the call's current state.

Returns:
  the current `Call.State` of this call.

### getStreamCount

int getStreamCount()
Returns the number of stream for the given call.

Returns:
  the amount of streams for this call.

### getTextStats

CallStats getTextStats()
Returns a copy of the call statistics for the text stream.

Returns:
  a `CallStats` object for the text stream or null if it isn't
  available.

### getToAddress

Address getToAddress()
Returns the to address with its headers associated to this call.

Returns:
  the `Address` matching the TO of the call.

### getTransferState

Call.State getTransferState()
Returns the current transfer state, if a transfer has been initiated from this
call.
see: linphone_core_transfer_call , linphone_core_transfer_call_to_another

Returns:
  the `Call.State`.

### getTransferTargetCall

Call getTransferTargetCall()
When this call has received a transfer request, returns the new call that was
automatically created as a result of the transfer.

Returns:
  the transfer `Call` created.

### getTransfererCall

Call getTransfererCall()
Gets the transferer if this call was started automatically as a result of an
incoming transfer request.
The call in which the transfer request was received is returned in this case.

Returns:
  The transferer `Call` if the specified call was started
  automatically as a result of an incoming transfer request, null otherwise.

### getVideoSource

VideoSourceDescriptor getVideoSource()
Gets the video source of a call.

Returns:
  The `VideoSourceDescriptor` describing the video source that is
  set

### setVideoSource

void setVideoSource(VideoSourceDescriptor descriptor)
Sets the video source of a call.

Parameters:
  `descriptor` - The `VideoSourceDescriptor` describing the video source
  to set

### getVideoStats

CallStats getVideoStats()
Returns a copy of the call statistics for the video stream.

Returns:
  a `CallStats` object for the video stream or null if it isn't
  available.

### getZrtpCacheMismatchFlag

boolean getZrtpCacheMismatchFlag()
Returns whether ZRTP cache mismatch.
If mismatch, the ZRTP authentication token must be verified by users as
described in ZRTP procedure.

Returns:
  true if ZRTP cache mismatch, false otherwise.

### accept

int accept()
Accepts an incoming call.
Basically the application is notified of incoming calls within the
call_state_changed callback of the LinphoneCoreVTable structure, where it will
receive a #LinphoneCallStateIncoming event with the associated `Call`
object. The application can later accept the call using this method.

Returns:
  0 on success, -1 on failure

### acceptEarlyMedia

int acceptEarlyMedia()
Accepts an early media session for an incoming call.
This is identical as calling `acceptEarlyMediaWithParams(org.linphone.core.CallParams)` with null
parameters.

Returns:
  0 if successful, -1 otherwise
  see: `acceptEarlyMediaWithParams(org.linphone.core.CallParams)`

### acceptEarlyMediaWithParams

int acceptEarlyMediaWithParams(CallParams params)
When receiving an incoming, accepts to start a media session as early-media.
This means the call is not accepted but audio invalid input: '&' video streams can be
established if the remote party supports early media. However, unlike after
call acceptance, mic and camera input are not sent during early-media, though
received audio invalid input: '&' video are played normally. The call can then later be fully
accepted using `accept()` or `acceptWithParams(org.linphone.core.CallParams)`.

Parameters:
  `params` - The call parameters to use (can be null).
Returns:
  0 if successful, -1 otherwise

### acceptTransfer

void acceptTransfer()
Accepts and execute a transfer (ie an incoming REFER request), to use when
[sip] 'auto_accept_refer' property is false.
Default behaviour is to accept and execute the transfer automatically.

### acceptUpdate

int acceptUpdate(CallParams params)
Accepts call modifications initiated by other end through an incoming reINVITE
or UPDATE request.
`acceptUpdate(org.linphone.core.CallParams)` is typically used in response to a `Call.State.UpdatedByRemote`
state notification. When such notification arrives, the application has several
choices:
An application may use `getRemoteParams()` to get information about the
call parameters proposed by the other party (for example when he wants to add a
video stream), in order to decide what to do, like for example requesting the
end-user approval.
The params argument must be constructed with `Core.createCallParams(org.linphone.core.Call)`.
`Core.createCallParams(org.linphone.core.Call)` will initialize the returned `CallParams`
according to the offered parameters, previously used local parameters and local
policies. For example, if the remote user-agent wants to add a video stream but
the `VideoActivationPolicy` of the `Core` is to not automatically
accept video, then the `CallParams` will get its video stream disabled.
The application is free to modify the `CallParams` before passing it to
`acceptUpdate(org.linphone.core.CallParams)`. Using null as params argument is allowed and equivalent
to passing a `CallParams` created by `Core.createCallParams(org.linphone.core.Call)` and
left unmodified.
The answer generated by `acceptUpdate(org.linphone.core.CallParams)` at first follows RFC3264 SDP
offer answer model rules. The supplied `CallParams` allows to give
application instructions about the response to generate, such as accepting or
not the enablement of new stream. `acceptUpdate(org.linphone.core.CallParams)` does not have the
pretention to control every aspect of the generation of the answer of an SDP
offer/answer procedure.

Parameters:
  `params` - A `CallParams` object describing the call parameters to
  accept.
Returns:
  0 if successful, -1 otherwise (actually when this function call is
  performed outside ot `Call.State.UpdatedByRemote` state)

### acceptWithParams

int acceptWithParams(CallParams params)
Accepts an incoming call, with parameters.
Basically the application is notified of incoming calls within the
call_state_changed callback of the LinphoneCoreVTable structure, where it will
receive a #LinphoneCallStateIncoming event with the associated `Call`
object. The application can later accept the call using this method.

Parameters:
  `params` - The specific parameters for this call, for example whether video
  is accepted or not. Use null to use default parameters.
Returns:
  0 on success, -1 on failure

### askedToAutoanswer

boolean askedToAutoanswer()
Tells whether a call has been asked to autoanswer.

Returns:
  A boolean value telling whether the call has been asked to autoanswer

### cancelDtmfs

void cancelDtmfs()
Stops current DTMF sequence sending.
Please note that some DTMF could be already sent, depending on when this
function call is delayed from `sendDtmfs(java.lang.String)`. This function will be
automatically called if call state change to anything but
LinphoneCallStreamsRunning.

### checkAuthenticationTokenSelected

void checkAuthenticationTokenSelected(String selectedValue)
Verifies that the half ZRTP short authentication string (SAS) selected by the
user is correct, and set the verification result accordingly.
If the remote party also verifies his/her half code correctly, the ZRTP cache
will be updated to prevent future verification requirements for these two
users.

Parameters:
  `selectedValue` - The ZRTP SAS selected by the user, or an empty string if
  the user cannot find the SAS

### confirmGoClear

void confirmGoClear()
Method to be called after the user confirm that he/she is notifed of the on
going Go Clear procedure.
warning: this operation must be imperatevely initiate by a user action on
sending of the GoClear ACK

### createNativeVideoWindowId

Object createNativeVideoWindowId()
Create a native video window id where the video is to be displayed.
see: `Core.setNativeVideoWindowId(java.lang.Object)` for a general discussion about window
IDs.

Returns:
  the native video window id (type may vary depending on platform).

### createNotify

Event createNotify(String event)
Create a `Event` in order to send NOTIFY requests through the SIP dialog
created by the call.
The call state must have passed through `Call.State.Connected`.

Parameters:
  `event` - The event type to be notified.
Returns:
  a new `Event`

### decline

int decline(Reason reason)
Declines a pending incoming call, with a reason.

Parameters:
  `reason` - The reason for rejecting the call: `Reason.Declined` or
  `Reason.Busy`
Returns:
  0 on success, -1 on failure

### declineWithErrorInfo

int declineWithErrorInfo(ErrorInfo ei)
Declines a pending incoming call, with a `ErrorInfo` object.

Parameters:
  `ei` - `ErrorInfo` containing more information on the call rejection.
Returns:
  0 on success, -1 on failure

### deferUpdate

int deferUpdate()
When receiving a `Call.State.UpdatedByRemote` state notification, prevent
`Core` from performing an automatic answer.
When receiving a `Call.State.UpdatedByRemote` state notification (ie an
incoming reINVITE), the default behaviour of `Core` is defined by the
"defer_update_default" option of the "sip" section of the config. If this
option is 0 (the default) then the `Core` automatically answers the
reINIVTE with call parameters unchanged. However when for example when the
remote party updated the call to propose a video stream, it can be useful to
prompt the user before answering. This can be achieved by calling
linphone_core_defer_call_update during the call state notification, to
deactivate the automatic answer that would just confirm the audio but reject
the video. Then, when the user responds to dialog prompt, it becomes possible
to call `acceptUpdate(org.linphone.core.CallParams)` to answer the reINVITE, with video possibly
enabled in the `CallParams` argument.
The `Call.State.UpdatedByRemote` notification can also happen when receiving
an INVITE without SDP. In such case, an unchanged offer is made in the 200Ok,
and when the ACK containing the SDP answer is received, `Call.State.UpdatedByRemote`
is triggered to notify the application of possible changes in the media
session. However in such case defering the update has no meaning since we just
generated an offer.

Returns:
  0 if successful, -1 if the `deferUpdate()` was done outside a
  valid #LinphoneCallUpdatedByRemote notification

### getStats

CallStats getStats(StreamType type)
Returns a copy of the call statistics for a particular stream type.

Parameters:
  `type` - the `StreamType`
Returns:
  a `CallStats` object for the given stream or null if stream isn't
  available.

### getToHeader

@Deprecated String getToHeader(String headerName)
Deprecated.
27/10/2020. Use `CallParams.getCustomHeader(java.lang.String)` on `getRemoteParams()`
instead.
Returns the value of the header name.

Parameters:
  `headerName` - the name of the header to check.
Returns:
  the value of the header if exists.

### hasTransferPending

boolean hasTransferPending()
Returns if this calls has received a transfer that has not been executed yet.
Pending transfers are executed when this call is being paused or closed,
locally or by remote endpoint. If the call is already paused while receiving
the transfer request, the transfer immediately occurs.

Returns:
  true if transfer is pending, false otherwise.

### mediaInProgress

boolean mediaInProgress()
Indicates whether an operation is in progress at the media side.
It can be a bad idea to initiate signaling operations (adding video, pausing
the call, removing video, changing video parameters) while the media is busy in
establishing the connection (typically ICE connectivity checks). It can result
in failures generating loss of time in future operations in the call.
Applications are invited to check this function after each call state change to
decide whether certain operations are permitted or not.

Returns:
  true if media is busy in establishing the connection, false otherwise.

### notifyRinging

void notifyRinging()
Starts the process of replying 180 Ringing.
This function is used in conjonction with
invalid reference

    Core#enableAutoSendRinging

.
If the automatic sending of the 180 Ringing is disabled, this function needs to
be called manually before the call timeouts.

### oglRender

void oglRender()
Calls generic OpenGL render for a given call.

### pause

int pause()
Pauses the call.
If a music file has been setup using `Core.setPlayFile(java.lang.String)`, this file will
be played to the remote user. The only way to resume a paused call is to call
`resume()`.

Returns:
  0 on success, -1 on failure
  see: `resume()`

### redirect

@Deprecated int redirect(String redirectUri)
Deprecated.
27/10/2020. Use `redirectTo(org.linphone.core.Address)` instead.
Redirect the specified call to the given redirect URI.

Parameters:
  `redirectUri` - The URI to redirect the call to
Returns:
  0 if successful, -1 on error.

### redirectTo

int redirectTo(Address redirectAddress)
Redirects the specified call to the given redirect Address.

Parameters:
  `redirectAddress` - The `Address` to redirect the call to
Returns:
  0 if successful, -1 on error.

### requestNotifyNextVideoFrameDecoded

void requestNotifyNextVideoFrameDecoded()
Requests the callback passed to linphone_call_cbs_set_next_video_frame_decoded
to be called the next time the video decoder properly decodes a video frame.

### resume

int resume()
Resumes a call.
The call needs to have been paused previously with `pause()`.

Returns:
  0 on success, -1 on failure
  see: `pause()`

### sendDtmf

int sendDtmf(char dtmf)
Sends the specified dtmf.
The dtmf is automatically played to the user. see: `Core.setUseRfc2833ForDtmf(boolean)`

Parameters:
  `dtmf` - The dtmf name specified as a char, such as '0', '#' etc...
Returns:
  0 if successful, -1 on error.

### sendDtmfs

int sendDtmfs(String dtmfs)
Sends a list of dtmf.
The dtmfs are automatically sent to remote, separated by some needed
customizable delay. Sending is canceled if the call state changes to something
not LinphoneCallStreamsRunning. see: `Core.setUseRfc2833ForDtmf(boolean)`

Parameters:
  `dtmfs` - A dtmf sequence such as '123#123123'
Returns:
  -2 if there is already a DTMF sequence, -1 if call is not ready, 0
  otherwise.

### sendInfoMessage

int sendInfoMessage(InfoMessage info)
Sends an info message through an established call.

Parameters:
  `info` - the `InfoMessage` to send

### sendVfuRequest

void sendVfuRequest()
Requests remote side to send us a Video Fast Update.

### skipZrtpAuthentication

void skipZrtpAuthentication()
If the user skips the ZRTP authentication check, stop the security alert.

### startRecording

void startRecording()
Starts call recording.
Video record is only available if this function is called in state
StreamRunning. The output file where audio is recorded must be previously
specified with `CallParams.setRecordFile(java.lang.String)`.

### stopRecording

void stopRecording()
Stops call recording.

### takePreviewSnapshot

int takePreviewSnapshot(String filePath)
Takes a photo of currently captured video and write it into a jpeg file.
Note that the snapshot is asynchronous, an application shall not assume that
the file is created when the function returns.

Parameters:
  `filePath` - a path where to write the jpeg content.
Returns:
  0 if successful, -1 otherwise (typically if jpeg format is not
  supported).

### takeVideoSnapshot

int takeVideoSnapshot(String filePath)
Takes a photo of currently received video and write it into a jpeg file.
Note that the snapshot is asynchronous, an application shall not assume that
the file is created when the function returns.

Parameters:
  `filePath` - a path where to write the jpeg content.
Returns:
  0 if successful, -1 otherwise (typically if jpeg format is not
  supported).

### terminate

int terminate()
Terminates (ends) a call.

Returns:
  0 on success, -1 on failure

### terminateWithErrorInfo

int terminateWithErrorInfo(ErrorInfo ei)
Terminates a call with additional information, serialized as a Reason header.

Parameters:
  `ei` - `ErrorInfo`
Returns:
  0 on success, -1 on failure

### transfer

@Deprecated int transfer(String referTo)
Deprecated.
27/10/2020. Use `transferTo(org.linphone.core.Address)` instead.
Performs a simple call transfer to the specified destination.
The remote endpoint is expected to issue a new call to the specified
destination. The current call remains active and thus can be later paused or
terminated. It is possible to follow the progress of the transfer provided that
transferee sends notification about it. In this case, the
transfer_state_changed callback of the LinphoneCoreVTable is invoked to notify
of the state of the new call at the other party. The notified states are
#LinphoneCallOutgoingInit , #LinphoneCallOutgoingProgress,
#LinphoneCallOutgoingRinging and #LinphoneCallConnected.

Parameters:
  `referTo` - The destination the call is to be referred to.
Returns:
  0 on success, -1 on failure

### transferTo

int transferTo(Address referTo)
Performs a simple call transfer to the specified destination.
The remote endpoint is expected to issue a new call to the specified
destination. The current call remains active and thus can be later paused or
terminated. It is possible to follow the progress of the transfer provided that
transferee sends notification about it. In this case, the 'transfer state
changed' callback of the `CoreListener` is invoked to notify of the state
of the new call to the other party. The notified states are `Call.State.OutgoingInit`
, `Call.State.OutgoingProgress`, `Call.State.OutgoingRinging` and `Call.State.Connected`
.

Parameters:
  `referTo` - The `Address` the call is to be referred to.
Returns:
  0 on success, -1 on failure

### transferToAnother

int transferToAnother(Call dest)
Transfers a call to destination of another running call.
This is used for "attended transfer" scenarios. The transferred call is
supposed to be in paused state, so that it is able to accept the transfer
immediately. The destination call is a call previously established to introduce
the transferred person. This method will send a transfer request to the
transferred person. The phone of the transferred is then expected to
automatically call to the destination of the transfer. The receiver of the
transfer will then automatically close the call with us (the 'dest' call). It
is possible to follow the progress of the transfer provided that transferee
sends notification about it. In this case, the "transfer state changed"
callback of the `CoreListener` is invoked to notify of the state of the
new call to the other party. The notified states are `Call.State.OutgoingInit`
, `Call.State.OutgoingProgress`, `Call.State.OutgoingRinging` and `Call.State.Connected`
.

Parameters:
  `dest` - A running call whose remote person will receive the transfer
Returns:
  0 on success, -1 on failure

### update

int update(CallParams params)
Updates a running call according to supplied call parameters or parameters
changed in the LinphoneCore.
It triggers a SIP reINVITE in order to perform a new offer/answer of media
capabilities. Changing the size of the transmitted video after calling
linphone_core_set_preferred_video_size can be used by passing null as params
argument. In case no changes are requested through the `CallParams`
argument, then this argument can be omitted and set to null. WARNING: Updating
a call in the `Call.State.Paused` state will still result in a paused call
even if the media directions set in the params are sendrecv. To resume a paused
call, you need to call `resume()`.

Parameters:
  `params` - The new call parameters to use (may be null).
Returns:
  0 if successful, -1 otherwise.

### zoom

void zoom(float zoomFactor, float cx, float cy)
Performs a zoom of the video displayed during a call.
The zoom ensures that all the screen is fullfilled with the video.

Parameters:
  `zoomFactor` - a floating point number describing the zoom factor. A value
  1.0 corresponds to no zoom applied.
  `cx` - a floating point number pointing the horizontal center of the zoom to
  be applied. This value should be between 0.0 and 1.0.
  `cy` - a floating point number pointing the vertical center of the zoom to
  be applied. This value should be between 0.0 and 1.0.

### addListener

void addListener(CallListener listener)

### removeListener

void removeListener(CallListener listener)

### 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`