onRedirected method
Handle redirect response event raised by library and route it to matched call instance
Implementation
void onRedirected(int origCallId, int relatedCallId, String referTo) {
_logs?.print(
'onRedirected origCallId:$origCallId relatedCallId:$relatedCallId to:$referTo',
);
//Find 'origCallId'
CallModel? origCall = _findCall(origCallId);
if (origCall == null) return;
//Clone 'origCallId' and add to collection of calls as related one
CallModel relatedCall = CallModel(
relatedCallId,
origCall.accUri,
parseExt(referTo),
false,
origCall.hasSecureMedia,
origCall.hasVideo,
_logs,
);
_callItems.add(relatedCall);
notifyListeners();
}