CallListener
This API is in beta and subject to change.
Interface that handles call events.
Methods
onCallConnected
fun onCallConnected(call: , headers: Map<String, String>?
): Unit
This API is in beta and subject to change.
Triggered after call is connected.
Parameters
call:
Call object that invoked the event
headers:
Map<String, String>?
OptionalOptional SIP headers received with message
Returns
type:
Unit
onCallDisconnected
fun onCallDisconnected(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 object that invoked the event
headers:
Map<String, String>?
OptionalOptional SIP headers received with message
answeredElsewhere:
Boolean
Whether the call is answered on another device via SIP forking
Returns
type:
Unit
onStartRinging
fun onStartRinging(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 object that invoked the event
headers:
Map<String, String>?
OptionalOptional SIP headers received with message
Returns
type:
Unit
onCallFailed
fun onCallFailed(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 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>?
OptionalOptional SIP headers received with message
Returns
type:
Unit
onStopRinging
fun onStopRinging(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 object that invoked the event
Returns
type:
Unit
onCallUpgradeRequested
fun onCallUpgradeRequested(call: , decision: ): Unit
This API is in beta and subject to change.
Triggered when an audio call is requested to upgrade to a video call.
Parameters
call:
Call object that invoked the event
decision:
Returns
type:
Unit
onCallUpgradeRequestTimeout
fun onCallUpgradeRequestTimeout(call: ): Unit
This API is in beta and subject to change.
Triggered when a voice call upgrade request has timed out.
Parameters
call:
Call object that invoked the event
Returns
type:
Unit
onSIPInfoReceived
fun onSIPInfoReceived(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 object that invoked the event
type:
String
MIME type of INFO message
content:
String
Body of INFO message
headers:
Map<String, String>?
OptionalOptional SIP headers received with message
Returns
type:
Unit
onMessageReceived
fun onMessageReceived(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 object that invoked the event
text:
String
Message text
Returns
type:
Unit
onCallStatsReceived
fun onCallStatsReceived(call: , callStats: ): Unit
This API is in beta and subject to change.
Triggered periodically with interval configured with CallManagerConfig.statsCollectionInterval with call statistics.
Returns
type:
Unit
onRemoteVideoStreamAdded
fun onRemoteVideoStreamAdded(call: , videoStream: ): 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 object that invoked the event
videoStream:
Video stream of a remote participant
Returns
type:
Unit
onRemoteVideoStreamRemoved
fun onRemoteVideoStreamRemoved(call: , videoStream: ): 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 object that invoked the event
videoStream:
Video stream of a remote participant
Returns
type:
Unit
onCallReconnecting
fun onCallReconnecting(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:
Parameters
call:
Call object that invoked the event
Returns
type:
Unit