messages, imsd: P-Access-Network-Info in responses and in requests within a dialog
imsd named the serving cell in its REGISTERs, the reg-event SUBSCRIBE, an INVITE and a MESSAGE. TS 24.229 5.1.2A.1.1 and 5.1.2A.2 have a UE insert the header into a request within a dialog as well, and into a response within a dialog, to a request for a dialog and to a standalone method: not into a CANCEL nor into a response to one, and into an ACK at its choice. A PRACK and a BYE carry it now, and every response imsd builds but a 100 Trying, the 200 to a CANCEL and the transport's 400 to a request cut short. The server ports (the protected ports' TCP listeners and UDP sockets) take a request from any source (AGENTS.md §12), and the header is the phone's cell. What they send in answer keeps it only on the two paths of the SA pair the shell has on record, and loses it anywhere else. Tested: the suites, and the daemon of this commit on the workstation against a stand-in network that asks it from both sides of those paths (the fp6 journal's 2026-12-04-pani-in-dialog capture, bench/), and on the dev phone on KPN, where its answers to a text's two requests and a call's 180 and 200 carried the header inside the SA pair (the journal's 2026-12-04-imsd-1.2.7-range-on-dev-phone capture).
This commit is contained in:
parent
6d05aaed0d
commit
a65724a252
11 changed files with 460 additions and 38 deletions
154
AGENTS.md
154
AGENTS.md
|
|
@ -44,12 +44,12 @@ PipeWire. The verified device/carrier combinations are in the README.
|
|||
| `project.cpp` | The canonical build description, for [Crafter Build](https://forgejo.catcrafts.net/Catcrafts/Crafter.Build). Chooses the product by `--product=`. |
|
||||
| `interfaces/Imsd.cppm` | The primary module interface of `imsd-core`: `export import`s the nine partitions below. |
|
||||
| `interfaces/Imsd-Util.cppm` | `imsd::util` — SIP tokens, IPv6 host/port formatting, the RFC 5952 §4 IPv6 text (`CanonicalIp6`/`CanonicalAddr`; an IPv4-mapped address spelled in hex stays hex, where §5 and `inet_ntop` write it dotted) and the comma-separated address-list parser (`ParseAddressList`), the count of seconds a setting names (`WholeSeconds`), hex/base64, MD5 (RFC 1321), the fixed protected ports `PortUc`/`PortUs` (45061/45062). |
|
||||
| `interfaces/Imsd-Sip.cppm` | `imsd::sip` — SIP as a text layer plus TCP framing: header extraction (from the header section only: a read ends at the first empty line after the start line, empty lines before it skipped; a header is asked for by its long name and found under that or its compact form — RFC 3261 7.3.3: the RFC's ten, and `o` for Event and `x` for Session-Expires — with or without white space before the colon; `Unfolded`, by which the framers hand a message on with its folded header lines — 7.3.1 — joined; `HeaderUri`: the party a header names; `Body`, moved here out of `CallMachine`), status codes, the granted lifetime, `MinSe` (the interval a `Min-SE` names), `ResponseOf` transaction matching (the Call-ID, and the CSeq as its number and its method, whatever spaces or tabs part them and whatever zeros stand before the number), `CutShortRequest`: the header section of a request — any but an ACK or a CANCEL — whose datagram has fewer body bytes than the Content-Length read from it says, which its 400 is built from. Not a full RFC 3261 parser, deliberately. |
|
||||
| `interfaces/Imsd-Sip.cppm` | `imsd::sip` — SIP as a text layer plus TCP framing: header extraction (from the header section only: a read ends at the first empty line after the start line, empty lines before it skipped; a header is asked for by its long name and found under that or its compact form — RFC 3261 7.3.3: the RFC's ten, and `o` for Event and `x` for Session-Expires — with or without white space before the colon; `Unfolded`, by which the framers hand a message on with its folded header lines — 7.3.1 — joined; `HeaderUri`: the party a header names; `Body`, moved here out of `CallMachine`), status codes, the granted lifetime, `MinSe` (the interval a `Min-SE` names), `WithoutHeader` (a message less every line on which one header is found, under its long name or its compact form), `ResponseOf` transaction matching (the Call-ID, and the CSeq as its number and its method, whatever spaces or tabs part them and whatever zeros stand before the number), `CutShortRequest`: the header section of a request — any but an ACK or a CANCEL — whose datagram has fewer body bytes than the Content-Length read from it says, which its 400 is built from. Not a full RFC 3261 parser, deliberately. |
|
||||
| `interfaces/Imsd-Sdp.cppm` | `imsd::sdp` — SDP offer/answer: the AMR-WB + AMR + telephone-event offer (optional IR.92 preconditions; `OfferedTelephoneEventPt` names its telephone-event numbers), the parser the media plane needs (the codec, its payload type and mode, and the telephone-event payload type the m-line lists at that codec's clock), `BuildAnswer` for the terminating side, the `CODECS` override. |
|
||||
| `interfaces/Imsd-Sms.cppm` | `imsd::sms` — the short message codecs SMS over IP rides on (TS 24.341 carries the bytes a 2G/3G phone puts in an RP-DATA, in a SIP MESSAGE body): the GSM 7-bit default alphabet with its extension table and the septet packing, UCS-2 (TS 23.038); the SM-TL PDUs (TS 23.040: SMS-SUBMIT built, one per segment with the concatenation header when the text needs more than one; SMS-DELIVER, SMS-STATUS-REPORT and SMS-SUBMIT-REPORT parsed; the SMS-DELIVER-REPORT that acknowledges a delivery; the user-data header — concatenation, application ports — and the `Reassembler` of a concatenated message); the SM-RL messages (TS 24.011: RP-DATA, RP-ACK, RP-ERROR in both directions, the cause values) and `RpCauseIsTemporary`, the causes of a submission after which imsd sends the segment again; EF_SMSP (TS 31.102 §4.2.27), where the (U)SIM names the service centre, and qmicli's hex dump of it. Byte-level only: no SIP, no clock, no I/O. |
|
||||
| `interfaces/Imsd-Aka.cppm` | `imsd::aka` — the card's side of a registration: the AKAv1-MD5 digest (RFC 3310), IMPI/IMPU/realm from IMSI + MCC/MNC, parsers for `qmicli --uim-get-card-status` and `mmcli` output, the AUTHENTICATE APDU and its response; since 1.2.3 the ISIM: the application of the slot in use out of the card status (`ParseIsimApp`, in whatever state the modem lists it), the SELECT and the two READ commands its identity files are read with, a card's answer (`ApduAnswer`: `90 00`, `91 XX` and `92 XX` are its normal endings; `HoldsRead` takes a read's data under `62 82` as well) and the command it asks for next (`ApduFollowUp`, for an answer without data: GET RESPONSE for `61 XX`, a command without data again for `6C XX`), the value a file holds (`ParseIsimValue`: the data object with tag `80`, the `FF` bytes at the end of its length cut, no blank and no byte outside printable ASCII) and `IsimIdentity`, the check of the three values — an `@` between two parts, a domain of labels of letters, digits and inner hyphens, 63 characters a label and 253 in all at most, a `sip:` at the start and more after it, the two identities 255 characters at most, no blank, no byte outside printable ASCII and no `"`, `\`, `<` or `>` — before they replace the derived names. |
|
||||
| `interfaces/Imsd-Ipsec.cppm` | `imsd::ipsec` — the two ESP SA pairs (TS 33.203) as `ip xfrm` argv lists, the ESP ciphers offered (`ParseEalgOffer`, `DefaultEalgOffer`), the Security-Server mechanism selection, and the reader that reconstructs SPIs/ports from `ip xfrm state`/`policy` text for a warm resume, and (1.0.0) `SaPeer`, the P-CSCF the kernel's pair is to, read from the `dir out` policies that carry imsd's fingerprint, `OwnXfrmDeleteCommands`, the deletes by exact key of what two rules select — the policies carrying imsd's fingerprint and the reqid-1/2 transport-mode ESP states in their direction or on the UE's ims-PDN address, whoever installed them (§12), and `FileNamesAnotherPair`, whether a state file's `spi_uc`/`spi_us` name the kernel's pair (unknown on either side decides nothing). |
|
||||
| `interfaces/Imsd-Messages.cppm` | `imsd::msg` — every SIP request and response imsd sends, built from an explicit `Context` and per-request variables so the builders are pure functions; `tests/Messages` is their suite. Also `IsEmergency`. Since 1.2.0 the SIP MESSAGE of SMS over IP (`BuildMessageSms`: an RP-DATA to the service centre's PSI, or an RP-ACK/RP-ERROR to the IP-SM-GW with In-Reply-To — TS 24.341 5.3.1.2 and 5.3.2.4), the `+g.3gpp.smsip` Contact tag behind `Context::smsOverIp`, `BuildResponse`, the final for an inbound MESSAGE outside a call's dialog (the 200, the 480, the 488): each Via row echoed in order and the To echoed with a tag added unless it already holds `tag=` (RFC 3261 8.2.6.2); since 1.2.1 `BuildBadRequest`, the 400 to a request cut short of the Content-Length read from it — any but an ACK or a CANCEL, in a call's dialog or not —, in that shape, a To tag it adds made from the request's header section and a secret of the run (RFC 3261 8.2.7); of requests that came whole, in-dialog requests, a MESSAGE among them, and the shell's answers to any other request outside a call — a NOTIFY, an OPTIONS, a method it does not handle; not an INVITE, whose 486 while a call exists is `BuildInviteResponse`'s — keep `BuildResponse200`'s hop-by-hop shape; and `ScPsi`, the service centre's PSI from its international number — never a dialled-number guess. |
|
||||
| `interfaces/Imsd-Ipsec.cppm` | `imsd::ipsec` — the two ESP SA pairs (TS 33.203) as `ip xfrm` argv lists, the ESP ciphers offered (`ParseEalgOffer`, `DefaultEalgOffer`), the Security-Server mechanism selection, and the reader that reconstructs SPIs/ports from `ip xfrm state`/`policy` text for a warm resume, and (1.0.0) `SaPeer`, the P-CSCF the kernel's pair is to, read from the `dir out` policies that carry imsd's fingerprint, `OwnXfrmDeleteCommands`, the deletes by exact key of what two rules select — the policies carrying imsd's fingerprint and the reqid-1/2 transport-mode ESP states in their direction or on the UE's ims-PDN address, whoever installed them (§12), and `FileNamesAnotherPair`, whether a state file's `spi_uc`/`spi_us` name the kernel's pair (unknown on either side decides nothing); `SaPaths` and `OnSaPath`, whether a packet runs on one of the two paths the outbound policies of an SA pair select. |
|
||||
| `interfaces/Imsd-Messages.cppm` | `imsd::msg` — every SIP request and response imsd sends, built from an explicit `Context` (an empty one for `BuildBadRequest`'s 400) and per-request variables so the builders are pure functions (the shell takes one line, `P-Access-Network-Info`, out of an answer its server ports send on neither path of the SA pair on record: §12); `tests/Messages` is their suite. Also `IsEmergency`. Since 1.2.0 the SIP MESSAGE of SMS over IP (`BuildMessageSms`: an RP-DATA to the service centre's PSI, or an RP-ACK/RP-ERROR to the IP-SM-GW with In-Reply-To — TS 24.341 5.3.1.2 and 5.3.2.4), the `+g.3gpp.smsip` Contact tag behind `Context::smsOverIp`, `BuildResponse`, the final for an inbound MESSAGE outside a call's dialog (the 200, the 480, the 488): each Via row echoed in order and the To echoed with a tag added unless it already holds `tag=` (RFC 3261 8.2.6.2); since 1.2.1 `BuildBadRequest`, the 400 to a request cut short of the Content-Length read from it — any but an ACK or a CANCEL, in a call's dialog or not —, in that shape, a To tag it adds made from the request's header section and a secret of the run (RFC 3261 8.2.7); of requests that came whole, in-dialog requests, a MESSAGE among them, and the shell's answers to any other request outside a call — a NOTIFY, an OPTIONS, a method it does not handle; not an INVITE, whose 486 while a call exists is `BuildInviteResponse`'s — keep `BuildResponse200`'s hop-by-hop shape; and `ScPsi`, the service centre's PSI from its international number — never a dialled-number guess. |
|
||||
| `interfaces/Imsd-Engine.cppm` | `imsd::engine` — the decisions as pure reducers: `CallMachine` (one call's dialog, returning `Action`s for the shell), `RegRecovery` (the registration recovery policy, §7.4) and, since 1.2.0, SMS over IP (§7.9): `SmsOutbound` (one short message of ours on its way to the service centre, segment by segment, since 1.2.1 a segment that gets no answer, or an RP-ERROR with cause 41, sent once more with TP-RD set — TS 23.040 9.2.3.6 —, returning `SmsAction`s) and `OnSmsMessage` (what an inbound MESSAGE outside a call's dialog leads to: its final, the message or status report it delivered, the delivery report to send), and `RecentTransactions` (an inbound request's retransmission — the same Call-ID, CSeq and Via branch within 32 s (`TimerJ`), the branch being the value of the first `branch=` of its first Via row and a request with none or an empty one never matched — answered with the same final and not handled again) and, since 1.2.1, `RecentSubmissions` (the Call-IDs of the MESSAGEs our submissions went out in, an hour each, by which a submit report for one that is no longer in flight is known for ours — TS 24.341 5.3.1.2); `SameRecipient` and `StatusReportBook`, a status report's match to the message that asked for one — TP-MR and recipient — and its word for the whole message, with `SmsWordOrder`, the order of a message's words: the submission's first, a report's held until then (§7.9); `RunToken`, `SentSmsId` and `ReceivedSmsId`, the ids (§8.4); `StoredSms` with `FormatStoredSms`/`ParseStoredSms`, the record codec of the received-message store, and `StoredSmsBefore`, `List`'s order. Since 1.2.5 also `WakeAt`: when the phone has to be awake for imsd (§7.10). |
|
||||
| `interfaces/Imsd-Qmi.cppm` | `imsd::qmi` — the QMI WDS request bytes `imsd-pcscf` sends (Bind Mux Data Port, Set IP Family, Get Packet Service Status, Get Current Settings, Get Profile Settings), the message/TLV parser, the P-CSCF list readers (0x22 flag, 0x23 IPv4, 0x24 FQDN, 0x2E IPv6 — the last one libqmi does not model). |
|
||||
| `interfaces/ImsdBus.cppm` | `imsd::bus` — the polkit gate in front of call control and messaging (`Gated`'s `Action` parameter names the action), shared by imsd and imsd-ofonod. GLib, so outside `imsd-core`. |
|
||||
|
|
@ -184,7 +184,14 @@ stand-ins on the workstation and what on the dev phone. Where an answer
|
|||
goes that the server ports send (§12: the connection found by its port
|
||||
and its peer, an answer that is not sent, the socket a datagram leaves
|
||||
from) is the shell's (`ServerPorts`); §5 has what of it ran against a
|
||||
stand-in network on the workstation and what on the dev phone. SMS over IP
|
||||
stand-in network on the workstation and what on the dev phone. What such
|
||||
an answer keeps of `P-Access-Network-Info` (§12) is decided by
|
||||
`imsd::ipsec::OnSaPath` and done by `imsd::sip::WithoutHeader`, both with
|
||||
tests; the shell's part is the record of the SA pair (`saPaths_`: when a
|
||||
pair goes on it and when it is emptied), the two ends it has an answer
|
||||
judged by (`Leaving`'s callers) and the journal's line for a header taken
|
||||
out (`Leaving`), and §5 has what of it ran against that network and what
|
||||
on the dev phone. SMS over IP
|
||||
(1.2.0, §7.9) keeps in the
|
||||
shell, among others, the service centre's source (`SMSC=` over EF_SMSP, `LoadSmsParameters`),
|
||||
the three counters (TP-MR, RP-MR, the concatenation reference), their
|
||||
|
|
@ -345,7 +352,14 @@ What the suites pin:
|
|||
untouched, another transport-mode user's pair on other ports and addresses
|
||||
untouched — its reqid-1 ESP state on the UE's address deleted, its AH state
|
||||
left —, a policy-less state on the UE's address deleted, one between
|
||||
other addresses left).
|
||||
other addresses left), and `OnSaPath` (our client port to the P-CSCF's
|
||||
server port and our server port to its client port are the pair's
|
||||
paths; our client port to its client port, our server port to its
|
||||
server port, another port or another host for the P-CSCF, another
|
||||
address or another port of ours are not, nor is anything while no pair
|
||||
is on record; an IPv6 address in another spelling, the packet's or the
|
||||
record's, is the same address; over IPv4 a path of the pair, and not
|
||||
another host on its port).
|
||||
- `Qmi` — the request bytes `imsd-pcscf` sends (four of the five the probe's,
|
||||
byte for byte; Get Profile Settings is the helper's own, answered by the
|
||||
modem on the dev phone in the probe capture's `--profile 2 -v` run and on the dev phone's bring-up
|
||||
|
|
@ -377,11 +391,25 @@ What the suites pin:
|
|||
(every Via row echoed; the To tag sixteen hex digits of the MD5 of a
|
||||
secret and the header section, the expected one from Python's hashlib;
|
||||
the same request, the same 400; another request, another tag; another
|
||||
secret, another tag; a To's own tag kept).
|
||||
secret, another tag; a To's own tag kept); `P-Access-Network-Info`
|
||||
where the cell is known — after the RAck of a PRACK and the CSeq of a
|
||||
BYE, in the 200 of `BuildResponse200` (before the Contact of one with an
|
||||
answer), in the 488 of `BuildResponse`, in a 180 plain and reliable, a
|
||||
486 and a 200 of `BuildInviteResponse` — and in none of these where it
|
||||
is not (the 488 and the plain 180 are pinned whole in both forms); where
|
||||
the cell is known, in no 200 to a CANCEL, no 100 Trying, neither ACK and
|
||||
no CANCEL; in no 400 of `BuildBadRequest`, which is built without the
|
||||
context; and the 180 to an INVITE whose Allow names CANCEL is the 180
|
||||
to any other.
|
||||
- `Sip` — the text layer's edge cases (empty header values, line anchoring,
|
||||
keepalive discards, a header read that stops at the first empty line — a
|
||||
body line spelling a header name picks nothing, leading empty lines are
|
||||
skipped), the Content-Length the two framers read (zeros before its
|
||||
skipped), `WithoutHeader` (a message less every line on which
|
||||
one header is found: one such line, two, the last before the
|
||||
empty line, a last line without its line end, the name in
|
||||
another letter case, a compact form; the body, a message
|
||||
without the header and a name that is part of a longer one left
|
||||
as they are), the Content-Length the two framers read (zeros before its
|
||||
number no part of it; a number past any that fits not read as zero; a
|
||||
value that begins with no digit read as none), `CutShortRequest` (the
|
||||
header section, unfolded, of a request with fewer body bytes than the
|
||||
|
|
@ -470,7 +498,11 @@ What the suites pin:
|
|||
string past `DtmfMaxTones`; the receive payload type: our offer's on a
|
||||
renumbered answer, the answer's when the audio took ours, the echoed
|
||||
offer's on an incoming call; an incoming call from an INVITE, and an
|
||||
outgoing call from responses, whose header names come in compact form) and
|
||||
outgoing call from responses, whose header names come in compact form;
|
||||
`P-Access-Network-Info` through a call where the cell is known: in the
|
||||
180, the 200s, the 486 and the 487 of a call that comes in, in the PRACK
|
||||
of a call imsd places and in a BYE either way, in no 100 Trying, no 200
|
||||
to a CANCEL, no ACK and no CANCEL) and
|
||||
`RegRecovery` (thresholds, backoffs, the throttle
|
||||
schedule, Retry-After, which waits a Dial may cut short, when the old
|
||||
registration counts as gone, the holds a restart takes over, a binding the
|
||||
|
|
@ -1353,6 +1385,46 @@ Rules:
|
|||
address; a peer on a link-local or an IPv4 address; a connection that
|
||||
ends in an error and is made again within one turn of the daemon's
|
||||
loop.
|
||||
- What an answer of the server ports keeps of `P-Access-Network-Info`
|
||||
(§7.6, §12): the rule of the two paths is pinned in `tests/Ipsec` and
|
||||
the line's removal in `tests/Sip`; the shell's part (the record of the
|
||||
SA pair, the two ends an answer is judged by, the journal's line) ran
|
||||
on the workstation against the same stand-in network (the same capture
|
||||
and script; the bench installs no SA, its `ip` being a stand-in, and
|
||||
the network tells the paths by the addresses and the ports, as the
|
||||
record does). Eight OPTIONS requests (five over UDP, three over TCP)
|
||||
were answered with the header to the P-CSCF's protected client port
|
||||
from 45062, over UDP and over TCP, and to its protected server port
|
||||
from 45061 by the request's Via, and without it to another port of the
|
||||
P-CSCF's host, to another host and to a Via port that is not the
|
||||
protected server port, with one line in the journal; the same after a
|
||||
restart that resumed the registration with another P-CSCF configured
|
||||
than the pair's; none of the eight answers carried it where one policy
|
||||
add of the SA setup had failed, nor where the modem named no cell. Of
|
||||
an incoming call, over TCP and over UDP by the Via, the reliable 180,
|
||||
the 200s to its PRACK and its UPDATE, the 200 that answered it and the
|
||||
200 to its BYE carried the header and the 100 Trying did not; over TCP
|
||||
a 486 and a 487 carried it and the 200 to the CANCEL did not; a call
|
||||
from another host got its 180 and its 486 without it. The daemon's own
|
||||
PRACK and BYE carried it, its ACKs and its CANCEL did not, and a
|
||||
request on the client flow was answered there with it. On the dev
|
||||
phone on KPN (2026-12-04, the capture of the entry above), with the
|
||||
record of the pair made by a resume, these left with the header
|
||||
inside the SA pair: the 200s to the two NOTIFYs that follow the
|
||||
reg-event SUBSCRIBE and to a text's two requests; of a call that came
|
||||
in the 180, the 200 that answered it and the 200 to its UPDATE; and
|
||||
the daemon's own BYE, of that call and of one it placed. The call's
|
||||
100 Trying and the daemon's ACK left without it. After a boot, where
|
||||
the record is made by the fresh registration's setup: the 200s to the
|
||||
NOTIFY and to a text's two requests, a call's 180, its 200 and the
|
||||
200 to its BYE, and the BYE of a call the daemon placed, with the
|
||||
header; the 100 Trying and the ACK without. The journal has no line
|
||||
of an answer that went without it. Of what ran against the stand-in
|
||||
network nothing else has been seen on a real one (an answer off the
|
||||
pair's two paths, a PRACK either way, a 486, a 487 and a CANCEL among
|
||||
it). Not run: a fresh registration whose setup fails while a pair is
|
||||
on record; a bring-up that finds a dead pair; a fresh attempt to
|
||||
another P-CSCF that fails before its SA setup; an address move.
|
||||
- `imsd-pcscf` ran on the dev phone (KPN) on 2026-10-11 against the live ims
|
||||
bearer: the `--mux 1 --profile 2 -v` sequence, a plain run, and `OutOfCall`
|
||||
on an unbound mux (the fp6 journal's `2026-10-11-pcscf-pco-probe` capture,
|
||||
|
|
@ -2142,6 +2214,29 @@ sent, emit this D-Bus state change, arm this deadline). States and reasons are t
|
|||
call it places imsd asks to be the refresher and sends no session
|
||||
refresh of its own (the call machine sends no UPDATE and no re-INVITE;
|
||||
one from the far side is answered).
|
||||
- Access information: `P-Access-Network-Info` names the serving cell
|
||||
(`ParsePani` of `mmcli --location-get`: no header before a read has
|
||||
named a cell, and a read that names none leaves the last one). TS 24.229
|
||||
5.1.2A.1.1 has a UE insert it "into any request for a dialog, any
|
||||
subsequent request (except CANCEL requests) or response (except CANCEL
|
||||
responses) within a dialog or any request for a standalone method", the
|
||||
ACK at its choice, and 5.1.2A.2 into "any response to a request for a
|
||||
dialog" and "any response to a standalone method" as well; RFC 7315 5.7
|
||||
has it appear in no ACK and no CANCEL. imsd writes it into its
|
||||
REGISTERs, the reg-event SUBSCRIBE, an INVITE, a MESSAGE, a PRACK and a
|
||||
BYE, and into every response it builds but three, the last two by its
|
||||
own choice: the 200 to a CANCEL; a 100 Trying, which a stateful proxy
|
||||
never forwards (RFC 3261 21.1.1) and for which the log of the stock
|
||||
modem's capture has no value either (§13); and the 400 to a request cut
|
||||
short (§7.9), which the transport answers without the registration's
|
||||
context. The value is the one
|
||||
`RefreshPani` last took — it reads at the bring-up and after a wait
|
||||
there, before a refresh's, a reconnect's and a recovery's REGISTER and
|
||||
before a dial — and not the cell of the moment a later message leaves at
|
||||
(NOTE 13 of 5.1.2A.1.1 has the current one in a request or response
|
||||
within a dialog): an incoming call's answers name the cell of the last
|
||||
of those reads. What the server ports send in answer keeps the header on
|
||||
the two paths of the SA pair on record and loses it anywhere else (§12).
|
||||
- DTMF (`SendDtmf`): the tones go out as RFC 4733 telephone-event packets
|
||||
on the call's RTP stream, at the payload type the SDP negotiated for the
|
||||
codec's clock (`MediaLeg::dtmfPt`: the answer's for an outgoing call, the
|
||||
|
|
@ -2342,6 +2437,9 @@ Lines the operator (and the scripts) look for, all prefixed `imsd: `:
|
|||
- `an answer from port N to [address]:port is not sent: no connection from that peer to that port is held
|
||||
(said once)` the first time in a run that an answer is given to the channel of a request that came in over
|
||||
TCP and `ServerPorts` holds no connection from that request's peer to that port (§12).
|
||||
- `an answer from port N to [address]:port is on neither path of the SA pair on record: it goes without
|
||||
P-Access-Network-Info, as every such answer does (said once)` the first time in a run that the header is
|
||||
taken out of an answer the server ports send (§12).
|
||||
- `sleep is held off while the call lasts (logind's inhibitor)` when the
|
||||
calls table's first call has its lock and `sleep is no longer held off
|
||||
(no call)` when that lock is released, the table's last call gone
|
||||
|
|
@ -3405,6 +3503,28 @@ only the imsd side of its bus choice.
|
|||
has one. A channel keeps no descriptor: the kernel gives a closed
|
||||
descriptor's number out again, to a pipe, a file or the connection of
|
||||
whoever connects next.
|
||||
`P-Access-Network-Info` names the serving cell, so what `ServerPorts`
|
||||
sends in answer keeps it only on the two paths of the SA pair on record
|
||||
— from the client port to the P-CSCF's protected server port, from the
|
||||
server port to its protected client port, between the pair's two
|
||||
addresses (`imsd::ipsec::OnSaPath`) — and loses it anywhere else
|
||||
(`Leaving`, `imsd::sip::WithoutHeader`), the journal saying so once in a
|
||||
run (§7.8). The record is the shell's (`saPaths_`): the pair this run
|
||||
set up without an error from `ip`, or read back from the kernel's
|
||||
tables at a resume, and none from the moment the shell takes that pair
|
||||
out of the kernel; the shell does not ask the kernel again. The client
|
||||
flow is not judged by the record: what imsd sends there, its own
|
||||
requests and its answers to what comes in on that flow, leaves as it
|
||||
was built. It is the first of the two paths; where a command of the SA
|
||||
setup failed and the registration went on all the same, it may run in
|
||||
the clear. The first REGISTER of a fresh registration goes from the
|
||||
init port to the P-CSCF's unprotected port and, where a cell has been
|
||||
read, carries the header in the clear: RFC 7315 6.4 keeps it out of an
|
||||
initial request that is unauthenticated and unprotected, as this one
|
||||
is, and TS 24.229 5.1.1.2.1 has it in an unprotected REGISTER only
|
||||
where a security association or TLS session exists (§13 has what the
|
||||
stock modem's log shows of the REGISTER that begins its own
|
||||
registration).
|
||||
- Short messages (§7.9): `Send` is behind `net.catcrafts.IMS1.Messaging`
|
||||
(an ungated `Send` would let any local account text from the
|
||||
subscriber's number); the journal names a delivered message's sender, size and
|
||||
|
|
@ -3758,3 +3878,21 @@ the related code.
|
|||
`folded-401`); the `Security-Server` of both was one line. imsd finds the nonce by a search
|
||||
of the whole message, and unfolds every received message where it is
|
||||
framed (§7.9).
|
||||
- **The stock modem's `P-Access-Network-Info`** — on KPN the stock
|
||||
Fairphone 6's own IMS client (2026-07-21, a de-registration, a
|
||||
registration and an incoming call it took: the fp6 journal's
|
||||
`2026-12-04-pani-in-dialog` capture, `evidence/`) puts the header into
|
||||
its reg-event SUBSCRIBE and
|
||||
into its 200s to a NOTIFY, to a PRACK, to an INVITE it answers after
|
||||
the call's ACK and to a BYE: its log has the value for each. It has
|
||||
the value for each of the capture's three REGISTERs too; for the one
|
||||
that begins the registration, unprotected, it also has, after the
|
||||
value, the stack's line that a `P-Access-Network-Info` "to be Removed"
|
||||
was "NOT Found", the only line of the log with the header's name: it
|
||||
does not say whether that REGISTER carried the header.
|
||||
The log has no value for its two 100 Tryings nor for the 200 with
|
||||
which it answers the call's INVITE, and too little of its 180 to say;
|
||||
it is a diagnostic stream that loses lines, so a value it lacks was
|
||||
not added or its line was lost. imsd leaves a 100 Trying without the
|
||||
header by its own choice (§7.6); into the 200 that answers an INVITE
|
||||
it writes it, as TS 24.229 5.1.2A.2 has it.
|
||||
|
|
|
|||
Loading…
Reference in a new issue