calling: update getIceServers to use new turn routing endpoint

Co-authored-by: Adel Lahlou <adel@signal.com>
This commit is contained in:
adel-signal
2024-03-29 10:17:56 -07:00
committed by GitHub
parent 32223acf5b
commit 94c7de6c65
2 changed files with 12 additions and 2 deletions

View File

@@ -2613,12 +2613,20 @@ export class CallingClass {
const isContactUntrusted = !isInSystemContacts(conversation.attributes);
const callSettings = {
// only include hostname with urlsWithIps
// proritize ice servers with IPs to avoid DNS
iceServers: [
{
hostname: iceServer.hostname,
username: iceServer.username,
password: iceServer.password,
urls: (iceServer.urlsWithIps ?? []).slice(),
},
{
hostname: '',
username: iceServer.username,
password: iceServer.password,
urls: iceServer.urls.slice(),
urls: (iceServer.urls ?? []).slice(),
},
],
hideIp: shouldRelayCalls || isContactUntrusted,