On Call Media Error
Fired when a media-related error occurs during a call.
Event Registration
fun setOnCallMediaErrorListener(
fn: (callId: String, error: VGError) -> Unit
): Subscription
Usage Example
client.setOnCallMediaErrorListener { callId, error ->
println("Received media error $error for Call $callId")
}
Event Data
| Parameter | Type | Description |
|---|---|---|
callId | string | Identifier of the affected call |
error | VonageError / VGError | Structured SDK error payload |
Errors
| Error Type | Error Code | Description |
|---|---|---|
INTERNAL_ERROR | voice:error:media_timeout, media:error:* | Local SDK or media-layer failure (SDP negotiation, peer connection, audio track, etc.) |
NETWORK_ERROR | internal:error:serviceNotAvailable | Network drop or service unavailable during media |
SESSION_ERROR | system:error:expired-token and related | Session expired or authentication failure |
CS_ERROR | Various backend error codes | Backend signalling error during media setup or negotiation |
UNKNOWN_ERROR | N/A | Unclassified — inspect error.code and error.message for details |
For complete error reference and handling guidelines, see Error Reference.
Notes
- Use this event for in-call diagnostics and recovery UX
- Error payload includes type/code/message fields for classification
Related Events
onCallMediaDisconnect- Fired when media disconnects