imsd, engine: the Messaging status and a received text carry the SIM's operator
A consumer that keeps a number in the form it was written in — a national number, an operator's short code — has to know where it was written before it dials it again: a national number's country, a short code's operator. The own number's country code is not enough for either: countries share a code, and the operators of one country share theirs. The daemon reads the SIM's operator id at bring-up (ModemManager's: MCC then MNC), which names the subscription's country and operator. The Messaging GetStatus gives it as `operator`, from the snapshot `ppi` comes from, and a received text's record and its Received and List dictionaries carry the one the daemon held at receipt, beside `to` — additive keys, as `to` and `ppi` are, and the operator id only, never the IMSI. Tested: tests/Engine, the record round trip with `operator` and a record without it.
This commit is contained in:
parent
c434c8e84d
commit
e39f7e39d6
5 changed files with 30 additions and 18 deletions
|
|
@ -153,11 +153,11 @@ gain a key.
|
|||
| Member | Signature |
|
||||
|---|---|
|
||||
| `Send(number, text, options)` | `ssa{sv} → s` (id); options: `status-report` (b, ask the SC to report delivery). Refused with `NotSupported` while SMS over IMS is off |
|
||||
| `GetStatus()` | `→ a{sv}`: `enabled` (b), `smsc` (s), `ppi` (s, the own number in the daemon's last status, e.g. `tel:+31612345678`), `registered` (b), `subscribers` (u) |
|
||||
| `GetStatus()` | `→ a{sv}`: `enabled` (b), `smsc` (s), `ppi` (s, the own number in the daemon's last status, e.g. `tel:+31612345678`), `operator` (s, the SIM's operator id in that status), `registered` (b), `subscribers` (u) |
|
||||
| `Subscribe()` | `→` nothing: the calling connection receives `Received` and `StateChanged` from now on (unicast, never broadcast: to subscribers, and a submission's `sent` / `failed` also to its `Send` caller); subscribe again when imsd's name reappears on the bus |
|
||||
| `List()` | `→ a(sa{sv})`: the stored messages it can read, by the arrival second on the phone's wall clock, then within a run the sequence number (a 1970 clock before the first time sync sorts first; the SC's `timestamp` is the real chronology), each the id and the dictionary `Received` carries |
|
||||
| `Delete(id)` | `s`: removes a stored message |
|
||||
| `Received` | `s a{sv}` (id, message: `from`, `text`, `timestamp` (the SC's, as `2026-10-16T22:50:00+02:00`), `received` (x), `sc`, `to` (when the daemon held an own number at receipt: that number, e.g. `tel:+31612345678`), `class` (i, -1 none), `pid` (y), `dcs` (y), `segments` (i), `message-waiting` (b), `port-dst`/`port-src` (u, when addressed to a port), `data` (ay, 8-bit data), `pdu` (ay, the SMS-DELIVER as received; of a concatenated message, the segment that completed it)) |
|
||||
| `Received` | `s a{sv}` (id, message: `from`, `text`, `timestamp` (the SC's, as `2026-10-16T22:50:00+02:00`), `received` (x), `sc`, `to` (when the daemon held an own number at receipt: that number, e.g. `tel:+31612345678`), `operator` (the SIM's operator id at receipt), `class` (i, -1 none), `pid` (y), `dcs` (y), `segments` (i), `message-waiting` (b), `port-dst`/`port-src` (u, when addressed to a port), `data` (ay, 8-bit data), `pdu` (ay, the SMS-DELIVER as received; of a concatenated message, the segment that completed it)) |
|
||||
| `StateChanged` | `s s s` (id, state, reason): `sent` (every segment accepted by the SC), `failed` (why), and with a status report `delivered` (every segment), `delivery-pending`, `delivery-failed` — each speaks for the whole message, never for one segment, and `delivery-pending` can come more than once |
|
||||
|
||||
`Send`, `Subscribe`, `List` and `Delete` are gated by polkit's `net.catcrafts.IMS1.Messaging`.
|
||||
|
|
|
|||
Loading…
Reference in a new issue