The vCon Foundation

Standards

Migrating from call recordings and CDRs to vCons

A five-phase path from CDR rows and recording files to vCons, with a mapping sketch and notes on 0.4.0 to 0.5.0 differences.

Last updated 18 November 2026

What you start with

Most organizations already hold three things about their calls: a billing or operations record (a call detail record, CDR), a recording file in a storage bucket, and perhaps a transcript from a vendor tool. These are scattered by system and keyed differently. A vCon puts the same facts in one self-describing record, with the people, the recording by reference, the analysis and the redaction trail linked together 1.

Phase 1: inventory and identity

  • List every source and its identifier: call id, recording file name, agent id, ticket id.
  • Decide the uuid policy. The draft wants a globally unique uuid, preferably version 8 built with a hash of the host name, so choose the signing host name now 1.
  • Decide which security domain produces the vCon and which key signs it, since signing happens before leaving the domain 1.
  • Record the legal basis and retention rules for each source in your own systems; the core draft does not define consent or retention handling.

Phase 2: map a CDR to a vCon

A CDR usually has a caller, a callee, a start time, a duration and an outcome. In the draft's terms, the caller and callee become Party Objects with tel; the call becomes a Session Object with start and duration; an answered call with a recording becomes a recording Dialog Object, and a call that never connected becomes an incomplete Dialog Object whose disposition explains why 1. The draft's defined dispositions are no-answer, congestion, failed, busy, hung-up and voicemail-no-message; if the reason is unknown, failed SHOULD be used 1. A voicemail with a message is a recording, not an incomplete dialog 1. Joins and drops can be reconstructed as events with the same times 1.

Sketch converting a simplified CDR to a vCon shaped like draft-ietf-vcon-vcon-core-05. The CDR fields and disposition table are invented; this is not production code.
import uuid as _uuid
from datetime import datetime, timedelta, timezone

# Mapping from a generic CDR "disposition" to -05 dialog dispositions.
DISPOSITION = {"NO ANSWER": "no-answer", "BUSY": "busy", "CONGESTION": "congestion", "FAILED": "failed"}

def iso(t: datetime) -> str:
    return t.astimezone(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")

def cdr_to_vcon(cdr: dict, recording_url=None, recording_hash=None) -> dict:
    """cdr: caller, callee, start (aware datetime), seconds, disposition."""
    start = cdr["start"]
    v = {
        "uuid": str(_uuid.uuid4()),          # illustration only; -05 says SHOULD be a version 8 UUID
        "created_at": iso(datetime.now(timezone.utc)),
        "parties": [{"tel": cdr["caller"]}, {"tel": cdr["callee"]}],
        "sessions": [{"start": iso(start), "duration": cdr["seconds"], "parties": [0, 1], "dialog": [0]}],
    }
    if cdr["disposition"] == "ANSWERED" and recording_url:
        v["dialog"] = [{"type": "recording", "start": iso(start), "duration": cdr["seconds"],
                        "parties": [0, 1], "mediatype": "audio/x-wav",
                        "url": recording_url, "content_hash": recording_hash}]
    elif cdr["disposition"] == "ANSWERED":
        v["dialog"] = [{"type": "recording", "start": iso(start), "duration": cdr["seconds"], "parties": [0, 1]}]
        # placeholder: call happened, content unavailable (body and url are SHOULD in -05 Table 5, so flag this gap)
    else:
        v["dialog"] = [{"type": "incomplete", "start": iso(start), "parties": [0],
                        "disposition": DISPOSITION.get(cdr["disposition"], "failed")}]
    v["events"] = [
        {"type": "join", "time": iso(start), "sessions": 0, "party": 0},
        {"type": "drop", "time": iso(start + timedelta(seconds=cdr["seconds"])), "sessions": 0, "party": 0},
    ]
    return v

Phase 3: attach recordings by reference

Recordings are large, so leave them where they are and reference them by HTTPS url plus content_hash. The hash must be computed over the file bytes using the sha512-prefixed form, and a vCon with a url but no hash breaks the draft's rule 1. Since the recording is a different object from the vCon, keep its storage access-controlled, because the draft treats secure storage of external files as out of scope 1. Use the recording topology that matches the file: a single mixed channel, one channel per party, or segmented files, tied together by a session 1.

Phase 4: add analysis, then redact and sign

  • Import existing transcripts as analysis objects of type transcript, recording vendor, product and schema so later readers know the format 1.
  • Add summaries as separate analysis objects pointing at their input 1.
  • If you must share beyond the producing team, create a redacted instance that points back with redacted_from, keep the original encrypted, and sign what you share 1.
  • Sign every vCon before it leaves the domain 1.

Phase 5: run old and new in parallel

Keep the legacy store authoritative at first, generate vCons nightly, and compare counts and durations between the two. Treat differences as migration defects, not data to be silently dropped. Backfill historical calls in batches, oldest or highest-value first, and stamp created_at with the real creation time of the vCon, not the call time, since the draft defines created_at as the creation time of the vCon itself 1.

Draft versions

If you already hold vCons from earlier drafts, the draft's appendix lists non-upward-compatible changes from 0.4.0 to 0.5.0, such as the new sessions array, events replacing party history, and the move of the originator into sessions 1. The vcon-lib library states that it reads both 0.4.0 and 0.5.0 and migrates 0.4.0 documents on load 2.

Matching CDRs to recordings when identifiers are missing, consent and notice for historical recordings, and retention depend on your organization. The format does not answer them.

Sources

  1. draft-ietf-vcon-vcon-core-05, The JSON format for vCon - Conversation Data Container (31 October 2026) (opens another site) IETF Datatracker · primary · retrieved 2026-11-18
  2. vcon-dev/vcon-lib README (Python library targeting draft-ietf-vcon-vcon-core-05) (opens another site) GitHub, vcon-dev · primary · retrieved 2026-11-18