Rate this page:

Call

Methods

answer

Copy URL

Unit

answer(

CallSettings

callSettings
)

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

Throws

CallException if the call is already answered or RECORD_AUDIO permission is not granted.

hangup

Copy URL

Unit

hangup(

Map<String, String>?

headers
)

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

hold

Copy URL

Unit

hold(

Boolean

enable,

CallCallback?

callback
)

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

muteAudio

Copy URL

Unit

muteAudio(

Boolean

muted
)

Enables or disables audio from microphone into the call.

Parameters

  • muted:

    Boolean

    Whether to mute the microphone

Returns

  • type:

    Unit

reject

Copy URL

Unit

reject(

RejectMode

mode,

Map<String, String>?

headers
)

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

Throws

CallException if the call is already answered or ended

sendDTMF

Copy URL

Unit

sendDTMF(

String

tone
)

Sends DTMF tones to the call.

Parameters

  • tone:

    String

    DTMF tones

Returns

  • type:

    Unit

sendInfo

Copy URL

Unit

sendInfo(

String

mimeType,

String

content,

Map<String, String>?

headers
)

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

Unit

sendMessage(

String

text
)

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

Unit

setCallListener(

CallListener?

listener
)

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

Unit

setQualityIssueListener(

QualityIssueListener?

listener
)

Sets QualityIssueListener to monitor issues that affect call quality.

Parameters

Returns

  • type:

    Unit

start

Copy URL

Unit

start()

Starts the outgoing call.

Returns

  • type:

    Unit

Throws

CallException if the call is already started, if RECORD_AUDIO (for audio and video call) or CAMERA (for video call) permissions are not granted, if the method is called for incoming call.

startSendingVideo

Copy URL

Unit

startSendingVideo(

LocalVideoStream

videoStream,

CallCallback?

callback
)

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

Unit

stopSendingVideo(

CallCallback?

callback
)

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.

Parameters

  • callback:

    CallCallback?

    Optional

    Object to receive the result of this operation

Returns

  • type:

    Unit

toString

Copy URL

String

toString()

Returns

  • type:

    String

Props

currentQualityIssues

Copy URL
public 

Map<QualityIssue, QualityIssueLevel>

currentQualityIssues

The current status for all quality issues.

direction

Copy URL
public 

CallDirection

direction

Whether the call is incoming or outgoing.

Returns

duration

Copy URL
public 

Long

duration

The call duration in milliseconds.

Returns

  • type:

    Long

id

Copy URL
public 

String

id

The call id.

Returns

  • type:

    String

isMuted

Copy URL
public 

Boolean

isMuted

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

Returns

  • type:

    Boolean

isOnHold

Copy URL
public 

Boolean

isOnHold

Whether the call is on hold. You can change this state via Call.hold.

Returns

  • type:

    Boolean

isVideoEnabled

Copy URL
public 

Boolean

isVideoEnabled

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

Returns

  • type:

    Boolean

localVideoStream

Copy URL
public 

LocalVideoStream?

localVideoStream

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

Returns

number

Copy URL
public 

String

number

Specifies the number used to make outgoing call.

Returns

  • type:

    String

remoteDisplayName

Copy URL
public 

String?

remoteDisplayName

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
public 

String?

remoteSipUri

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?

remoteVideoStreams

Copy URL
public 

List<RemoteVideoStream>

remoteVideoStreams

The list of remote video streams.

Returns

state

Copy URL
public 

CallState

state

The call state.

Returns