Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

About calls and call audio

A call uses two connections at once. Answering, declining and dialling travel over Tetheron’s own encrypted connection, like notifications and messages. The voices travel over Bluetooth, through the hands-free profile that a car kit uses. This page explains the split, what the desktop’s audio system does during a call, and where the limits come from.

For the steps, see Make and receive calls. The decision record is ADR-0015.

Two channels for one call

  Phone                                              Desktop
 +---------------------+     Tether (TLS, LAN)      +-----------------------+
 | Tether app          |<==========================>| tetherd               |
 |  call state, answer,|  state, commands, call log |  call windows, dialer |
 |  dial, mute, route  |                            |  ringtone, call log   |
 +---------------------+                            +-----------------------+
 | Android Telecom     |   Bluetooth hands-free     | BlueZ + PipeWire      |
 |  audio gateway      |<==========================>|  hands-free unit      |
 |                     |  both voices (SCO link)    |  speakers, microphone |
 +---------------------+                            +-----------------------+

Control goes over the Tetheron connection because Android offers it to a normal app. With the phone and call-log permissions, the app can see the state of a call, answer it, reject it, end it, silence the ringer, place a call and read the call log. Control therefore works with Bluetooth switched off, and on a desktop without a Bluetooth adapter.

Audio goes over Bluetooth because that is the route Android provides for the voice of a cellular call. The audio interfaces open to a normal app affect only the app’s own sound. In the Bluetooth Hands-Free Profile (HFP) the phone is the audio gateway and the other device is the hands-free unit, and Android’s telephony stack routes the call to it by itself.

The cost of the split is a second pairing, over Bluetooth, and two connections that can disagree. A call can be fully controllable from the desktop while its audio stays on the phone, which is why the call windows say where the audio is.

Tetheron does not implement the hands-free profile on the desktop. PipeWire has implemented the hands-free role in its Bluetooth support since 2021, and WirePlumber enables it by default. The daemon drives BlueZ for the guided pairing and then follows what PipeWire does.

PipeWire presents the phone’s call audio as two streams, one carrying the caller’s voice into the desktop and one carrying the microphone to the phone. They are not devices, as a headset’s microphone and speaker would be. WirePlumber therefore connects them to the default speakers and the default microphone by itself, as it would for any voice application. The streams exist only while the phone holds the audio link, called SCO, open. When the phone closes it, the streams vanish.

Three consequences follow.

The existence of the streams is the reliable sign that call audio is on the desktop. The daemon looks at the audio graph once a second during a call, which is how the PC button in the in-call window follows a switch that you make on the phone’s own call screen.

The daemon has little to do in the normal case. It adds a connection only if one is still missing a few seconds after the streams appear, and it leaves alone a direction that the session manager connected somewhere else, for example to a headset. It does not change the default speakers or microphone.

The desktop cannot pull the audio to itself. PipeWire opens the audio link only when a stream starts, and there is no stream without the link, so moving a call to the desktop always has to be done by the phone. The desktop can only push audio away: switching the phone’s Bluetooth card off for a moment closes the link, and Android falls back to the earpiece.

Why switching audio needs a one-time adb grant

Since the phone has to open the link, the app on the phone must be able to tell Android to route the call to Bluetooth, to the earpiece or to the loudspeaker. Android reserves that for the in-call service of a dialler or call-companion app, and the direct Bluetooth call that would connect the audio is restricted to system apps.

The app ships such an in-call service. On Android 16, Android binds the service only when the app holds the app-op MANAGE_ONGOING_CALLS, a per-app switch that Android keeps outside the permission dialogs. Holding the normal call-companion permission was not enough, and neither was registering the app as a call companion through Telecom’s shell command. The app-op is granted once over adb. That makes audio switching an enhanced-tier feature in a narrow sense: it needs one command and does not need the running helper.

Without the grant, calls still work with less control:

  • Android routes a call to the desktop by itself when the desktop is the connected hands-free device, so answering on the desktop usually works.
  • Phone works from the desktop, by pushing the audio away as described above.
  • PC and Speaker report the reason, and you can still choose the desktop on the phone’s call screen.

Why echo cancellation runs the way it does

A laptop is a poor speakerphone. Its speakers play the caller’s voice a few centimetres from its microphone, so the caller’s voice goes straight back to the caller. A real hands-free unit announces that it cancels echo, and PipeWire’s hands-free role does not. The phone and the mobile network therefore treat the returning voice as echo and suppress the desktop’s side of the call whenever the far end makes sound. In the first test the caller heard roughly two thirds of the speech, with gaps.

The fix is PipeWire’s echo-cancel module with the WebRTC canceller on the microphone path. Tetheron runs it in a particular way:

  • Only when the call uses the default speakers and microphone. A headset does not have the problem, so the daemon leaves it alone.
  • In monitor mode. The obvious layout creates a virtual speaker and a virtual microphone and moves both directions of the call onto them. That removed the echo, but one side dropped out intermittently. In monitor mode the caller’s voice stays connected to the real speakers, the canceller listens to what the speakers play as its reference, and only the microphone side moves to a cancelled source. Both directions were clear.
  • In a child process. Monitor mode cannot be reached through the usual module-loading command, and a module loaded by a short-lived tool dies with it. The daemon starts a small PipeWire process with its own configuration for the duration of the calls and stops it afterwards.

The cost is a gap at the start. The daemon waits for WirePlumber’s own linking to settle before it starts the canceller, so the first seconds of a call on the desktop run without cancellation. The same happens for about a second each time the audio moves back to the desktop mid-call.

Why there is no in-call keypad

Touch tones (DTMF) are how you answer “press 1 for …” menus and enter PIN codes. Android lets only the phone’s default dialler send them into a call. The keypad button in the in-call window explains this, and for menus and PIN codes you use the keypad on the phone.

Conference calls (merge and swap) and video calls are out of scope as well.

Alternatives that were rejected

oFono is a telephony service that can take over the hands-free profile from PipeWire. It replaces PipeWire’s native headset support, runs as a system service and is fragile. With PipeWire’s own role there is no new system service, and earbuds and other headsets keep their behaviour. hsphfpd, a separate hands-free daemon that PipeWire once supported, is abandoned.

Tetheron could register its own Bluetooth profile, open the audio sockets and run the wideband codec itself. That was estimated at four to six weeks, followed by a long tail of adapter and kernel differences. It remains the fallback if PipeWire’s native role proves unusable on common hardware.

Call control could also go through PipeWire. PipeWire 1.0.5, which the Ubuntu 24.04 family ships, has no call-control interface, and the telephony interface on D-Bus arrives with PipeWire 1.4. Control over the Tetheron connection works on every supported distribution and does not depend on Bluetooth being up.

Trade-offs that remain

  • Wideband speech (mSBC) depends on the Bluetooth adapter. Without it the call falls back to narrowband.
  • The phone may prefer earbuds that are connected at the same time. Android decides that.
  • With in-band ringing the phone opens the audio link while the call still rings, so its ringtone can play on the desktop next to the desktop’s own.
  • Occasional short static-like noises during calls on the desktop are a known, undiagnosed issue.
  • Call audio was developed on one desktop, one Bluetooth adapter and one phone, so other hardware may behave differently.

The changelog lists the known limitations of each release.