Reconnect Call
Reconnects media for an existing call when recovery is possible. Use the active callId to reattach to the call flow.
Signature
// Callback version
fun reconnectCall(
callId: String,
callback: (Exception?) -> Unit
)
// Suspend version
suspend fun reconnectCall(
callId: String
)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
callId | string | Yes | Identifier of the call to reconnect |
Return Type
Returns void (or Promise<void> for Web). Completion indicates reconnection attempt has finished.
Usage Example
// Callback
client.reconnectCall("callId") {
it?.let { err ->
// Handle Error in reconnecting call
println("Error in reconnecting call: $err")
}
}
// Coroutine
try {
client.reconnectCall("callId")
}
catch (e:Error) {
// Handle Error in reconnecting call
}
Errors
| Error Type | Error Code | Description |
|---|---|---|
INTERNAL_ERROR | voice:error:no_call_found / media errors | Call is not found or media cannot be re-established |
NETWORK_ERROR | internal:error:serviceNotAvailable | Network/service issue during reconnection |
UNKNOWN_ERROR | N/A | Unexpected failure |
For complete error reference and handling guidelines, see Error Reference.
Notes
- Reconnection is typically used after media/network interruption
- Reconnection viability depends on call state and backend timing window
- Listen for media lifecycle events to reflect reconnect state in UI
Related Events
onCallMediaDisconnect- Fired when media disconnectsonCallMediaReconnecting- Fired when reconnection startsonCallMediaReconnection- Fired when reconnection succeeds