Skip to content

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 ​

ParameterTypeRequiredDescription
callIdstringYesIdentifier 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 TypeError CodeDescription
INTERNAL_ERRORvoice:error:no_call_found / media errorsCall is not found or media cannot be re-established
NETWORK_ERRORinternal:error:serviceNotAvailableNetwork/service issue during reconnection
UNKNOWN_ERRORN/AUnexpected 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

Built with VitePress.