Share via


CallAutomationClient Class

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

public final class CallAutomationClient

Synchronous client that supports calling server operations.

Instantiating a synchronous Calling Server Client

View CallAutomationClientBuilder for additional ways to construct the client.

Method Summary

Modifier and Type Method and Description
AnswerCallResult answerCall(String incomingCallContext, String callbackUrl)

Answer an incoming call

Response<AnswerCallResult> answerCallWithResponse(AnswerCallOptions answerCallOptions, Context context)

Create a call connection request from a source identity to a target identity.

ConnectCallResult connectCall(CallLocator callLocator, String callbackUrl)

Create a connect request

Response<ConnectCallResult> connectCallWithResponse(ConnectCallOptions connectCallOptions, Context context)

Create a connect request.

CreateCallResult createCall(CallInvite targetParticipant, String callbackUrl)

Create a call connection request from a source identity to a target identity.

Response<CreateCallResult> createCallWithResponse(CreateCallOptions createCallOptions, Context context)

Create a call connection request from a source identity to a target identity.

CreateCallResult createGroupCall(List<CommunicationIdentifier> targetParticipants, String callbackUrl)

Create a call connection request from a source identity to a list of target identity.

Response<CreateCallResult> createGroupCallWithResponse(CreateGroupCallOptions createGroupCallOptions, Context context)

Create a group call connection request from a source identity to multiple identities.

CallConnection getCallConnection(String callConnectionId)

Returns an object of CallConnection

CallRecording getCallRecording()

Returns an object of CallRecording

CommunicationUserIdentifier getSourceIdentity()

Get Source Identity that is used for create and answer call

void redirectCall(String incomingCallContext, CallInvite targetParticipant)

Redirect a call

Response<Void> redirectCallWithResponse(RedirectCallOptions redirectCallOptions, Context context)

Redirect a call

void rejectCall(String incomingCallContext)

Reject a call

Response<Void> rejectCallWithResponse(RejectCallOptions rejectCallOptions, Context context)

Reject a call

Methods inherited from java.lang.Object

Method Details

answerCall

public AnswerCallResult answerCall(String incomingCallContext, String callbackUrl)

Answer an incoming call

Parameters:

incomingCallContext - The incoming call context.
callbackUrl - The call back url.

Returns:

Result of answering the call.

answerCallWithResponse

public Response<AnswerCallResult> answerCallWithResponse(AnswerCallOptions answerCallOptions, Context context)

Create a call connection request from a source identity to a target identity.

Parameters:

answerCallOptions - The options of answering the call.
context - The context to associate with this operation.

Returns:

Response with result of answering the call.

connectCall

public ConnectCallResult connectCall(CallLocator callLocator, String callbackUrl)

Create a connect request

Parameters:

callLocator - call locator.
callbackUrl - The call back url for receiving events.

Returns:

Result of connect.

connectCallWithResponse

public Response<ConnectCallResult> connectCallWithResponse(ConnectCallOptions connectCallOptions, Context context)

Create a connect request.

Parameters:

connectCallOptions - Options for connect request.
context - The context to associate with this operation.

Returns:

Response with result of connect.

createCall

public CreateCallResult createCall(CallInvite targetParticipant, String callbackUrl)

Create a call connection request from a source identity to a target identity.

Parameters:

targetParticipant - call invitee's information
callbackUrl - The call back url for receiving events.

Returns:

Result of creating the call.

createCallWithResponse

public Response<CreateCallResult> createCallWithResponse(CreateCallOptions createCallOptions, Context context)

Create a call connection request from a source identity to a target identity.

Parameters:

createCallOptions - Options bag for creating a new call.
context - The context to associate with this operation.

Returns:

Response with result of creating the call.

createGroupCall

public CreateCallResult createGroupCall(List<CommunicationIdentifier> targetParticipants, String callbackUrl)

Create a call connection request from a source identity to a list of target identity.

Parameters:

targetParticipants - The list of targetParticipants.
callbackUrl - The call back url for receiving events.

Returns:

Result of creating the call.

createGroupCallWithResponse

public Response<CreateCallResult> createGroupCallWithResponse(CreateGroupCallOptions createGroupCallOptions, Context context)

Create a group call connection request from a source identity to multiple identities.

Parameters:

createGroupCallOptions - Options bag for creating a new group call.
context - The context to associate with this operation.

Returns:

Response with result of creating the call.

getCallConnection

public CallConnection getCallConnection(String callConnectionId)

Returns an object of CallConnection

Parameters:

callConnectionId - the id of the call connection

Returns:

a CallConnection.

getCallRecording

public CallRecording getCallRecording()

Returns an object of CallRecording

Returns:

a CallRecording.

getSourceIdentity

public CommunicationUserIdentifier getSourceIdentity()

Get Source Identity that is used for create and answer call

Returns:

redirectCall

public void redirectCall(String incomingCallContext, CallInvite targetParticipant)

Redirect a call

Parameters:

incomingCallContext - The incoming call context.
targetParticipant - CallInvite represent redirect targetParticipant

redirectCallWithResponse

public Response<Void> redirectCallWithResponse(RedirectCallOptions redirectCallOptions, Context context)

Redirect a call

Parameters:

redirectCallOptions - options of redirecting a call
context - The context to associate with this operation.

Returns:

Response with Void.

rejectCall

public void rejectCall(String incomingCallContext)

Reject a call

Parameters:

incomingCallContext - The incoming call context.

rejectCallWithResponse

public Response<Void> rejectCallWithResponse(RejectCallOptions rejectCallOptions, Context context)

Reject a call

Parameters:

rejectCallOptions - The options of rejecting the call.
context - The context to associate with this operation.

Returns:

Response with Void.

Applies to