Skip to content

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

ParameterTypeDescription
callIdstringIdentifier of the affected call
errorVonageError / VGErrorStructured SDK error payload

Errors

Error TypeError CodeDescription
INTERNAL_ERRORvoice:error:media_timeout, media:error:*Local SDK or media-layer failure (SDP negotiation, peer connection, audio track, etc.)
NETWORK_ERRORinternal:error:serviceNotAvailableNetwork drop or service unavailable during media
SESSION_ERRORsystem:error:expired-token and relatedSession expired or authentication failure
CS_ERRORVarious backend error codesBackend signalling error during media setup or negotiation
UNKNOWN_ERRORN/AUnclassified — 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

Built with VitePress.