Rate this page:

Call

This API is in beta and subject to change.

Interface that manages call operations like answer, reject, hang up and mid-call operations like hold, start/stop video and others.

Methods

start

Copy URL
@Throws
fun start():

Unit

This API is in beta and subject to change.

Starts the outgoing call.

Returns

  • type:

    Unit

answer

Copy URL
@Throws
fun answer(callSettings:

CallSettings

):

Unit

This API is in beta and subject to change.

Answers the call. Should be used only for incoming calls.

Parameters

  • callSettings:

    CallSettings

    Call settings with additional call parameters, such as preferred video codec, custom data, extra headers etc.

Returns

  • type:

    Unit

reject

Copy URL
@Throws
fun reject(mode:

RejectMode

,
headers:

Map<String, String>?

):

Unit

This API is in beta and subject to change.

Rejects the call. Should be used only for incoming calls.

Parameters

  • headers:

    Map<String, String>?

    Optional

    Optional set of headers to be sent to the Voximplant Cloud. Names should begin with "X-" to be processed by SDK

Returns

  • type:

    Unit

hangup

Copy URL
fun hangup(headers: 

Map<String, String>?

):

Unit

This API is in beta and subject to change.

Hangs up the call.

Parameters

  • headers:

    Map<String, String>?

    Optional

    Optional set of headers to be sent to the Voximplant Cloud. Names should begin with "X-" to be processed by SDK

Returns

  • type:

    Unit

muteAudio

Copy URL
fun muteAudio(muted: 

Boolean

):

Unit

This API is in beta and subject to change.

Enables or disables audio from microphone into the call.

Parameters

  • muted:

    Boolean

    Whether to mute the microphone

Returns

  • type:

    Unit

startSendingVideo

Copy URL
fun startSendingVideo(videoStream: 

LocalVideoStream

,
callback:

CallCallback?

):

Unit

This API is in beta and subject to change.

Starts sending video in the call.

Parameters

  • videoStream:

    LocalVideoStream

    Video stream to be sent within the call

  • callback:

    CallCallback?

    Optional

    Object to receive the result of this operation

Returns

  • type:

    Unit

stopSendingVideo

Copy URL
fun stopSendingVideo(callback: 

CallCallback?

):

Unit

This API is in beta and subject to change.

Stops sending video in the call.

If the operation is completed successfully, you must close the local video stream that has been previously used to send the video. Otherwise the video resources are not released.

To close the local video stream, use LocalVideoStream.close API.

Parameters

  • callback:

    CallCallback?

    Optional

    Object to receive the result of this operation

Returns

  • type:

    Unit

hold

Copy URL
fun hold(enable: 

Boolean

,
callback:

CallCallback?

):

Unit

This API is in beta and subject to change.

Holds or unholds the call.

Parameters

  • enable:

    Boolean

    Whether to put the call on hold

  • callback:

    CallCallback?

    Optional

    Object to receive the result of this operation

Returns

  • type:

    Unit

sendDTMF

Copy URL
fun sendDTMF(tone: 

String

):

Unit

This API is in beta and subject to change.

Sends DTMF tones to the call.

Parameters

  • tone:

    String

    DTMF tones

Returns

  • type:

    Unit

sendInfo

Copy URL
fun sendInfo(mimeType: 

String

,
content:

String

,
headers:

Map<String, String>?

):

Unit

This API is in beta and subject to change.

Sends an INFO message within the call.

Parameters

  • mimeType:

    String

    MIME type of info

  • content:

    String

    Custom string data

  • headers:

    Map<String, String>?

    Optional

    Optional set of headers to be sent with message. Names should begin with "X-" to be processed by SDK

Returns

  • type:

    Unit

sendMessage

Copy URL
fun sendMessage(text: 

String

):

Unit

This API is in beta and subject to change.

Sends a message within the call.

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

Parameters

  • text:

    String

    Message text

Returns

  • type:

    Unit

setCallListener

Copy URL
fun setCallListener(listener: 

CallListener?

):

Unit

This API is in beta and subject to change.

Sets a listener to be notified of the call events

Parameters

  • listener:

    CallListener?

    Optional

    The listener to be notified of call events. If null, previously set listener is removed.

Returns

  • type:

    Unit

setQualityIssueListener

Copy URL
fun setQualityIssueListener(listener: 

QualityIssueListener?

):

Unit

This API is in beta and subject to change.

Sets QualityIssueListener to monitor issues that affect call quality.

Parameters

Returns

  • type:

    Unit

Props

id

Copy URL
val id: 

String

This API is in beta and subject to change.

The call id.

Returns

  • type:

    String

state

Copy URL
val state: 

CallState

This API is in beta and subject to change.

The call state.

Returns

remoteDisplayName

Copy URL
val remoteDisplayName: 

String?

This API is in beta and subject to change.

The participant's display name.

For incoming calls it is available immediately, for outgoing calls it is available after the CallListener.onCallConnected event.

Returns

  • type:

    String?

remoteSipUri

Copy URL
val remoteSipUri: 

String?

This API is in beta and subject to change.

The participant SIP URI.

For incoming calls it is available immediately, for outgoing calls it is available after the CallListener.onCallConnected event.

Returns

  • type:

    String?

direction

Copy URL
val direction: 

CallDirection

This API is in beta and subject to change.

Whether the call is incoming or outgoing.

Returns

isVideoEnabled

Copy URL
val isVideoEnabled: 

Boolean

This API is in beta and subject to change.

Whether video is enabled in the call. True if video send or receive is enabled by current user, false otherwise.

Returns

  • type:

    Boolean

duration

Copy URL
val duration: 

Long

This API is in beta and subject to change.

The call duration in milliseconds.

Returns

  • type:

    Long

localVideoStream

Copy URL
val localVideoStream: 

LocalVideoStream?

This API is in beta and subject to change.

Outgoing video stream during the call or null if the local video is disabled.

Returns

currentQualityIssues

Copy URL
val currentQualityIssues: 

Map<QualityIssue, QualityIssueLevel>

This API is in beta and subject to change.

The current status for all quality issues.

isMuted

Copy URL
val isMuted: 

Boolean

This API is in beta and subject to change.

Whether the user's microphone is muted. You can change this state via Call.muteAudio.

Returns

  • type:

    Boolean

number

Copy URL
val number: 

String?

This API is in beta and subject to change.

Specifies the number used to make outgoing call.

Null, if the call is incoming.

Returns

  • type:

    String?