Class CallAutomationAsyncClient

java.lang.Object
com.azure.communication.callautomation.CallAutomationAsyncClient

public final class CallAutomationAsyncClient extends Object
Asynchronous client that supports calling server operations.

Instantiating a asynchronous CallingServer client

View this for additional ways to construct the client.

See Also:
  • Method Details

    • createCall

      public Mono<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:
      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.
    • createCallWithResponse

      public Mono<com.azure.core.http.rest.Response<CreateCallResult>> createCallWithResponse(CreateCallOptions createCallOptions)
      Create a call connection request from a source identity to a target identity.
      Parameters:
      createCallOptions - Options for creating a new call.
      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

      public Mono<AnswerCallResult> answerCall(String incomingCallContext, String callbackUrl)
      Answer an incoming call
      Parameters:
      incomingCallContext - The incoming call context.
      callbackUrl - The call back url.
      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 Mono<com.azure.core.http.rest.Response<AnswerCallResult>> answerCallWithResponse(AnswerCallOptions answerCallOptions)
      Create a call connection request from a source identity to a target identity.
      Parameters:
      answerCallOptions - The options of answering the call.
      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 Mono<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 Mono<com.azure.core.http.rest.Response<Void>> redirectCallWithResponse(RedirectCallOptions redirectCallOptions)
      Redirect a call
      Parameters:
      redirectCallOptions - Options for redirecting a call.
      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

      public Mono<Void> rejectCall(String incomingCallContext)
      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 Mono<com.azure.core.http.rest.Response<Void>> rejectCallWithResponse(RejectCallOptions rejectCallOptions)
      Reject a call
      Parameters:
      rejectCallOptions - the options of rejecting the call
      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.
    • getCallConnectionAsync

      public CallConnectionAsync getCallConnectionAsync(String callConnectionId)
      Returns an object of CallConnectionAsync
      Parameters:
      callConnectionId - the id of the call connection
      Returns:
      a CallContentAsync.
    • getCallRecordingAsync

      public CallRecordingAsync getCallRecordingAsync()
      Returns an object of CallRecordingAsync
      Returns:
      a CallRecordingAsync.