{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-communication-services/json-schema/microsoft-azure-communication-services-call-connection-properties-schema.json",
  "title": "CallConnectionProperties",
  "description": "Properties of a call connection",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-communication-services-callautomation-api-openapi.yml#/components/schemas/CallConnectionProperties",
  "type": "object",
  "properties": {
    "callConnectionId": {
      "description": "The call connection id.",
      "type": "string"
    },
    "serverCallId": {
      "description": "The server call id.",
      "type": "string"
    },
    "targets": {
      "description": "The targets of the call.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/CommunicationIdentifierModel"
      }
    },
    "callConnectionState": {
      "$ref": "#/$defs/CallConnectionStateModel"
    },
    "callbackUri": {
      "description": "The callback URI.",
      "type": "string"
    },
    "sourceCallerIdNumber": {
      "$ref": "#/$defs/PhoneNumberIdentifierModel"
    },
    "sourceDisplayName": {
      "description": "Display name of the call if dialing out to a pstn number.",
      "type": "string"
    },
    "source": {
      "$ref": "#/$defs/CommunicationIdentifierModel"
    },
    "correlationId": {
      "description": "The correlation ID.",
      "type": "string"
    },
    "answeredBy": {
      "$ref": "#/$defs/CommunicationUserIdentifierModel"
    },
    "mediaStreamingSubscription": {
      "$ref": "#/$defs/MediaStreamingSubscription"
    },
    "transcriptionSubscription": {
      "$ref": "#/$defs/TranscriptionSubscription"
    },
    "answeredFor": {
      "$ref": "#/$defs/PhoneNumberIdentifierModel"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "CallConnectionStateModel": {
      "description": "The states of a call connection.",
      "enum": [
        "unknown",
        "connecting",
        "connected",
        "transferring",
        "transferAccepted",
        "disconnecting",
        "disconnected"
      ],
      "type": "string",
      "x-ms-enum": {
        "name": "CallConnectionStateModel",
        "modelAsString": true
      }
    },
    "CommunicationIdentifierModel": {
      "$ref": "../../../Common/stable/2025-06-30/common.json#/components/schemas/CommunicationIdentifierModel"
    },
    "CommunicationUserIdentifierModel": {
      "$ref": "../../../Common/stable/2025-06-30/common.json#/components/schemas/CommunicationUserIdentifierModel"
    },
    "MediaStreamingContentType": {
      "description": "Type of content in Media streaming.",
      "enum": [
        "audio"
      ],
      "type": "string",
      "x-ms-enum": {
        "name": "MediaStreamingContentType",
        "modelAsString": true
      }
    },
    "MediaStreamingSubscription": {
      "description": "Media streaming Subscription Object.",
      "type": "object",
      "properties": {
        "id": {
          "description": "Subscription Id.",
          "type": "string"
        },
        "state": {
          "$ref": "#/$defs/MediaStreamingSubscriptionState"
        },
        "subscribedContentTypes": {
          "description": "Subscribed media streaming content types.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/MediaStreamingContentType"
          }
        }
      },
      "additionalProperties": false
    },
    "MediaStreamingSubscriptionState": {
      "description": "Current state of media streaming session",
      "enum": [
        "disabled",
        "inactive",
        "active"
      ],
      "type": "string",
      "x-ms-enum": {
        "name": "MediaStreamingSubscriptionState",
        "modelAsString": true
      }
    },
    "PhoneNumberIdentifierModel": {
      "$ref": "../../../Common/stable/2025-06-30/common.json#/components/schemas/PhoneNumberIdentifierModel"
    },
    "TranscriptionResultType": {
      "description": "Transcription result types",
      "enum": [
        "final",
        "intermediate"
      ],
      "type": "string",
      "x-ms-enum": {
        "name": "TranscriptionResultType",
        "modelAsString": true
      }
    },
    "TranscriptionSubscription": {
      "description": "Transcription Subscription Object.",
      "type": "object",
      "properties": {
        "id": {
          "description": "Subscription Id.",
          "type": "string"
        },
        "state": {
          "$ref": "#/$defs/TranscriptionSubscriptionState"
        },
        "subscribedResultTypes": {
          "description": "Subscribed transcription result types.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/TranscriptionResultType"
          }
        },
        "locale": {
          "description": "Specifies the locale used for transcription, e.g., en-CA or en-AU.",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "TranscriptionSubscriptionState": {
      "description": "Current state of transcription session",
      "enum": [
        "disabled",
        "inactive",
        "active"
      ],
      "type": "string",
      "x-ms-enum": {
        "name": "TranscriptionSubscriptionState",
        "modelAsString": true
      }
    }
  }
}