What actually differs when you onboard a Diameter partner
Four partner integrations on one Diameter routing agent, and the per-partner delta is four config files and a Python module.
Each partner gets its own instance directory (four of them, plus one for IMS). Everything
else comes from one shared base/:
instances/partner-a-dra/
configs/etc/freeDiameter/
freeDiameter.conf.tpl # peers, listeners, extensions
rt_default.conf # routing scores
acl_wl.conf # identities allowed to connect
rt_pyform.conf # module and function called per message
_Transforms.py # the partner-specific rewriting
tests/test_transform.py
Dockerfile, Makefile, meta-dev.yml, meta-prod.yml
That is the whole surface — nine files, one of which is a test. A partner is not a code branch; it is five files and a tag. The
freeDiameter build, the routing extensions, the service scripts and the dictionaries all live
in base/ and are shared.
The routing file is a score sheet
rt_default.conf does not list routes (despite the name). It adds and subtracts points, and freeDiameter sends
each message to whichever candidate peer scores highest:
* : "partner-a-peer-1" += DEFAULT_REALM ;
* : "partner-a-peer-2" += DEFAULT_REALM ;
dr="<our EPC realm>" : "<our HSS>" += REDIR_REALM ;
Partner peers are the default for everything (* on the left of the rule). The HSS outscores them for its own realm, so
only traffic for that realm goes to it. NO_DELIVERY is the one that does real work: it
removes a candidate instead of choosing one. With every candidate removed freeDiameter answers
UNABLE_TO_DELIVER, and a clean refusal for one subscriber beats a message delivered to the
wrong HSS.
Per-message rewriting lives in Python
rt_pyform.conf is three lines (DirectoryPath, ModuleName, FunctionName). It points a C
routing extension at a Python function that runs on every message. The partner-specific
part is therefore a 320-line Python file per instance, with a unit test beside it, and not a
patch to freeDiameter.
The price of that boundary is paid in C. Two tickets in March 2026 were crash fixes at the
C/Python edge. Heap corruption when TRANSLATION_MODE arrived empty (CW-3471, CW-3475). An OctetString compared
with the wrong function (memcmp, not a string compare — a Diameter OctetString carries no
terminator). A double free in a routing callback, and an answer leaked when the send failed.
A per-message hook into another language turns every Python-side surprise into a segfault in
the DRA.
Onboarding, honestly
Partner A and Partner B went in together over seven weeks in late 2024 (CW-1287, twelve
commits). The Diameter part was small — three changes, all in config. Allow both clear and IPSec CER/CEA in the ACL;
configure the instance as a client; make the partner peers the default route for
HSS-originated traffic.
Partner E, in July 2025, took five commits across eight days (CW-2426). Three of the five are
dummy commit for forcing build, add a dummy test step and Dummy commit for build testing.
The routing was the easy half, and not the slow one. Getting a new instance through the image build, tagged and
promoted, was the half that took the week.
The transition flag
IMSI translation arrived in February 2026 (CW-3075, eleven commits). It could not be switched
on in one step, because the DRA and the party behind it had to agree on which form of an IMSI
they were exchanging. So translation got an environment flag with three states (disable,
dev, enable) and shipped in dev while the behaviour was checked against production
traffic.
One partner's detection moved mid-flight too, from classifying by Route-Record to classifying by Origin-Realm. Route-Record is a path record, and the live path had more hops in it (a hub, then the served network) than the first version assumed.
What replaced the guesswork
By late 2026 the instances had an end-to-end harness instead of an opinion. A compose topology
stands up an HSS peer and an MME (two peers, one image under test). Replay bundles are built from
production captures, scrubbed, and committed, so the scenario reruns anywhere. A
route_assert step then predicts, from the config and a capture, where a given frame would be
routed; it scores every peer that could win and reports ties.
It found the bug that justified it — and only in the one place that counted. One check read the peer list straight out of the raw template and ignored the template's own environment gating, so it described a candidate set that cannot exist. The case where that mattered was exactly the fail-clean path the work existed to guarantee.