{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cisco-voice-portal/json-schema/cisco-voice-portal-cdr-query-result-schema.json",
  "title": "CdrQueryResult",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cisco-voice-portal-call-detail-records-api-openapi.yml#/components/schemas/CdrQueryResult",
  "type": "object",
  "properties": {
    "totalRecords": {
      "type": "integer",
      "description": "Total number of matching records"
    },
    "offset": {
      "type": "integer"
    },
    "limit": {
      "type": "integer"
    },
    "records": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CallDetailRecord"
      }
    }
  },
  "$defs": {
    "CallDetailRecord": {
      "type": "object",
      "properties": {
        "callGuid": {
          "type": "string",
          "description": "Globally unique call identifier"
        },
        "callStartTime": {
          "type": "string",
          "format": "date-time",
          "description": "Call start timestamp"
        },
        "callEndTime": {
          "type": "string",
          "format": "date-time",
          "description": "Call end timestamp"
        },
        "callingNumber": {
          "type": "string",
          "description": "Caller ANI (Automatic Number Identification)"
        },
        "calledNumber": {
          "type": "string",
          "description": "Called DNIS (Dialed Number Identification Service)"
        },
        "callResult": {
          "type": "string",
          "enum": [
            "completed",
            "abandoned",
            "transferred",
            "error"
          ],
          "description": "Final call outcome"
        },
        "callDuration": {
          "type": "integer",
          "description": "Total call duration in seconds"
        },
        "selfServiceDuration": {
          "type": "integer",
          "description": "Duration of self-service (IVR) portion in seconds"
        },
        "queueDuration": {
          "type": "integer",
          "description": "Duration in queue in seconds"
        },
        "applicationName": {
          "type": "string",
          "description": "VXML application that handled the call"
        },
        "callServerHostname": {
          "type": "string",
          "description": "Call Server that processed the call"
        },
        "vxmlServerHostname": {
          "type": "string",
          "description": "VXML Server that executed the application"
        },
        "sipCallId": {
          "type": "string",
          "description": "SIP Call-ID header value"
        },
        "icmCallKey": {
          "type": "string",
          "description": "ICM/UCCE call key for correlation"
        },
        "eccVariables": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Expanded Call Context (ECC) variables"
        },
        "transferDestination": {
          "type": "string",
          "description": "Transfer destination number if the call was transferred"
        },
        "errorCode": {
          "type": "string",
          "description": "Error code if the call ended in error"
        }
      }
    }
  }
}