Class CallConnectionAsync
java.lang.Object
com.azure.communication.callautomation.CallConnectionAsync
CallConnectionAsync for mid-call actions
-
Method Summary
Modifier and TypeMethodDescriptionaddParticipant(CallInvite participant) Add a participant to the call.Mono<com.azure.core.http.rest.Response<AddParticipantResult>> addParticipantWithResponse(AddParticipantOptions addParticipantOptions) Add a participant to the call.cancelAddParticipantOperation(String invitationId) Cancel add participant operation request.Mono<com.azure.core.http.rest.Response<CancelAddParticipantOperationResult>> cancelAddParticipantOperationWithResponse(CancelAddParticipantOperationOptions cancelAddParticipantOperationOptions) Cancel add participant operation request.Returns an object of CallContentAsyncGet call connection properties.Mono<com.azure.core.http.rest.Response<CallConnectionProperties>> Get call connection properties.getParticipant(CommunicationIdentifier targetParticipant) Get a specific participant.Mono<com.azure.core.http.rest.Response<CallParticipant>> getParticipantWithResponse(CommunicationIdentifier targetParticipant) Get a specific participant.hangUp(boolean isForEveryone) Hangup a call.hangUpWithResponse(boolean isForEveryone) Hangup a call.com.azure.core.http.rest.PagedFlux<CallParticipant> Get all participants.muteParticipant(CommunicationIdentifier targetParticipant) Mutes a participant in the call.Mono<com.azure.core.http.rest.Response<MuteParticipantResult>> Mutes a participant in the call.removeParticipant(CommunicationIdentifier participantToRemove) Remove a participant from the call.Mono<com.azure.core.http.rest.Response<RemoveParticipantResult>> removeParticipantWithResponse(RemoveParticipantOptions removeParticipantOptions) Remove a participant from the call.transferCallToParticipant(CommunicationIdentifier targetParticipant) Transfer the call to a participant.Mono<com.azure.core.http.rest.Response<TransferCallResult>> transferCallToParticipantWithResponse(TransferCallToParticipantOptions transferCallToParticipantOptions) Transfer the call to a participant.
-
Method Details
-
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
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
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
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
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- ACommunicationIdentifierrepresenting 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 userRuntimeException- 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
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
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
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
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
Returns an object of CallContentAsync- Returns:
- a CallContentAsync.
-