Package org.linphone.core

# Interface CallListener

All Known Implementing Classes:
  `CallListenerStub`

public interface CallListener
That class holds all the callbacks which are called by `Call` objects.
Use `Factory#createCallCbs` to create an instance. Then, call the
callback setters on the events you need to monitor and pass the object to a
`Call` instance through `Call.addListener(org.linphone.core.CallListener)`.

## Method Summary

Modifier and Type
Method
Description
`void`
`onAckProcessing(Call call, Headers ack, boolean isReceived)`
Callback for notifying the processing SIP ACK messages.
`void`
`onAudioDeviceChanged(Call call, AudioDevice audioDevice)`
Callback to notify that the audio device has been changed.
`void`
`onAuthenticationTokenVerified(Call call, boolean verified)`
Call authentication token verified callback.
`void`
`onBaudotDetected(Call call, BaudotStandard standard)`
Callback to notify that Baudot tones have been detected in the audio received
from the remote.
`void`
`onCameraNotWorking(Call call, String cameraName)`
Callback to notify that the camera is not working and has been changed to "No
Webcam".
`void`
`onDtmfReceived(Call call, int dtmf)`
Callback for being notified of received DTMFs.
`void`
`onEncryptionChanged(Call call, boolean on, String authenticationToken)`
Call encryption changed callback.
`void`
`onGoclearAckSent(Call call)`
GoClear ACK sent callback.
`void`
`onInfoMessageReceived(Call call, InfoMessage message)`
Callback for receiving info messages.
`void`
`onNextVideoFrameDecoded(Call call)`
Callback to notify a next video frame has been decoded.
`void`
`onReceiveMasterKeyChanged(Call call, String receiveMasterKey)`
Call receive master key changed callback.
`void`
`onReferRequested(Call call, Address referTo)`
Callback for notifying when a call transfer (refer) is requested.
`void`
`onRemoteRecording(Call call, boolean recording)`
Callback to notify that the call is being recorded by the remote.
`void`
`onSecurityLevelDowngraded(Call call)`
Call security level downgraded callback.
`void`
`onSendMasterKeyChanged(Call call, String sendMasterKey)`
Call send master key changed callback.
`void`
`onSnapshotTaken(Call call, String filePath)`
Callback for notifying a snapshot taken.
`void`
`onStateChanged(Call call, Call.State state, String message)`
Call state notification callback.
`void`
`onStatsUpdated(Call call, CallStats stats)`
Callback for receiving quality statistics for calls.
`void`
`onTmmbrReceived(Call call, int streamIndex, int tmmbr)`
Callback for notifying a received TMMBR.
`void`
`onTransferStateChanged(Call call, Call.State state)`
Callback for notifying progresses of transfers.
`void`
`onVideoDisplayErrorOccurred(Call call, int errorCode)`
Callback to notify that there are errors from the video rendering.

## Method Details

### onDtmfReceived

void onDtmfReceived(@NonNull Call call, int dtmf)
Callback for being notified of received DTMFs.

Parameters:
  `call` - `Call` object that received the dtmf
  `dtmf` - The ascii code of the dtmf

### onGoclearAckSent

void onGoclearAckSent(@NonNull Call call)
GoClear ACK sent callback.

Parameters:
  `call` - the `Call` on which the GoClear ACK was sent.

### onSecurityLevelDowngraded

void onSecurityLevelDowngraded(@NonNull Call call)
Call security level downgraded callback.

Parameters:
  `call` - `Call` object whose security level is downgraded.

### onEncryptionChanged

void onEncryptionChanged(@NonNull Call call, boolean on, @Nullable String authenticationToken)
Call encryption changed callback.

Parameters:
  `call` - `Call` object whose encryption is changed.
  `on` - Whether encryption is activated.
  `authenticationToken` - An authentication_token, currently set for ZRTP kind
  of encryption only.

### onAuthenticationTokenVerified

void onAuthenticationTokenVerified(@NonNull Call call, boolean verified)
Call authentication token verified callback.

Parameters:
  `call` - `Call` object whose authentication is verified.
  `verified` - Whether encryption is verified.

### onSendMasterKeyChanged

void onSendMasterKeyChanged(@NonNull Call call, @Nullable String sendMasterKey)
Call send master key changed callback.

Parameters:
  `call` - `Call` object whose encryption is changed.
  `sendMasterKey` - The send master key of the SRTP session.

### onReceiveMasterKeyChanged

