Realtime
Functions
Link copied to clipboard
open suspend fun acceptRealtimeCall(id: String, session: RealtimeSessionConfig, requestOptions: RequestOptions? = null)
Accepts an incoming SIP call using the supplied realtime session configuration.
Link copied to clipboard
Hangs up a call.
Link copied to clipboard
open suspend fun realtimeCall(sdp: String, session: RealtimeSessionConfig? = null, requestOptions: RequestOptions? = null): RealtimeCall
Exchanges an SDP offer for an answer. The caller owns the WebRTC peer connection and media tracks.
Link copied to clipboard
open suspend fun realtimeClientSecret(request: RealtimeClientSecretRequest = RealtimeClientSecretRequest(), requestOptions: RequestOptions? = null): RealtimeClientSecret
Creates an ephemeral credential without exposing the server API key to a client.
Link copied to clipboard
open suspend fun <T> realtimeSession(model: ModelId? = null, callId: String? = null, secure: Boolean = true, requestOptions: RequestOptions? = null, block: suspend RealtimeConnection.() -> T): T
Opens a scoped WebSocket conversation. Use model for a new session or callId for an existing call's sideband. secure=false is only for trusted local test servers.
Link copied to clipboard
open suspend fun <T> realtimeTranslation(model: ModelId, secure: Boolean = true, requestOptions: RequestOptions? = null, block: suspend RealtimeConnection.() -> T): T
Opens a scoped continuous translation WebSocket. The server requires the model query parameter.
Link copied to clipboard
open suspend fun realtimeTranslationSecret(request: RealtimeTranslationSecretRequest, requestOptions: RequestOptions? = null): RealtimeClientSecret
Creates a continuous translation credential.
Link copied to clipboard
open suspend fun referRealtimeCall(id: String, targetUri: String, requestOptions: RequestOptions? = null)
Transfers a SIP call to a tel: or sip: URI.
Link copied to clipboard
open suspend fun rejectRealtimeCall(id: String, statusCode: Int? = null, requestOptions: RequestOptions? = null)
Rejects an incoming SIP call; statusCode is an optional SIP status.