Class CallAutomationClient
java.lang.Object
com.azure.communication.callautomation.CallAutomationClient
Synchronous client that supports calling server operations.
Instantiating a synchronous Calling Server Client
View this
for additional ways to construct the client.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionanswerCall
(String incomingCallContext, String callbackUrl) Answer an incoming callcom.azure.core.http.rest.Response<AnswerCallResult>
answerCallWithResponse
(AnswerCallOptions answerCallOptions, com.azure.core.util.Context context) Create a call connection request from a source identity to a target identity.createCall
(com.azure.communication.common.CommunicationIdentifier source, List<com.azure.communication.common.CommunicationIdentifier> targets, String callbackUrl) Create a call connection request from a source identity to a target identity.com.azure.core.http.rest.Response<CreateCallResult>
createCallWithResponse
(CreateCallOptions createCallOptions, com.azure.core.util.Context context) Create a call connection request from a source identity to a target identity.getCallConnection
(String callConnectionId) Returns an object of CallConnectionReturns an object of CallRecordingredirectCall
(String incomingCallContext, com.azure.communication.common.CommunicationIdentifier target) Redirect a callcom.azure.core.http.rest.Response<Void>
redirectCallWithResponse
(RedirectCallOptions redirectCallOptions, com.azure.core.util.Context context) Redirect a callrejectCall
(String incomingCallContext) Reject a callcom.azure.core.http.rest.Response<Void>
rejectCallWithResponse
(RejectCallOptions rejectCallOptions, com.azure.core.util.Context context) Reject a call
-
Method Details
-
createCall
public CreateCallResult createCall(com.azure.communication.common.CommunicationIdentifier source, List<com.azure.communication.common.CommunicationIdentifier> targets, String callbackUrl) Create a call connection request from a source identity to a target identity.- Parameters:
source
- The caller.targets
- The list of targets.callbackUrl
- The call back url for receiving events.- Returns:
- A CallConnectionDelete object.
- Throws:
CallingServerErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
createCallWithResponse
public com.azure.core.http.rest.Response<CreateCallResult> createCallWithResponse(CreateCallOptions createCallOptions, com.azure.core.util.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 for a successful CreateCallConnection request.
- Throws:
CallingServerErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
answerCall
Answer an incoming call- Parameters:
incomingCallContext
- The incoming call context.callbackUrl
- The call back uri.- Returns:
- Response for a successful CreateCallConnection request.
- Throws:
CallingServerErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
answerCallWithResponse
public com.azure.core.http.rest.Response<AnswerCallResult> answerCallWithResponse(AnswerCallOptions answerCallOptions, com.azure.core.util.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 for a successful CreateCallConnection request.
- Throws:
CallingServerErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
redirectCall
public Void redirectCall(String incomingCallContext, com.azure.communication.common.CommunicationIdentifier target) Redirect a call- Parameters:
incomingCallContext
- The incoming call context.target
- The target identity.- Returns:
- Response for a successful CreateCallConnection request.
- Throws:
CallingServerErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
redirectCallWithResponse
public com.azure.core.http.rest.Response<Void> redirectCallWithResponse(RedirectCallOptions redirectCallOptions, com.azure.core.util.Context context) Redirect a call- Parameters:
redirectCallOptions
- options of redirecting a callcontext
- The context to associate with this operation.- Returns:
- Response for a successful CreateCallConnection request.
- Throws:
CallingServerErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
rejectCall
Reject a call- Parameters:
incomingCallContext
- The incoming call context.- Returns:
- Response for a successful CreateCallConnection request.
- Throws:
CallingServerErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
rejectCallWithResponse
public com.azure.core.http.rest.Response<Void> rejectCallWithResponse(RejectCallOptions rejectCallOptions, com.azure.core.util.Context context) Reject a call- Parameters:
rejectCallOptions
- The options of rejecting the call.context
- The context to associate with this operation.- Returns:
- Response for a successful CreateCallConnection request.
- Throws:
CallingServerErrorException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getCallConnection
Returns an object of CallConnection- Parameters:
callConnectionId
- the id of the call connection- Returns:
- a CallConnection.
-
getCallRecording
Returns an object of CallRecording- Returns:
- a CallRecording.
-