Class CallMedia
java.lang.Object
com.azure.communication.callautomation.CallMedia
CallContent.
-
Method Summary
Modifier and TypeMethodDescriptionvoidCancels all the queued media operations.com.azure.core.http.rest.Response<Void> cancelAllMediaOperationsWithResponse(com.azure.core.util.Context context) Cancels all the queued media operationsvoidhold(CommunicationIdentifier targetParticipant) Holds participant in call.voidhold(CommunicationIdentifier targetParticipant, PlaySource playSource) Holds participant in call.com.azure.core.http.rest.Response<Void> holdWithResponse(HoldOptions options, com.azure.core.util.Context context) Holds participant in call.voidplay(PlaySource playSource, List<CommunicationIdentifier> playTo) Playvoidplay(List<PlaySource> playSources, List<CommunicationIdentifier> playTo) PlayvoidplayToAll(PlaySource playSource) Play to all participantsvoidplayToAll(List<PlaySource> playSources) Play to all participantscom.azure.core.http.rest.Response<Void> playToAllWithResponse(PlayToAllOptions options, com.azure.core.util.Context context) PlayAllWithResponsecom.azure.core.http.rest.Response<Void> playWithResponse(PlayOptions options, com.azure.core.util.Context context) PlayWithResponsesendDtmfTones(List<DtmfTone> tones, CommunicationIdentifier targetParticipant) Sends Dtmf tonescom.azure.core.http.rest.Response<SendDtmfTonesResult> sendDtmfTonesWithResponse(SendDtmfTonesOptions options, com.azure.core.util.Context context) Sends Dtmf tonesvoidstartContinuousDtmfRecognition(CommunicationIdentifier targetParticipant) Starts continuous Dtmf recognition.com.azure.core.http.rest.Response<Void> startContinuousDtmfRecognitionWithResponse(ContinuousDtmfRecognitionOptions options, com.azure.core.util.Context context) Starts continuous Dtmf recognition.voidstartRecognizing(CallMediaRecognizeOptions callMediaRecognizeOptions) Recognize tones.com.azure.core.http.rest.Response<Void> startRecognizingWithResponse(CallMediaRecognizeOptions callMediaRecognizeOptions, com.azure.core.util.Context context) Recognize tones.voidstopContinuousDtmfRecognition(CommunicationIdentifier targetParticipant) Stops continuous Dtmf recognition.com.azure.core.http.rest.Response<Void> stopContinuousDtmfRecognitionWithResponse(ContinuousDtmfRecognitionOptions options, com.azure.core.util.Context context) Stops continuous Dtmf recognition.voidunhold(CommunicationIdentifier targetParticipant) Removes hold from participant in call.com.azure.core.http.rest.Response<Void> unholdWithResponse(UnholdOptions options, com.azure.core.util.Context context) Removes hold from participant in call.
-
Method Details
-
play
Play- Parameters:
playSources- A List ofPlaySourcerepresenting the sources to play.playTo- the targets to play to.- Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
play
Play- Parameters:
playSource- APlaySourcerepresenting the source to play.playTo- the targets to play to.- Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
playToAll
Play to all participants- Parameters:
playSources- A List ofPlaySourcerepresenting the sources to play.- Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
playToAll
Play to all participants- Parameters:
playSource- APlaySourcerepresenting the source to play.- Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
playWithResponse
public com.azure.core.http.rest.Response<Void> playWithResponse(PlayOptions options, com.azure.core.util.Context context) PlayWithResponse- Parameters:
options- play options.context- AContextrepresenting the request context.- Returns:
- Response for successful play request.
- Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
playToAllWithResponse
public com.azure.core.http.rest.Response<Void> playToAllWithResponse(PlayToAllOptions options, com.azure.core.util.Context context) PlayAllWithResponse- Parameters:
options- play options.context- AContextrepresenting the request context.- Returns:
- Response for successful playAll request.
- Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
startRecognizing
Recognize tones.- Parameters:
callMediaRecognizeOptions- Optional elements for recognize.
-
startRecognizingWithResponse
public com.azure.core.http.rest.Response<Void> startRecognizingWithResponse(CallMediaRecognizeOptions callMediaRecognizeOptions, com.azure.core.util.Context context) Recognize tones.- Parameters:
callMediaRecognizeOptions- Optional elements for recognize.context- AContextrepresenting the request context.- Returns:
- Response for a successful recognize request.
-
cancelAllMediaOperations
public void cancelAllMediaOperations()Cancels all the queued media operations. -
cancelAllMediaOperationsWithResponse
public com.azure.core.http.rest.Response<Void> cancelAllMediaOperationsWithResponse(com.azure.core.util.Context context) Cancels all the queued media operations- Parameters:
context- AContextrepresenting the request context.- Returns:
- Response for successful playAll request.
-
sendDtmfTones
public SendDtmfTonesResult sendDtmfTones(List<DtmfTone> tones, CommunicationIdentifier targetParticipant) Sends Dtmf tones- Parameters:
tones- tones to be senttargetParticipant- the target participant- Returns:
- Response for successful sendDtmfTones request.
-
sendDtmfTonesWithResponse
public com.azure.core.http.rest.Response<SendDtmfTonesResult> sendDtmfTonesWithResponse(SendDtmfTonesOptions options, com.azure.core.util.Context context) Sends Dtmf tones- Parameters:
options- SendDtmfTones configuration optionscontext- Context- Returns:
- Response for successful sendDtmfTones request.
-
startContinuousDtmfRecognition
Starts continuous Dtmf recognition.- Parameters:
targetParticipant- the target participant
-
startContinuousDtmfRecognitionWithResponse
public com.azure.core.http.rest.Response<Void> startContinuousDtmfRecognitionWithResponse(ContinuousDtmfRecognitionOptions options, com.azure.core.util.Context context) Starts continuous Dtmf recognition.- Parameters:
options- ContinuousDtmfRecognition configuration optionscontext- Context- Returns:
- Response for successful start continuous dtmf recognition request.
-
stopContinuousDtmfRecognition
Stops continuous Dtmf recognition.- Parameters:
targetParticipant- the target participant
-
stopContinuousDtmfRecognitionWithResponse
public com.azure.core.http.rest.Response<Void> stopContinuousDtmfRecognitionWithResponse(ContinuousDtmfRecognitionOptions options, com.azure.core.util.Context context) Stops continuous Dtmf recognition.- Parameters:
options- ContinuousDtmfRecognition configuration optionscontext- Context- Returns:
- Response for successful stop continuous dtmf recognition request.
-
hold
Holds participant in call.- Parameters:
targetParticipant- the target.
-
hold
Holds participant in call.- Parameters:
targetParticipant- the target.playSource- APlaySourcerepresenting the source to play.
-
holdWithResponse
public com.azure.core.http.rest.Response<Void> holdWithResponse(HoldOptions options, com.azure.core.util.Context context) Holds participant in call.- Parameters:
options- - Different options to pass to the request.context- Context- Returns:
- Response for successful operation.
-
unhold
Removes hold from participant in call.- Parameters:
targetParticipant- the target.
-
unholdWithResponse
public com.azure.core.http.rest.Response<Void> unholdWithResponse(UnholdOptions options, com.azure.core.util.Context context) Removes hold from participant in call.- Parameters:
options- Different options to pass to the request.context- Context.- Returns:
- Response for successful operation.
-