swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector CallConnection API schemes: - https tags: - name: CallConnection paths: /calling/callConnections: post: tags: - CallConnection summary: Microsoft Azure Create A New Call description: Create a new call. operationId: microsoftAzureCallconnectionsCreatecall parameters: - name: callRequest in: body description: Create call request. required: true schema: $ref: '#/definitions/CreateCallRequest' - $ref: '#/parameters/ApiVersionParameter' responses: '201': description: Returns the create call response. schema: $ref: '#/definitions/CreateCallResult' '400': $ref: '#/responses/400' '401': $ref: '#/responses/401' '403': $ref: '#/responses/403' '500': $ref: '#/responses/500' x-ms-examples: Create a new call.: $ref: ./examples/CallConnections_CreateCall.json /calling/callConnections/{callConnectionId}/:hangup: post: tags: - CallConnection summary: Microsoft Azure Hangup The Call description: Hangup the call. operationId: microsoftAzureCallconnectionsHangupcall parameters: - name: callConnectionId in: path description: The call connection id. required: true type: string - $ref: '#/parameters/ApiVersionParameter' responses: '202': description: Returns the hangup call response. '400': $ref: '#/responses/400' '401': $ref: '#/responses/401' '403': $ref: '#/responses/403' '404': $ref: '#/responses/404' '500': $ref: '#/responses/500' x-ms-examples: Hangup the call.: $ref: ./examples/CallConnections_HangupCall.json /calling/callConnections/{callConnectionId}/:playAudio: post: tags: - CallConnection summary: Microsoft Azure Play Audio In The Call description: Play audio in the call. operationId: microsoftAzureCallconnectionsPlayaudio parameters: - name: callConnectionId in: path description: The call connection id. required: true type: string - name: request in: body description: Play audio request. required: true schema: $ref: '#/definitions/PlayAudioRequest' - $ref: '#/parameters/ApiVersionParameter' responses: '202': description: Returns the play audio response. schema: $ref: '#/definitions/PlayAudioResult' '400': $ref: '#/responses/400' '401': $ref: '#/responses/401' '403': $ref: '#/responses/403' '404': $ref: '#/responses/404' '500': $ref: '#/responses/500' x-ms-examples: Play audio in the call.: $ref: ./examples/CallConnections_PlayAudio.json /calling/callConnections/{callConnectionId}/:cancelAllMediaOperations: post: tags: - CallConnection summary: Microsoft Azure Cancel All Media Operations description: Cancel all media operations. operationId: microsoftAzureCallconnectionsCancelallmediaoperations parameters: - name: callConnectionId in: path description: The call connection id required: true type: string - name: cancelAllMediaOperationRequest in: body description: The cancel all media operations context. required: true schema: $ref: '#/definitions/CancelAllMediaOperationsRequest' - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: Returns the cancel all media operations response. schema: $ref: '#/definitions/CancelAllMediaOperationsResult' '400': $ref: '#/responses/400' '401': $ref: '#/responses/401' '403': $ref: '#/responses/403' '404': $ref: '#/responses/404' '500': $ref: '#/responses/500' x-ms-examples: Cancel all media operations.: $ref: ./examples/CallConnections_CancelAllMediaOperations.json /calling/callConnections/{callConnectionId}/participants: post: tags: - CallConnection summary: Microsoft Azure Add A Participant To The Call description: Add a participant to the call. operationId: microsoftAzureCallconnectionsAddparticipant parameters: - name: callConnectionId in: path description: The call connection id. required: true type: string - name: addParticipantRequest in: body description: Add participant request. required: true schema: $ref: '#/definitions/AddParticipantRequest' - $ref: '#/parameters/ApiVersionParameter' responses: '202': description: Returns the add participant response. schema: $ref: '#/definitions/AddParticipantResult' '400': $ref: '#/responses/400' '401': $ref: '#/responses/401' '403': $ref: '#/responses/403' '404': $ref: '#/responses/404' '500': $ref: '#/responses/500' x-ms-examples: Add a participant to the call.: $ref: ./examples/CallConnections_AddParticipant.json /calling/callConnections/{callConnectionId}/participants/{participantId}: delete: tags: - CallConnection summary: Microsoft Azure Remove A Participant From The Call description: Remove a participant from the call. operationId: microsoftAzureCallconnectionsRemoveparticipant parameters: - name: callConnectionId in: path description: The call connection id. required: true type: string - name: participantId in: path description: The participant id. required: true type: string - $ref: '#/parameters/ApiVersionParameter' responses: '202': description: Returns the remove participant response. '400': $ref: '#/responses/400' '401': $ref: '#/responses/401' '403': $ref: '#/responses/403' '404': $ref: '#/responses/404' '500': $ref: '#/responses/500' x-ms-examples: Remove a participant from the call.: $ref: ./examples/CallConnections_RemoveParticipant.json definitions: CommunicationErrorResponse: $ref: ../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse CancelAllMediaOperationsResult: description: The response payload of the cancel all media operations. required: - status type: object properties: operationId: description: The operation id. type: string status: $ref: '#/definitions/OperationStatus' operationContext: description: The operation context provided by client. type: string resultInfo: $ref: '#/definitions/ResultInfo' description: The result info for the operation. CreateCallRequest: description: The request payload for create call. required: - targets - source - callbackUri type: object properties: alternateCallerId: $ref: '#/definitions/PhoneNumberIdentifier' description: The alternate identity of the source of the call if dialing out to a pstn number targets: description: The targets of the call. type: array items: $ref: '#/definitions/CommunicationIdentifier' source: $ref: '#/definitions/CommunicationIdentifier' description: The source of the call. subject: description: The subject. type: string callbackUri: description: The callback URI. type: string requestedMediaTypes: description: The requested modalities. type: array items: $ref: '#/definitions/MediaType' requestedCallEvents: description: The requested call events to subscribe to. type: array items: $ref: '#/definitions/EventSubscriptionType' PlayAudioResult: description: The response payload for play audio operation. required: - status type: object properties: operationId: description: The operation id. type: string status: $ref: '#/definitions/OperationStatus' operationContext: description: The operation context provided by client. type: string resultInfo: $ref: '#/definitions/ResultInfo' description: The result info for the operation. AddParticipantResult: description: The add participant result type: object properties: participantId: description: The id of the added participant. type: string OperationStatus: description: The status of the operation enum: - notStarted - running - completed - failed type: string x-ms-enum: name: OperationStatus modelAsString: true AddParticipantRequest: description: The add participant request. type: object properties: alternateCallerId: $ref: '#/definitions/PhoneNumberIdentifier' description: The alternate identity of source participant. participant: $ref: '#/definitions/CommunicationIdentifier' description: The participant to be added to the call. operationContext: description: The operation context. type: string callbackUri: description: The callback URI. type: string CancelAllMediaOperationsRequest: description: The request payload for cancel all media operations type: object properties: operationContext: description: The context for this operation. type: string CommunicationIdentifier: $ref: ../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationIdentifierModel MediaType: enum: - audio - video type: string x-ms-enum: name: MediaType modelAsString: true CreateCallResult: description: The response payload of the create call operation. type: object properties: callConnectionId: description: The call connection id. type: string PlayAudioRequest: description: The request payload for playing audio. type: object properties: audioFileUri: description: "The media resource uri of the play audio request. \r\nCurrently only Wave file (.wav) format audio prompts are supported.\r\nMore specifically, the audio content in the wave file must be mono (single-channel),\r\n16-bit samples with a 16,000 (16KHz) sampling rate." type: string loop: description: The flag indicating whether audio file needs to be played in loop or not. type: boolean operationContext: description: The value to identify context of the operation. type: string audioFileId: description: An id for the media in the AudioFileUri, using which we cache the media resource. type: string callbackUri: description: The callback Uri to receive PlayAudio status notifications. type: string ResultInfo: description: Result info class to be used to report result status for actions/operations. required: - code - subcode type: object properties: code: format: int32 description: The result code associated with the operation. type: integer subcode: format: int32 description: The subcode that further classifies the result. type: integer message: description: The message is a detail explanation of subcode. type: string PhoneNumberIdentifier: $ref: ../../../Common/stable/2021-03-07/common.json#/definitions/PhoneNumberIdentifierModel EventSubscriptionType: enum: - participantsUpdated - dtmfReceived type: string x-ms-enum: name: EventSubscriptionType modelAsString: true parameters: ApiVersionParameter: name: api-version in: query description: Version of API to invoke. required: true type: string x-ms-parameter-location: method responses: '500': description: InternalServerError schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '404': description: NotFound schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '401': description: Unauthorized schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '400': description: BadRequest schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '403': description: Forbidden schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'