Skip to content

Diagram: 1-1 Call Flow (Audio/Video)

Canonical doc: ../one-to-one.md

sequenceDiagram
    autonumber
    participant Caller as Caller (Device)
    participant App as iOS App
    participant API as Backend API
    participant STOMP as STOMP
    participant Callee as Callee (Device)

    Caller->>App: Start 1-1 Call
    App->>API: Fetch public keys via Key Transparency (KT)
    API-->>App: Raw KT Response (Public Keys + Merkle Proofs)

    Note over App: Verify KT proof + local trust cache
    Note over App: Warn if trusted key set changed

    Note over App: Prepare E2EE session key<br/>P-256 preferred / RSA fallback

    App->>API: POST /app/api/call/start-v2
    API-->>App: CallRecord(callId, livekitToken, ...)

    API->>Callee: VoIP push signal: call_created
    API->>STOMP: call_created fallback/sync signal

    Note over Callee: Decrypt session key<br/>P-256 preferred / RSA fallback

    Callee->>Callee: Answer CallKit and connect to LiveKit
    Callee->>API: GET /app/api/call/{callId}/participants

    Note over Caller,Callee: Encrypted media starts (AES-256-GCM)