3 VoIP Client Architecture: Two Case Studies
3.1 Overview: Read a Calling Product as Component Boundaries
Real-Time Protocol Workflows already names the roles of SIP, RTP, SRTP, RTCP, WebRTC, ICE, STUN, TURN, and WebSocket. This chapter does not re-teach those protocols or their negotiation flows. It asks a different question: when a connected doorbell, intercom, or camera product ships a calling feature, which software component owns each responsibility, and what evidence must cross the component boundary?
Linphone is useful because its architecture exposes those seams. The source-era diagram separates product user interfaces from a reusable core, media engine, signaling library, RTP library, and operating-system services. Belledonne Communications’ current public SDK repository still bundles the four named component families, although the former standalone repositories have moved into the combined linphone-sdk project. Treat the diagram as a responsibility map, not as a promise about today’s source-tree layout or release packaging.
3.1.1 The Linphone Responsibility Stack
Product UI
Device screen, mobile app, or headless product adapter. Owns user intent, visible call state, accessibility, and product-specific policy prompts.
Liblinphone
High-level core API. Owns accounts, call/session objects, presence and messaging state, configuration, and coordination of the lower components.
Mediastreamer2 + belle-sip
Parallel media and signaling responsibilities. Mediastreamer2 builds audio/video processing graphs; belle-sip provides the SIP user-agent, transaction, dialog, and transport machinery.
oRTP
RTP/RTCP library used by the media path. Owns packet-level real-time sequence, timestamp, session, and transport-facing work delegated by the media engine.
Operating system
Audio and camera devices, network sockets, clocks, threads, storage, permissions, and platform lifecycle events.
This separation prevents a common architecture mistake: treating “the VoIP library” as one opaque box. A call can be registered but have a failed capture device; media can be encoded while signaling has lost authentication; packets can leave the socket while the product UI still shows stale state. Each layer needs its own health signal and a defined hand-off to the next.
Call-control evidence
Account identity, requested peer, state transition, authorization decision, timeout, and termination reason.
Media evidence
Capture/render availability, selected format, processing latency, packet counts, loss/jitter observations, and concealment or mute state.
Product evidence
User-visible status, consent or privacy state, fallback path, retry policy, and a timestamped incident record.
3.2 Practitioner: Trace a Door-Station Call End to End
Consider a mains-powered apartment door station with a camera, microphone, speaker, and mobile companion app. The resident presses “answer” on the app. A useful architecture trace names the owner and evidence at every transition:
1. Intent
The product records who answered and which door session the action belongs to.
2. Core
Liblinphone validates account and call state, then coordinates the session objects.
3. Signal
belle-sip advances the signaling transaction and exposes response or timeout evidence.
4. Process
Mediastreamer2 opens capture/render chains, codecs, echo control, and media filters.
5. Packet
oRTP moves timed media packets and produces sequence and quality observations.
6. Report
The product combines call and media state into one honest user-visible outcome.
The important word is combines, not collapses. A product may present one call screen, but its diagnostic record should preserve two correlated timelines:
- The control timeline records account readiness, request/response state, authentication, peer identity, timeouts, cancellation, and termination.
- The media timeline records capture/render readiness, negotiated media configuration, first-packet and first-render times, packet loss, jitter, mute state, and device errors.
Correlation needs a stable session identifier and a monotonic clock. Without them, an incident reviewer cannot tell whether “no audio” preceded the answer, followed a network transition, or began when the operating system revoked microphone access.
3.2.1 Boundary Contracts for a Connected Product
This ledger turns a source-code decomposition into a product review. It also makes tests mutation-sensitive. Revoking microphone permission should fail the media boundary without rewriting the call-control history; dropping the signaling network should produce a different record from exhausting the audio device; suspending the mobile app should exercise lifecycle recovery rather than masquerade as packet loss.
3.3 Under the Hood: Contrast Central Coordination with a Historical Peer Model
The source deck contrasts Linphone with the historical desktop Skype peer-to-peer architecture described at the time: a signed-in client was not merely an endpoint but an active participant in a distributed network that helped locate peers and route traffic. This is a historical case study, not a claim about the current Skype service. The retained idea is architectural: responsibilities that a client-server design places in managed infrastructure can instead be distributed among clients.
The contrast must also stay precise. A SIP-based Linphone client uses server-coordinated signaling, but that does not imply that every media packet must traverse one central server. Conversely, a peer-assisted discovery or routing overlay does not imply that every client relays every call. Compare the ownership boundaries, not slogans such as “centralized” and “peer-to-peer.”
Server-coordinated client
Managed services can centralize account policy, directory state, registration, abuse controls, and audit. Endpoints can remain simpler, but service availability and relay capacity become explicit dependencies.
Peer-assisted client
Discovery or routing work can be spread across participating endpoints. That may reduce reliance on one path, but it spends endpoint CPU, memory, energy, bandwidth, and trust.
IoT product consequence
A mains-powered desktop and a constrained door station are not equivalent peers. The architecture must state whether a device may relay third-party work, how updates revoke unsafe behavior, and what an operator can audit.
3.3.1 Choose by Responsibility, Not Fashion
For an intercom or camera product, compare at least these dimensions:
| Decision dimension | Server-coordinated tendency | Peer-assisted tendency |
|---|---|---|
| Endpoint resource budget | Keeps directory and policy work off constrained clients | May consume client compute, memory, battery, and uplink for shared work |
| Operations | Central services expose clearer policy and fleet controls | Distributed state can make diagnosis and coordinated change harder |
| Resilience | Needs explicit redundant services and relay capacity | Can retain alternate participants, but churn and peer quality become inputs |
| Privacy and trust | Concentrates sensitive metadata in managed services | Expands which endpoints may observe or act on routing/discovery information |
| Audit | Easier to build one authoritative control-plane record | Requires evidence from multiple independently changing participants |
Neither column wins universally. The product decision is a responsibility allocation: who locates peers, who enforces policy, who may relay traffic, who pays the resource cost, and who can explain a failed or abusive session after the fact.
3.4 Summary
- Linphone separates product UI, high-level call control, media processing, signaling, RTP packet handling, and operating-system services.
- The current combined Linphone SDK still bundles Liblinphone, Mediastreamer2, belle-sip, and oRTP, while the source-era package diagram remains a responsibility map rather than a release manifest.
- A connected product needs correlated but distinct call-control and media timelines because successful signaling does not prove usable capture, rendering, or packet quality.
- Historical Skype illustrates a peer-assisted alternative in which clients participate in discovery or routing; it must not be presented as current Skype architecture.
- Server-coordinated and peer-assisted designs allocate resource, trust, operations, privacy, and audit responsibilities differently.
3.5 Key Takeaway
A VoIP SDK is not one box. Name the component that owns user intent, call state, signaling, media processing, packet timing, and device resources; then define the evidence and safe failure at every boundary. Compare distributed alternatives by the responsibilities they move onto endpoints.
3.6 See Also
- Real-Time Protocol Workflows — the SIP, RTP/RTCP, SRTP, WebRTC, and NAT-traversal roles this chapter assumes rather than repeats.
- Media Compression Mechanics — the perceptual, transform, and prediction mechanisms inside the media payload.
- Voice Compression and Digital Telephony — speech-codec, latency, header-budget, and quality evidence for the media path.
- Application Protocol Worked Examples — broader evidence-driven protocol boundary design.
