twilio / voice-quickstart-android

Quickstart app for the Voice Android SDK
https://www.twilio.com/docs/api/voice-sdk/android/getting-started
MIT License
184 stars 140 forks source link

Call.getStats unexpected behaviour #508

Closed franciscommcunha closed 2 years ago

franciscommcunha commented 2 years ago

Description

We are using Call.getStats API to retrieve the MOS during a call. However, we are noticing unexpected behaviours. The documentation states that if the call is on the DISCONNECTED state, the reports will not be delivered, but reports are also not being delivered when we are on the RECONNECTING state.

We would like to know if this an unexpected behaviour although that it is not documented, or if is is an unexpected bug.

Steps to Reproduce

  1. Start an (inbound / outbound ) call
  2. Retrieving call.getStats every 5 seconds
  3. Briefly disconnect the internet connection
  4. The call will be in the RECONNECTING state
  5. Turn on the internet connection again
  6. The previous call.getStats done in a reconnecting state is not received

Expected Behavior

The previous call.getStats done in a reconnecting state should be received.

Actual Behavior

When the call is on the RECONNECTING state, the call.getStats are not being received

Versions

Voice Android SDK

[6.0.1]

OS Version

[Android 10]

Device Model

[Xiaomi Redmi 8]

kbagchiGWC commented 2 years ago

@franciscommcunha Thanks for filing the issue and bringing to our attention. The getStats() API requires the Call to be in CONNECTED Call.State. I have created an internal issue for tracking this work. We will fix this in the next release and notify you here.

Apologies for the confusion and thanks again.

oliveira-marcio commented 2 years ago

@franciscommcunha Thanks for filing the issue and bringing to our attention. The getStats() API requires the Call to be in CONNECTED Call.State. I have created an internal issue for tracking this work. We will fix this in the next release and notify you here.

Apologies for the confusion and thanks again.

Hi, @kbagchiGWC. I work with @franciscommcunha but I'm from the iOS team. I can confirm that this same behavior happens in the current iOS SDK (6.3.0) and iOS 15.2 as well. Can you also open an internal issue for the iOS SDK? Thanks!

kbagchiGWC commented 2 years ago

@oliveira-marcio thanks for reaching out. I have created a ticket for iOS as well.

kbagchiGWC commented 2 years ago

Javadoc has been updated in https://www.twilio.com/docs/voice/sdks/android/3x-changelog#610.