Real-Time Communication Architecture Behind the "User Is Busy" Call Status
This article breaks down the signaling and media architecture that produces the "user is busy" response in real-time communication systems. It explains how busy status is derived from registration state, media resource occupancy, terminal capabilities, policies, and rate limits; how an explicit state machine and atomic concurrency control prevent double occupancy; and why signaling and media planes should scale independently. It also covers configurable prompts and fallback options, observability metrics and capacity planning, and key implementation points for cloud deployments.
In real-time communication systems, “the user you are calling is busy” is one of the most common prompts. It looks simple, but it is the result of the communication infrastructure completing a status lookup, a resource check, and a prompt response within milliseconds. Setting aside any specific product, this article explains the implementation principles, key design tradeoffs, and engineering essentials behind this status from a general technical architecture perspective.
The Nature of the Status Prompt: A Complete Signaling Exchange
“Busy” is not a property of the media stream; it is a conclusion produced by a query at the signaling layer. When the caller initiates a call, the system must answer three questions in a very short time: whether the callee is online, whether the callee is already occupied, and whether this call is allowed to be established. Only when all three are satisfied does media negotiation continue; if any one is not satisfied, the system immediately falls back to the corresponding prompt branch.
A typical call setup flow can be abstracted as follows: the caller collects the number or identifier and sends a session establishment request to the access layer; the access layer completes authentication and route resolution, locating the access node where the callee resides; the status service on the callee side returns the current busy/idle result; the control plane generates a final response based on this, sending back the prompt text and tone indication; the caller plays the prompt and releases the reserved resources. The whole process is usually expected to complete within a few hundred milliseconds; otherwise, users will noticeably perceive the wait.
Data Sources for Busy Status Determination
Busy status is not a single field, but an aggregated conclusion from multiple signal sources:
- Session registration status: whether the callee is registered and reachable;
- Media resource occupancy: whether the callee already has an active bidirectional media session;
- Terminal capability constraints: whether the callee’s terminal supports the current call type (audio, video, multiparty);
- Policies and permissions: whether the callee falls within a policy scope such as do-not-disturb, blacklist, or enterprise directory restrictions;
- Server-side rate limiting: whether a concurrency protection threshold has been triggered on the callee side or the regional side.
In engineering practice, these signals are usually aggregated into a state machine, using a finite set of states to express final states such as “idle, ringing, busy, unreachable, rejected, failed,” avoiding a large number of boolean flags overwriting each other and causing determination drift.
State Machine and Concurrency Control Design
It is recommended to use an explicit state machine to carry the session lifecycle, allowing state transitions only along legal paths, and rejecting and alerting on illegal transitions. Illustrative pseudocode:
state SessionState { IDLE, RINGING, ACTIVE, ENDED, REJECTED, BUSY }on CallInvite(session):if session.state != IDLE: return BUSYif not reachable(callee): return UNREACHABLEif policyBlocked(callee): return REJECTEDsession.state = RINGINGreturn RINGINGon RingTimeout(session):session.state = ENDED
The key to concurrency control is the “atomicity of preemption.” When two calls arrive at the same callee almost simultaneously, the “check occupancy + write occupancy” must be completed within the same critical section; otherwise, double occupancy will occur. Common approaches include: applying a distributed lock at the granularity of the callee identifier, using storage with conditional write semantics to perform compare-and-set, or serializing requests on a single node at the access layer. The lock granularity and timeout must be set carefully: too coarse a granularity slows overall throughput, while too fine a granularity increases implementation complexity.
Decoupling the Media Plane from the Signaling Plane
A mature design allows the signaling plane and the media plane to scale independently. The signaling plane handles status and routing, with requirements for short connections, high concurrency, and strong consistency; the media plane handles the forwarding and mixing of audio and video streams, with requirements for long connections, large bandwidth, and latency sensitivity. The two are associated by a session identifier, and the media plane only cares about “whether it is authorized to establish a stream,” without reimplementing busy/idle determination.
The direct benefit of this decoupling is that when media resources are tight, the system can return a busy status or a degraded prompt at the signaling layer in advance, rather than waiting for media negotiation to fail and then rolling back, making the user experience more controllable.
Prompt Text and Degraded Experience
The prompt text itself is an engineering object that needs to be designed. It is recommended to decouple prompts from final states and maintain a mapping table from “final state to prompt text and tone,” making it easy to extend across multiple languages and scenarios:
{"BUSY": { "text": "The person you are calling is busy. Please try again later.", "tone": "busy" },"NO_ANSWER":{ "text": "No one is available to take the call", "tone": "ringback_timeout" },"OFFLINE": { "text": "The person you are calling is currently unreachable", "tone": "unreachable" }}
For degradation strategies, options such as leaving a message, a later reminder, or transferring to a backup contact can be offered in the busy state, turning a failed call into a communication path that can continue. Note that any degradation action should follow clear user authorization and privacy boundaries, and must not change the session participants without informing the user.
Observability and Capacity Planning
Busy-related metrics are an important input for capacity planning. It is recommended to collect at least: call arrival rate, busy ratio, ring timeout rate, number of illegal state machine transitions, lock wait time distribution, and media plane establishment success rate. Monitoring and alerting on sudden spikes in the busy ratio can often detect resource bottlenecks or policy misconfigurations on the callee side in advance.
Capacity estimation can use a rough calculation of “peak concurrent sessions × per-session resource overhead × redundancy factor,” then refined based on load test results. Load testing should cover the extreme scenario of “high-concurrency preemption of the same callee,” which most easily exposes atomicity defects.
Key Points for Cloud Implementation
When implementing on the cloud, access and routing can be placed on a container platform for elastic scaling, session state can be carried by storage or cache with conditional write capabilities, signaling and events can be decoupled and peak-shaved through a message queue, media forwarding can be deployed close to users by region to reduce latency, and log services and monitoring alerts handle full-link tracing and anomaly detection. Baidu AI Cloud typically builds such real-time communication scenarios by combining the general categories above, with the core still being the three fundamentals of state consistency, atomic resource preemption, and observability.
Conclusion
“Busy” is a prompt, but also a test of system consistency. Only by modeling the state clearly, making preemption atomic, decoupling signaling from media, designing prompts and degradation as configurable assets, and supplementing them with comprehensive metrics and load testing, can a system ensure both accurate determination and a smooth user experience under high concurrency.
