Class CallRecording

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

public final class CallRecording extends Object
CallRecording.
  • Method Details

    • start

      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.
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • startWithResponse

      public com.azure.core.http.rest.Response<RecordingStateResult> startWithResponse(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.
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • stop

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

      public com.azure.core.http.rest.Response<Void> stopWithResponse(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:
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • pause

      public void pause(String recordingId)
      Pause recording of the call.
      Parameters:
      recordingId - Recording id to stop.
      Throws:
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • pauseWithResponse

      public com.azure.core.http.rest.Response<Void> pauseWithResponse(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:
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • resume

      public void resume(String recordingId)
      Resume recording of the call.
      Parameters:
      recordingId - The recording id to stop.
      Throws:
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • resumeWithResponse

      public com.azure.core.http.rest.Response<Void> resumeWithResponse(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:
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getState

      public RecordingStateResult getState(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:
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getStateWithResponse

      public com.azure.core.http.rest.Response<RecordingStateResult> getStateWithResponse(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:
      com.azure.core.exception.HttpResponseException - 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 sourceUrl, 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:
      sourceUrl - - ACS URL where the content is located.
      destinationStream - - A stream where to write the downloaded content.
    • downloadTo

      public void downloadTo(String sourceUrl, 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:
      sourceUrl - - 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.
    • downloadContent

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

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

      Parameters:
      sourceUrl - - 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 sourceUrl, 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 downloadTo(String, OutputStream, HttpRange, Context) to download larger blobs.

      Parameters:
      sourceUrl - 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 sourceUrl, Path destinationPath)
      Download the content located in endpoint into a file marked by path. This download will be done using parallel workers.
      Parameters:
      sourceUrl - - ACS URL where the content is located.
      destinationPath - - File location.
    • downloadTo

      public void downloadTo(String sourceUrl, 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:
      sourceUrl - - 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.
    • delete

      public void delete(String deleteUrl)
      Delete the content located in the deleteUrl
      Parameters:
      deleteUrl - - ACS URL where the content is located.
    • deleteWithResponse

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