Call
Methods
setCallListener
fun setCallListener(listener: ): Unit
Sets a listener to be notified of the call events
Parameters
- listener:Optional- The listener to be notified of call events. If null, previously set listener is removed. 
Returns
- type:- Unit 
start
@Throwsfun start(): Unit
Starts the outgoing call.
Returns
- type:- Unit 
answer
@Throwsfun answer(callSettings: ): Unit
Answers the call. Should be used only for incoming calls.
Parameters
- callSettings:- Call settings with additional call parameters, such as preferred video codec, custom data, extra headers etc. 
Returns
- type:- Unit 
reject
@Throwsfun reject(mode: , headers: Map<String, String>?
): Unit
Rejects the call. Should be used only for incoming calls.
Parameters
- mode:
- 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
fun hangup(headers: Map<String, String>?
): Unit
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
fun muteAudio(muted: Boolean
): Unit
Enables or disables audio from microphone into the call.
Parameters
- muted:- Boolean - Whether to mute the microphone 
Returns
- type:- Unit 
startSendingVideo
fun startSendingVideo(videoStream: , callback: ): Unit
Starts sending video in the call.
Parameters
- videoStream:- Video stream to be sent within the call 
- callback:Optional- Object to receive the result of this operation 
Returns
- type:- Unit 
stopSendingVideo
fun stopSendingVideo(callback: ): Unit
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:Optional- Object to receive the result of this operation 
Returns
- type:- Unit 
hold
fun hold(enable: Boolean
, callback: ): Unit
Holds or unholds the call.
Parameters
- enable:- Boolean - Whether to put the call on hold 
- callback:Optional- Object to receive the result of this operation 
Returns
- type:- Unit 
sendDTMF
fun sendDTMF(tone: String
): Unit
Sends DTMF tones to the call.
Parameters
- tone:- String - DTMF tones 
Returns
- type:- Unit 
sendInfo
fun sendInfo(mimeType: String
, content: String
, headers: Map<String, String>?
): Unit
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
fun sendMessage(text: String
): Unit
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 
setQualityIssueListener
fun setQualityIssueListener(listener: ): Unit
Sets QualityIssueListener to monitor issues that affect call quality.
Parameters
- listener:Optional- The QualityIssueListener instance or null 
Returns
- type:- Unit 
toString
fun toString(): String
Returns
- type:- String 
Props
id
val id: String
The call id.
Returns
- type:- String 
number
val number: String
Specifies the number used to make outgoing call.
Returns
- type:- String 
direction
val direction: Whether the call is incoming or outgoing.
Returns
- type:
remoteDisplayName
val remoteDisplayName: String?
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
val remoteSipUri: String?
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? 
isVideoEnabled
val isVideoEnabled: Boolean
Whether video is enabled in the call. True if video send or receive is enabled by current user, false otherwise.
Returns
- type:- Boolean 
duration
val duration: Long
The call duration in milliseconds.
Returns
- type:- Long 
localVideoStream
val localVideoStream: Outgoing video stream during the call or null if the local video is disabled.
Returns
- type:
isMuted
var isMuted: Boolean
Whether the user's microphone is muted. You can change this state via Call.muteAudio.
Returns
- type:- Boolean 
remoteVideoStreams
val remoteVideoStreams: List<RemoteVideoStream>
The list of remote video streams.
Returns
- type:- List<RemoteVideoStream> 
currentQualityIssues
val currentQualityIssues: The current status for all quality issues.
Returns
- type: