|
|
|
|
@ -389,6 +389,9 @@ class PushNotificationHandler {
|
|
|
|
|
) async {
|
|
|
|
|
try {
|
|
|
|
|
log('🎈 example: onDidRejectIncomingCall $uuid - $callerId');
|
|
|
|
|
await voIPKit.endCall();
|
|
|
|
|
await voIPKit.dispose();
|
|
|
|
|
await FlutterCallkitIncoming.endAllCalls();
|
|
|
|
|
timeOutTimer.cancel();
|
|
|
|
|
// Cleanup on reject with API call
|
|
|
|
|
if (_currentCallId != null) {
|
|
|
|
|
@ -407,7 +410,7 @@ class PushNotificationHandler {
|
|
|
|
|
|
|
|
|
|
String zoomSessionID = callerId.split("_").sublist(0, callerId.split("_").length - 1).join("_");
|
|
|
|
|
|
|
|
|
|
await voIPKit.acceptIncomingCall(callerState: CallStateType.calling);
|
|
|
|
|
await voIPKit.acceptIncomingCall(callerState: CallStateType.idle);
|
|
|
|
|
await voIPKit.callConnected();
|
|
|
|
|
|
|
|
|
|
// Cleanup on accept - cancel timer and reset flags
|
|
|
|
|
@ -415,7 +418,7 @@ class PushNotificationHandler {
|
|
|
|
|
_callTimeoutTimer = null;
|
|
|
|
|
_isCallInProgress = false;
|
|
|
|
|
_currentCallId = null;
|
|
|
|
|
await Future.delayed(Duration(seconds: 2)).then((val) async {
|
|
|
|
|
await Future.delayed(Duration(milliseconds: 1500)).then((val) async {
|
|
|
|
|
await voIPKit.endCall();
|
|
|
|
|
await voIPKit.dispose();
|
|
|
|
|
await FlutterCallkitIncoming.endAllCalls();
|
|
|
|
|
|