{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/teliax/json-schema/teliax-github-com-ringer-warp-api-gateway-internal-models-call-statistics-schema.json",
  "title": "github_com_ringer-warp_api-gateway_internal_models.CallStatistics",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/teliax-customer-analytics-api-openapi.yml#/components/schemas/github_com_ringer-warp_api-gateway_internal_models.CallStatistics",
  "type": "object",
  "properties": {
    "acd": {
      "type": "number"
    },
    "answered_calls": {
      "type": "integer"
    },
    "asr": {
      "type": "number"
    },
    "avg_margin_pct": {
      "type": "number"
    },
    "call_type_breakdown": {
      "type": "object",
      "additionalProperties": {
        "type": "integer"
      }
    },
    "connected_minutes": {
      "type": "number"
    },
    "disposition_breakdown": {
      "type": "object",
      "additionalProperties": {
        "type": "integer"
      }
    },
    "inbound_calls": {
      "type": "integer"
    },
    "outbound_calls": {
      "type": "integer"
    },
    "period_end": {
      "type": "string"
    },
    "period_start": {
      "type": "string"
    },
    "quality": {
      "description": "Quality is populated ONLY when CDR_MIRROR_READS is enabled — the mirror\ngrain (migration 152) carries sum/cnt quality columns the legacy\nper-row raw_cdr scan never aggregated. nil on the legacy path; the\nfrontend falls back to its existing no-quality-data rendering. Never\nredacted (customer-visible; internal/cdrredact zeroes fields\nindividually and does not touch this one).",
      "allOf": [
        {
          "$ref": "#/$defs/github_com_ringer-warp_api-gateway_internal_models.QualityStats"
        }
      ]
    },
    "total_calls": {
      "type": "integer"
    },
    "total_charge": {
      "type": "number"
    },
    "total_cost": {
      "description": "Wholesale economics — customer wire: always redacted by internal/cdrredact.\nomitempty so the zeroed values are absent rather than misleading zeros.",
      "type": "number"
    },
    "total_margin": {
      "type": "number"
    },
    "total_minutes": {
      "description": "Minimum/increment-rounded billed minutes.",
      "type": "number"
    }
  },
  "$defs": {
    "github_com_ringer-warp_api-gateway_internal_models.QualityStats": {
      "type": "object",
      "properties": {
        "avg_jitter_ms": {
          "type": "number"
        },
        "avg_mos": {
          "type": "number"
        },
        "avg_packet_loss_pct": {
          "type": "number"
        },
        "avg_pdd_ms": {
          "type": "number"
        },
        "samples": {
          "type": "integer"
        }
      }
    }
  }
}