answer method

bool answer({
  1. String? callId,
})

Implementation

bool answer({String? callId}) {
  if (callId == null) {
    if (!callCurrentIsEmpty() &&
        _sipuaHelper.findCall(_callIdCurrent!) != null) {
      _sipuaHelper
          .findCall(_callIdCurrent!)!
          .answer(_sipuaHelper.buildCallOptions());
      return true;
    } else {
      _logger.error('You have to set callIdCurrent or pass param callId');
      return false;
    }
  } else {
    if (_sipuaHelper.findCall(callId) != null) {
      _sipuaHelper.findCall(callId)!.answer(_sipuaHelper.buildCallOptions());
      return true;
    }
    return false;
  }
}