public final class ServerCall extends Object
| Modifier and Type | Method and Description |
|---|---|
AddParticipantResult |
addParticipant(com.azure.communication.common.CommunicationIdentifier participant,
String callBackUri,
String alternateCallerId,
String operationContext)
Add a participant to the call.
|
com.azure.core.http.rest.Response<AddParticipantResult> |
addParticipantWithResponse(com.azure.communication.common.CommunicationIdentifier participant,
String callBackUri,
String alternateCallerId,
String operationContext,
com.azure.core.util.Context context)
Add a participant to the call.
|
CallRecordingProperties |
getRecordingState(String recordingId)
Get the current recording state by recording id.
|
com.azure.core.http.rest.Response<CallRecordingProperties> |
getRecordingStateWithResponse(String recordingId,
com.azure.core.util.Context context)
Get the current recording state by recording id.
|
String |
getServerCallId()
Get server call id property.
|
void |
pauseRecording(String recordingId)
Pause recording of the call.
|
com.azure.core.http.rest.Response<Void> |
pauseRecordingWithResponse(String recordingId,
com.azure.core.util.Context context)
Pause recording of the call.
|
PlayAudioResult |
playAudio(String audioFileUri,
PlayAudioOptions playAudioOptions)
Play audio in a call.
|
PlayAudioResult |
playAudio(String audioFileUri,
String audioFileId,
String callbackUri,
String operationContext)
Play audio in a call.
|
com.azure.core.http.rest.Response<PlayAudioResult> |
playAudioWithResponse(String audioFileUri,
PlayAudioOptions playAudioOptions,
com.azure.core.util.Context context)
Play audio in a call.
|
void |
removeParticipant(String participantId)
Remove a participant from the call.
|
com.azure.core.http.rest.Response<Void> |
removeParticipantWithResponse(String participantId,
com.azure.core.util.Context context)
Remove a participant from the call.
|
void |
resumeRecording(String recordingId)
Resume recording of the call.
|
com.azure.core.http.rest.Response<Void> |
resumeRecordingWithResponse(String recordingId,
com.azure.core.util.Context context)
Resume recording of the call.
|
StartCallRecordingResult |
startRecording(String recordingStateCallbackUri)
Start recording of the call.
|
com.azure.core.http.rest.Response<StartCallRecordingResult> |
startRecordingWithResponse(String recordingStateCallbackUri,
StartRecordingOptions startRecordingOptions,
com.azure.core.util.Context context)
Start recording of the call.
|
void |
stopRecording(String recordingId)
Stop recording of the call.
|
com.azure.core.http.rest.Response<Void> |
stopRecordingWithResponse(String recordingId,
com.azure.core.util.Context context)
Stop recording of the call.
|
public String getServerCallId()
public AddParticipantResult addParticipant(com.azure.communication.common.CommunicationIdentifier participant, String callBackUri, String alternateCallerId, String operationContext)
participant - Added participant.callBackUri - CallBackUri to get notifications.alternateCallerId - Phone number to use when adding a phone number participant.operationContext - 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 com.azure.core.http.rest.Response<AddParticipantResult> addParticipantWithResponse(com.azure.communication.common.CommunicationIdentifier participant, String callBackUri, String alternateCallerId, String operationContext, com.azure.core.util.Context context)
participant - Added participant.callBackUri - CallBackUri to get notifications.alternateCallerId - Phone number to use when adding a phone number participant.operationContext - Value to identify context of the operation. This is used to co-relate other
communications related to this operationcontext - A Context representing the request context.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public void removeParticipant(String participantId)
participantId - Participant id.public com.azure.core.http.rest.Response<Void> removeParticipantWithResponse(String participantId, com.azure.core.util.Context context)
participantId - Participant id.context - Context representing the request context.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public StartCallRecordingResult startRecording(String recordingStateCallbackUri)
recordingStateCallbackUri - Uri to send state change callbacks.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<StartCallRecordingResult> startRecordingWithResponse(String recordingStateCallbackUri, StartRecordingOptions startRecordingOptions, com.azure.core.util.Context context)
recordingStateCallbackUri - Uri to send state change callbacks.startRecordingOptions - StartRecordingOptions custom options.context - A Context representing the request context.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public void stopRecording(String recordingId)
recordingId - Recording id to stop.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> stopRecordingWithResponse(String recordingId, com.azure.core.util.Context context)
recordingId - Recording id to stop.context - A Context representing the request context.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public void pauseRecording(String recordingId)
recordingId - Recording id to stop.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> pauseRecordingWithResponse(String recordingId, com.azure.core.util.Context context)
recordingId - Recording id to stop.context - A Context representing the request context.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public void resumeRecording(String recordingId)
recordingId - The recording id to stop.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> resumeRecordingWithResponse(String recordingId, com.azure.core.util.Context context)
recordingId - The recording id to stop.context - A Context representing the request context.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public CallRecordingProperties getRecordingState(String recordingId)
recordingId - The recording id to stop.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<CallRecordingProperties> getRecordingStateWithResponse(String recordingId, com.azure.core.util.Context context)
recordingId - The recording id to stop.context - A Context representing the request context.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public PlayAudioResult playAudio(String audioFileUri, String audioFileId, String callbackUri, String operationContext)
audioFileUri - 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.audioFileId - Id for the media in the AudioFileUri, using which we cache the media.callbackUri - Callback Uri to receive PlayAudio status notifications.operationContext - 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 PlayAudioResult playAudio(String audioFileUri, PlayAudioOptions playAudioOptions)
audioFileUri - 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 com.azure.core.http.rest.Response<PlayAudioResult> playAudioWithResponse(String audioFileUri, PlayAudioOptions playAudioOptions, com.azure.core.util.Context context)
audioFileUri - 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.context - A Context representing the request context.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.