Skip to content
Permalink
Browse files

VoIP: Stop falling back to Google for STUN

  • Loading branch information...
manuroe committed Jun 26, 2019
1 parent c09ac9f commit 24832a2b14fb72ae6f051d5aba40262d11eef65d
@@ -9,6 +9,7 @@ Improvements:
* Aggregations: Create MXSession.MXAggregations to manage Matrix aggregations API.
* Add the Matrix errors related to the password policy.
* MXHTTPClient: Add a new notification name `kMXHTTPClientMatrixErrorNotification` posted on each Matrix error.
* VoIP: Stop falling back to Google for STUN (vector-im/riot-ios/issues/2532).

Bug Fix:
* MXMediaLoader: Disable trusting the built-in anchors certificates when the certificate pinning is enabled.
@@ -128,11 +128,15 @@ - (instancetype)initWithRoomId:(NSString *)roomId callSignalingRoomId:(NSString
withUsername:callManager.turnServers.username
password:callManager.turnServers.password];
}
else
else if (callManager.fallbackSTUNServer)
{
NSLog(@"[MXCall] No TURN server: using fallback STUN server: %@", callManager.fallbackSTUNServer);
[callStackCall addTURNServerUris:@[callManager.fallbackSTUNServer] withUsername:nil password:nil];
}
else
{
NSLog(@"[MXCall] No TURN server and no fallback TURN server");
}
}
return self;
}
@@ -30,8 +30,6 @@
NSString *const kMXCallManagerConferenceStarted = @"kMXCallManagerConferenceStarted";
NSString *const kMXCallManagerConferenceFinished = @"kMXCallManagerConferenceFinished";

// Use Google STUN server as fallback
static NSString *const kMXCallManagerFallbackSTUNServer = @"stun:stun.l.google.com:19302";

@interface MXCallManager ()
{
@@ -67,7 +65,6 @@ - (instancetype)initWithMatrixSession:(MXSession *)mxSession andCallStack:(id<MX
{
_mxSession = mxSession;
calls = [NSMutableArray array];
_fallbackSTUNServer = kMXCallManagerFallbackSTUNServer;
_inviteLifetime = 30000;

_callStack = callstack;
@@ -130,13 +130,6 @@ - (void)addTURNServerUris:(NSArray<NSString *> *)uris withUsername:(nullable NSS
if (!ICEServer)
{
NSLog(@"[MXJingleCallStackCall] addTURNServerUris: Warning: Failed to create RTCICEServer with credentials %@: %@ for:\n%@", username, password, uris);

// Define at least one server
ICEServer = [[RTCIceServer alloc] initWithURLStrings:@[@"stun:stun.l.google.com:19302"]];
if (!ICEServer)
{
NSLog(@"[MXJingleCallStackCall] addTURNServerUris: Warning: Failed to create fallback RTCICEServer");
}
}

if (ICEServer)

0 comments on commit 24832a2

Please sign in to comment.
You can’t perform that action at this time.