             
             if event.sender == session.myUserId {
                 //  outgoing call
+                NSLog("[CallPresenter] processWidgetEvent: Report outgoing call with id: \(newUUID.uuidString)")
                 JMCallKitProxy.reportOutgoingCall(with: newUUID, connectedAt: nil)
             } else {
                 //  incoming call

    }
    
    func processWidgetEvent(_ event: MXEvent, inSession session: MXSession) {
        guard JMCallKitProxy.isProviderConfigured() else {
            //  CallKit proxy is not configured, no benefit in parsing the event
            return
        }
        
        guard let widget = Widget(widgetEvent: event, inMatrixSession: session) else {
            return
        }
        
        if self.jitsiCalls.first(where: { $0.value.widgetId == widget.widgetId })?.key != nil {
            //  this Jitsi call is already managed by this class, no need to report the call again
            return
        }
        
        if widget.isActive {
            guard widget.type == kWidgetTypeJitsiV1 || widget.type == kWidgetTypeJitsiV2 else {
                //  not a Jitsi widget, ignore
                return
            }
            
            if let jitsiVC = jitsiVC,
               jitsiVC.widget.widgetId == widget.widgetId {
                //  this is already the Jitsi call we have atm
                return
            }
            
            if TimeInterval(event.age)/MSEC_PER_SEC > Constants.groupCallInviteLifetime {
                //  too late to process the event
                return
            }
            

        } else {
            guard let uuid = self.jitsiCalls.first(where: { $0.value.widgetId == widget.widgetId })?.key else {
                //  this Jitsi call is not managed by this class
                NSLog("[CallPresenter] processWidgetEvent: not managed Jitsi call: \(widget.widgetId)")
                return
            }
            NSLog("[CallPresenter] processWidgetEvent: ended call with id: \(uuid.uuidString)")
            JMCallKitProxy.reportCall(with: uuid, endedAt: nil, reason: .remoteEnded)
            self.jitsiCalls.removeValue(forKey: uuid)
        }
