IOSOR Learn
SMS Message-Parts Drift Audit: Recalculate Segments Before Reconciliation
Audit recorded SMS segment counts against parts recalculated from final bodies, encoding, and UDH headers before accepting carrier invoices or DLR cost rollups.
Lead Telecom & Routing Architect · Lausanne, CH
Recalculate each message's parts from its final body, encoding, and concatenation header, then compare that number to the recorded segment count before any invoice or DLR-based cost rollup is accepted. Drift is a reconciliation blocker, not a rounding note.
Define the parts-of-record baseline
Freeze a baseline before touching invoices. For every message, capture the final outbound body exactly as submitted, the encoding decision (GSM-07.01 vs UCS-2), the effective per-part payload after encoding extension escapes, and the concat header (UDH reference, total parts, part index) where multi-part applies. Store the derived parts count as a computed field, never overwrite the carrier-reported value.
Recalculation rules that must be deterministic
Pin the exact segment math and test it against fixtures. GSM-07.01 single part holds 160 septets; concatenated parts hold 153 each after the 6-byte UDH. UCS-2 single part holds 70 code units; concatenated parts hold 67 each. Extension characters consume escape budget and silently push a body into an extra part. Recompute from the final body bytes, not from a template estimate or a pre-render length.
Trace drift back to the send path
Drift rarely originates in billing. Walk the send path: template rendering that changes length, encoding fallback that shifts GSM to UCS-2 mid-campaign, concat header assignment errors, retries that re-split a body, and DLR webhook payloads that report a segment count different from the recalculated parts.
Gate invoices and DLR cost rollups
Do not accept carrier invoices or DLR-based cost rollups until drift is explained per batch. Apply a gate: invoices pass only when recalculated parts match recorded segments within the batch, or when every mismatch carries a documented cause and an adjustment. Build a weekly drift register keyed by route, sender ID, and encoding, with counts of matched, mismatched, and unresolved messages.
Repeat the audit across routes and channels
Drift that persists on one route but not another points to route-level segment accounting, not to your renderer. Run the same recalculation and comparison for each route and corridor, then compare drift rates side by side.
Start with IOSOR
Run a partner-comparison and operational checklist for this job. First, export final bodies, encoding, concat headers, recorded segments, and DLR receipts for the last four weeks. Second, recalculate parts with a versioned ruleset and mark every mismatch with a cause class. Third, compute drift rate per route, sender ID, and encoding.
Related: PAYG hold before first debit · Wallet stop-lines before production.
IOSOR takeaway
Freeze a baseline before touching invoices. Run the same recalculation and comparison for each route and corridor, then compare drift rates side by side (/tools/brief · DLR / webhook).
Was this guide helpful?
Related guides
- SMS Route Cost-Band Verification and Failover Readiness Gate
Verify quoted SMS route cost bands against carrier and aggregator tiers, then confirm failover routes preserve delivery SLAs before committing volume.
- SMS Route Cost-Band Verification Before Volume Commitment
Verify quoted SMS cost bands against real carrier and aggregator route economics, audit DLR and failover behavior, then compare partner routes before committing campaign volume.
- Audit SMS Webhook Signatures Before Provider Failover
Verify SMS webhook signing, replay protection, and acknowledgement behavior before switching providers, then compare partner routes and webhook guarantees in Decision Brief.












