                  .hangup,
                  .hangupElsewhere,
                  .remoteHangup,
-                 .missed,
                  .answeredElseWhere:
-                statusTextView.text = VectorL10n.eventFormatterCallHasEnded
+                viewState = .ended
+                statusText = VectorL10n.eventFormatterCallHasEnded(callDurationString)
+            case .missed:
+                if call.isIncoming {
+                    viewState = .missed
+                    statusText = VectorL10n.eventFormatterCallYouMissed
+                } else {
+                    statusText = VectorL10n.eventFormatterCallHasEnded(callDurationString)
+                }
             case .busy:
                 configureForRejectedCall(call: call)
             @unknown default:
-                statusTextView.text = VectorL10n.eventFormatterCallHasEnded
+                viewState = .ended
+                statusText = VectorL10n.eventFormatterCallHasEnded(callDurationString)
             }
         case .inviteExpired,
              .answeredElseWhere:
-            statusTextView.text = VectorL10n.eventFormatterCallHasEnded
+            viewState = .ended
+            statusText = VectorL10n.eventFormatterCallHasEnded(callDurationString)
         @unknown default:
-            statusTextView.text = VectorL10n.eventFormatterCallHasEnded
+            viewState = .ended
+            statusText = VectorL10n.eventFormatterCallHasEnded(callDurationString)
         }
     }
     


import UIKit

class RoomDirectCallStatusBubbleCell: RoomBaseCallBubbleCell {
    
    private enum Constants {
        static let statusTextFontSize: CGFloat = 14
        static let statusTextInsets: UIEdgeInsets = UIEdgeInsets(top: 8, left: 8, bottom: 12, right: 8)
        // swiftlint:disable force_unwrapping
        static let statusCallBackURL: URL = URL(string: "element://call")!
        // swiftlint:enable force_unwrapping
    }
    
    private lazy var statusTextView: UITextView = {
        let textView = UITextView()
        textView.font = .systemFont(ofSize: Constants.statusTextFontSize)
        textView.backgroundColor = .clear
        textView.textColor = ThemeService.shared().theme.noticeSecondaryColor
        textView.linkTextAttributes = [
            .font: UIFont.systemFont(ofSize: Constants.statusTextFontSize),
            .foregroundColor: ThemeService.shared().theme.tintColor
        ]
        textView.textAlignment = .center
        textView.contentInset = .zero
        textView.isEditable = false
        textView.isSelectable = false
        textView.isScrollEnabled = false
        textView.scrollsToTop = false
        textView.textContainerInset = Constants.statusTextInsets
        textView.textContainer.lineFragmentPadding = 0
        textView.delegate = self
        return textView
    }()
    
    override var bottomContentView: UIView? {
        return statusTextView
    }
    
    override func update(theme: Theme) {
        super.update(theme: theme)
        statusTextView.textColor = theme.noticeSecondaryColor
        statusTextView.linkTextAttributes = [
            .font: UIFont.systemFont(ofSize: Constants.statusTextFontSize),
            .foregroundColor: theme.tintColor
        ]
    }
    
    private func configure(withCall call: MXCall) {

         .connecting,
         .onHold,
         .remotelyOnHold:
            viewState = .active
            statusText = VectorL10n.eventFormatterCallYouCurrentlyIn
        case .ringing:
            if call.isIncoming {
                viewState = .ringing
                statusText = nil
            } else {
                viewState = .active
                statusText = VectorL10n.eventFormatterCallYouCurrentlyIn
            }
        case .ended:
            switch call.endReason {
