Class CallConnectionAsync

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

public final class CallConnectionAsync extends Object
CallConnectionAsync for mid-call actions
  • Method Details

    • getCallProperties

      public Mono<CallConnectionProperties> getCallProperties()
      Get call connection properties.
      Returns:
      Response payload for a successful get call connection 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.
    • getCallPropertiesWithResponse

      public Mono<com.azure.core.http.rest.Response<CallConnectionProperties>> getCallPropertiesWithResponse()
      Get call connection properties.
      Returns:
      Response payload for a successful get call connection 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.
    • hangUp

      public Mono<Void> hangUp(boolean isForEveryone)
      Hangup a call.
      Parameters:
      isForEveryone - determine if the call is handed up for all participants.
      Returns:
      Void.
      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.
    • hangUpWithResponse

      public Mono<com.azure.core.http.rest.Response<Void>> hangUpWithResponse(boolean isForEveryone)
      Hangup a call.
      Parameters:
      isForEveryone - determine if the call is handed up for all participants.
      Returns:
      Response with Void.
      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.
    • getParticipant

      public Mono<CallParticipant> getParticipant(CommunicationIdentifier targetParticipant)
      Get a specific participant.
      Parameters:
      targetParticipant - The participant to retrieve.
      Returns:
      Result of getting a desired participant in the call.
      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.
    • getParticipantWithResponse

      public Mono<com.azure.core.http.rest.Response<CallParticipant>> getParticipantWithResponse(CommunicationIdentifier targetParticipant)
      Get a specific participant.
      Parameters:
      targetParticipant - The participant to retrieve.
      Returns:
      Response with the result of getting a desired participant in the call.
      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.
    • listParticipants

      public com.azure.core.http.rest.PagedFlux<CallParticipant> listParticipants()
      Get all participants.
      Returns:
      Response with result of getting all participants in the call.
      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.
    • transferCallToParticipant

      public Mono<TransferCallResult> transferCallToParticipant(CommunicationIdentifier targetParticipant)
      Transfer the call to a participant.
      Parameters:
      targetParticipant - A CommunicationIdentifier representing the targetParticipant participant of this transfer.
      Returns:
      Result of transferring the call to a designated participant.
      Throws:
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      IllegalArgumentException - if the targetParticipant is not ACS, phone nor teams user
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • transferCallToParticipantWithResponse

      public Mono<com.azure.core.http.rest.Response<TransferCallResult>> transferCallToParticipantWithResponse(TransferCallToParticipantOptions transferCallToParticipantOptions)
      Transfer the call to a participant.
      Parameters:
      transferCallToParticipantOptions - Options bag for transferToParticipantCall
      Returns:
      Response with result of transferring the call to a designated participant.
      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.
    • addParticipant

      public Mono<AddParticipantResult> addParticipant(CallInvite participant)
      Add a participant to the call.
      Parameters:
      participant - participant to invite.
      Returns:
      Result of adding a participant to the call.
      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.
    • addParticipantWithResponse

      public Mono<com.azure.core.http.rest.Response<AddParticipantResult>> addParticipantWithResponse(AddParticipantOptions addParticipantOptions)
      Add a participant to the call.
      Parameters:
      addParticipantOptions - Options bag for addParticipant
      Returns:
      Response with result of adding a participant to the call.
      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.
    • removeParticipant

      public Mono<RemoveParticipantResult> removeParticipant(CommunicationIdentifier participantToRemove)
      Remove a participant from the call.
      Parameters:
      participantToRemove - participant to remove.
      Returns:
      Result of removing a participant from the call.
      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.
    • removeParticipantWithResponse

      public Mono<com.azure.core.http.rest.Response<RemoveParticipantResult>> removeParticipantWithResponse(RemoveParticipantOptions removeParticipantOptions)
      Remove a participant from the call.
      Parameters:
      removeParticipantOptions - Options bag for removeParticipant
      Returns:
      Response with result of removing a participant from the call.
      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.
    • muteParticipant

      public Mono<MuteParticipantResult> muteParticipant(CommunicationIdentifier targetParticipant)
      Mutes a participant in the call.
      Parameters:
      targetParticipant - - Participant to be muted. Only ACS Users are currently supported.
      Returns:
      A MuteParticipantResult object.
    • muteParticipantWithResponse

      public Mono<com.azure.core.http.rest.Response<MuteParticipantResult>> muteParticipantWithResponse(MuteParticipantOptions options)
      Mutes a participant in the call.
      Parameters:
      options - - Options for the request.
      Returns:
      Response containing the MuteParticipantResult object.
    • cancelAddParticipantOperation

      public Mono<CancelAddParticipantOperationResult> cancelAddParticipantOperation(String invitationId)
      Cancel add participant operation request.
      Parameters:
      invitationId - invitation ID used to add participant.
      Returns:
      Result of cancelling add participant 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.
    • cancelAddParticipantOperationWithResponse

      public Mono<com.azure.core.http.rest.Response<CancelAddParticipantOperationResult>> cancelAddParticipantOperationWithResponse(CancelAddParticipantOperationOptions cancelAddParticipantOperationOptions)
      Cancel add participant operation request.
      Parameters:
      cancelAddParticipantOperationOptions - Options bag for cancelAddParticipantOperationOptions.
      Returns:
      Response with result of cancelling add participant 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.
    • getCallMediaAsync

      public CallMediaAsync getCallMediaAsync()
      Returns an object of CallContentAsync
      Returns:
      a CallContentAsync.