On Call Hangup
Fired when a call is terminated. This includes local or remote hangup and timeout/end scenarios.
Event Registration
fun setOnCallHangupListener(
fn: (callId: String, callQuality: RTCQuality, reason: HangupReason) -> Unit
): Subscription
Usage Example
client.setOnCallHangupListener { call, callQuality, reason ->
println("Received $reason callQuality: $callQuality for Call $call")
}
Event Data
| Parameter | Type | Description |
|---|---|---|
callId | string | Identifier of the call that ended |
callQuality | RTCQuality | Call quality metrics summary — see below |
reason | HangupReason | Reason the call ended — see below |
RTCQuality
| Property | Type | Description |
|---|---|---|
mos_score | float | Mean Opinion Score — overall perceived call quality (higher is better) |
quality_percentage | float | Quality expressed as a percentage (0–100) |
jitter_min_var | float | Minimum jitter variance observed |
jitter_max_var | float | Maximum jitter variance observed |
jitter_loss_rate | float | Packet loss rate attributable to jitter |
jitter_burst_rate | float | Burst loss rate attributable to jitter |
flaw_total | integer | Total number of detected flaws or errors |
packet_cnt | integer | Total number of packets transmitted |
packet_loss_perc | float | Packet loss as a percentage |
HangupReason
| Android / Web value | iOS value | Description |
|---|---|---|
remoteReject / REMOTE_REJECT | VGHangupReasonRemoteReject | Remote party rejected the call |
remoteHangup / REMOTE_HANGUP | VGHangupReasonRemoteHangup | Remote party hung up |
remoteNoAnswerTimeout / REMOTE_NO_ANSWER_TIMEOUT | VGHangupReasonRemoteNoAnswerTimeout | Remote did not answer within the timeout period |
localHangup / LOCAL_HANGUP | VGHangupReasonLocalHangup | Local party hung up |
mediaTimeout / MEDIA_TIMEOUT | VGHangupReasonMediaTimeout | Media session timed out |
Notes
- Use
reasonto differentiate user actions from remote termination/timeouts - Final call cleanup and UI transitions should be driven from this event
Related Actions
hangup- End an active call