Discard incoming calls by ring_timeout (1.5 minutes).

This commit is contained in:
John Preston 2021-10-25 09:39:50 +04:00
parent fba17a8c25
commit 57345cec3b

View file

@ -172,6 +172,8 @@ Call::Call(
if (_type == Type::Outgoing) { if (_type == Type::Outgoing) {
setState(State::Requesting); setState(State::Requesting);
} else { } else {
const auto &config = _user->session().serverConfig();
_discardByTimeoutTimer.callOnce(config.callRingTimeoutMs);
startWaitingTrack(); startWaitingTrack();
} }
setupOutgoingVideo(); setupOutgoingVideo();
@ -967,6 +969,7 @@ void Call::setState(State state) {
break; break;
case State::Busy: case State::Busy:
_delegate->callPlaySound(Delegate::CallSound::Busy); _delegate->callPlaySound(Delegate::CallSound::Busy);
_discardByTimeoutTimer.cancel();
break; break;
} }
} }