Class CallConnectionAsync
java.lang.Object
com.azure.communication.callautomation.CallConnectionAsync
CallConnectionAsync for mid-call actions
-
Method Summary
Modifier and TypeMethodDescriptionaddParticipants
(List<com.azure.communication.common.CommunicationIdentifier> participants) Add a participant to the call.Mono<com.azure.core.http.rest.Response<AddParticipantsResult>>
addParticipantsWithResponse
(AddParticipantsOptions addParticipantsOptions) Add a participant to the call.Returns an object of CallContentAsyncGet call connection properties.Mono<com.azure.core.http.rest.Response<CallConnectionProperties>>
Get call connection properties.getParticipant
(String participantMri) Get a specific participant.Mono<com.azure.core.http.rest.Response<CallParticipant>>
getParticipantWithResponse
(String participantMri) Get a specific participant.hangUp
(boolean isForEveryone) Hangup a call.hangUpWithResponse
(HangUpOptions hangUpOptions) Hangup a call.Get all participants.Mono<com.azure.core.http.rest.Response<ListParticipantsResult>>
Get all participants.removeParticipants
(List<com.azure.communication.common.CommunicationIdentifier> participantsToRemove) Remove a list of participants from the call.Mono<com.azure.core.http.rest.Response<RemoveParticipantsResult>>
removeParticipantsWithResponse
(RemoveParticipantsOptions removeParticipantsOptions) Remove a list of participants from the call.transferToParticipantCall
(com.azure.communication.common.CommunicationIdentifier targetParticipant) Transfer the call to a participant.Mono<com.azure.core.http.rest.Response<TransferCallResult>>
transferToParticipantCallWithResponse
(TransferToParticipantCallOptions transferToParticipantCallOptions) Transfer the call to a participant.
-
Method Details
-
getCallProperties
Get call connection properties.- Returns:
- Response payload for a successful get call connection request.
- Throws:
CallingServerErrorException
- 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:
CallingServerErrorException
- 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:
- Response for a successful hangup request.
- Throws:
CallingServerErrorException
- 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(HangUpOptions hangUpOptions) Hangup a call.- Parameters:
hangUpOptions
- options to hang up- Returns:
- Response for a successful hangup request.
- Throws:
CallingServerErrorException
- 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:
participantMri
- MRI of the participants to retrieve.- Returns:
- Response payload for a successful get call connection request.
- Throws:
CallingServerErrorException
- 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(String participantMri) Get a specific participant.- Parameters:
participantMri
- MRI of the participants to retrieve.- Returns:
- Response payload for a successful get call connection request.
- Throws:
CallingServerErrorException
- 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 payload for a successful get call connection request.
- Throws:
CallingServerErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
listParticipantsWithResponse
public Mono<com.azure.core.http.rest.Response<ListParticipantsResult>> listParticipantsWithResponse()Get all participants.- Returns:
- Response payload for a successful get call connection request.
- Throws:
CallingServerErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
transferToParticipantCall
public Mono<TransferCallResult> transferToParticipantCall(com.azure.communication.common.CommunicationIdentifier targetParticipant) Transfer the call to a participant.- Parameters:
targetParticipant
- ACommunicationIdentifier
representing the target participant of this transfer.- Returns:
- Response payload for a successful call termination request.
- Throws:
CallingServerErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
transferToParticipantCallWithResponse
public Mono<com.azure.core.http.rest.Response<TransferCallResult>> transferToParticipantCallWithResponse(TransferToParticipantCallOptions transferToParticipantCallOptions) Transfer the call to a participant.- Parameters:
transferToParticipantCallOptions
- Options bag for transferToParticipantCall- Returns:
- Response for a successful call termination request.
- Throws:
CallingServerErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
addParticipants
public Mono<AddParticipantsResult> addParticipants(List<com.azure.communication.common.CommunicationIdentifier> participants) Add a participant to the call.- Parameters:
participants
- The list of participants to invite.- Returns:
- Response for a successful add participant request.
- Throws:
CallingServerErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
addParticipantsWithResponse
public Mono<com.azure.core.http.rest.Response<AddParticipantsResult>> addParticipantsWithResponse(AddParticipantsOptions addParticipantsOptions) Add a participant to the call.- Parameters:
addParticipantsOptions
- Options bag for addParticipants- Returns:
- Response for a successful add participant request.
- Throws:
CallingServerErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
removeParticipants
public Mono<RemoveParticipantsResult> removeParticipants(List<com.azure.communication.common.CommunicationIdentifier> participantsToRemove) Remove a list of participants from the call.- Parameters:
participantsToRemove
- The identifier list of the participant to be removed.- Returns:
- Response for a successful add participant request.
- Throws:
CallingServerErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
removeParticipantsWithResponse
public Mono<com.azure.core.http.rest.Response<RemoveParticipantsResult>> removeParticipantsWithResponse(RemoveParticipantsOptions removeParticipantsOptions) Remove a list of participants from the call.- Parameters:
removeParticipantsOptions
- The options for removing participants.- Returns:
- Response for a successful add participant request.
- Throws:
CallingServerErrorException
- 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.
-