Class CallRecording

java.lang.Object
com.azure.communication.callautomation.CallRecording

public class CallRecording extends Object
CallRecording.
  • Method Details

    • startRecording

      public RecordingStateResult startRecording(StartRecordingOptions options)
      Start recording of the call.
      Parameters:
      options - A StartRecordingOptions object containing different options for recording.
      Returns:
      Result for a successful start recording request.
      Throws:
      InvalidParameterException - is recordingStateCallbackUri is absolute uri.
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • startRecordingWithResponse

      public com.azure.core.http.rest.Response<RecordingStateResult> startRecordingWithResponse(StartRecordingOptions options, com.azure.core.util.Context context)
      Start recording of the call.
      Parameters:
      options - A StartRecordingOptions object containing different options for recording.
      context - A Context representing the request context.
      Returns:
      Result for a successful start recording request.
      Throws:
      InvalidParameterException - is recordingStateCallbackUri is absolute uri.
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • stopRecording

      public void stopRecording(String recordingId)
      Stop recording of the call.
      Parameters:
      recordingId - Recording id to stop.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • stopRecordingWithResponse

      public com.azure.core.http.rest.Response<Void> stopRecordingWithResponse(String recordingId, com.azure.core.util.Context context)
      Stop recording of the call.
      Parameters:
      recordingId - Recording id to stop.
      context - A Context representing the request context.
      Returns:
      Response for a successful stop recording request.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • pauseRecording

      public void pauseRecording(String recordingId)
      Pause recording of the call.
      Parameters:
      recordingId - Recording id to stop.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • pauseRecordingWithResponse

      public com.azure.core.http.rest.Response<Void> pauseRecordingWithResponse(String recordingId, com.azure.core.util.Context context)
      Pause recording of the call.
      Parameters:
      recordingId - Recording id to stop.
      context - A Context representing the request context.
      Returns:
      Response for a successful pause recording request.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • resumeRecording

      public void resumeRecording(String recordingId)
      Resume recording of the call.
      Parameters:
      recordingId - The recording id to stop.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • resumeRecordingWithResponse

      public com.azure.core.http.rest.Response<Void> resumeRecordingWithResponse(String recordingId, com.azure.core.util.Context context)
      Resume recording of the call.
      Parameters:
      recordingId - The recording id to stop.
      context - A Context representing the request context.
      Returns:
      Response for a successful resume recording request.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getRecordingState

      public RecordingStateResult getRecordingState(String recordingId)
      Get the current recording state by recording id.
      Parameters:
      recordingId - The recording id to stop.
      Returns:
      Response for a successful get recording state request.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getRecordingStateWithResponse

      public com.azure.core.http.rest.Response<RecordingStateResult> getRecordingStateWithResponse(String recordingId, com.azure.core.util.Context context)
      Get the current recording state by recording id.
      Parameters:
      recordingId - The recording id to stop.
      context - A Context representing the request context.
      Returns:
      Response for a successful get recording state request.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • downloadTo

      public void downloadTo(String sourceEndpoint, OutputStream destinationStream)
      Download the recording content, e.g. Recording's metadata, Recording video, etc., from endpoint and write it in the OutputStream passed as parameter.
      Parameters:
      sourceEndpoint - - ACS URL where the content is located.
      destinationStream - - A stream where to write the downloaded content.
    • downloadToWithResponse

      public com.azure.core.http.rest.Response<Void> downloadToWithResponse(String sourceEndpoint, OutputStream destinationStream, com.azure.core.http.HttpRange httpRange, com.azure.core.util.Context context)
      Download the recording content, e.g. Recording's metadata, Recording video, etc., from endpoint and write it in the OutputStream passed as parameter.
      Parameters:
      sourceEndpoint - - ACS URL where the content is located.
      destinationStream - - A stream where to write the downloaded content.
      httpRange - - An optional HttpRange value containing the range of bytes to download. If missing, the whole content will be downloaded.
      context - A Context representing the request context.
      Returns:
      Response containing the http response information from the download.
    • downloadContent

      public com.azure.core.util.BinaryData downloadContent(String sourceEndpoint)
      Downloads the entire content.

      This method supports downloads up to 2GB of data. Use downloadTo(String, OutputStream) to download larger blobs.

      Parameters:
      sourceEndpoint - - ACS URL where the content is located.
      Returns:
      The content of the blob.
    • downloadContentWithResponse

      public com.azure.core.http.rest.Response<com.azure.core.util.BinaryData> downloadContentWithResponse(String sourceEndpoint, com.azure.core.http.HttpRange range, com.azure.core.util.Context context)
      Downloads the entire content.

      This method supports downloads up to 2GB of data. Use downloadToWithResponse(String, OutputStream, HttpRange, Context) to download larger blobs.

      Parameters:
      sourceEndpoint - ACS URL where the content is located.
      range - An optional HttpRange value containing the range of bytes to download. If missing, the whole content will be downloaded.
      context - A Context representing the request context.
      Returns:
      The content of the blob.
    • downloadTo

      public void downloadTo(String sourceEndpoint, Path destinationPath)
      Download the content located in endpoint into a file marked by path. This download will be done using parallel workers.
      Parameters:
      sourceEndpoint - - ACS URL where the content is located.
      destinationPath - - File location.
    • downloadToWithResponse

      public com.azure.core.http.rest.Response<Void> downloadToWithResponse(String sourceEndpoint, Path destinationPath, DownloadToFileOptions options, com.azure.core.util.Context context)
      Download the content located in endpoint into a file marked by path. This download will be done using parallel workers.
      Parameters:
      sourceEndpoint - - ACS URL where the content is located.
      destinationPath - - File location.
      options - - an optional DownloadToFileOptions object to modify how the download will work.
      context - A Context representing the request context.
      Returns:
      Response containing the http response information from the download.
    • deleteRecording

      public void deleteRecording(String deleteEndpoint)
      Delete the content located in the deleteEndpoint
      Parameters:
      deleteEndpoint - - ACS URL where the content is located.
    • deleteRecordingWithResponse

      public com.azure.core.http.rest.Response<Void> deleteRecordingWithResponse(String deleteEndpoint, com.azure.core.util.Context context)
      Delete the content located in the deleteEndpoint
      Parameters:
      deleteEndpoint - - ACS URL where the content is located.
      context - A Context representing the request context.
      Returns:
      Response for successful delete request..