ofonod: GNOME Calls backend over org.ofono for Phosh and GNOME Mobile

imsd-ofonod presents imsd on the system bus as an oFono modem — Manager at
/, Modem + VoiceCallManager at /imsd, a VoiceCall object per call — which
is what GNOME Calls' bundled ofono provider drives; Calls, Phosh and GNOME
Shell run unmodified. org.gnome.Calls is not a seam a third party can
provide (Calls exports it, nothing feeds it), and Calls' provider plugins
link private headers, so org.ofono is the only D-Bus contract available.
Pure GDBus translation of net.catcrafts.IMS1, no core, like imsd-dialerd.

Packaged as the opt-in imsd-ofono subpackage: the daemon, its unit
(Conflicts=ofono.service), the system-bus policy and a gschema override
that points Calls at the ofono provider instead of mm (the ModemManager
origin would offer the modem's CS voice path, which carries no audio on
these phones). The policy grants root send_destination=org.ofono: under
dbus-broker a broadcast is checked against the sender's send policy for
every name the receiver owns, so without it imsd's call signals never
reach the daemon.

Verified on a Fairphone 6 with GNOME Calls 50.0: outgoing and incoming
calls with audio both ways, answered and hung up through
org.gnome.Calls.Call. Known Calls-side gap documented in the README: after
the VoiceCallManager interface is withdrawn and re-added, Calls keeps the
old origin's CallAdded handler and eventually crashes.
This commit is contained in:
Jorijn van der Graaf 2026-09-20 16:07:46 +02:00
commit b986eb3750
Signed by: jorijnvdgraaf
GPG key ID: 2937E59CDCC1BCFB
11 changed files with 1037 additions and 13 deletions

34
packaging/org.ofono.conf Normal file
View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?> <!--*-nxml-*-->
<!-- SPDX-License-Identifier: GPL-3.0-only -->
<!-- SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts® -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<!-- imsd-ofonod system-bus policy: imsd presented as an oFono modem, which is
the seam GNOME Calls' bundled `ofono` provider plugin drives.
Install: /usr/share/dbus-1/system.d/imsd-ofono.conf
Deliberately NOT named org.ofono.conf on disk: the real oFono package
ships that filename, and the two must not silently overwrite each other.
They cannot run together in any case — one org.ofono name, one owner. -->
<busconfig>
<policy user="root">
<allow own="org.ofono"/>
<!-- imsd (root) reaches this daemon only by broadcast signals, and
dbus-broker checks a broadcast against the sender's send policy for
every name the receiver owns (dbus-daemon does not): without this
line the default deny below silently drops every CallAdded /
CallStateChanged from imsd on the way to imsd-ofonod (found on the
FP6, 2026-09-20). -->
<allow send_destination="org.ofono"/>
</policy>
<!-- the session user's GNOME Calls drives the modem; call control is
exactly what net.catcrafts.IMS1 already grants it through the dialerd -->
<policy user="user">
<allow send_destination="org.ofono"/>
<allow receive_sender="org.ofono"/>
</policy>
<policy context="default">
<deny own="org.ofono"/>
<deny send_destination="org.ofono"/>
</policy>
</busconfig>