Putting a Robot on a Phone Call: Layered Signaling, Bounded Occupancy and Turn Arbitration over WebRTC

Zheyuan Zhang, Zaide ZhangarXiv 2026

TL;DR

Calling a robot from your phone browser sounds straightforward until two callers, a local voice assistant, a conversational chatbot, and a physical task controller all try to talk through the same loudspeaker at once. This paper presents a practical WebRTC architecture that puts a physical robot on a reliable browser voice call—complete with strict resource locks, overlapped connection setup, and a clever two-second "turn gate" that arbitrates between small talk and physical task updates without deadlocking the conversation.

What Problem Does This Paper Address?

Imagine tapping "Call" on your iPhone to speak to a robot across town. Loading the webpage is easy, but establishing a real-time conversational loop with a physical machine introduces messy boundary problems.

First, a loaded page doesn't mean you have a working call: signaling, relayed audio, and backend speech generation can fail independently. Second, the robot's physical loudspeaker is a shared bottleneck; remote callers and local room interactions will collide without cross-process coordination. Finally, modern language-enabled robots often feed your words to both a fast conversational model (chat) and a slower physical task controller ("go check the stove"). If chat answers immediately, it talks over the task status; if the robot waits indefinitely for the controller, pure conversation stalls whenever no physical task is triggered.

Methods

Instead of inventing exotic protocols, the authors compose standard web and operating-system primitives around explicit ownership boundaries:

System architecture separating signaling, relayed media, and bounded turn arbitration
  • Layered, Overlapped Setup: HTTPS signaling (via a Sakura Frp tunnel), WebRTC media (via Cloudflare TURN relays), and WebSocket speech synthesis (MOSS API) run on separately observable routes. To cut dial latency, the browser prefetches TURN credentials on page load, limits candidate gathering to a 500 ms window after the first relay appears, and runs backend speech-service startup concurrently with WebRTC answer preparation inside a 55 s deadline.
  • Cross-Process Speaker Locking: Reserving a call claims both an application session slot and a non-blocking OS file lock on the loudspeaker. Because local voice processes request the exact same OS file lock, competing callers immediately get an HTTP 409 busy signal, and crashed processes automatically release the hardware. To prevent the robot from hearing and transcribing its own voice, the system uses half-duplex input—replacing incoming caller audio blocks with silence while the robot is speaking.
  • The 2-Second Turn Gate: When a user finishes speaking, the transcript goes to both the chat generator and the task controller. Generated chat audio is held at a gate for up to 2 seconds. If the controller claims the turn within 2 s, the buffered chat is discarded. If 2 s expire (or the controller explicitly defers), chat plays immediately, and any slower controller feedback queues up sequentially behind it.

Datasets

Not discussed in the paper. Instead of pre-existing training or benchmark datasets, the authors evaluate their live deployment on 16 planned field calls (Wi-Fi and cellular), 20 disturbance scenarios, 40 controlled replay schedules with simulated controller timings, and 2 asynchronous boundary-error fixtures.

Key Insights and Ideas

  • Turn selection and resource ownership live on different clocks: A caller owns the speaker for a whole session, a turn gate arbitrates an utterance over 2 seconds, and an asynchronous robot task callback might arrive after the call itself has ended. Treating these lifetimes separately prevents deadlocks.
  • Timeouts beat waiting for silence: A bounded 2-second gate turns an open-ended distributed consensus problem ("who should answer this utterance?") into predictable behavior—fast tasks cleanly suppress small talk, while slow tasks let chat fill the silence before reporting back.
  • Asynchronous receipts easily lose their owners: In distributed audio pipelines, inferring which task owns an audio playback receipt based on "most recent submission" breaks under rapid updates. Identifiers for the originating call, turn, and audio chunk must be explicitly bound end-to-end.
Asynchronous boundary traces showing mismatched feedback receipts within and across calls

Key Results

  • Fast First-Dial Readiness: 15 of 16 first-attempt calls reached the ready-to-speak state—7/8 on Wi-Fi (median 5.57 s) and 8/8 on cellular (median 6.76 s). Median time from the end of caller speech to first answer text on the phone was 3.01 s.
  • Clean Occupancy & Recovery: Across 20/20 disturbance tests (second caller dialing in, local voice holding the speaker, closing the Safari tab, and 60 s total network outages), busy lines properly rejected intruders (HTTP 409 in 5/5 checks) and reliably released resources to admit subsequent calls. During 60 s network drops, the backend cleared the dead session within 31.9–36.1 s while the phone was still offline.
  • Zero Overlapping Speech: Across 40 controlled replays, zero traces produced overlapping audio. With the 2 s gate enabled, 1 s controller decisions suppressed chat 5/5 times, while 3 s decisions played chat followed sequentially by controller feedback 5/5 times.
  • Pinpointed Boundary Bugs: Two targeted stress traces caught subtle state leaks—one where a second rapid feedback item (f2) stole the completion receipt of an earlier audio run (n-f1), and another where a delayed task from call-A leaked into a status query for call-B.

Limitations and Future Work

The field tests used a single client setup (one iPhone 17 running Safari), and the sample target of eight calls per network was finalized mid-collection after the fourth pair. Furthermore, evaluation ended at software events and text delivery rather than acoustic room recordings or physical task verification (14 of 15 ready field calls were not checked turn-by-turn for full acoustic exchange completion), and replay tests relied on a simulated controller with no baseline system or human user study. For future iterations, the authors propose strict end-to-end run/turn/chunk identifier bindings and connection-generation checks to eliminate the cross-turn and cross-call receipt bugs uncovered in their boundary traces, alongside explicit release-cause logging for offline disconnects.

Summary updated

BibTeX
@misc{zhang2026putting,
  author = {Zheyuan Zhang and Zaide Zhang},
  title = {{Putting a Robot on a Phone Call: Layered Signaling, Bounded Occupancy and Turn Arbitration over WebRTC}},
  year = {2026},
  eprint = {2611.32308},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.32308},
}
Figure