element-hq / element-ios

A glossy Matrix collaboration client for iOS
https://element.io
GNU Affero General Public License v3.0
1.74k stars 497 forks source link

IOS calls not working #3054

Open myoussef89 opened 4 years ago

myoussef89 commented 4 years ago

I tried to test from android > android on different networks and its working with the turn server, when I try from android > IOS or from IOS > IOS on the same network it's working. when I try from android > IOS or from IOS > IOS on cellular networks it's not working.

did anyone faced like an issue before, or any clue for that?

Android 9 IOS13.4 synapse:v0.31.1

Zer0x00 commented 4 years ago

Same problem here on iOS 13.4 and a new installed server.

manuroe commented 4 years ago

This looks like a TURN issue.

Have you set up a TURN server on your server? If not, there is a "Allow fallback call assist sever" in Settings > Call to fallback to turn.matrix.org.

Zer0x00 commented 4 years ago

Yes, we have a TURN server set up and we are explicitly not allowing any fallbacks in the app.

bylmzio commented 4 years ago

This looks like a TURN issue.

Have you set up a TURN server on your server? If not, there is a "Allow fallback call assist sever" in Settings > Call to fallback to turn.matrix.org.

What could it be? We configured TURN server, like it is described in the docs. Cellular networks work in Android completely without fallback.

andrewhotlab commented 4 years ago

Same problems here. VoIP doesn't work for the most calls when an iOS device is involved (only the first call after rebooting the phone works). No problem when using Riot-web in the same network scenario. We have no Android device to test at the moment.

Synapse 1.10.0 coturn 4.5.1.1 Riot-iOS 0.10.5 (on iOS 13.4 and 12.4.6) Riot-web 1.5.15

stuart12 commented 4 years ago

I am getting lots of reports of bad audio calls when I ring an iPhone using my Android device. See my comment in #2897. Is your TURN server configured like mine? When you say that calls fail what do you mean? One-way audio? Which way? Or an error message?

andrewhotlab commented 4 years ago

Thank you @stuart12, here is the configuration of our coturn instance

listening-ip=x.x.x.x
relay-ip=x.x.x.x
min-port=16384
max-port=32767
use-auth-secret
static-auth-secret=xxxx
realm=xxx.yyy.zz
user-quota=12
total-quota=1200
no-tcp-relay
cert=/var/db/acme/certs/xxx.yyy.zz/fullchain.cer
pkey=/var/db/acme/certs/xxx.yyy.zz/xxx.yyy.zz.key
log-file=/var/tmp/turn.log
no-multicast-peers
mobility
cli-password=xxxx
web-admin
ne=2

The most frequent issue after the first (video)call, which usually works fine, is that the caller's audio is not heard by the called party.

mowtheair commented 4 years ago

Same issue here. With my coturn/matrix-synapse setup behind NAT, I actually have better results using my cotrun server as compared to using the fail back only for calls and the trun server disabled in-house. My issue seems to be specific to calling the iphone - one way audio. If i kill the app, it works PERFECTLY, second call is one way audio. Easy to recreate. I've looked at all the settings i can think of and rebuilt the server fresh, verbose logging, webRTC diagnostics, etc., etc. Is there any fix for this? It is silly to have the app with buttons that do not work as advertised. Thanks

andrewhotlab commented 4 years ago

We just made a video call test by using the latest version from the App Store (0.11.5 #20200518190504). The same reproducible problem arise: the first VoIP call between two devices works fine, while on the second shot the caller audio is not heard by the called party.

myoussef89 commented 4 years ago

I believe the main issue is described here, it's not about coturn server https://github.com/vector-im/riot-ios/issues/2714

andrewhotlab commented 4 years ago

Hi to all. I just tried the latest release of Riot for iOS (pardon: Element v1.0.0), and VoIP calls and video calls are working now!!

Unfortunately, incoming call notification when iPhone is locked are horrible (just as message notification: no ring!!)... but at least real-time communications are available to iOS users finally. Thanks!

Our environment:

Synapse 1.14.0 coturn 4.5.1.2 Element iOS 1.0.0 (on iOS 13.6 and 12.4.7)

HeikoBoettger commented 4 years ago

I have a similar issue and discovered and always when it´s not working I see the following log message in coturn:

40664: check_stun_auth: Cannot find credentials of user <number:@username:domain>

When explicitly terminating the IOS app, it immediately works. Is it possible that the app caches the credentials for the coturn server which it via the matrix-server?

Unfortunately I am not familia with the exact procedure but I wonder how does element/riot know that the credentials have expired and need to be renewed.