void onReceiveMasterKeyChanged(@NonNull Call call, @Nullable String receiveMasterKey)
Call receive master key changed callback.

Parameters:
  `call` - `Call` object whose encryption is changed.
  `receiveMasterKey` - The receive master key of the SRTP session.

### onInfoMessageReceived

void onInfoMessageReceived(@NonNull Call call, @NonNull InfoMessage message)
Callback for receiving info messages.

Parameters:
  `call` - `Call` whose info message belongs to.
  `message` - `InfoMessage` object.

### onStateChanged

void onStateChanged(@NonNull Call call, Call.State state, @NonNull String message)
Call state notification callback.

Parameters:
  `call` - `Call` whose state is changed.
  `state` - The new `Call#State` of the call
  `message` - An informational message about the state.

### onStatsUpdated

void onStatsUpdated(@NonNull Call call, @NonNull CallStats stats)
Callback for receiving quality statistics for calls.

Parameters:
  `call` - `Call` object whose statistics are notified
  `stats` - `CallStats` object

### onTransferStateChanged

void onTransferStateChanged(@NonNull Call call, Call.State state)
Callback for notifying progresses of transfers.

Parameters:
  `call` - `Call` that was transferred
  `state` - The `Call#State` of the call to transfer target at the far
  end.

### onReferRequested

void onReferRequested(@NonNull Call call, @NonNull Address referTo)
Callback for notifying when a call transfer (refer) is requested.

Parameters:
  `call` - `Call` associated with the transfer request.
  `referTo` - The target `Address` to which the call is being
  transferred.

### onAckProcessing

void onAckProcessing(@NonNull Call call, @NonNull Headers ack, boolean isReceived)
Callback for notifying the processing SIP ACK messages.

Parameters:
  `call` - `Call` for which an ACK is being received or sent
  `ack` - the ACK `Headers`
  `isReceived` - if true this ACK is an incoming one, otherwise it is an ACK
  about to be sent.

### onTmmbrReceived

void onTmmbrReceived(@NonNull Call call, int streamIndex, int tmmbr)
Callback for notifying a received TMMBR.

Parameters:
  `call` - LinphoneCall for which the TMMBR has changed
  `streamIndex` - the index of the current stream
  `tmmbr` - the value of the received TMMBR

### onSnapshotTaken

void onSnapshotTaken(@NonNull Call call, @NonNull String filePath)
Callback for notifying a snapshot taken.

Parameters:
  `call` - LinphoneCall for which the snapshot was taken
  `filePath` - the name of the saved file

### onNextVideoFrameDecoded

void onNextVideoFrameDecoded(@NonNull Call call)
Callback to notify a next video frame has been decoded.

Parameters:
  `call` - LinphoneCall for which the next video frame has been decoded

### onCameraNotWorking

void onCameraNotWorking(@NonNull Call call, @NonNull String cameraName)
Callback to notify that the camera is not working and has been changed to "No
Webcam".
A camera is detected as mis-functionning as soon as it outputs no frames at all
during a period of 5 seconds. This check is only performed on desktop
platforms, in the purpose of notifying camera failures, for example if when a
usb cable gets disconnected.

Parameters:
  `call` - LinphoneCall for which the next video frame has been decoded
  `cameraName` - the name of the non-working camera

### onVideoDisplayErrorOccurred

void onVideoDisplayErrorOccurred(@NonNull Call call, int errorCode)
Callback to notify that there are errors from the video rendering.
The error code depends of the implementation.

Parameters:
  `call` - LinphoneCall
  `errorCode` - error code from render. It depends of the renderer.

### onAudioDeviceChanged

void onAudioDeviceChanged(@NonNull Call call, @NonNull AudioDevice audioDevice)
Callback to notify that the audio device has been changed.

Parameters:
  `call` - LinphoneCall for which the audio device has changed
  `audioDevice` - the new audio device used for this call

### onRemoteRecording

void onRemoteRecording(@NonNull Call call, boolean recording)
Callback to notify that the call is being recorded by the remote.

Parameters:
  `call` - LinphoneCall for which the audio is recorded
  `recording` - true if the call is being recorded by the remote, false
  otherwise

### onBaudotDetected

void onBaudotDetected(@NonNull Call call, BaudotStandard standard)
Callback to notify that Baudot tones have been detected in the audio received
from the remote.

Parameters:
  `call` - LinphoneCall where Baudot tones have been detected
  `standard` - The Baudot standard of the detected tones.