onTerminated method
Handle teminated call event raised by library (removes call instance from list and notifies UI)
Implementation
void onTerminated(int callId, int statusCode) {
_logs?.print('onTerminated callId:$callId statusCode:$statusCode');
int index = _callItems.indexWhere((c) => c.myCallId==callId);
if(index != -1) {
_cdrs?.setTerminated(callId, statusCode, _callItems[index].displName, _callItems[index].durationStr);
_callItems.removeAt(index);
_logs?.print('Removed call: $callId');
if(_confModeStarted && !hasConnectedFewCalls()) {
_confModeStarted = false;
}
notifyListeners();
}
}