public final class CallConnectionAsync extends Object
| Modifier and Type | Method and Description |
|---|---|
Mono<AddParticipantResult> |
addParticipant(com.azure.communication.common.CommunicationIdentifier participant,
String alternateCallerId,
String operationContext)
Add a participant to the call.
|
Mono<com.azure.core.http.rest.Response<AddParticipantResult>> |
addParticipantWithResponse(com.azure.communication.common.CommunicationIdentifier participant,
String alternateCallerId,
String operationContext)
Add a participant to the call.
|
Mono<CancelAllMediaOperationsResult> |
cancelAllMediaOperations(String operationContext)
Cancel all media operations in the call.
|
Mono<com.azure.core.http.rest.Response<CancelAllMediaOperationsResult>> |
cancelAllMediaOperationsWithResponse(String operationContext)
Cancel all media operations in the call.
|
String |
getCallConnectionId()
Get the call connection id property.
|
Mono<Void> |
hangup()
Hangup a call.
|
Mono<com.azure.core.http.rest.Response<Void>> |
hangupWithResponse()
Hangup a call.
|
Mono<PlayAudioResult> |
playAudio(String audioFileUri,
boolean loop,
String audioFileId,
String callbackUri,
String operationContext)
Play audio in a call.
|
Mono<PlayAudioResult> |
playAudio(String audioFileUri,
PlayAudioOptions playAudioOptions)
Play audio in a call.
|
Mono<com.azure.core.http.rest.Response<PlayAudioResult>> |
playAudioWithResponse(String audioFileUri,
PlayAudioOptions playAudioOptions)
Play audio in a call.
|
Mono<Void> |
removeParticipant(String participantId)
Remove a participant from the call.
|
Mono<com.azure.core.http.rest.Response<Void>> |
removeParticipantWithResponse(String participantId)
Remove a participant from the call.
|
public String getCallConnectionId()
public Mono<PlayAudioResult> playAudio(String audioFileUri, boolean loop, String audioFileId, String callbackUri, String operationContext)
audioFileUri - The media resource uri of the play audio request. Currently only Wave file (.wav) format
audio prompts are supported. More specifically, the audio content in the wave file must
be mono (single-channel), 16-bit samples with a 16,000 (16KHz) sampling rate.loop - The flag indicating whether audio file needs to be played in loop or not.audioFileId - An id for the media in the AudioFileUri, using which we cache the media.callbackUri - call back uri to receive notifications.operationContext - The value to identify context of the operation. This is used to co-relate other
communications related to this operationCallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public Mono<PlayAudioResult> playAudio(String audioFileUri, PlayAudioOptions playAudioOptions)
audioFileUri - The media resource uri of the play audio request. Currently only Wave file (.wav) format
audio prompts are supported. More specifically, the audio content in the wave file must
be mono (single-channel), 16-bit samples with a 16,000 (16KHz) sampling rate.playAudioOptions - Options for play audio.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public Mono<com.azure.core.http.rest.Response<PlayAudioResult>> playAudioWithResponse(String audioFileUri, PlayAudioOptions playAudioOptions)
audioFileUri - The media resource uri of the play audio request. Currently only Wave file (.wav) format
audio prompts are supported. More specifically, the audio content in the wave file must
be mono (single-channel), 16-bit samples with a 16,000 (16KHz) sampling rate.playAudioOptions - Options for play audio.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public Mono<Void> hangup()
CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public Mono<com.azure.core.http.rest.Response<Void>> hangupWithResponse()
CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public Mono<CancelAllMediaOperationsResult> cancelAllMediaOperations(String operationContext)
operationContext - The value to identify context of the operation. This is used to co-relate other
communications related to this operationCallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public Mono<com.azure.core.http.rest.Response<CancelAllMediaOperationsResult>> cancelAllMediaOperationsWithResponse(String operationContext)
operationContext - The value to identify context of the operation. This is used to co-relate other
communications related to this operationCallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public Mono<AddParticipantResult> addParticipant(com.azure.communication.common.CommunicationIdentifier participant, String alternateCallerId, String operationContext)
participant - Added participant.alternateCallerId - The phone number to use when adding a phone number participant.operationContext - The value to identify context of the operation. This is used to co-relate other
communications related to this operationCallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public Mono<com.azure.core.http.rest.Response<AddParticipantResult>> addParticipantWithResponse(com.azure.communication.common.CommunicationIdentifier participant, String alternateCallerId, String operationContext)
participant - Added participant.alternateCallerId - The phone number to use when adding a phone number participant.operationContext - The value to identify context of the operation. This is used to co-relate other
communications related to this operationCallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public Mono<Void> removeParticipant(String participantId)
participantId - Participant id.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public Mono<com.azure.core.http.rest.Response<Void>> removeParticipantWithResponse(String participantId)
participantId - Participant id.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.Visit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.