Class CallMediaAsync

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

public final class CallMediaAsync extends Object
CallContent.
  • Method Details

    • play

      public Mono<Void> play(List<PlaySource> playSources, List<CommunicationIdentifier> playTo)
      Play
      Parameters:
      playSources - A List of PlaySource representing the sources to play.
      playTo - the targets to play to
      Returns:
      Void for successful play 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.
    • play

      public Mono<Void> play(PlaySource playSource, List<CommunicationIdentifier> playTo)
      Play
      Parameters:
      playSource - A PlaySource representing the source to play.
      playTo - the targets to play to
      Returns:
      Void for successful play 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.
    • playToAll

      public Mono<Void> playToAll(List<PlaySource> playSources)
      Play to all participants
      Parameters:
      playSources - A List of PlaySource representing the sources to play.
      Returns:
      Void for successful playAll 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.
    • playToAll

      public Mono<Void> playToAll(PlaySource playSource)
      Play to all participants
      Parameters:
      playSource - A PlaySource representing the source to play.
      Returns:
      Void for successful playAll 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.
    • playWithResponse

      public Mono<com.azure.core.http.rest.Response<Void>> playWithResponse(PlayOptions options)
      Play
      Parameters:
      options - play options.
      Returns:
      Response for successful play 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.
    • playToAllWithResponse

      public Mono<com.azure.core.http.rest.Response<Void>> playToAllWithResponse(PlayToAllOptions options)
      Play to all participants
      Parameters:
      options - play to all options.
      Returns:
      Response for successful playAll 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.
    • startRecognizing

      public Mono<Void> startRecognizing(CallMediaRecognizeOptions recognizeOptions)
      Recognize operation.
      Parameters:
      recognizeOptions - Different attributes for recognize.
      Returns:
      Response for successful recognize request.
    • startRecognizingWithResponse

      public Mono<com.azure.core.http.rest.Response<Void>> startRecognizingWithResponse(CallMediaRecognizeOptions recognizeOptions)
      Recognize operation
      Parameters:
      recognizeOptions - Different attributes for recognize.
      Returns:
      Response for successful recognize request.
    • cancelAllMediaOperations

      public Mono<Void> cancelAllMediaOperations()
      Cancels all the queued media operations.
      Returns:
      Void
    • cancelAllMediaOperationsWithResponse

      public Mono<com.azure.core.http.rest.Response<Void>> cancelAllMediaOperationsWithResponse()
      Cancels all the queued media operations
      Returns:
      Response for successful playAll request.
    • sendDtmfTones

      public Mono<SendDtmfTonesResult> sendDtmfTones(List<DtmfTone> tones, CommunicationIdentifier targetParticipant)
      Send DTMF tones
      Parameters:
      tones - tones to be sent
      targetParticipant - the target participant
      Returns:
      Response for successful sendDtmfTones request.
    • sendDtmfTonesWithResponse

      public Mono<com.azure.core.http.rest.Response<SendDtmfTonesResult>> sendDtmfTonesWithResponse(SendDtmfTonesOptions options)
      Send DTMF tones
      Parameters:
      options - SendDtmfTones configuration options
      Returns:
      Response for successful sendDtmfTones request.
    • startContinuousDtmfRecognition

      public Mono<Void> startContinuousDtmfRecognition(CommunicationIdentifier targetParticipant)
      Starts continuous Dtmf recognition.
      Parameters:
      targetParticipant - the target participant
      Returns:
      void
    • startContinuousDtmfRecognitionWithResponse

      public Mono<com.azure.core.http.rest.Response<Void>> startContinuousDtmfRecognitionWithResponse(ContinuousDtmfRecognitionOptions options)
      Starts continuous Dtmf recognition.
      Parameters:
      options - ContinuousDtmfRecognition configuration options
      Returns:
      Response for successful start continuous dtmf recognition request.
    • stopContinuousDtmfRecognition

      public Mono<Void> stopContinuousDtmfRecognition(CommunicationIdentifier targetParticipant)
      Stops continuous Dtmf recognition.
      Parameters:
      targetParticipant - the target participant
      Returns:
      void
    • stopContinuousDtmfRecognitionWithResponse

      public Mono<com.azure.core.http.rest.Response<Void>> stopContinuousDtmfRecognitionWithResponse(ContinuousDtmfRecognitionOptions options)
      Stops continuous Dtmf recognition.
      Parameters:
      options - ContinuousDtmfRecognition configuration options
      Returns:
      Response for successful stop continuous dtmf recognition request.
    • hold

      public Mono<Void> hold(CommunicationIdentifier targetParticipant)
      Holds participant in call.
      Parameters:
      targetParticipant - the target.
      Returns:
      Response for successful operation.
    • hold

      public Mono<Void> hold(CommunicationIdentifier targetParticipant, PlaySource playSource)
      Holds participant in call.
      Parameters:
      targetParticipant - the target.
      playSource - the play source.
      Returns:
      Response for successful operation.
    • holdWithResponse

      public Mono<com.azure.core.http.rest.Response<Void>> holdWithResponse(HoldOptions options)
      Holds participant in call.
      Parameters:
      options - - Different options to pass to the request.
      Returns:
      Response for successful operation.
    • unhold

      public Mono<Void> unhold(CommunicationIdentifier targetParticipant)
      Removes hold from participant in call.
      Parameters:
      targetParticipant - the target.
      Returns:
      Response for successful operation.
    • unholdWithResponse

      public Mono<com.azure.core.http.rest.Response<Void>> unholdWithResponse(UnholdOptions options)
      Holds participant in call.
      Parameters:
      options - Different options to pass to the request.
      Returns:
      Response for successful operation.