telco-interop

Open-source Rust crates · WBCI · S/PRI

The German provider switch, in Rust

WBCI 2.0 for the § 59 TKG Anbieterwechsel and Rufnummernportierung between providers, S/PRI 4.x for open-access fibre orders with the network owner: typed messages, XML proven against the official schemas, deadlines that explain themselves and the whole process as a value. Sans-I/O, so transport, signing and storage stay yours.

cargo add telco-interop

or only one interface: cargo add wbci · cargo add spri

Answer a pre-agreement as the losing provider
use wbci::pruefung::{self, Bestand};
use wbci::*;

// A pre-agreement (VA-KUE-MRN) arrives from the gaining provider.
let Payload::AnfrageRequest { anfrage: Anfrage::Vorabstimmung(va), .. } = Payload::from_xml(&xml)? else {
    return Err("not a pre-agreement".into());
};

// As the losing provider: decide the answer from your record.
let mut bestand = Bestand::new(va.endkunde.clone(), "D123".parse()?);
bestand.rufnummern = vec![OnkzRufnummer { onkz: "30".parse()?, rufnummer: "1234567".parse()? }];
bestand.standort = va.standort().cloned();
let pruefung = pruefung::check(&va, &bestand, received, &Calendar::wbci());
assert!(pruefung.is_agreed()); // RUEM-VA, every field explained

// Follow the switch: what is due, by whom, and why.
let mut process = Process::new(Role::EkpAbg, va.clone(), Direction::Received, received)?;
process.apply(Direction::Sent, received, Teq::for_anfrage(&va.into(), Meldungscode::Ok))?;
println!("{}", process.deadlines()[0]); // EKPabg: by Do 26.11.2026 23:59 …

Why you can rely on it

  • 373 + 776WBCI and S/PRI payloads validated against the official XSDs on every CI run
  • Fuzzedhostile XML refused with its receipt code, never a panic
  • Sans-I/Ono network, no clock, no global state
  • Redactedpersonal data never in Debug, errors or logs
  • MSRV 1.88three external dependencies, no unsafe
  • MIT / Apache-2.0dual-licensed, open source

One switch, two interfaces

The gaining provider agrees the switch with the losing provider over WBCI, then orders the line from the network owner over S/PRI with the same Vorabstimmungs-ID. telco_interop::Wechsel shows it as one timeline and checks that both sides agree.

  1. VA-KUE-MRNEKPauf → EKPabgpre-agreement
  2. RUEM-VAEKPabg → EKPaufagreed, binding date
  3. AKM-TREKPauf → EKPabgtakes over the line
  4. PVEKPauf → networkprovider-switch order
  5. QEBnetwork → EKPauforder admissible
  6. AKM-PVnetwork → EKPabgswitch announced
  7. RUEM-PVEKPabg → networklosing side answers
  8. ABM · ABM-PVnetwork → bothdate confirmed
  9. ERLM · ERLM-PVnetwork → bothswitched
  10. ENTM · ENTM-PVnetwork → bothbilling date

WBCI provider ↔ provider S/PRI provider ↔ network owner · One switch across WBCI and S/PRI

What the crates give you

The crates

CrateInterfaceBetweenStatus
wbciWBCI 2.0provider ↔ provider: the § 59 TKG switch, number porting, the losing provider's checkcomplete
spriS/PRI 4.xservice provider ↔ network owner: open-access orders, faults, diagnostics, the provider switchcomplete
telco-interopbothone dependency for both, plus Wechsel: one switch across WBCI and S/PRI, the sandbox scenarios, the command line and its output as a librarycomplete
wita-kitWITAservice provider ↔ Deutsche Telekom: wholesale orders on Telekom linesname reserved

All share one foundation (carrier-core: identifiers, working-day calendar, hardened XML), which you never depend on directly.

Questions

Is this official or certified?

No. telco-interop is an independent open-source project, not affiliated with or endorsed by the AK S&P, VATM, BUGLAS or Deutsche Telekom. Every payload kind the writers produce is validated against the official XML schemas on every CI run (373 WBCI and 776 S/PRI payloads), but certification of your system with your peers remains your step.

Which specification versions are implemented?

WBCI 2.0 with the XSD V2.00, Anlage 1 „Spezifikation Vorabstimmung“ V5.4.1 and the Arbeitshandbuch WBCI 2.10; S/PRI 4.x with the schema 4.00.03, the Providervereinbarung S/PRI V4.4, Anlage 7 (EPKs) V.13 and the Arbeitshandbuch S/PRI 4.x V2.9.5. The scope page lists every document and each interpretation.

Does it do SOAP, WS-Security or HTTPS?

It reads and writes the payloads bare or inside a SOAP 1.1 envelope, and leaves the SOAP header empty for your WS-Security signer. The crates are sans-I/O: transport, TLS, signing and verification, persistence and the clock belong to your application, so they fit any HTTP stack, queue or test harness.

How are the deadlines counted?

In German time (Europe/Berlin, compiled in). WBCI working days (AT) are Monday to Friday without the nine nationwide public holidays; S/PRI Werktage are Monday to Saturday. Forwards deadlines end at 23:59 of the n-th working day, backwards ones before 0:00. Every deadline names its rule and source and lists the days it counted and skipped; other calendars, regional holidays and closing days are configurable.

Can I use only WBCI, or only S/PRI?

Yes. Depend on the wbci or the spri crate directly, or on telco-interop with one feature turned off. The identifiers both interfaces share (Vorabstimmungs-ID, LineID, carrier code) are the same types in both crates, so adding the other one later needs no conversion.

Can I try it without installing anything?

Yes. The playground reads and checks a WBCI or S/PRI payload, explains a Meldungscode and shows the sandbox scenarios in your browser, with the same output as the command line. The crates run there as WebAssembly: nothing is uploaded, and there are no cookies or analytics.

How do I test without a partner?

With the sandbox. wbci::sim and spri::sim are simulated peers — the losing provider, the network owner and the losing provider in a PV — that answer what your system sends as the protocol prescribes, inside the deadlines and without a network. telco_interop::sim plays 13 named scenarios from both sides; telco-interop simulate writes them as files. It replaces no certification with your peers.

What about personal data?

Names, addresses, phone numbers, e-mail addresses, free text and attachment content print redacted in Debug output, and errors, validation issues, timelines and findings never contain them. The losing provider's check explains its decision without personal data, so the explanation can be logged and shared.

Is WITA supported?

No. The wita-kit crate is a name reservation for Deutsche Telekom's wholesale ordering interface; nothing is implemented.

What is the licence?

MIT or Apache-2.0, at your option. The AK S&P's specifications are copyrighted documents and are not part of the repository or the packages: the crates carry their own types and synthetic test data, and the schemas are fetched by URL and pinned by SHA-256 for the conformance test.

Start with one pre-agreement

Build a Vorabstimmung, check it, write the XML and follow its deadlines.