IOSOR Learn
SIP REFER Transfer Cost Attribution & Billing Reconciliation
Verify SIP REFER/302 transfer legs map to the originating trunk and partner route, prevent double-billing, and reconcile CDRs with auditable fields for cost attribution.
Lead Telecom & Routing Architect · Lausanne, CH
SIP REFER and 302 redirects must preserve the originating trunk ID and partner route tag across transfer legs so billing systems attribute every connected minute to the correct cost center. Without transparent signaling, carriers may bill the transfer leg as a new origination, creating double-charges or orphaned CDRs that break reconciliation.
Signaling Integrity & Header Preservation
Confirm the INVITE after REFER/302 carries the original `P-Asserted-Identity`, `Diversion`, and custom `X-IOSOR-Trunk` headers. Partners that strip or rewrite these fields force the billing engine to treat the leg as a fresh call, inflating per-minute costs and distorting margin calculations.
CDR Field Mapping & Uniqueness
Each CDR must include `original_call_id`, `transfer_type` (REFER/302), `originating_trunk_sid`, and `partner_route_id`. Duplicate `call_id` values across legs indicate missing correlation keys; enforce a composite primary key of `original_call_id` + `leg_sequence` to prevent double-counting.
During pre-flight verification, validate that automatic failover thresholds trigger deterministic rerouting without duplicating outbound segments or exhausting retry backoff budgets under peak regional load.
Partner Route Transfer Compliance
Not all carriers honor REFER with header transparency. Test each route with a controlled transfer scenario: originate via Trunk A, REFER to Trunk B, verify CDR on Trunk A shows full duration and Trunk B shows zero billable seconds. Routes failing this test must be flagged in the LCR engine.
Automated Reconciliation Pipeline
Build a nightly job that joins originating CDRs with transfer CDRs on `original_call_id`. Flag discrepancies >1 second in billed duration, missing `partner_route_id`, or mismatched `trunk_sid`. Alert billing ops via webhook with the offending `call_id` set for manual review before invoice close.
Cost Attribution Audit Trail
Store the full SIP ladder (INVITE, REFER, 202, NOTIFY, final INVITE) in object storage keyed by `original_call_id`. Retain 90 days for dispute resolution. Include SDP diffs to prove media path remained on the original partner route, avoiding hairpin charges.
Start with IOSOR
Compare verified partner routes for transparent REFER/302 handling and auditable CDR fields using the partner route comparison. Cross-reference findings with SIP REFER transfer billing audit, route ASR & NER cost per connected minute, and LCR margin verification gate.
IOSOR takeaway
Compare verified partner routes for transparent REFER/302 handling and auditable CDR fields using the partner route comparison. Cross-reference findings with SIP INVITE logs, CDR billing records, and DLR webhook payloads to confirm cost attribution accuracy before reconciling invoices.
Was this guide helpful?
Related guides
- Voice Silence Suppression: Trunk Billing and Route Comparison Gate
Verify whether SIP silence suppression skews billed minutes, ASR, and connect-time before locking a voice trunk route. Compare partner routes via /tools/brief.
- Voice Trunk Registration Failover and Drain Audit for Route Selection
Audit SIP trunk registration failover and graceful drain against contracted route priority before committing PAYG voice capacity. Verify readiness via partner comparison.
- Voice Answer Seizure Ratio and Trunk Sizing: Operational Comparison
Verify ASR and trunk concurrency against real carrier behavior before committing PAYG voice capacity or failover routes. Compare measured seizure ratio and cost-band evidence.












