Skip to content

WEBRTC-2635: [Android] WebRTC Stats Exposure on Call Level #512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 17 commits into from

Conversation

ai-swe-agent
Copy link
Contributor

Description

This PR implements WebRTC stats exposure on call level for the Android SDK, similar to the existing implementation in the JS SDK.

Changes

  • Added CallQualityMetrics class to represent real-time call quality metrics
  • Added MOSCalculator class to calculate Mean Opinion Score and call quality
  • Updated WebRTCReporter to collect and emit call quality metrics
  • Updated Call and TelnyxClient classes to support the debug parameter
  • Added onCallQualityChange callback for real-time metrics

Usage

When creating an invitation or answering an invitation, you can now pass a debug parameter:

// When making a call
call.newInvite(
    callerName = "John Doe",
    callerNumber = "+1234567890",
    destinationNumber = "+1987654321",
    clientState = "some-state",
    debug = true
)

// When answering a call
call.acceptCall(
    callId = callId,
    destinationNumber = "destination",
    debug = true
)

// Listen for call quality metrics
call.onCallQualityChange = { metrics ->
    // Access metrics.jitter, metrics.rtt, metrics.mos, metrics.quality
    Log.d("CallQuality", "MOS: ${metrics.mos}, Quality: ${metrics.quality}")
}

Related

Fixes WEBRTC-2635

openhands-agent and others added 17 commits April 17, 2025 16:22
- Added CallQualityMetrics class to represent real-time call quality metrics
- Added MOSCalculator class to calculate Mean Opinion Score and call quality
- Updated WebRTCReporter to collect and emit call quality metrics
- Updated Call and TelnyxClient classes to support the debug parameter
- Added onCallQualityChange callback for real-time metrics
This reverts commit 6e4d487, reversing
changes made to e3e5b11.
@Oliver-Zimmerman
Copy link
Collaborator

To be reviewed here:
#516

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants