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

The app is not receiving Connected events on VOIP calls using bad internet connection #498

Closed mykola-tarchanyn closed 2 years ago

mykola-tarchanyn commented 2 years ago

Description

We started noticing unexpected lockup issues when making VOIP calls. Looks like Twilio is not sending Connected event but the phone already started ringing. When the call gets stuck in CONNECTING state looks like Twilio library doesn't send us any failure events, it doesn't send us any events at all. Sometimes when you get stuck in CONNECTING state the app will recover itself and then connect to the call, but that sometimes is pretty vague and can take forever. To my testing, this happens using a bad internet connection only.

Steps to Reproduce

  1. Create VOIP call using a very slow internet.
  2. Notice Twilio is sending Connecting event but doesn't send Connected.
  3. Disconnect from the call and you will see the Disconnected event.

The issue is not consistently reproducible, so you might have to repeat it a few times to get it.

Expected Behavior

Twilio should send Connected event

Actual Behavior

Twilio doesn't send Connected event

Reproduces How Often

One day it was reproducible about 50% using slow internet connection, the other day it works fine, but the Connected even about 3-5 sec late

Twilio Call SID(s)

CA8027f7575d467930736818746eb711a2

Versions

The app is targeting API 31 running on Android 12 device

Voice Android SDK

It happens on 5.8.0 and 6.0.2

OS Version

Android 12

Device Model

Samsung S20

kbagchiGWC commented 2 years ago

We are able to see connected event in Voice Insights that confirms that the device received the event. Do you have device log? Screen Shot 2022-01-06 at 4 44 09 PM

mykola-tarchanyn commented 2 years ago

@kbagchiGWC unfortunately, I don't have any logs that could be useful to you. Also as mentioned in the ticket, it was happening for one day only, now it works fine. It makes me think there was something wrong with Twilio services where the Connected event was taking a long time to come through. I created this ticket in hopes that you could explain why that was happening and give us the confidence it won't happen again. Thanks!

kbagchiGWC commented 2 years ago

@mykola-tarchanyn The voice insight data confirms that Twilio services delivered the event. I can see a ~7 sec gap between connecting and connected event. This could be due to the slow network connection. I will close the issue for now. Please file a new ticket or reopen this one with device logs if you have further questions.