replaceCall method
Implementation
Future<void> replaceCall(
CallSession existingCall, CallSession replacementCall) async {
final existingCallIndex =
calls.indexWhere((element) => element == existingCall);
if (existingCallIndex == -1) {
throw Exception('Couldn\'t find call to replace');
}
calls.removeAt(existingCallIndex);
calls.add(replacementCall);
await disposeCall(existingCall, CallErrorCode.Replaced);
await initCall(replacementCall);
onGroupCallEvent.add(GroupCallEvent.CallsChanged);
}