Class CallConnection
java.lang.Object
com.azure.communication.callautomation.CallConnection
CallConnection for mid-call actions
-
Method Summary
Modifier and TypeMethodDescriptionaddParticipants
(List<com.azure.communication.common.CommunicationIdentifier> participants) Add a participant to the call.com.azure.core.http.rest.Response<AddParticipantsResult>
addParticipantsWithResponse
(AddParticipantsOptions addParticipantsOptions, com.azure.core.util.Context context) Add a participant to the call.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
(String participantMri) Get a specific participant.com.azure.core.http.rest.Response<CallParticipant>
getParticipantWithResponse
(String participantMri, com.azure.core.util.Context context) Get all participants.hangUp
(boolean isForEveryone) Hangup a call.com.azure.core.http.rest.Response<Void>
hangUpWithResponse
(HangUpOptions hangUpOptions, com.azure.core.util.Context context) Hangup a call.Get all participants.com.azure.core.http.rest.Response<ListParticipantsResult>
listParticipantsWithResponse
(com.azure.core.util.Context context) Get all participants.removeParticipants
(List<com.azure.communication.common.CommunicationIdentifier> participantsToRemove) Remove a list of participants from the call.com.azure.core.http.rest.Response<RemoveParticipantsResult>
removeParticipantsWithResponse
(RemoveParticipantsOptions removeParticipantsOptions, com.azure.core.util.Context context) Remove a list of participant from the call.transferToParticipantCall
(com.azure.communication.common.CommunicationIdentifier targetParticipant) Transfer the call to a participant.com.azure.core.http.rest.Response<TransferCallResult>
transferToParticipantCallWithResponse
(TransferToParticipantCallOptions transferToParticipantCallOptions, 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:
CallingServerErrorException
- 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
- AContext
representing the request context.- 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 com.azure.core.http.rest.Response<Void> hangUpWithResponse(HangUpOptions hangUpOptions, com.azure.core.util.Context context) Hangup a call.- Parameters:
hangUpOptions
- options to hang upcontext
- AContext
representing the request context.- 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
- The participant.- 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 com.azure.core.http.rest.Response<CallParticipant> getParticipantWithResponse(String participantMri, com.azure.core.util.Context context) Get all participants.- Parameters:
participantMri
- The participant.context
- AContext
representing the request context.- 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 com.azure.core.http.rest.Response<ListParticipantsResult> listParticipantsWithResponse(com.azure.core.util.Context context) Get all participants.- Parameters:
context
- AContext
representing the request context.- 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 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 com.azure.core.http.rest.Response<TransferCallResult> transferToParticipantCallWithResponse(TransferToParticipantCallOptions transferToParticipantCallOptions, com.azure.core.util.Context context) Transfer the call to a participant.- Parameters:
transferToParticipantCallOptions
- Options bag for transferToParticipantCallcontext
- AContext
representing the request context.- 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 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 com.azure.core.http.rest.Response<AddParticipantsResult> addParticipantsWithResponse(AddParticipantsOptions addParticipantsOptions, com.azure.core.util.Context context) Add a participant to the call.- Parameters:
addParticipantsOptions
- Options bag for addParticipantscontext
- AContext
representing the request context.- 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 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 com.azure.core.http.rest.Response<RemoveParticipantsResult> removeParticipantsWithResponse(RemoveParticipantsOptions removeParticipantsOptions, com.azure.core.util.Context context) Remove a list of participant from the call.- Parameters:
removeParticipantsOptions
- The options for removing participants.context
- AContext
representing the request context.- 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.
-
getCallMedia
Returns an object of CallContent- Returns:
- a CallContentAsync.
-