Class CallConnection
java.lang.Object
com.azure.communication.callautomation.CallConnection
CallConnection for mid-call actions
-
Method Summary
Modifier and TypeMethodDescriptionaddParticipant(CallInvite participant) Add a participant to the call.com.azure.core.http.rest.Response<AddParticipantResult> addParticipantWithResponse(AddParticipantOptions addParticipantOptions, com.azure.core.util.Context context) Add a participant to the call.cancelAddParticipantOperation(String invitationId) Cancel add participant operation request.com.azure.core.http.rest.Response<CancelAddParticipantOperationResult> cancelAddParticipantOperationWithResponse(CancelAddParticipantOperationOptions cancelAddParticipantOperationOptions, com.azure.core.util.Context context) Cancel add participant operation request.Returns an object of CallContentGet call connection properties.com.azure.core.http.rest.Response<CallConnectionProperties> getCallPropertiesWithResponse(com.azure.core.util.Context context) Get call connection properties.getParticipant(CommunicationIdentifier targetParticipant) Get a specific participant.com.azure.core.http.rest.Response<CallParticipant> getParticipantWithResponse(CommunicationIdentifier targetParticipant, com.azure.core.util.Context context) Get all participants.voidhangUp(boolean isForEveryone) Hangup a call.com.azure.core.http.rest.Response<Void> hangUpWithResponse(boolean isForEveryone, com.azure.core.util.Context context) Hangup a call.com.azure.core.http.rest.PagedIterable<CallParticipant> Get all participants.com.azure.core.http.rest.PagedIterable<CallParticipant> listParticipants(com.azure.core.util.Context context) Get all participants.muteParticipant(CommunicationIdentifier targetParticipant) Mutes a participant in the call.com.azure.core.http.rest.Response<MuteParticipantResult> muteParticipantWithResponse(MuteParticipantOptions options, com.azure.core.util.Context context) Mutes a participant in the call.removeParticipant(CommunicationIdentifier participantToRemove) Remove a participant from the call.com.azure.core.http.rest.Response<RemoveParticipantResult> removeParticipantWithResponse(RemoveParticipantOptions removeParticipantOptions, com.azure.core.util.Context context) Remove a participant from the call.transferCallToParticipant(CommunicationIdentifier targetParticipant) Transfer the call to a participant.com.azure.core.http.rest.Response<TransferCallResult> transferCallToParticipantWithResponse(TransferCallToParticipantOptions transferCallToParticipantOptions, com.azure.core.util.Context context) 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 com.azure.core.http.rest.Response<CallConnectionProperties> getCallPropertiesWithResponse(com.azure.core.util.Context context) Get call connection properties.- Parameters:
context- AContextrepresenting 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- AContextrepresenting 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
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- AContextrepresenting 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
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- AContextrepresenting 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
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.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 transferToParticipantCallcontext- AContextrepresenting 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
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 addParticipantcontext- AContextrepresenting 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
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- AContextrepresenting 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
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- AContextrepresenting the request context.- Returns:
- a 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 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- AContextrepresenting 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
Returns an object of CallContent- Returns:
- a CallMediaAsync.
-