Chapters

3 VoIP Client Architecture: Two Case Studies

voip
media-compression
connected-products

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 asks who owns each part of a call. For a connected doorbell, intercom, or camera, which software component does each job? What evidence must pass between those components?

Linphone makes those seams visible. The source-era diagram separates the product user interface from the 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. The former standalone repositories have moved into the combined linphone-sdk project. The diagram maps duties; it does not promise 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.

Use a stable session identifier and a monotonic clock to link the records. Without them, a reviewer cannot place the loss of audio in time. Did it start before the answer, after a network change, or when the operating system revoked microphone access?

3.2.1 Boundary Contracts for a Connected Product

Boundary
Input contract
Output evidence
Safe failure
UI to core
Authenticated user intent plus target session
Accepted state transition or explicit rejection
Keep door locked; show retry or alternate contact path
Core to signaling
Valid account, destination, policy, and session state
Transaction/dialog state and reason code
Bounded retry, then surface unavailable state
Core to media
Approved media direction, devices, and configuration
Capture/render readiness and processing health
Do not claim a usable call; preserve privacy/mute state
Media to packet path
Timestamped encoded frames and session parameters
Packet, sequence, loss, jitter, and receive timing
Conceal within budget, degrade visibly, then end or fall back
SDK to operating system
Permission, device, socket, clock, and lifecycle requests
Concrete resource handles or typed errors
Release partial resources and report the exact unavailable capability

Use this ledger to review the product and test changes. Revoke microphone permission: the media boundary should fail, while call-control history stays intact. A lost signaling network should leave a different record from an exhausted audio device. Suspending the mobile app should test lifecycle recovery, not appear 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. At the time, a signed-in client was an endpoint and also helped find peers and route traffic in a distributed network. This case is historical; it makes no claim about the current Skype service. A client-server design can place duties in managed infrastructure, while a peer model can share them among clients.

Keep the contrast precise. A SIP-based Linphone client uses server-coordinated signaling. That does not mean every media packet goes through one central server. Nor does peer-assisted discovery or routing mean that every client relays every call. Compare who owns each duty.

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 dimensionServer-coordinated tendencyPeer-assisted tendency
Endpoint resource budgetKeeps directory and policy work off constrained clientsMay consume client compute, memory, battery, and uplink for shared work
OperationsCentral services expose clearer policy and fleet controlsDistributed state can make diagnosis and coordinated change harder
ResilienceNeeds explicit redundant services and relay capacityCan retain alternate participants, but churn and peer quality become inputs
Privacy and trustConcentrates sensitive metadata in managed servicesExpands which endpoints may observe or act on routing/discovery information
AuditEasier to build one authoritative control-plane recordRequires 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.

See why the tempting answer fails.
  1. Two-panel cartoon contrasts a crossed-out relay path through a central server with a reviewed network path involving a gateway and several connected devices. The devices are represented by temperature, light, and camera icons; no spare doorbells are shown.

    Wrong idea: spare doorbells can relay for others at no real cost. It fails because that choice spends device power and bandwidth and adds privacy, trust, and removal duties.

A video doorbell review exposes the cost of peer discovery and routing.

3.4 Summary

The two cases show how a VoIP design assigns duties. Linphone separates the product UI and call control from media processing, signaling, RTP packet handling, and operating-system services. Its current combined SDK still bundles Liblinphone, Mediastreamer2, belle-sip, and oRTP. Read the source-era package diagram as a map of duties, not a current release manifest. A successful signaling timeline does not prove that capture, rendering, jitter handling, or packet quality made a call usable. Keep evidence for each part.

Historical Skype shows a different choice; it does not describe the product today. Its peer-assisted model puts some discovery or routing work on clients. This moves resource cost, trust, privacy, revocation, operational control, and audit duties toward endpoints. Ask who owns each service, failure, and piece of evidence in the chosen design.

3.5 Key Takeaway

A call depends on several parts working together.

Name the owner of user intent, call state, signaling, media processing, packet timing, and device resources. Define the evidence and safe failure at each boundary. Compare distributed designs by the duties they move to endpoints.

3.6 See Also

Follow the boundary that remains unresolved after the architecture comparison. Real-Time Protocol Workflows traces the SIP, RTP/RTCP, SRTP, WebRTC, and NAT-traversal roles carried across component boundaries. Media Compression Mechanics moves inward to masking, transforms, quantization, and motion prediction inside the payload. Voice Compression and Digital Telephony focuses that media question on speech quality, latency, and packet budget, while Application Protocol Worked Examples broadens the same evidence-driven boundary method beyond calling systems.

Read together, those chapters connect protocol events, encoded media, product ownership, and observable failure without treating any one layer’s success as proof that the entire call works.

Hi, I’m Broker Bex. What do you need?

Find help

Let’s find what you need

Find a lesson or return to your module guide.

Give feedback

Help improve this chapter

Tell us what helped or what needs fixing.

Tips

Try a small next step

A few ways to get more from this chapter.

Ask AI

Continue the conversation

Take the conversation further with your preferred assistant.

AI help is available in supported modules when enabled in Settings.

No live person answers on independent study. Feedback does not promise a personal reply.

For welfare or safety concerns, follow your school’s procedures outside IoTClass.