Case Study·production
Single-Session Multi-Channel Calling
How the hybrid telephony work moved channel selection out of session init — enum state, session-preserving driver swaps, and callMedium attribution across logs and analytics.
Date2026-04
Reading TimeN/A
Statusproduction
StackFlutter, Dart, State Machines+1
In-session driver swap
Mode switch
[High Confidence]
callMedium on activity and reports
Attribution
[High Confidence]
Companion write-up for Hybrid Telephony Workflows.
Challenge: session-level coupling
Channel used to be a flag baked into session creation:
flowchart TD
LegacySession[Session Instantiation] -->|Hardcoded Channel Flag| BoundMode{Bound Channel Mode}
BoundMode -->|Cellular| CellularSession[Cellular Session]
BoundMode -->|Cloud| CloudSession[Cloud Session]
CellularSession -->|Mode Switch| DestroySession[Forced Teardown and Re-Auth]
CloudSession -->|Mode Switch| DestroySession
That caused forced re-auth, cache/sync loss risk on teardown, and reporting forks that disagreed on which medium a call used.
Solution: session-preserving orchestrator
Mode becomes runtime state on one session. Drivers swap; Hive, tokens, and sync queues stay.
sequenceDiagram
participant User as Operator UI
participant Orchestrator as Session Orchestrator
participant Driver as Channel Driver
participant Telemetry as Telemetry and Reporting
User->>Orchestrator: Request channel action
Orchestrator->>Orchestrator: Check session and permissions
alt Cellular
Orchestrator->>Driver: Cellular intent
else Cloud
Orchestrator->>Driver: Cloud virtual service
end
Driver->>Telemetry: Tag payload with callMedium
Telemetry->>User: UI updates; session intact
Primitives
- Enum model —
SIM/Cloud/Hybrid - Driver orchestrator — re-inits transport without resetting the user session
CallMediumSelector— default or per-interaction overridecallMediumattribution — events, activity logs, exports, dashboards
Outcomes (high confidence)
- Operators change medium without logout
- Reporting uses one attribution field instead of parallel mode branches
- Admin permission/allocation changes no longer imply client re-login storms
See the project page for the shorter product-facing summary.