twilio / twilio-voice-ios

Programmable Voice SDK by Twilio
https://www.twilio.com/voice
38 stars 14 forks source link

DTMF tones are not audible from the user who sends them #91

Closed gianpispi closed 2 years ago

gianpispi commented 2 years ago

Hi everyone!

Description

We have two iOS apps that use the last version of Twilio Voice (6.3.1). When sending digits, the receiver can hear them, but not the user who sends them.

We have an old version of one of these two apps that integrates the 6.0.2 SDK, and there it works as intended, where both sides can hear the tones.

Steps to Reproduce

  1. Start a call
  2. Send a digit via sendDigits(_:)
  3. Nothing audible

Code

call.sendDigits("3")

Expected Behavior

Both sides can hear the DTMF tones

Actual Behavior

The sender cannot hear the DTMF tones; only the receiver can.

Reproduces How Often

Always

Versions

I tested 6.3.1, 6.2.0

Voice iOS SDK

6.3.1 via SPM

Xcode

13.2.1

iOS Version

15.4

iOS Device

Generic iOS device

bobiechen-twilio commented 2 years ago

Hi @gianpispi

The Voice SDK does not play DTMF tones for the local client. To workaround this, you can use the playback frameworks such as AVAudioPlayer to play tone files in the app at the same time when calling sendDigits().

ream88 commented 2 years ago

@bobiechen-twilio it did this in the past, right? Could playing it locally via AVAudioPlayer lead to sending the DTMF tones multiple times? Because the microphone listens to it, as its played via AVAudioPlayer and therefore the other side hears it a second time?