{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cisco-voice-portal/json-schema/cisco-voice-portal-call-leg-schema.json",
  "title": "CallLeg",
  "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/CallLeg",
  "type": "object",
  "properties": {
    "legId": {
      "type": "string"
    },
    "callGuid": {
      "type": "string"
    },
    "legType": {
      "type": "string",
      "enum": [
        "inbound",
        "outbound",
        "transfer",
        "conference"
      ],
      "description": "Type of call leg"
    },
    "startTime": {
      "type": "string",
      "format": "date-time"
    },
    "endTime": {
      "type": "string",
      "format": "date-time"
    },
    "duration": {
      "type": "integer",
      "description": "Leg duration in seconds"
    },
    "fromUri": {
      "type": "string",
      "description": "SIP From URI"
    },
    "toUri": {
      "type": "string",
      "description": "SIP To URI"
    },
    "serverHostname": {
      "type": "string",
      "description": "Server that handled this leg"
    },
    "sipResponseCode": {
      "type": "integer",
      "description": "Final SIP response code for this leg"
    }
  }
}