Class CallConnection

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

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

    • getCallProperties

      public 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 com.azure.core.http.rest.Response<CallConnectionProperties> getCallPropertiesWithResponse(com.azure.core.util.Context context)
      Get call connection properties.
      Parameters:
      context - A Context representing the request context.
      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 void hangUp(boolean isForEveryone)
      Hangup a call.
      Parameters:
      isForEveryone - determine if the call is handed up for all participants.
      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 com.azure.core.http.rest.Response<Void> hangUpWithResponse(boolean isForEveryone, com.azure.core.util.Context context)
      Hangup a call.
      Parameters:
      isForEveryone - determine if the call is handed up for all participants.
      context - A Context representing the request context.
      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 CallParticipant getParticipant(CommunicationIdentifier targetParticipant)
      Get a specific participant.
      Parameters:
      targetParticipant - The participant to retrieve.
      Returns:
      The desired call 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.
    • getParticipantWithResponse

      public com.azure.core.http.rest.Response<CallParticipant> getParticipantWithResponse(CommunicationIdentifier targetParticipant, com.azure.core.util.Context context)
      Get all participants.
      Parameters:
      targetParticipant - The participant to retrieve.
      context - A Context representing the request context.
      Returns:
      Response with the desired call 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.
    • listParticipants

      public com.azure.core.http.rest.PagedIterable<CallParticipant> listParticipants()
      Get all participants.
      Returns:
      A list of 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.
    • listParticipants

      public com.azure.core.http.rest.PagedIterable<CallParticipant> listParticipants(com.azure.core.util.Context context)
      Get all participants.
      Parameters:
      context - A Context representing the request context.
      Returns:
      Response with a list of 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 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.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • transferCallToParticipantWithResponse

      public com.azure.core.http.rest.Response<TransferCallResult> transferCallToParticipantWithResponse(TransferCallToParticipantOptions transferCallToParticipantOptions, com.azure.core.util.Context context)
      Transfer the call to a participant.
      Parameters:
      transferCallToParticipantOptions - Options bag for transferToParticipantCall
      context - A Context representing the request context.
      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 AddParticipantResult addParticipant(CallInvite participant)
      Add a participant to the call.
      Parameters:
      participant - participant to invite.
      Returns:
      Result of adding a 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.
    • addParticipantWithResponse

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

      public RemoveParticipantResult removeParticipant(CommunicationIdentifier participantToRemove)
      Remove a participant from the call.
      Parameters:
      participantToRemove - participant to be removed.
      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 com.azure.core.http.rest.Response<RemoveParticipantResult> removeParticipantWithResponse(RemoveParticipantOptions removeParticipantOptions, com.azure.core.util.Context context)
      Remove a participant from the call.
      Parameters:
      removeParticipantOptions - The options for removing participant.
      context - A Context representing the request context.
      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 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 com.azure.core.http.rest.Response<MuteParticipantResult> muteParticipantWithResponse(MuteParticipantOptions options, com.azure.core.util.Context context)
      Mutes a participant in the call.
      Parameters:
      options - - Options for the request.
      context - A Context representing the request context.
      Returns:
      a Response containing the MuteParticipantResult object.
    • cancelAddParticipantOperation

      public 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 com.azure.core.http.rest.Response<CancelAddParticipantOperationResult> cancelAddParticipantOperationWithResponse(CancelAddParticipantOperationOptions cancelAddParticipantOperationOptions, com.azure.core.util.Context context)
      Cancel add participant operation request.
      Parameters:
      cancelAddParticipantOperationOptions - The options for cancelling add participant operation request.
      context - A Context representing the request context.
      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.
    • getCallMedia

      public CallMedia getCallMedia()
      Returns an object of CallContent
      Returns:
      a CallMediaAsync.