Share via


CallConnection Class

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

public final class CallConnection

CallConnection for mid-call actions

Method Summary

Modifier and Type Method and Description
AddParticipantResult addParticipant(CallInvite participant)

Add a participant to the call.

Response<AddParticipantResult> addParticipantWithResponse(AddParticipantOptions addParticipantOptions, Context context)

Add a participant to the call.

CancelAddParticipantOperationResult cancelAddParticipantOperation(String invitationId)

Cancel add participant operation request.

Response<CancelAddParticipantOperationResult> cancelAddParticipantOperationWithResponse(CancelAddParticipantOperationOptions cancelAddParticipantOperationOptions, Context context)

Cancel add participant operation request.

CallMedia getCallMedia()

Returns an object of CallContent

CallConnectionProperties getCallProperties()

Get call connection properties.

Response<CallConnectionProperties> getCallPropertiesWithResponse(Context context)

Get call connection properties.

CallParticipant getParticipant(CommunicationIdentifier targetParticipant)

Get a specific participant.

Response<CallParticipant> getParticipantWithResponse(CommunicationIdentifier targetParticipant, Context context)

Get all participants.

void hangUp(boolean isForEveryone)

Hangup a call.

Response<Void> hangUpWithResponse(boolean isForEveryone, Context context)

Hangup a call.

PagedIterable<CallParticipant> listParticipants()

Get all participants.

PagedIterable<CallParticipant> listParticipants(Context context)

Get all participants.

MuteParticipantResult muteParticipant(CommunicationIdentifier targetParticipant)

Mutes a participant in the call.

Response<MuteParticipantResult> muteParticipantWithResponse(MuteParticipantOptions options, Context context)

Mutes a participant in the call.

RemoveParticipantResult removeParticipant(CommunicationIdentifier participantToRemove)

Remove a participant from the call.

Response<RemoveParticipantResult> removeParticipantWithResponse(RemoveParticipantOptions removeParticipantOptions, Context context)

Remove a participant from the call.

TransferCallResult transferCallToParticipant(CommunicationIdentifier targetParticipant)

Transfer the call to a participant.

Response<TransferCallResult> transferCallToParticipantWithResponse(TransferCallToParticipantOptions transferCallToParticipantOptions, Context context)

Transfer the call to a participant.

Methods inherited from java.lang.Object

Method Details

addParticipant

public AddParticipantResult addParticipant(CallInvite participant)

Add a participant to the call.

Parameters:

participant - participant to invite.

Returns:

Result of adding a participant.

addParticipantWithResponse

public Response<AddParticipantResult> addParticipantWithResponse(AddParticipantOptions addParticipantOptions, 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.

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.

cancelAddParticipantOperationWithResponse

public Response<CancelAddParticipantOperationResult> cancelAddParticipantOperationWithResponse(CancelAddParticipantOperationOptions cancelAddParticipantOperationOptions, 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.

getCallMedia

public CallMedia getCallMedia()

Returns an object of CallContent

Returns:

a CallMediaAsync.

getCallProperties

public CallConnectionProperties getCallProperties()

Get call connection properties.

Returns:

Response payload for a successful get call connection request.

getCallPropertiesWithResponse

public Response<CallConnectionProperties> getCallPropertiesWithResponse(Context context)

Get call connection properties.

Parameters:

context - A Context representing the request context.

Returns:

Response payload for a successful get call connection request.

getParticipant

public CallParticipant getParticipant(CommunicationIdentifier targetParticipant)

Get a specific participant.

Parameters:

targetParticipant - The participant to retrieve.

Returns:

The desired call participant.

getParticipantWithResponse

public Response<CallParticipant> getParticipantWithResponse(CommunicationIdentifier targetParticipant, 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.

hangUp

public void hangUp(boolean isForEveryone)

Hangup a call.

Parameters:

isForEveryone - determine if the call is handed up for all participants.

hangUpWithResponse

public Response<Void> hangUpWithResponse(boolean isForEveryone, 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.

listParticipants

public PagedIterable<CallParticipant> listParticipants()

Get all participants.

Returns:

A list of all participants in the call.

listParticipants

public PagedIterable<CallParticipant> listParticipants(Context context)

Get all participants.

Parameters:

context - A Context representing the request context.

Returns:

Response with a list of all participants in the call.

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 Response<MuteParticipantResult> muteParticipantWithResponse(MuteParticipantOptions options, 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.

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

removeParticipantWithResponse

public Response<RemoveParticipantResult> removeParticipantWithResponse(RemoveParticipantOptions removeParticipantOptions, 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.

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.

transferCallToParticipantWithResponse

public Response<TransferCallResult> transferCallToParticipantWithResponse(TransferCallToParticipantOptions transferCallToParticipantOptions, 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.

Applies to