Fixed-line voice imports
Reconcile outbound switch calls against sealed invoices.
usaged (port 9403) accepts a switch export for subscriptions the source has already identified. A 61-second fixed-line call to a mobile number on the example Glasfaser 1000 tariff produces a €0.38 line for two started minutes on the following month's invoice.
Download the usage OpenAPI or fetch GET /openapi.yaml from the service. The local development estate starts it with just dev. Compose exposes the redacted receipts in the Desk and keeps switch intake on the private service network.
Connect a switch
Configure a named switch key in usaged. Give each switch a separate principal and preserve its name during key rotation. Serve the endpoint over TLS. The source must provide a stable, opaque call ID unique across its subscriptions and one final outbound record per call. Keep the export at the switch for reconciliation.
Configure TELCO_BILLD_URL and TELCO_MEDIATION_TOKEN in usaged. Register that token with the mediation role in billd. The switch keeps its own credential.
Set TELCO_VOICE_PLAN to a TOML file and restart usaged when publishing a new revision. The local estate uses this deliberately narrow example.
version = "example-de-1"
[prefixes]
"49151" = "calls-mobile"
"4930" = "calls-landline"The longest matching international prefix determines the tariff kind. Available kinds are calls-mobile, calls-landline, calls-eu and calls-premium. Configure ranges supported by the subscriptions' price books. The switch supplies an international or German national dial string and an offset timestamp. Its recorded local day is the usage date. Supply the optional sixth field area_code for local dialling. An optional [classes] table maps German numbering classes to tariff kinds where no configured prefix matches. Unmapped destinations go to review. Emergency and freephone calls are suppressed. Zero seconds produces no charge.
Submit and reconcile
Set SUBSCRIPTION to an active subscription UUID and SWITCH_TOKEN to the source credential. This example places the call on 31 October. Use a billing period still open on your estate.
cat > calls.csv <<CSV
subscription,call_id,destination,answered_at,seconds
$SUBSCRIPTION,call-8472,01511234567,2026-10-31T23:55:00+01:00,61
CSV
BATCH=$(uuidgen)
curl --fail-with-body -X PUT "${TELCO_USAGED_URL:-http://127.0.0.1:9403}/voice-batches/$BATCH" \
-H "Authorization: Bearer $SWITCH_TOKEN" -H 'Content-Type: text/csv' \
--data-binary @calls.csvSources with structured records may send application/json with a records array using the same field names and numeric seconds.
Send at most 1,000 records and 64 KiB per import. Save the batch UUID before sending. Retrying identical bytes in the original format with the same principal and UUID returns the original receipt, including after a restart, plan change or invoice seal. A new batch containing an already charged source call returns a duplicate if subscription, tariff kind, day and seconds agree. A change to those charge facts is rejected. Native POST /usage reserves the voice: ID prefix.
If billd is unavailable after usaged accepts the input, the source receives 503 voice.delivery-pending. The worker retries the frozen classification. Reusing the original UUID lets the switch recover the resulting receipt.
In Gesprächsimporte, open a batch to match its one-based data-record numbers to the original CSV. Each record is accepted, duplicate, held, rejected, suppressed or sent to online reconciliation. A reconciliation row refers to usage already reported through online charging. Resolve held or malformed records at the source and send a corrected export under a fresh batch UUID. Usage for an already sealed period or an account with a final invoice stays held. For offline prepaid subscriptions, submit the held usage through the prepaid intake. Their wallet receipt has no postpaid invoice dispatch date. Online-owned calls are counted for reconciliation without charging the subscriber again. The receipt records the plan revision, counts and reasons. Raw switch call IDs and dialled numbers stay out of the stored usage, receipt and event feed.
The estate feed at GET /usage/events emits one de.telco.usage.batch-reconciled event per completed batch. Consumers can follow its UUID to the redacted receipt.
A switch can retrieve its own receipts with GET /voice-batches/{id} and list its latest 50 with GET /voice-batches. Estate operators and read-only staff can inspect imports across sources. Operators that supply classified usage send it to billd’s classified usage API. For the customer-visible breakdown and dispatch-based retention, see Itemised fixed-line calls.