Rate this page:

CallListener

This API is in beta and subject to change.

Interface that handles call events.

Methods

onCallConnected

Copy URL
fun onCallConnected(call: 

Call

,
headers:

Map<String, String>?

):

Unit

This API is in beta and subject to change.

Triggered after call is connected.

Parameters

  • call:

    Call

    Call object that invoked the event

  • headers:

    Map<String, String>?

    Optional

    Optional SIP headers received with message

Returns

  • type:

    Unit

onCallDisconnected

Copy URL
fun onCallDisconnected(call: 

Call

,
headers:

Map<String, String>?

,
answeredElsewhere:

Boolean

):

Unit

This API is in beta and subject to change.

Triggered after the call is disconnected.

Parameters

  • call:

    Call

    Call object that invoked the event

  • headers:

    Map<String, String>?

    Optional

    Optional SIP headers received with message

  • answeredElsewhere:

    Boolean

    Whether the call is answered on another device via SIP forking

Returns

  • type:

    Unit

onStartRinging

Copy URL
fun onStartRinging(call: 

Call

,
headers:

Map<String, String>?

):

Unit

This API is in beta and subject to change.

Call ringing. Start playing call progress tone now.

Parameters

  • call:

    Call

    Call object that invoked the event

  • headers:

    Map<String, String>?

    Optional

    Optional SIP headers received with message

Returns

  • type:

    Unit

onCallFailed

Copy URL
fun onCallFailed(call: 

Call

,
code:

Int

,
description:

String

,
headers:

Map<String, String>?

):

Unit

This API is in beta and subject to change.

Triggered if call is failed.

Parameters

  • call:

    Call

    Call object that invoked the event

  • code:

    Int

    Status code of the call failure

  • description:

    String

    Status message of the call failure

  • headers:

    Map<String, String>?

    Optional

    Optional SIP headers received with message

Returns

  • type:

    Unit

onStopRinging

Copy URL
fun onStopRinging(call: 

Call

):

Unit

This API is in beta and subject to change.

Triggered after audio is started in the call.

The call media starts soon. If you are playing progress tones, stop them in this event.

Parameters

  • call:

    Call

    Call object that invoked the event

Returns

  • type:

    Unit

onCallUpgradeRequested

Copy URL
fun onCallUpgradeRequested(call: 

Call

,
decision:

CallUpgradeDecision

):

Unit

This API is in beta and subject to change.

Triggered when an audio call is requested to upgrade to a video call.

Parameters

Returns

  • type:

    Unit

onCallUpgradeRequestTimeout

Copy URL
fun onCallUpgradeRequestTimeout(call: 

Call

):

Unit

This API is in beta and subject to change.

Triggered when a voice call upgrade request has timed out.

Parameters

  • call:

    Call

    Call object that invoked the event

Returns

  • type:

    Unit

onSIPInfoReceived

Copy URL
fun onSIPInfoReceived(call: 

Call

,
type:

String

,
content:

String

,
headers:

Map<String, String>?

):

Unit

This API is in beta and subject to change.

Triggered when an INFO message is received.

Parameters

  • call:

    Call

    Call object that invoked the event

  • type:

    String

    MIME type of INFO message

  • content:

    String

    Body of INFO message

  • headers:

    Map<String, String>?

    Optional

    Optional SIP headers received with message

Returns

  • type:

    Unit

onMessageReceived

Copy URL
fun onMessageReceived(call: 

Call

,
text:

String

):

Unit

This API is in beta and subject to change.

Triggered when a message is received within the call.

Implemented atop SIP INFO for communication between call endpoint and Voximplant cloud, and is separated from Voximplant messaging API.

Parameters

  • call:

    Call

    Call object that invoked the event

  • text:

    String

    Message text

Returns

  • type:

    Unit

onCallStatsReceived

Copy URL
fun onCallStatsReceived(call: 

Call

,
callStats:

CallStats

):

Unit

This API is in beta and subject to change.

Triggered periodically with interval configured with CallManagerConfig.statsCollectionInterval with call statistics.

Parameters

  • call:

    Call

    Call object that invoked the event

  • callStats:

    CallStats

    Call statistics

Returns

  • type:

    Unit

onRemoteVideoStreamAdded

Copy URL
fun onRemoteVideoStreamAdded(call: 

Call

,
videoStream:

RemoteVideoStream

):

Unit

This API is in beta and subject to change.

Triggered when a remote participant has started sending video in the call.

Parameters

  • call:

    Call

    Call object that invoked the event

  • videoStream:

    RemoteVideoStream

    Video stream of a remote participant

Returns

  • type:

    Unit

onRemoteVideoStreamRemoved

Copy URL
fun onRemoteVideoStreamRemoved(call: 

Call

,
videoStream:

RemoteVideoStream

):

Unit

This API is in beta and subject to change.

Triggered when a remote participant has stopped sending video in the call.

Parameters

  • call:

    Call

    Call object that invoked the event

  • videoStream:

    RemoteVideoStream

    Video stream of a remote participant

Returns

  • type:

    Unit

onCallReconnecting

Copy URL
fun onCallReconnecting(call: 

Call

):

Unit

This API is in beta and subject to change.

Triggered when the connection to the Voximplant Cloud is lost due to a network issues and media streams may be interrupted in the call.

Once the connection to the Voximplant Cloud is restored and media streams are active, CallListener.onCallReconnected event is triggered.

Until CallListener.onCallReconnected event is invoked, the following API calls will fail with CallError.InvalidCallState error:

  1. Call.startSendingVideo
  2. Call.stopSendingVideo
  3. Call.hold

Parameters

  • call:

    Call

    Call object that invoked the event

Returns

  • type:

    Unit

onCallReconnected

Copy URL
fun onCallReconnected(call: 

Call

):

Unit

This API is in beta and subject to change.

Triggered when the connection to the Voximplant Cloud is restored and media stream are active in the call.

Parameters

  • call:

    Call

    Call object that invoked the event

Returns

  • type:

    Unit