From 63d347de8e01e499394636fa3930fdfa1fe029f8 Mon Sep 17 00:00:00 2001 From: cloudwebrtc Date: Tue, 15 Feb 2022 22:02:56 +0800 Subject: [PATCH] fix: Correctly end the call. --- lib/src/voip.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/voip.dart b/lib/src/voip.dart index 15150baf..b86ade56 100644 --- a/lib/src/voip.dart +++ b/lib/src/voip.dart @@ -383,12 +383,12 @@ class CallSession { setCallState(CallState.kRinging); - ringingTimer = Timer(Duration(milliseconds: lifetime - 3000), () { + ringingTimer = Timer(Duration(milliseconds: 30000 - lifetime), () { if (state == CallState.kRinging) { Logs().v('[VOIP] Call invite has expired. Hanging up.'); hangupParty = CallParty.kRemote; // effectively - setCallState(CallState.kEnded); fireCallEvent(CallEvent.kHangup); + hangup(CallErrorCode.InviteTimeout); } ringingTimer?.cancel(); ringingTimer = null;