Class CallMedia

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

public final class CallMedia extends Object
CallContent.
  • Method Details

    • play

      public 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.
      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 void play(PlaySource playSource, List<CommunicationIdentifier> playTo)
      Play
      Parameters:
      playSource - A PlaySource representing the source to play.
      playTo - the targets to play to.
      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 void playToAll(List<PlaySource> playSources)
      Play to all participants
      Parameters:
      playSources - A List of PlaySource representing the sources to play.
      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 void playToAll(PlaySource playSource)
      Play to all participants
      Parameters:
      playSource - A PlaySource representing the source to play.
      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 com.azure.core.http.rest.Response<Void> playWithResponse(PlayOptions options, com.azure.core.util.Context context)
      PlayWithResponse
      Parameters:
      options - play options.
      context - A Context representing the request context.
      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 com.azure.core.http.rest.Response<Void> playToAllWithResponse(PlayToAllOptions options, com.azure.core.util.Context context)
      PlayAllWithResponse
      Parameters:
      options - play options.
      context - A Context representing the request context.
      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 void startRecognizing(CallMediaRecognizeOptions callMediaRecognizeOptions)
      Recognize tones.
      Parameters:
      callMediaRecognizeOptions - Optional elements for recognize.
    • startRecognizingWithResponse

      public com.azure.core.http.rest.Response<Void> startRecognizingWithResponse(CallMediaRecognizeOptions callMediaRecognizeOptions, com.azure.core.util.Context context)
      Recognize tones.
      Parameters:
      callMediaRecognizeOptions - Optional elements for recognize.
      context - A Context representing the request context.
      Returns:
      Response for a successful recognize request.
    • cancelAllMediaOperations

      public void cancelAllMediaOperations()
      Cancels all the queued media operations.
    • cancelAllMediaOperationsWithResponse

      public com.azure.core.http.rest.Response<Void> cancelAllMediaOperationsWithResponse(com.azure.core.util.Context context)
      Cancels all the queued media operations
      Parameters:
      context - A Context representing the request context.
      Returns:
      Response for successful playAll request.
    • sendDtmfTones

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

      public com.azure.core.http.rest.Response<SendDtmfTonesResult> sendDtmfTonesWithResponse(SendDtmfTonesOptions options, com.azure.core.util.Context context)
      Sends Dtmf tones
      Parameters:
      options - SendDtmfTones configuration options
      context - Context
      Returns:
      Response for successful sendDtmfTones request.
    • startContinuousDtmfRecognition

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

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

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

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

      public void hold(CommunicationIdentifier targetParticipant)
      Holds participant in call.
      Parameters:
      targetParticipant - the target.
    • hold

      public void hold(CommunicationIdentifier targetParticipant, PlaySource playSource)
      Holds participant in call.
      Parameters:
      targetParticipant - the target.
      playSource - A PlaySource representing the source to play.
    • holdWithResponse

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

      public void unhold(CommunicationIdentifier targetParticipant)
      Removes hold from participant in call.
      Parameters:
      targetParticipant - the target.
    • unholdWithResponse

      public com.azure.core.http.rest.Response<Void> unholdWithResponse(UnholdOptions options, com.azure.core.util.Context context)
      Removes hold from participant in call.
      Parameters:
      options - Different options to pass to the request.
      context - Context.
      Returns:
      Response for successful operation.