diff --git a/sdk/communication/azure-communication-callautomation/assets.json b/sdk/communication/azure-communication-callautomation/assets.json index 824ec12c4106..c9007af83818 100644 --- a/sdk/communication/azure-communication-callautomation/assets.json +++ b/sdk/communication/azure-communication-callautomation/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/communication/azure-communication-callautomation", - "Tag": "java/communication/azure-communication-callautomation_9339e7fc0c" + "Tag": "java/communication/azure-communication-callautomation_80ad22db2d" } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationAsyncClient.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationAsyncClient.java index 2cf26d6aaae6..2314d820c46c 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationAsyncClient.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationAsyncClient.java @@ -5,13 +5,11 @@ import com.azure.communication.callautomation.implementation.AzureCommunicationCallAutomationServiceImpl; import com.azure.communication.callautomation.implementation.CallConnectionsImpl; -import com.azure.communication.callautomation.implementation.CallDialogsImpl; import com.azure.communication.callautomation.implementation.CallMediasImpl; import com.azure.communication.callautomation.implementation.CallRecordingsImpl; import com.azure.communication.callautomation.implementation.accesshelpers.CallConnectionPropertiesConstructorProxy; import com.azure.communication.callautomation.implementation.converters.CommunicationIdentifierConverter; import com.azure.communication.callautomation.implementation.converters.CommunicationUserIdentifierConverter; -import com.azure.communication.callautomation.implementation.converters.MicrosoftTeamsAppIdentifierConverter; import com.azure.communication.callautomation.implementation.converters.PhoneNumberIdentifierConverter; import com.azure.communication.callautomation.implementation.models.AnswerCallRequestInternal; import com.azure.communication.callautomation.implementation.models.AudioFormatInternal; @@ -23,15 +21,14 @@ import com.azure.communication.callautomation.implementation.models.CommunicationUserIdentifierModel; import com.azure.communication.callautomation.implementation.models.ConnectRequestInternal; import com.azure.communication.callautomation.implementation.models.CreateCallRequestInternal; -import com.azure.communication.callautomation.implementation.models.CustomCallingContext; import com.azure.communication.callautomation.implementation.models.MediaStreamingAudioChannelTypeInternal; import com.azure.communication.callautomation.implementation.models.MediaStreamingContentTypeInternal; import com.azure.communication.callautomation.implementation.models.MediaStreamingOptionsInternal; -import com.azure.communication.callautomation.implementation.models.MediaStreamingTransportTypeInternal; import com.azure.communication.callautomation.implementation.models.RedirectCallRequestInternal; import com.azure.communication.callautomation.implementation.models.RejectCallRequestInternal; import com.azure.communication.callautomation.implementation.models.TranscriptionOptionsInternal; -import com.azure.communication.callautomation.implementation.models.TranscriptionTransportTypeInternal; +import com.azure.communication.callautomation.implementation.models.WebSocketMediaStreamingOptionsInternal; +import com.azure.communication.callautomation.implementation.models.WebSocketTranscriptionOptionsInternal; import com.azure.communication.callautomation.models.AnswerCallOptions; import com.azure.communication.callautomation.models.AnswerCallResult; import com.azure.communication.callautomation.models.CallInvite; @@ -87,22 +84,18 @@ public final class CallAutomationAsyncClient { private final AzureCommunicationCallAutomationServiceImpl azureCommunicationCallAutomationServiceInternal; private final CallRecordingsImpl callRecordingsInternal; private final CallMediasImpl callMediasInternal; - private final CallDialogsImpl callDialogsInternal; private final ClientLogger logger; private final ContentDownloader contentDownloader; private final HttpPipeline httpPipelineInternal; private final String resourceUrl; private final CommunicationUserIdentifierModel sourceIdentity; - private final CallAutomationEventProcessor eventProcessor; CallAutomationAsyncClient(AzureCommunicationCallAutomationServiceImpl callServiceClient, - CommunicationUserIdentifier sourceIdentity, CallAutomationEventProcessor eventProcessor) { + CommunicationUserIdentifier sourceIdentity) { this.callConnectionsInternal = callServiceClient.getCallConnections(); this.azureCommunicationCallAutomationServiceInternal = callServiceClient; this.callRecordingsInternal = callServiceClient.getCallRecordings(); this.callMediasInternal = callServiceClient.getCallMedias(); - this.callDialogsInternal = callServiceClient.getCallDialogs(); - this.eventProcessor = eventProcessor; this.logger = new ClientLogger(CallAutomationAsyncClient.class); this.contentDownloader = new ContentDownloader(callServiceClient.getEndpoint(), callServiceClient.getHttpPipeline()); @@ -112,14 +105,6 @@ public final class CallAutomationAsyncClient { = sourceIdentity == null ? null : CommunicationUserIdentifierConverter.convert(sourceIdentity); } - /** - * Get the event processor for handling events. - * @return {@link CallAutomationEventProcessor} as event processor - */ - public CallAutomationEventProcessor getEventProcessor() { - return eventProcessor; - } - /** * Get Source Identity that is used for create and answer call * @return {@link CommunicationUserIdentifier} represent source @@ -230,11 +215,6 @@ private CreateCallRequestInternal getCreateCallRequestInternal(CreateCallOptions callIntelligenceOptionsInternal = new CallIntelligenceOptionsInternal(); callIntelligenceOptionsInternal.setCognitiveServicesEndpoint( createCallOptions.getCallIntelligenceOptions().getCognitiveServicesEndpoint()); - - if (createCallOptions.getCallIntelligenceOptions().getBackupCognitiveServicesEndpoint() != null) { - callIntelligenceOptionsInternal.setBackupCognitiveServicesEndpoint( - createCallOptions.getCallIntelligenceOptions().getBackupCognitiveServicesEndpoint()); - } } CreateCallRequestInternal request = new CreateCallRequestInternal() @@ -242,20 +222,11 @@ private CreateCallRequestInternal getCreateCallRequestInternal(CreateCallOptions PhoneNumberIdentifierConverter.convert(createCallOptions.getCallInvite().getSourceCallerIdNumber())) .setSourceDisplayName(createCallOptions.getCallInvite().getSourceDisplayName()) .setSource(sourceIdentity) - .setTeamsAppSource(MicrosoftTeamsAppIdentifierConverter.convert(createCallOptions.getTeamsAppSource())) .setTargets(targetsModel) .setCallbackUri(createCallOptions.getCallbackUrl()) .setCallIntelligenceOptions(callIntelligenceOptionsInternal) .setOperationContext(createCallOptions.getOperationContext()); - // Need to do a null check since SipHeaders and VoipHeaders are optional; If they both are null then we do not need to set custom context - if (createCallOptions.getCallInvite().getCustomCallingContext().getSipHeaders() != null - || createCallOptions.getCallInvite().getCustomCallingContext().getVoipHeaders() != null) { - CustomCallingContext customContext = new CustomCallingContext(); - customContext.setSipHeaders(createCallOptions.getCallInvite().getCustomCallingContext().getSipHeaders()); - customContext.setVoipHeaders(createCallOptions.getCallInvite().getCustomCallingContext().getVoipHeaders()); - request.setCustomCallingContext(customContext); - } if (createCallOptions.getMediaStreamingOptions() != null) { MediaStreamingOptionsInternal streamingOptionsInternal = getMediaStreamingOptionsInternal(createCallOptions.getMediaStreamingOptions()); @@ -283,11 +254,6 @@ private CreateCallRequestInternal getCreateCallRequestInternal(CreateGroupCallOp callIntelligenceOptionsInternal = new CallIntelligenceOptionsInternal(); callIntelligenceOptionsInternal.setCognitiveServicesEndpoint( createCallGroupOptions.getCallIntelligenceOptions().getCognitiveServicesEndpoint()); - - if (createCallGroupOptions.getCallIntelligenceOptions().getBackupCognitiveServicesEndpoint() != null) { - callIntelligenceOptionsInternal.setBackupCognitiveServicesEndpoint( - createCallGroupOptions.getCallIntelligenceOptions().getBackupCognitiveServicesEndpoint()); - } } CreateCallRequestInternal request = new CreateCallRequestInternal() @@ -295,19 +261,11 @@ private CreateCallRequestInternal getCreateCallRequestInternal(CreateGroupCallOp PhoneNumberIdentifierConverter.convert(createCallGroupOptions.getSourceCallIdNumber())) .setSourceDisplayName(createCallGroupOptions.getSourceDisplayName()) .setSource(sourceIdentity) - .setTeamsAppSource(MicrosoftTeamsAppIdentifierConverter.convert(createCallGroupOptions.getTeamsAppSource())) .setTargets(targetsModel) .setCallbackUri(createCallGroupOptions.getCallbackUrl()) .setCallIntelligenceOptions(callIntelligenceOptionsInternal) .setOperationContext(createCallGroupOptions.getOperationContext()); - if (createCallGroupOptions.getCustomContext().getSipHeaders() != null - || createCallGroupOptions.getCustomContext().getVoipHeaders() != null) { - CustomCallingContext customContext = new CustomCallingContext(); - customContext.setSipHeaders(createCallGroupOptions.getCustomContext().getSipHeaders()); - customContext.setVoipHeaders(createCallGroupOptions.getCustomContext().getVoipHeaders()); - request.setCustomCallingContext(customContext); - } if (createCallGroupOptions.getMediaStreamingOptions() != null) { MediaStreamingOptionsInternal streamingOptionsInternal = getMediaStreamingOptionsInternal(createCallGroupOptions.getMediaStreamingOptions()); @@ -325,13 +283,11 @@ private CreateCallRequestInternal getCreateCallRequestInternal(CreateGroupCallOp private MediaStreamingOptionsInternal getMediaStreamingOptionsInternal(MediaStreamingOptions mediaStreamingOptions) { - return new MediaStreamingOptionsInternal().setTransportUrl(mediaStreamingOptions.getTransportUrl()) + return new WebSocketMediaStreamingOptionsInternal().setTransportUrl(mediaStreamingOptions.getTransportUrl()) .setAudioChannelType(MediaStreamingAudioChannelTypeInternal .fromString(mediaStreamingOptions.getAudioChannelType().toString())) .setContentType( MediaStreamingContentTypeInternal.fromString(mediaStreamingOptions.getContentType().toString())) - .setTransportType( - MediaStreamingTransportTypeInternal.fromString(mediaStreamingOptions.getTransportType().toString())) .setStartMediaStreaming(mediaStreamingOptions.isStartMediaStreamingEnabled()) .setEnableBidirectional(mediaStreamingOptions.isEnableBidirectional()) .setAudioFormat(AudioFormatInternal.fromString(mediaStreamingOptions.getAudioFormat() != null @@ -340,13 +296,11 @@ private CreateCallRequestInternal getCreateCallRequestInternal(CreateGroupCallOp } private TranscriptionOptionsInternal getTranscriptionOptionsInternal(TranscriptionOptions transcriptionOptions) { - return new TranscriptionOptionsInternal().setTransportUrl(transcriptionOptions.getTransportUrl()) - .setTransportType( - TranscriptionTransportTypeInternal.fromString(transcriptionOptions.getTransportType().toString())) + return new WebSocketTranscriptionOptionsInternal().setTransportUrl(transcriptionOptions.getTransportUrl()) .setLocale(transcriptionOptions.getLocale()) .setStartTranscription(transcriptionOptions.getStartTranscription()) .setEnableIntermediateResults(transcriptionOptions.isIntermediateResultsEnabled()) - .setSpeechRecognitionModelEndpointId(transcriptionOptions.getSpeechRecognitionModelEndpointId()); + .setSpeechModelEndpointId(transcriptionOptions.getSpeechRecognitionModelEndpointId()); } /** @@ -394,11 +348,6 @@ Mono> answerCallWithResponseInternal(AnswerCallOption callIntelligenceOptionsInternal.setCognitiveServicesEndpoint( answerCallOptions.getCallIntelligenceOptions().getCognitiveServicesEndpoint()); - if (answerCallOptions.getCallIntelligenceOptions().getBackupCognitiveServicesEndpoint() != null) { - callIntelligenceOptionsInternal.setBackupCognitiveServicesEndpoint( - answerCallOptions.getCallIntelligenceOptions().getBackupCognitiveServicesEndpoint()); - } - request.setCallIntelligenceOptions(callIntelligenceOptionsInternal); } @@ -413,25 +362,15 @@ Mono> answerCallWithResponseInternal(AnswerCallOption = getTranscriptionOptionsInternal(answerCallOptions.getTranscriptionOptions()); request.setTranscriptionOptions(transcriptionOptionsInternal); } - if (answerCallOptions.getCustomCallingContext().getSipHeaders() != null - || answerCallOptions.getCustomCallingContext().getVoipHeaders() != null) { - CustomCallingContext customContext = new CustomCallingContext(); - customContext.setSipHeaders(answerCallOptions.getCustomCallingContext().getSipHeaders()); - customContext.setVoipHeaders(answerCallOptions.getCustomCallingContext().getVoipHeaders()); - request.setCustomCallingContext(customContext); - } return azureCommunicationCallAutomationServiceInternal.answerCallWithResponseAsync(request, context) .map(response -> { try { CallConnectionAsync callConnectionAsync = getCallConnectionAsync(response.getValue().getCallConnectionId()); - AnswerCallResult result - = new AnswerCallResult(CallConnectionPropertiesConstructorProxy.create(response.getValue()), - new CallConnection(callConnectionAsync), callConnectionAsync); - result.setEventProcessor(eventProcessor, response.getValue().getCallConnectionId(), null); - - return new SimpleResponse<>(response, result); + return new SimpleResponse<>(response, + new AnswerCallResult(CallConnectionPropertiesConstructorProxy.create(response.getValue()), + new CallConnection(callConnectionAsync), callConnectionAsync)); } catch (URISyntaxException e) { throw logger.logExceptionAsError(new RuntimeException(e)); } @@ -478,16 +417,6 @@ Mono> redirectCallWithResponseInternal(RedirectCallOptions redire .setTarget(CommunicationIdentifierConverter .convert(redirectCallOptions.getTargetParticipant().getTargetParticipant())); - // Need to do a null check since SipHeaders and VoipHeaders are optional; If they both are null then we do not need to set custom context - if (redirectCallOptions.getTargetParticipant().getCustomCallingContext().getSipHeaders() != null - || redirectCallOptions.getTargetParticipant().getCustomCallingContext().getVoipHeaders() != null) { - CustomCallingContext customContext = new CustomCallingContext(); - customContext.setSipHeaders( - redirectCallOptions.getTargetParticipant().getCustomCallingContext().getSipHeaders()); - customContext.setVoipHeaders( - redirectCallOptions.getTargetParticipant().getCustomCallingContext().getVoipHeaders()); - request.setCustomCallingContext(customContext); - } return azureCommunicationCallAutomationServiceInternal.redirectCallWithResponseAsync(request, context); } catch (RuntimeException ex) { return monoError(logger, ex); @@ -598,11 +527,6 @@ Mono> connectCallWithResponseInternal(ConnectCallOpt callIntelligenceOptionsInternal.setCognitiveServicesEndpoint( connectCallOptions.getCallIntelligenceOptions().getCognitiveServicesEndpoint()); - if (connectCallOptions.getCallIntelligenceOptions().getBackupCognitiveServicesEndpoint() != null) { - callIntelligenceOptionsInternal.setBackupCognitiveServicesEndpoint( - connectCallOptions.getCallIntelligenceOptions().getBackupCognitiveServicesEndpoint()); - } - request.setCallIntelligenceOptions(callIntelligenceOptionsInternal); } @@ -632,8 +556,7 @@ Mono> connectCallWithResponseInternal(ConnectCallOpt * @return a CallContentAsync. */ public CallConnectionAsync getCallConnectionAsync(String callConnectionId) { - return new CallConnectionAsync(callConnectionId, callConnectionsInternal, callMediasInternal, - callDialogsInternal, eventProcessor); + return new CallConnectionAsync(callConnectionId, callConnectionsInternal, callMediasInternal); } //endregion diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationClient.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationClient.java index 0fb7004ddccf..389f11d17dcd 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationClient.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationClient.java @@ -42,14 +42,6 @@ public final class CallAutomationClient { this.callAutomationAsyncClient = callAutomationAsyncClient; } - /** - * Get the event processor for handling events. - * @return {@link CallAutomationEventProcessor} as event processor - */ - public CallAutomationEventProcessor getEventProcessor() { - return callAutomationAsyncClient.getEventProcessor(); - } - /** * Get Source Identity that is used for create and answer call * @return {@link CommunicationUserIdentifier} represent source diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationClientBuilder.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationClientBuilder.java index 7ddc5d0a276e..30a224565982 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationClientBuilder.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationClientBuilder.java @@ -101,17 +101,6 @@ public CallAutomationClientBuilder endpoint(String endpoint) { return this; } - /** - * Set pma endpoint override of the service. - * - * @param pmaEndpoint url of the service. - * @return CallAutomationClientBuilder object. - */ - public CallAutomationClientBuilder pmaEndpoint(String pmaEndpoint) { - this.pmaEndpoint = Objects.requireNonNull(pmaEndpoint, "'pmaEndpoint' cannot be null."); - return this; - } - /** * Sets the {@link HttpPipeline} to use for the service client. * @@ -319,7 +308,7 @@ public CallAutomationClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { * and {@link #retryPolicy(RetryPolicy)} have been set. */ public CallAutomationAsyncClient buildAsyncClient() { - return new CallAutomationAsyncClient(createServiceImpl(), sourceIdentity, new CallAutomationEventProcessor()); + return new CallAutomationAsyncClient(createServiceImpl(), sourceIdentity); } /** diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationEventParser.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationEventParser.java index 25d626fc2c2e..ec5380353d13 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationEventParser.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationEventParser.java @@ -23,20 +23,7 @@ import com.azure.communication.callautomation.models.events.ContinuousDtmfRecognitionToneFailed; import com.azure.communication.callautomation.models.events.ContinuousDtmfRecognitionToneReceived; import com.azure.communication.callautomation.models.events.CreateCallFailed; -import com.azure.communication.callautomation.models.events.DialogCompleted; -import com.azure.communication.callautomation.models.events.DialogConsent; -import com.azure.communication.callautomation.models.events.DialogFailed; -import com.azure.communication.callautomation.models.events.DialogHangup; -import com.azure.communication.callautomation.models.events.DialogLanguageChange; -import com.azure.communication.callautomation.models.events.DialogSensitivityUpdate; -import com.azure.communication.callautomation.models.events.DialogStarted; -import com.azure.communication.callautomation.models.events.DialogTransfer; -import com.azure.communication.callautomation.models.events.HoldAudioCompleted; -import com.azure.communication.callautomation.models.events.HoldAudioPaused; -import com.azure.communication.callautomation.models.events.HoldAudioResumed; -import com.azure.communication.callautomation.models.events.HoldAudioStarted; import com.azure.communication.callautomation.models.events.HoldFailed; -import com.azure.communication.callautomation.models.events.IncomingCall; import com.azure.communication.callautomation.models.events.MediaStreamingFailed; import com.azure.communication.callautomation.models.events.MediaStreamingStarted; import com.azure.communication.callautomation.models.events.MediaStreamingStopped; @@ -44,8 +31,6 @@ import com.azure.communication.callautomation.models.events.PlayCanceled; import com.azure.communication.callautomation.models.events.PlayCompleted; import com.azure.communication.callautomation.models.events.PlayFailed; -import com.azure.communication.callautomation.models.events.PlayPaused; -import com.azure.communication.callautomation.models.events.PlayResumed; import com.azure.communication.callautomation.models.events.PlayStarted; import com.azure.communication.callautomation.models.events.RecognizeCanceled; import com.azure.communication.callautomation.models.events.RecognizeCompleted; @@ -55,7 +40,6 @@ import com.azure.communication.callautomation.models.events.RemoveParticipantSucceeded; import com.azure.communication.callautomation.models.events.SendDtmfTonesCompleted; import com.azure.communication.callautomation.models.events.SendDtmfTonesFailed; -import com.azure.communication.callautomation.models.events.StartRecordingFailed; import com.azure.communication.callautomation.models.events.TranscriptionFailed; import com.azure.communication.callautomation.models.events.TranscriptionResumed; import com.azure.communication.callautomation.models.events.TranscriptionStarted; @@ -123,8 +107,6 @@ private static CallAutomationEventBase parseSingleCloudEvent(String data, String ret = CallConnected.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.CallDisconnected")) { ret = CallDisconnected.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.IncomingCall")) { - ret = IncomingCall.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.AddParticipantFailed")) { ret = AddParticipantFailed.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.AddParticipantSucceeded")) { @@ -137,8 +119,6 @@ private static CallAutomationEventBase parseSingleCloudEvent(String data, String ret = ParticipantsUpdated.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.RecordingStateChanged")) { ret = RecordingStateChanged.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.StartRecordingFailed")) { - ret = StartRecordingFailed.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.PlayCompleted")) { ret = PlayCompleted.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.PlayFailed")) { @@ -147,10 +127,6 @@ private static CallAutomationEventBase parseSingleCloudEvent(String data, String ret = PlayStarted.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.PlayCanceled")) { ret = PlayCanceled.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.PlayPaused")) { - ret = PlayPaused.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.PlayResumed")) { - ret = PlayResumed.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.RecognizeCompleted")) { ret = RecognizeCompleted.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.RecognizeFailed")) { @@ -175,22 +151,6 @@ private static CallAutomationEventBase parseSingleCloudEvent(String data, String ret = CancelAddParticipantSucceeded.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.CancelAddParticipantFailed")) { ret = CancelAddParticipantFailed.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.DialogStarted")) { - ret = DialogStarted.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.DialogCompleted")) { - ret = DialogCompleted.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.DialogFailed")) { - ret = DialogFailed.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.DialogConsent")) { - ret = DialogConsent.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.DialogHangup")) { - ret = DialogHangup.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.DialogLanguageChange")) { - ret = DialogLanguageChange.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.DialogTransfer")) { - ret = DialogTransfer.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.DialogSensitivityUpdate")) { - ret = DialogSensitivityUpdate.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.TranscriptionStarted")) { ret = TranscriptionStarted.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.TranscriptionFailed")) { @@ -205,14 +165,6 @@ private static CallAutomationEventBase parseSingleCloudEvent(String data, String ret = AnswerFailed.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.CreateCallFailed")) { ret = CreateCallFailed.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.HoldAudioCompleted")) { - ret = HoldAudioCompleted.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.HoldAudioStarted")) { - ret = HoldAudioStarted.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.HoldAudioPaused")) { - ret = HoldAudioPaused.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.HoldAudioResumed")) { - ret = HoldAudioResumed.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.HoldFailed")) { ret = HoldFailed.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.ConnectFailed")) { diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationEventProcessor.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationEventProcessor.java deleted file mode 100644 index 03214312daee..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationEventProcessor.java +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation; - -import com.azure.communication.callautomation.implementation.eventprocessor.EventAwaiter; -import com.azure.communication.callautomation.implementation.eventprocessor.EventAwaiterOngoing; -import com.azure.communication.callautomation.implementation.eventprocessor.EventAwaiterSingleTime; -import com.azure.communication.callautomation.implementation.eventprocessor.EventBacklog; -import com.azure.communication.callautomation.implementation.eventprocessor.EventWithBacklogId; -import com.azure.communication.callautomation.implementation.eventprocessor.OngoingEventAwaiterKey; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; -import com.azure.communication.callautomation.models.events.CallDisconnected; -import com.azure.core.util.logging.ClientLogger; -import reactor.core.publisher.Mono; - -import java.time.Duration; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Objects; -import java.util.UUID; -import java.util.concurrent.ConcurrentHashMap; -import java.util.function.Consumer; -import java.util.function.Predicate; - -/** - * Call Automation's EventProcessor for incoming events for ease of use. - */ -public final class CallAutomationEventProcessor { - private final EventBacklog eventBacklog; - private final HashSet eventAwaiters; - private static final ClientLogger LOGGER = new ClientLogger(CallAutomationEventProcessor.class); - private static final int DEFAULT_EVENT_AWAITER_EXPIRATION_SECONDS = 240; - - // Key: Map entry of ConnectionId and Event class, Value: ongoingEventAwaiter - // Used to keep track of all ongoing event awaiters. - private final ConcurrentHashMap, EventAwaiterOngoing> ongoingEventAwaiters; - - /** - * Constructor of the event processor - */ - CallAutomationEventProcessor() { - eventBacklog = new EventBacklog(); - eventAwaiters = new HashSet<>(); - ongoingEventAwaiters = new ConcurrentHashMap<>(); - } - - /** - * Process incoming events. Pass incoming events to get it processed to have other method like WaitForEventProcessor to function. - * @param requestBody Incoming event request's body in string. - */ - public void processEvents(String requestBody) { - List receivedEvents = CallAutomationEventParser.parseEvents(requestBody); - if (receivedEvents.isEmpty()) { - return; - } - processEvents(receivedEvents); - } - - /** - * Process incoming events. Pass incoming events to get it processed to have other method like WaitForEventProcessor to function. - * @param events Incoming event in a list that after CallAutomationEventParser processing. - */ - public void processEvents(List events) { - // Note: There will always be only 1 event coming from the service - CallAutomationEventBase receivedEvent = events.get(0); - String backlogEventId = UUID.randomUUID().toString(); - EventWithBacklogId receivedEventWithBacklogId = eventBacklog.addEvent(backlogEventId, receivedEvent); - - // Each event awaiter should be notified and check if this is the event it is looking for. - eventAwaiters.forEach(eventAwaiter -> { - eventAwaiter.onEventsReceived(receivedEventWithBacklogId); - }); - - // If this call is about to disconnect, remove all related items in memory - if (receivedEvent instanceof CallDisconnected) { - // remove the event from eventBacklog - eventBacklog.removeEvent(backlogEventId); - // remove from ongoingevent list - removeFromOngoingEvent(receivedEvent.getCallConnectionId()); - } - } - - /** - * Wait for matching incoming event. This is blocking Call. Returns the event once it arrives in ProcessEvent method. - * @param connectionId Call connection id of the call. - * @param operationContext OperationContext of the method. - * @param eventType The event type that is being waited. - * @return Returns the event once matching event arrives. - * @param Any CallAutomation events. - */ - public TEvent waitForEventProcessor(String connectionId, - String operationContext, Class eventType) { - return waitForEventProcessorAsync(connectionId, operationContext, eventType).block(); - } - - /** - * Wait for matching incoming event. This is blocking Call. Returns the event once it arrives in ProcessEvent method. - * @param connectionId Call connection id of the call. - * @param operationContext OperationContext of the method. - * @param eventType The event type that is being waited. - * @param timeout The timeout duration for the event to arrive. - * @return Returns the event once matching event arrives. - * @param Any CallAutomation events. - */ - public TEvent waitForEventProcessor(String connectionId, - String operationContext, Class eventType, Duration timeout) { - return waitForEventProcessorAsync(connectionId, operationContext, eventType, timeout).block(); - } - - /** - * Wait for matching incoming event. This is blocking Call. Returns the event once it arrives in ProcessEvent method. - * @param predicate Predicate for waiting on event. - * @return Returns the event once matching event arrives. - */ - public CallAutomationEventBase waitForEventProcessor(Predicate predicate) { - return waitForEventProcessorAsync(predicate).block(); - } - - /** - * Wait for matching incoming event. This is blocking Call. Returns the event once it arrives in ProcessEvent method. - * @param predicate Predicate for waiting on event. - * @param timeout The timeout duration for the event to arrive. - * @return Returns the event once matching event arrives. - */ - public CallAutomationEventBase waitForEventProcessor(Predicate predicate, - Duration timeout) { - return waitForEventProcessorAsync(predicate, timeout).block(); - } - - /** - * Wait for matching incoming event. Returns the event once it arrives in ProcessEvent method. - * @param connectionId Call connection id of the call. - * @param operationContext OperationContext of the method. - * @param eventType The event type that is being waited. - * @return Returns the event once matching event arrives. - * @param Any CallAutomation events. - */ - @SuppressWarnings("unchecked") - public Mono waitForEventProcessorAsync(String connectionId, - String operationContext, Class eventType) { - return waitForEventProcessorAsync(connectionId, operationContext, eventType, - Duration.ofSeconds(DEFAULT_EVENT_AWAITER_EXPIRATION_SECONDS)); - } - - /** - * Wait for matching incoming event. Returns the event once it arrives in ProcessEvent method. - * @param connectionId Call connection id of the call. - * @param operationContext OperationContext of the method. - * @param eventType The event type that is being waited. - * @param timeout The timeout duration for the event to arrive. - * @return Returns the event once matching event arrives. - * @param Any CallAutomation events. - */ - @SuppressWarnings("unchecked") - public Mono waitForEventProcessorAsync(String connectionId, - String operationContext, Class eventType, Duration timeout) { - Mono ret = waitForEventProcessorAsync( - event -> (Objects.equals(event.getCallConnectionId(), connectionId) || Objects.isNull(connectionId)) - && (Objects.equals(event.getOperationContext(), operationContext) || Objects.isNull(operationContext)) - && event.getClass() == eventType, - timeout); - - return ret.map(event -> event == null ? null : (TEvent) event); - } - - /** - * Wait for matching incoming event. Returns the event once it arrives in ProcessEvent method. - * @param predicate Predicate for waiting on event. - * @return Returns the event once matching event arrives. - * @throws RuntimeException all checked exceptions if the logic fails. - */ - public Mono waitForEventProcessorAsync(Predicate predicate) { - return waitForEventProcessorAsync(predicate, Duration.ofSeconds(DEFAULT_EVENT_AWAITER_EXPIRATION_SECONDS)); - } - - /** - * Wait for matching incoming event. Returns the event once it arrives in ProcessEvent method. - * @param predicate Predicate for waiting on event. - * @param timeout The timeout duration for the event to arrive. - * @return Returns the event once matching event arrives. - * @throws RuntimeException all checked exceptions if the logic fails. - */ - public Mono waitForEventProcessorAsync(Predicate predicate, - Duration timeout) { - // Initialize awaiter - EventAwaiterSingleTime eventAwaiterSingleTime = new EventAwaiterSingleTime(predicate); - - try { - // Queue it into the subscriber list. - eventAwaiters.add(eventAwaiterSingleTime); - - EventWithBacklogId eventWithBacklogId = eventBacklog.tryGetAndRemoveMatchedEvent(predicate); - - if (eventWithBacklogId == null) { - // If event comes to backlog later before the awaiter expires, ret will get that event, otherwise a timeout exception will throw. - Mono futureEventWithBacklogId - = eventAwaiterSingleTime.getEventWithBacklogId().timeout(timeout); - futureEventWithBacklogId.subscribe(event -> { - eventBacklog.removeEvent(event.getBackLogEventId()); - // Remove the awaiter since the event is found or the awaiter is expired. - eventAwaiters.remove(eventAwaiterSingleTime); - eventAwaiterSingleTime.close(); - }); - return futureEventWithBacklogId.map(EventWithBacklogId::getEvent); - } else { - // Remove the awaiter since the event is found or the awaiter is expired. - eventAwaiters.remove(eventAwaiterSingleTime); - eventAwaiterSingleTime.close(); - return Mono.just(eventWithBacklogId.getEvent()); - } - } catch (Exception e) { - if (!eventAwaiterSingleTime.isDisposed()) { - eventAwaiters.remove(eventAwaiterSingleTime); - eventAwaiterSingleTime.close(); - } - throw LOGGER.logExceptionAsError(new RuntimeException(e)); - } - } - - /** - * Attach Ongoing EventProcessor for specific event. - * @param callConnectionId The call connection id of the call. - * @param eventProcessor EventProcessor to be fired when the specified event arrives. - * @param eventType The event type that is being waited. - * @param Any CallAutomation events. - */ - public void attachOngoingEventProcessor(String callConnectionId, - Consumer eventProcessor, Class eventType) { - EventAwaiterOngoing eventAwaiterOngoing - = new EventAwaiterOngoing<>(eventType, callConnectionId, eventProcessor); - - try { - // Queue it into the subscriber list. - eventAwaiters.add(eventAwaiterOngoing); - ongoingEventAwaiters.put(new OngoingEventAwaiterKey<>(callConnectionId, eventType), eventAwaiterOngoing); - } catch (Exception e) { - if (!eventAwaiterOngoing.isDisposed()) { - OngoingEventAwaiterKey removalKey = ongoingEventAwaiters.searchKeys(1, key -> { - if (Objects.equals(key.getCallConnectionId(), callConnectionId) && key.getClazz() == eventType) { - return key; - } - return null; - }); - - if (removalKey != null) { - ongoingEventAwaiters.remove(removalKey); - eventAwaiters.remove(eventAwaiterOngoing); - } - } - } - } - - /** - * Detach Ongoing EventProcessor for specific event. - * @param callConnectionId The call connection id of the call. - * @param eventType The event type that is being waited. - * @param Any CallAutomation events. - */ - public void detachOngoingEventProcessor(String callConnectionId, - Class eventType) { - removeFromOngoingEvent(callConnectionId, eventType); - } - - private void removeFromOngoingEvent(String connectionId) { - removeFromOngoingEvent(connectionId, null); - } - - private void removeFromOngoingEvent(String connectionId, - Class clazz) { - if (clazz == null) { - // Remove all matching connectionId - List> keysToRemove = new ArrayList<>(); - ongoingEventAwaiters.forEachKey(1, key -> { - if (Objects.equals(key.getCallConnectionId(), connectionId)) { - keysToRemove.add(key); - } - }); - keysToRemove.forEach(key -> { - EventAwaiterOngoing awaiterOngoingToBeRemoved = ongoingEventAwaiters.remove(key); - eventAwaiters.remove(awaiterOngoingToBeRemoved); - }); - } else { - OngoingEventAwaiterKey removalKey = ongoingEventAwaiters.searchKeys(1, key -> { - if (Objects.equals(key.getCallConnectionId(), connectionId) && key.getClazz() == clazz) { - return key; - } - return null; - }); - - if (removalKey != null) { - EventAwaiterOngoing awaiterOngoingToBeRemoved = ongoingEventAwaiters.remove(removalKey); - eventAwaiters.remove(awaiterOngoingToBeRemoved); - } - } - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationServiceVersion.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationServiceVersion.java index 895cebe280bc..c7409ab1b0c8 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationServiceVersion.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationServiceVersion.java @@ -11,8 +11,8 @@ public enum CallAutomationServiceVersion implements ServiceVersion { /** - * Service version {@code 2023-03-06}. - */ + * Service version {@code 2023-03-06}. + */ V2023_03_06("2023-03-06"), /** @@ -26,29 +26,14 @@ public enum CallAutomationServiceVersion implements ServiceVersion { V2024_04_15("2024-04-15"), /** - * Service version {@code 2024-09-15}. - */ - V2024_09_15("2024-09-15"), - - /** - * Service version {@code 2024-06-15-preview}. + * Service version {@code 2024-09-15}. */ - V2024_06_15_PREVIEW("2024-06-15-preview"), - - /** - * Service version {@code 2024-06-15-preview}. - */ - V2024_11_15_PREVIEW("2024-11-15-preview"), - - /** - * Service version {@code 2023-10-03-preview}. - */ - V2023_10_03_PREVIEW("2023-10-03-preview"), + V2024_09_15("2024-09-15"), /** - * Service version {@code 2024-2024-01-preview}. + * Service version {@code 2025-05-15}. */ - V2024_09_01_PREVIEW("2024-09-01-preview"); + V2025_05_15("2025-05-15"); private final String version; @@ -70,6 +55,6 @@ public String getVersion() { * @return The latest {@link CallAutomationServiceVersion} object. */ public static CallAutomationServiceVersion getLatest() { - return V2024_09_01_PREVIEW; + return V2025_05_15; } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnection.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnection.java index 12c52e666dcb..d975bc9d99a6 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnection.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnection.java @@ -16,8 +16,6 @@ import com.azure.communication.callautomation.models.RemoveParticipantResult; import com.azure.communication.callautomation.models.TransferCallResult; import com.azure.communication.callautomation.models.TransferCallToParticipantOptions; -import com.azure.communication.callautomation.models.UnmuteParticipantOptions; -import com.azure.communication.callautomation.models.UnmuteParticipantResult; import com.azure.communication.common.CommunicationIdentifier; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; @@ -250,30 +248,6 @@ public Response muteParticipantWithResponse(MuteParticipa return callConnectionAsync.muteParticipantWithResponseInternal(options, context).block(); } - /** - * Unmutes participant in the call. - * - * @param targetParticipant - Participant to be unmuted. Only ACS Users are currently supported. - * @return An UnmuteParticipantResult object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UnmuteParticipantResult unmuteParticipant(CommunicationIdentifier targetParticipant) { - return callConnectionAsync.unmuteParticipant(targetParticipant).block(); - } - - /** - * Unmutes participant in the call. - * - * @param options - Options for the request. - * @param context A {@link Context} representing the request context. - * @return a Response containing the UnmuteParticipantResult object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response unmuteParticipantWithResponse(UnmuteParticipantOptions options, - Context context) { - return callConnectionAsync.unmuteParticipantWithResponseInternal(options, context).block(); - } - /** * Cancel add participant operation request. * @@ -314,16 +288,5 @@ public Response cancelAddParticipantOperati public CallMedia getCallMedia() { return new CallMedia(callConnectionAsync.getCallMediaAsync()); } - - /*** - * Returns an object of CallDialog - * - * @return a CallDialogAsync. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CallDialog getCallDialog() { - return new CallDialog(callConnectionAsync.getCallDialogAsync()); - } - //endregion } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnectionAsync.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnectionAsync.java index ee9e25f2cb36..9426805497bb 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnectionAsync.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnectionAsync.java @@ -4,7 +4,6 @@ package com.azure.communication.callautomation; import com.azure.communication.callautomation.implementation.CallConnectionsImpl; -import com.azure.communication.callautomation.implementation.CallDialogsImpl; import com.azure.communication.callautomation.implementation.CallMediasImpl; import com.azure.communication.callautomation.implementation.accesshelpers.AddParticipantResponseConstructorProxy; import com.azure.communication.callautomation.implementation.accesshelpers.CallConnectionPropertiesConstructorProxy; @@ -12,7 +11,6 @@ import com.azure.communication.callautomation.implementation.accesshelpers.MuteParticipantsResponseConstructorProxy; import com.azure.communication.callautomation.implementation.accesshelpers.RemoveParticipantResponseConstructorProxy; import com.azure.communication.callautomation.implementation.accesshelpers.TransferCallResponseConstructorProxy; -import com.azure.communication.callautomation.implementation.accesshelpers.UnmuteParticipantsResponseConstructorProxy; import com.azure.communication.callautomation.implementation.converters.CallParticipantConverter; import com.azure.communication.callautomation.implementation.converters.CommunicationIdentifierConverter; import com.azure.communication.callautomation.implementation.converters.PhoneNumberIdentifierConverter; @@ -22,7 +20,6 @@ import com.azure.communication.callautomation.implementation.models.MuteParticipantsRequestInternal; import com.azure.communication.callautomation.implementation.models.RemoveParticipantRequestInternal; import com.azure.communication.callautomation.implementation.models.TransferToParticipantRequestInternal; -import com.azure.communication.callautomation.implementation.models.UnmuteParticipantsRequestInternal; import com.azure.communication.callautomation.models.AddParticipantOptions; import com.azure.communication.callautomation.models.AddParticipantResult; import com.azure.communication.callautomation.models.CallConnectionProperties; @@ -36,8 +33,6 @@ import com.azure.communication.callautomation.models.RemoveParticipantResult; import com.azure.communication.callautomation.models.TransferCallResult; import com.azure.communication.callautomation.models.TransferCallToParticipantOptions; -import com.azure.communication.callautomation.models.UnmuteParticipantOptions; -import com.azure.communication.callautomation.models.UnmuteParticipantResult; import com.azure.communication.common.CommunicationIdentifier; import com.azure.communication.common.CommunicationUserIdentifier; import com.azure.communication.common.MicrosoftTeamsAppIdentifier; @@ -70,17 +65,13 @@ public final class CallConnectionAsync { private final String callConnectionId; private final CallConnectionsImpl callConnectionInternal; private final CallMediasImpl callMediasInternal; - private final CallDialogsImpl callDialogsInternal; - private final CallAutomationEventProcessor eventProcessor; private final ClientLogger logger; CallConnectionAsync(String callConnectionId, CallConnectionsImpl callConnectionInternal, - CallMediasImpl contentsInternal, CallDialogsImpl dialogsInternal, CallAutomationEventProcessor eventProcessor) { + CallMediasImpl contentsInternal) { this.callConnectionId = callConnectionId; this.callConnectionInternal = callConnectionInternal; this.callMediasInternal = contentsInternal; - this.callDialogsInternal = dialogsInternal; - this.eventProcessor = eventProcessor; this.logger = new ClientLogger(CallConnectionAsync.class); } @@ -314,11 +305,8 @@ Mono> transferCallToParticipantWithResponseInternal } return callConnectionInternal.transferToParticipantWithResponseAsync(callConnectionId, request, context) - .map(response -> { - TransferCallResult result = TransferCallResponseConstructorProxy.create(response.getValue()); - result.setEventProcessor(eventProcessor, callConnectionId, result.getOperationContext()); - return new SimpleResponse<>(response, result); - }); + .map(response -> new SimpleResponse<>(response, + TransferCallResponseConstructorProxy.create(response.getValue()))); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -380,11 +368,8 @@ Mono> addParticipantWithResponseInternal(AddParti } return callConnectionInternal.addParticipantWithResponseAsync(callConnectionId, request, context) - .map(response -> { - AddParticipantResult result = AddParticipantResponseConstructorProxy.create(response.getValue()); - result.setEventProcessor(eventProcessor, callConnectionId, result.getOperationContext()); - return new SimpleResponse<>(response, result); - }); + .map(response -> new SimpleResponse<>(response, + AddParticipantResponseConstructorProxy.create(response.getValue()))); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -430,12 +415,8 @@ public Mono removeParticipant(CommunicationIdentifier p .setOperationCallbackUri(removeParticipantOptions.getOperationCallbackUrl()); return callConnectionInternal.removeParticipantWithResponseAsync(callConnectionId, request, context) - .map(response -> { - RemoveParticipantResult result - = RemoveParticipantResponseConstructorProxy.create(response.getValue()); - result.setEventProcessor(eventProcessor, callConnectionId, result.getOperationContext()); - return new SimpleResponse<>(response, result); - }); + .map(response -> new SimpleResponse<>(response, + RemoveParticipantResponseConstructorProxy.create(response.getValue()))); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -481,45 +462,6 @@ Mono> muteParticipantWithResponseInternal(MutePa } } - /** - * Unmutes participant in the call. - * @param targetParticipant - Participant to be unmuted. Only ACS Users are currently supported. - * @return An UnmuteParticipantResult object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono unmuteParticipant(CommunicationIdentifier targetParticipant) { - return unmuteParticipantWithResponseInternal(new UnmuteParticipantOptions(targetParticipant), null) - .flatMap(FluxUtil::toMono); - } - - /** - * Unmute participants in the call. - * @param unmuteParticipantOptions - Options for the request. - * @return a Response containing the UnmuteParticipantResult object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - unmuteParticipantWithResponse(UnmuteParticipantOptions unmuteParticipantOptions) { - return withContext(context -> unmuteParticipantWithResponseInternal(unmuteParticipantOptions, context)); - } - - Mono> - unmuteParticipantWithResponseInternal(UnmuteParticipantOptions unmuteParticipantOptions, Context context) { - try { - context = context == null ? Context.NONE : context; - UnmuteParticipantsRequestInternal request = new UnmuteParticipantsRequestInternal() - .setTargetParticipants(Collections.singletonList( - CommunicationIdentifierConverter.convert(unmuteParticipantOptions.getTargetParticipant()))) - .setOperationContext(unmuteParticipantOptions.getOperationContext()); - - return callConnectionInternal.unmuteWithResponseAsync(callConnectionId, request, context) - .map(internalResponse -> new SimpleResponse<>(internalResponse, - UnmuteParticipantsResponseConstructorProxy.create(internalResponse.getValue()))); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - /** * Cancel add participant operation request. * @@ -560,12 +502,8 @@ Mono> cancelAddParticipantOperatio .setOperationCallbackUri(cancelAddParticipantOperationOptions.getOperationCallbackUrl()); return callConnectionInternal.cancelAddParticipantWithResponseAsync(callConnectionId, request, context) - .map(response -> { - CancelAddParticipantOperationResult result - = CancelAddParticipantResponseConstructorProxy.create(response.getValue()); - result.setEventProcessor(eventProcessor, callConnectionId, result.getOperationContext()); - return new SimpleResponse<>(response, result); - }); + .map(response -> new SimpleResponse<>(response, + CancelAddParticipantResponseConstructorProxy.create(response.getValue()))); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -581,15 +519,5 @@ Mono> cancelAddParticipantOperatio public CallMediaAsync getCallMediaAsync() { return new CallMediaAsync(callConnectionId, callMediasInternal); } - - /*** - * Returns an object of CallDialogAsync - * - * @return a CallDialogAsync. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CallDialogAsync getCallDialogAsync() { - return new CallDialogAsync(callConnectionId, callDialogsInternal); - } //endregion } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallDialog.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallDialog.java deleted file mode 100644 index d0dee1bfa4db..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallDialog.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation; - -import com.azure.core.util.Context; -import com.azure.communication.callautomation.models.DialogStateResult; -import com.azure.communication.callautomation.models.StartDialogOptions; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.exception.HttpResponseException; -import com.azure.core.http.rest.Response; - -/** - * CallDialog. - */ -public final class CallDialog { - - /** - * Instance of CallDialogAsync. - */ - private final CallDialogAsync callDialogAsync; - - /** - * Constructor. - * - * @param callDialogAsync callDialogAsync - */ - CallDialog(CallDialogAsync callDialogAsync) { - this.callDialogAsync = callDialogAsync; - } - - /** - * Start Dialog - * - * @param options A {@link StartDialogOptions} object containing different options for startDialog. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return Response for successful startDialog request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DialogStateResult startDialog(StartDialogOptions options) { - return callDialogAsync.startDialog(options).block(); - } - - /** - * Start Dialog - * - * @param options A {@link StartDialogOptions} object containing different options for startDialog. - * @param context The context to associate with this operation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return Response for successful startDialog request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response startDialogWithResponse(StartDialogOptions options, Context context) { - return callDialogAsync.startDialogWithResponseInternal(options, context).block(); - } - - /** - * Stop Dialog - * - * @param dialogId The dialog id. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void stopDialog(String dialogId) { - callDialogAsync.stopDialog(dialogId).block(); - } - - /** - * Stop Dialog - * - * @param dialogId The dialog id. - * @param context The context to associate with this operation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return Response for successful stopDialog request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response stopDialogWithResponse(String dialogId, Context context) { - return callDialogAsync.stopDialogWithResponseInternal(dialogId, context).block(); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallDialogAsync.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallDialogAsync.java deleted file mode 100644 index bdb493c54990..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallDialogAsync.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation; - -import com.azure.communication.callautomation.implementation.CallDialogsImpl; -import com.azure.communication.callautomation.implementation.accesshelpers.DialogStateResponseConstructorProxy; -import com.azure.communication.callautomation.implementation.models.BaseDialog; -import com.azure.communication.callautomation.implementation.models.StartDialogRequestInternal; -import com.azure.communication.callautomation.implementation.models.PowerVirtualAgentsDialog; -import com.azure.communication.callautomation.implementation.models.AzureOpenAIDialog; -import com.azure.communication.callautomation.models.DialogStateResult; -import com.azure.communication.callautomation.models.StartDialogOptions; -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import reactor.core.publisher.Mono; - -import static com.azure.core.util.FluxUtil.monoError; -import static com.azure.core.util.FluxUtil.withContext; - -/** - * CallDialogAsync. - */ -public final class CallDialogAsync { - - private final CallDialogsImpl dialogsInternal; - private final String callConnectionId; - private final ClientLogger logger; - - /** - * Constructor. - * - * @param callConnectionId callConnectionId the id of the call connection - * @param callDialogInternal Internal implementation of CallDialog - */ - CallDialogAsync(String callConnectionId, CallDialogsImpl callDialogInternal) { - this.callConnectionId = callConnectionId; - this.dialogsInternal = callDialogInternal; - this.logger = new ClientLogger(CallDialogAsync.class); - } - - /** - * Start Dialog - * - * @param startDialogOptions startDialog options - * @return Response for successful startDialog request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono startDialog(StartDialogOptions startDialogOptions) { - return startDialogWithResponse(startDialogOptions).flatMap(response -> Mono.just(response.getValue())); - } - - /** - * Start Dialog - * - * @param startDialogOptions startDialog options - * @return Response for successful startDialog request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> startDialogWithResponse(StartDialogOptions startDialogOptions) { - return withContext(context -> startDialogWithResponseInternal(startDialogOptions, context)); - } - - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> startDialogWithResponseInternal(StartDialogOptions startDialogOptions, - Context context) { - try { - context = context == null ? Context.NONE : context; - - BaseDialog baseDialog = null; - if (startDialogOptions.getDialogInputType() == DialogInputType.POWER_VIRTUAL_AGENTS) { - baseDialog = new PowerVirtualAgentsDialog().setBotAppId(startDialogOptions.getBotId()) - .setContext(startDialogOptions.getDialogContext()); - } else if (startDialogOptions.getDialogInputType() == DialogInputType.AZURE_OPEN_AI) { - baseDialog = new AzureOpenAIDialog().setContext(startDialogOptions.getDialogContext()); - } - - StartDialogRequestInternal requestInternal = new StartDialogRequestInternal().setDialog(baseDialog) - .setOperationContext(startDialogOptions.getOperationContext()); - - return dialogsInternal - .startDialogWithResponseAsync(callConnectionId, startDialogOptions.getDialogId(), requestInternal, - context) - .map(response -> new SimpleResponse<>(response, - DialogStateResponseConstructorProxy.create(response.getValue()))); - } catch (RuntimeException e) { - return monoError(logger, e); - } - } - - /** - * Stop Dialog - * - * @param dialogId The dialog id. - * @return Response for successful stopDialog request. - */ - public Mono stopDialog(String dialogId) { - return stopDialogWithResponse(dialogId).then(); - } - - /** - * Sop Dialog - * - * @param dialogId The dialog id. - * @return Response for successful stopDialog request. - */ - public Mono> stopDialogWithResponse(String dialogId) { - return withContext(context -> stopDialogWithResponseInternal(dialogId, context)); - } - - Mono> stopDialogWithResponseInternal(String dialogId, Context context) { - try { - context = context == null ? Context.NONE : context; - // TODO: FIX OperationCallbackUri - return dialogsInternal.stopDialogWithResponseAsync(callConnectionId, dialogId, null, context); - } catch (RuntimeException e) { - return monoError(logger, e); - } - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMedia.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMedia.java index 1f9a853b6ddb..77ecdc15e54d 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMedia.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMedia.java @@ -7,7 +7,6 @@ import com.azure.communication.callautomation.models.ContinuousDtmfRecognitionOptions; import com.azure.communication.callautomation.models.DtmfTone; import com.azure.communication.callautomation.models.HoldOptions; -import com.azure.communication.callautomation.models.InterruptAudioAndAnnounceOptions; import com.azure.communication.callautomation.models.UnholdOptions; import com.azure.communication.callautomation.models.PlayOptions; import com.azure.communication.callautomation.models.PlayToAllOptions; @@ -387,26 +386,4 @@ public void stopMediaStreaming() { public Response stopMediaStreamingWithResponse(StopMediaStreamingOptions options, Context context) { return callMediaAsync.stopMediaStreamingWithResponseInternal(options, context).block(); } - - /** - * Interrupt audio and play announment to the participant in call. - * @param playSource A {@link PlaySource} representing the source to play. - * @param playTo the target. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void interruptAudioAndAnnounce(PlaySource playSource, CommunicationIdentifier playTo) { - callMediaAsync.interruptAudioAndAnnounce(playSource, playTo).block(); - } - - /** - * Interrupt audio and play announment to the participant in call. - * @param options - Different options to pass to the request. - * @param context Context - * @return Response for successful operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response interruptAudioAndAnnounceWithResponse(InterruptAudioAndAnnounceOptions options, - Context context) { - return callMediaAsync.interruptAudioAndAnnounceWithResponseInternal(options, context).block(); - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMediaAsync.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMediaAsync.java index 2c8cb646d7c2..e1ca1502f955 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMediaAsync.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMediaAsync.java @@ -16,7 +16,6 @@ import com.azure.communication.callautomation.implementation.models.DtmfToneInternal; import com.azure.communication.callautomation.implementation.models.FileSourceInternal; import com.azure.communication.callautomation.implementation.models.HoldRequest; -import com.azure.communication.callautomation.implementation.models.InterruptAudioAndAnnounceRequest; import com.azure.communication.callautomation.implementation.models.PlayOptionsInternal; import com.azure.communication.callautomation.implementation.models.PlayRequest; import com.azure.communication.callautomation.implementation.models.PlaySourceInternal; @@ -45,7 +44,6 @@ import com.azure.communication.callautomation.models.DtmfTone; import com.azure.communication.callautomation.models.FileSource; import com.azure.communication.callautomation.models.HoldOptions; -import com.azure.communication.callautomation.models.InterruptAudioAndAnnounceOptions; import com.azure.communication.callautomation.models.PlayOptions; import com.azure.communication.callautomation.models.PlaySource; import com.azure.communication.callautomation.models.PlayToAllOptions; @@ -303,7 +301,6 @@ PlayRequest getPlayRequest(PlayOptions options) { request.setPlayOptions(new PlayOptionsInternal().setLoop(options.isLoop())); request.setOperationContext(options.getOperationContext()); request.setOperationCallbackUri(options.getOperationCallbackUrl()); - request.setPlayOptions(new PlayOptionsInternal().setInterruptHoldAudio(options.isInterruptHoldAudio())); return request; } @@ -333,8 +330,8 @@ PlayRequest getPlayToAllRequest(PlayToAllOptions options) { if (!playSourcesInternal.isEmpty()) { PlayRequest request = new PlayRequest().setPlaySources(playSourcesInternal); - request.setPlayOptions(new PlayOptionsInternal().setLoop(options.isLoop()) - .setInterruptCallMediaOperation(options.isInterruptCallMediaOperation())); + request.setPlayOptions(new PlayOptionsInternal().setLoop(options.isLoop())); + request.setInterruptCallMediaOperation(options.isInterruptCallMediaOperation()); request.setOperationContext(options.getOperationContext()); request.setOperationCallbackUri(options.getOperationCallbackUrl()); @@ -840,7 +837,7 @@ Mono> startTranscriptionWithResponseInternal(StartTranscriptionOp if (options != null) { request.setLocale(options.getLocale()); request.setOperationContext(options.getOperationContext()); - request.setSpeechRecognitionModelEndpointId(options.getSpeechRecognitionModelEndpointId()); + request.setSpeechModelEndpointId(options.getSpeechRecognitionModelEndpointId()); } return contentsInternal.startTranscriptionWithResponseAsync(callConnectionId, request, context); } catch (RuntimeException ex) { @@ -936,7 +933,7 @@ Mono> updateTranscriptionWithResponseInternal(String locale, Stri context = context == null ? Context.NONE : context; UpdateTranscriptionRequestInternal request = new UpdateTranscriptionRequestInternal(); request.setLocale(locale); - request.setSpeechRecognitionModelEndpointId(speechRecognitionModelEndpointId); + request.setSpeechModelEndpointId(speechRecognitionModelEndpointId); request.setOperationContext(operationContext); return contentsInternal.updateTranscriptionWithResponseAsync(callConnectionId, request, context); } catch (RuntimeException ex) { @@ -1012,50 +1009,4 @@ Mono> stopMediaStreamingWithResponseInternal(StopMediaStreamingOp return monoError(logger, ex); } } - - /** - * Interrupt audio and play announment to the participant in call. - * @param playTo the target. - * @param playSource the play source. - * @return Response for successful operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono interruptAudioAndAnnounce(PlaySource playSource, CommunicationIdentifier playTo) { - return interruptAudioAndAnnounceWithResponse(new InterruptAudioAndAnnounceOptions(playSource, playTo)) - .flatMap(FluxUtil::toMono); - } - - /** - * Interrupt audio and play announment to the participant in call. - * @param options - Different options to pass to the request. - * @return Response for successful operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> interruptAudioAndAnnounceWithResponse(InterruptAudioAndAnnounceOptions options) { - return withContext(context -> interruptAudioAndAnnounceWithResponseInternal(options, context)); - } - - Mono> interruptAudioAndAnnounceWithResponseInternal(InterruptAudioAndAnnounceOptions options, - Context context) { - try { - context = context == null ? Context.NONE : context; - List playSourcesInternal = new ArrayList<>(); - InterruptAudioAndAnnounceRequest request = new InterruptAudioAndAnnounceRequest() - .setPlayTo(CommunicationIdentifierConverter.convert(options.getPlayTo())) - .setOperationContext(options.getOperationContext()); - - if (options.getPlaySources() != null) { - for (PlaySource playSource : options.getPlaySources()) { - if (playSource != null) { - playSourcesInternal.add(convertPlaySourceToPlaySourceInternal(playSource)); - } - } - } - request.setPlaySources(playSourcesInternal); - - return contentsInternal.interruptAudioAndAnnounceWithResponseAsync(callConnectionId, request, context); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallRecordingAsync.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallRecordingAsync.java index c5290114fd79..e9a0d4672ceb 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallRecordingAsync.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallRecordingAsync.java @@ -186,9 +186,6 @@ private StartCallRecordingRequestInternal getStartCallRecordingRequest(StartReco if (options.isPauseOnStart() != null) { request.setPauseOnStart(options.isPauseOnStart()); } - if (options.getCallConnectionId() != null) { - request.setCallConnectionId(options.getCallConnectionId()); - } return request; } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/AzureCommunicationCallAutomationServiceImpl.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/AzureCommunicationCallAutomationServiceImpl.java index 9a14b998ef27..a1cf281a34a0 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/AzureCommunicationCallAutomationServiceImpl.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/AzureCommunicationCallAutomationServiceImpl.java @@ -130,20 +130,6 @@ public CallMediasImpl getCallMedias() { return this.callMedias; } - /** - * The CallDialogsImpl object to access its operations. - */ - private final CallDialogsImpl callDialogs; - - /** - * Gets the CallDialogsImpl object to access its operations. - * - * @return the CallDialogsImpl object. - */ - public CallDialogsImpl getCallDialogs() { - return this.callDialogs; - } - /** * The CallRecordingsImpl object to access its operations. */ @@ -196,7 +182,6 @@ public CallRecordingsImpl getCallRecordings() { this.apiVersion = apiVersion; this.callConnections = new CallConnectionsImpl(this); this.callMedias = new CallMediasImpl(this); - this.callDialogs = new CallDialogsImpl(this); this.callRecordings = new CallRecordingsImpl(this); this.service = RestProxy.create(AzureCommunicationCallAutomationServiceService.class, this.httpPipeline, this.getSerializerAdapter()); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/AzureCommunicationCallAutomationServiceImplBuilder.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/AzureCommunicationCallAutomationServiceImplBuilder.java index ee97c03a9306..199d36e2c4db 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/AzureCommunicationCallAutomationServiceImplBuilder.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/AzureCommunicationCallAutomationServiceImplBuilder.java @@ -271,7 +271,7 @@ public AzureCommunicationCallAutomationServiceImplBuilder retryPolicy(RetryPolic @Generated public AzureCommunicationCallAutomationServiceImpl buildClient() { HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); - String localApiVersion = (apiVersion != null) ? apiVersion : "2024-09-01-preview"; + String localApiVersion = (apiVersion != null) ? apiVersion : "2025-05-15"; SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : JacksonAdapter.createDefaultSerializerAdapter(); AzureCommunicationCallAutomationServiceImpl client = new AzureCommunicationCallAutomationServiceImpl( diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallConnectionsImpl.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallConnectionsImpl.java index b7865950d33c..f473a974953d 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallConnectionsImpl.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallConnectionsImpl.java @@ -18,8 +18,6 @@ import com.azure.communication.callautomation.implementation.models.RemoveParticipantResponseInternal; import com.azure.communication.callautomation.implementation.models.TransferCallResponseInternal; import com.azure.communication.callautomation.implementation.models.TransferToParticipantRequestInternal; -import com.azure.communication.callautomation.implementation.models.UnmuteParticipantsRequestInternal; -import com.azure.communication.callautomation.implementation.models.UnmuteParticipantsResponseInternal; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; @@ -149,16 +147,6 @@ Mono> mute(@HostParam("endpoint") Strin @HeaderParam("repeatability-request-id") String repeatabilityRequestId, @HeaderParam("repeatability-first-sent") String repeatabilityFirstSent, Context context); - @Post("/calling/callConnections/{callConnectionId}/participants:unmute") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) - Mono> unmute(@HostParam("endpoint") String endpoint, - @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") UnmuteParticipantsRequestInternal unmuteParticipantsRequest, - @HeaderParam("Accept") String accept, - @HeaderParam("repeatability-request-id") String repeatabilityRequestId, - @HeaderParam("repeatability-first-sent") String repeatabilityFirstSent, Context context); - @Post("/calling/callConnections/{callConnectionId}/participants:cancelAddParticipant") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) @@ -714,7 +702,7 @@ public PagedIterable getParticipants(String callConnect * Add a participant to the call. * * @param callConnectionId The call connection Id. - * @param addParticipantRequest The add participants request. + * @param addParticipantRequest The request payload for adding participant to the call. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -736,7 +724,7 @@ public Mono> addParticipantWithResponse * Add a participant to the call. * * @param callConnectionId The call connection Id. - * @param addParticipantRequest The add participants request. + * @param addParticipantRequest The request payload for adding participant to the call. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. @@ -758,7 +746,7 @@ public Mono> addParticipantWithResponse * Add a participant to the call. * * @param callConnectionId The call connection Id. - * @param addParticipantRequest The add participants request. + * @param addParticipantRequest The request payload for adding participant to the call. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -775,7 +763,7 @@ public Mono addParticipantAsync(String callConne * Add a participant to the call. * * @param callConnectionId The call connection Id. - * @param addParticipantRequest The add participants request. + * @param addParticipantRequest The request payload for adding participant to the call. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. @@ -793,7 +781,7 @@ public Mono addParticipantAsync(String callConne * Add a participant to the call. * * @param callConnectionId The call connection Id. - * @param addParticipantRequest The add participants request. + * @param addParticipantRequest The request payload for adding participant to the call. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. @@ -810,7 +798,7 @@ public Response addParticipantWithResponse(Strin * Add a participant to the call. * * @param callConnectionId The call connection Id. - * @param addParticipantRequest The add participants request. + * @param addParticipantRequest The request payload for adding participant to the call. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1046,118 +1034,6 @@ public MuteParticipantsResultInternal mute(String callConnectionId, return muteWithResponse(callConnectionId, muteParticipantsRequest, Context.NONE).getValue(); } - /** - * Unmute participants from the call using identifier. - * - * @param callConnectionId The call connection id. - * @param unmuteParticipantsRequest The participants to be unmuted from the call. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response payload for unmuting participants from the call along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> unmuteWithResponseAsync(String callConnectionId, - UnmuteParticipantsRequestInternal unmuteParticipantsRequest) { - final String accept = "application/json"; - String repeatabilityRequestId = UUID.randomUUID().toString(); - String repeatabilityFirstSent = DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()); - return FluxUtil.withContext( - context -> service.unmute(this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), - unmuteParticipantsRequest, accept, repeatabilityRequestId, repeatabilityFirstSent, context)); - } - - /** - * Unmute participants from the call using identifier. - * - * @param callConnectionId The call connection id. - * @param unmuteParticipantsRequest The participants to be unmuted from the call. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response payload for unmuting participants from the call along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> unmuteWithResponseAsync(String callConnectionId, - UnmuteParticipantsRequestInternal unmuteParticipantsRequest, Context context) { - final String accept = "application/json"; - String repeatabilityRequestId = UUID.randomUUID().toString(); - String repeatabilityFirstSent = DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()); - return service.unmute(this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), - unmuteParticipantsRequest, accept, repeatabilityRequestId, repeatabilityFirstSent, context); - } - - /** - * Unmute participants from the call using identifier. - * - * @param callConnectionId The call connection id. - * @param unmuteParticipantsRequest The participants to be unmuted from the call. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response payload for unmuting participants from the call on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono unmuteAsync(String callConnectionId, - UnmuteParticipantsRequestInternal unmuteParticipantsRequest) { - return unmuteWithResponseAsync(callConnectionId, unmuteParticipantsRequest) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Unmute participants from the call using identifier. - * - * @param callConnectionId The call connection id. - * @param unmuteParticipantsRequest The participants to be unmuted from the call. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response payload for unmuting participants from the call on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono unmuteAsync(String callConnectionId, - UnmuteParticipantsRequestInternal unmuteParticipantsRequest, Context context) { - return unmuteWithResponseAsync(callConnectionId, unmuteParticipantsRequest, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Unmute participants from the call using identifier. - * - * @param callConnectionId The call connection id. - * @param unmuteParticipantsRequest The participants to be unmuted from the call. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response payload for unmuting participants from the call along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response unmuteWithResponse(String callConnectionId, - UnmuteParticipantsRequestInternal unmuteParticipantsRequest, Context context) { - return unmuteWithResponseAsync(callConnectionId, unmuteParticipantsRequest, context).block(); - } - - /** - * Unmute participants from the call using identifier. - * - * @param callConnectionId The call connection id. - * @param unmuteParticipantsRequest The participants to be unmuted from the call. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response payload for unmuting participants from the call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UnmuteParticipantsResponseInternal unmute(String callConnectionId, - UnmuteParticipantsRequestInternal unmuteParticipantsRequest) { - return unmuteWithResponse(callConnectionId, unmuteParticipantsRequest, Context.NONE).getValue(); - } - /** * Cancel add participant operation. * diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallMediasImpl.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallMediasImpl.java index d0f33c422122..a0696ac44a44 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallMediasImpl.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallMediasImpl.java @@ -7,7 +7,6 @@ import com.azure.communication.callautomation.implementation.models.CommunicationErrorResponseException; import com.azure.communication.callautomation.implementation.models.ContinuousDtmfRecognitionRequestInternal; import com.azure.communication.callautomation.implementation.models.HoldRequest; -import com.azure.communication.callautomation.implementation.models.InterruptAudioAndAnnounceRequest; import com.azure.communication.callautomation.implementation.models.PlayRequest; import com.azure.communication.callautomation.implementation.models.RecognizeRequest; import com.azure.communication.callautomation.implementation.models.SendDtmfTonesRequestInternal; @@ -95,6 +94,14 @@ Mono> stopTranscription(@HostParam("endpoint") String endpoint, @BodyParam("application/json") StopTranscriptionRequestInternal stopTranscriptionRequest, @HeaderParam("Accept") String accept, Context context); + @Post("/calling/callConnections/{callConnectionId}:updateTranscription") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) + Mono> updateTranscription(@HostParam("endpoint") String endpoint, + @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") UpdateTranscriptionRequestInternal updateTranscriptionRequest, + @HeaderParam("Accept") String accept, Context context); + @Post("/calling/callConnections/{callConnectionId}:cancelAllMediaOperations") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) @@ -136,14 +143,6 @@ Mono> sendDtmfTones(@HostParam("endpoint") @HeaderParam("repeatability-request-id") String repeatabilityRequestId, @HeaderParam("repeatability-first-sent") String repeatabilityFirstSent, Context context); - @Post("/calling/callConnections/{callConnectionId}:updateTranscription") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) - Mono> updateTranscription(@HostParam("endpoint") String endpoint, - @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") UpdateTranscriptionRequestInternal updateTranscriptionRequest, - @HeaderParam("Accept") String accept, Context context); - @Post("/calling/callConnections/{callConnectionId}:hold") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) @@ -175,14 +174,6 @@ Mono> stopMediaStreaming(@HostParam("endpoint") String endpoint, @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") StopMediaStreamingRequest stopMediaStreamingRequest, @HeaderParam("Accept") String accept, Context context); - - @Post("/calling/callConnections/{callConnectionId}:interruptAudioAndAnnounce") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) - Mono> interruptAudioAndAnnounce(@HostParam("endpoint") String endpoint, - @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") InterruptAudioAndAnnounceRequest interruptRequest, - @HeaderParam("Accept") String accept, Context context); } /** @@ -489,6 +480,122 @@ public void stopTranscription(String callConnectionId, StopTranscriptionRequestI stopTranscriptionWithResponse(callConnectionId, stopTranscriptionRequest, Context.NONE); } + /** + * UpdateTranscription Api. + * + * API to change transcription language. + * + * @param callConnectionId The call connection id. + * @param updateTranscriptionRequest The UpdateTranscription request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateTranscriptionWithResponseAsync(String callConnectionId, + UpdateTranscriptionRequestInternal updateTranscriptionRequest) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.updateTranscription(this.client.getEndpoint(), callConnectionId, + this.client.getApiVersion(), updateTranscriptionRequest, accept, context)); + } + + /** + * UpdateTranscription Api. + * + * API to change transcription language. + * + * @param callConnectionId The call connection id. + * @param updateTranscriptionRequest The UpdateTranscription request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateTranscriptionWithResponseAsync(String callConnectionId, + UpdateTranscriptionRequestInternal updateTranscriptionRequest, Context context) { + final String accept = "application/json"; + return service.updateTranscription(this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), + updateTranscriptionRequest, accept, context); + } + + /** + * UpdateTranscription Api. + * + * API to change transcription language. + * + * @param callConnectionId The call connection id. + * @param updateTranscriptionRequest The UpdateTranscription request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateTranscriptionAsync(String callConnectionId, + UpdateTranscriptionRequestInternal updateTranscriptionRequest) { + return updateTranscriptionWithResponseAsync(callConnectionId, updateTranscriptionRequest) + .flatMap(ignored -> Mono.empty()); + } + + /** + * UpdateTranscription Api. + * + * API to change transcription language. + * + * @param callConnectionId The call connection id. + * @param updateTranscriptionRequest The UpdateTranscription request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateTranscriptionAsync(String callConnectionId, + UpdateTranscriptionRequestInternal updateTranscriptionRequest, Context context) { + return updateTranscriptionWithResponseAsync(callConnectionId, updateTranscriptionRequest, context) + .flatMap(ignored -> Mono.empty()); + } + + /** + * UpdateTranscription Api. + * + * API to change transcription language. + * + * @param callConnectionId The call connection id. + * @param updateTranscriptionRequest The UpdateTranscription request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateTranscriptionWithResponse(String callConnectionId, + UpdateTranscriptionRequestInternal updateTranscriptionRequest, Context context) { + return updateTranscriptionWithResponseAsync(callConnectionId, updateTranscriptionRequest, context).block(); + } + + /** + * UpdateTranscription Api. + * + * API to change transcription language. + * + * @param callConnectionId The call connection id. + * @param updateTranscriptionRequest The UpdateTranscription request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void updateTranscription(String callConnectionId, + UpdateTranscriptionRequestInternal updateTranscriptionRequest) { + updateTranscriptionWithResponse(callConnectionId, updateTranscriptionRequest, Context.NONE); + } + /** * Cancel all media operations in a call. * @@ -997,122 +1104,6 @@ public SendDtmfTonesResultInternal sendDtmfTones(String callConnectionId, return sendDtmfTonesWithResponse(callConnectionId, sendDtmfTonesRequest, Context.NONE).getValue(); } - /** - * UpdateTranscription Api. - * - * API to change transcription language. - * - * @param callConnectionId The call connection id. - * @param updateTranscriptionRequest The UpdateTranscription request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateTranscriptionWithResponseAsync(String callConnectionId, - UpdateTranscriptionRequestInternal updateTranscriptionRequest) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.updateTranscription(this.client.getEndpoint(), callConnectionId, - this.client.getApiVersion(), updateTranscriptionRequest, accept, context)); - } - - /** - * UpdateTranscription Api. - * - * API to change transcription language. - * - * @param callConnectionId The call connection id. - * @param updateTranscriptionRequest The UpdateTranscription request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateTranscriptionWithResponseAsync(String callConnectionId, - UpdateTranscriptionRequestInternal updateTranscriptionRequest, Context context) { - final String accept = "application/json"; - return service.updateTranscription(this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), - updateTranscriptionRequest, accept, context); - } - - /** - * UpdateTranscription Api. - * - * API to change transcription language. - * - * @param callConnectionId The call connection id. - * @param updateTranscriptionRequest The UpdateTranscription request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateTranscriptionAsync(String callConnectionId, - UpdateTranscriptionRequestInternal updateTranscriptionRequest) { - return updateTranscriptionWithResponseAsync(callConnectionId, updateTranscriptionRequest) - .flatMap(ignored -> Mono.empty()); - } - - /** - * UpdateTranscription Api. - * - * API to change transcription language. - * - * @param callConnectionId The call connection id. - * @param updateTranscriptionRequest The UpdateTranscription request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateTranscriptionAsync(String callConnectionId, - UpdateTranscriptionRequestInternal updateTranscriptionRequest, Context context) { - return updateTranscriptionWithResponseAsync(callConnectionId, updateTranscriptionRequest, context) - .flatMap(ignored -> Mono.empty()); - } - - /** - * UpdateTranscription Api. - * - * API to change transcription language. - * - * @param callConnectionId The call connection id. - * @param updateTranscriptionRequest The UpdateTranscription request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateTranscriptionWithResponse(String callConnectionId, - UpdateTranscriptionRequestInternal updateTranscriptionRequest, Context context) { - return updateTranscriptionWithResponseAsync(callConnectionId, updateTranscriptionRequest, context).block(); - } - - /** - * UpdateTranscription Api. - * - * API to change transcription language. - * - * @param callConnectionId The call connection id. - * @param updateTranscriptionRequest The UpdateTranscription request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void updateTranscription(String callConnectionId, - UpdateTranscriptionRequestInternal updateTranscriptionRequest) { - updateTranscriptionWithResponse(callConnectionId, updateTranscriptionRequest, Context.NONE); - } - /** * Hold participant from the call using identifier. * @@ -1536,107 +1527,4 @@ public Response stopMediaStreamingWithResponse(String callConnectionId, public void stopMediaStreaming(String callConnectionId, StopMediaStreamingRequest stopMediaStreamingRequest) { stopMediaStreamingWithResponse(callConnectionId, stopMediaStreamingRequest, Context.NONE); } - - /** - * Plays audio to participants in the call. - * - * @param callConnectionId The call connection id. - * @param interruptRequest play request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> interruptAudioAndAnnounceWithResponseAsync(String callConnectionId, - InterruptAudioAndAnnounceRequest interruptRequest) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.interruptAudioAndAnnounce(this.client.getEndpoint(), - callConnectionId, this.client.getApiVersion(), interruptRequest, accept, context)); - } - - /** - * Plays audio to participants in the call. - * - * @param callConnectionId The call connection id. - * @param interruptRequest play request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> interruptAudioAndAnnounceWithResponseAsync(String callConnectionId, - InterruptAudioAndAnnounceRequest interruptRequest, Context context) { - final String accept = "application/json"; - return service.interruptAudioAndAnnounce(this.client.getEndpoint(), callConnectionId, - this.client.getApiVersion(), interruptRequest, accept, context); - } - - /** - * Plays audio to participants in the call. - * - * @param callConnectionId The call connection id. - * @param interruptRequest play request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono interruptAudioAndAnnounceAsync(String callConnectionId, - InterruptAudioAndAnnounceRequest interruptRequest) { - return interruptAudioAndAnnounceWithResponseAsync(callConnectionId, interruptRequest) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Plays audio to participants in the call. - * - * @param callConnectionId The call connection id. - * @param interruptRequest play request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono interruptAudioAndAnnounceAsync(String callConnectionId, - InterruptAudioAndAnnounceRequest interruptRequest, Context context) { - return interruptAudioAndAnnounceWithResponseAsync(callConnectionId, interruptRequest, context) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Plays audio to participants in the call. - * - * @param callConnectionId The call connection id. - * @param interruptRequest play request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response interruptAudioAndAnnounceWithResponse(String callConnectionId, - InterruptAudioAndAnnounceRequest interruptRequest, Context context) { - return interruptAudioAndAnnounceWithResponseAsync(callConnectionId, interruptRequest, context).block(); - } - - /** - * Plays audio to participants in the call. - * - * @param callConnectionId The call connection id. - * @param interruptRequest play request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void interruptAudioAndAnnounce(String callConnectionId, InterruptAudioAndAnnounceRequest interruptRequest) { - interruptAudioAndAnnounceWithResponse(callConnectionId, interruptRequest, Context.NONE); - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallRecordingsImpl.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallRecordingsImpl.java index 574d7c291acd..4e48ba94799d 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallRecordingsImpl.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallRecordingsImpl.java @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation; import com.azure.communication.callautomation.implementation.models.CommunicationErrorResponseException; -import com.azure.communication.callautomation.implementation.models.RecordingResultResponse; import com.azure.communication.callautomation.implementation.models.RecordingStateResponseInternal; import com.azure.communication.callautomation.implementation.models.StartCallRecordingRequestInternal; import com.azure.core.annotation.BodyParam; @@ -100,13 +99,6 @@ Mono> pauseRecording(@HostParam("endpoint") String endpoint, Mono> resumeRecording(@HostParam("endpoint") String endpoint, @PathParam("recordingId") String recordingId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Get("/calling/recordings/{recordingId}/result") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) - Mono> getRecordingResult(@HostParam("endpoint") String endpoint, - @PathParam("recordingId") String recordingId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); } /** @@ -574,97 +566,4 @@ public Response resumeRecordingWithResponse(String recordingId, Context co public void resumeRecording(String recordingId) { resumeRecordingWithResponse(recordingId, Context.NONE); } - - /** - * Get recording result. This includes the download URLs for the recording chunks. - * - * @param recordingId The recording id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recording result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getRecordingResultWithResponseAsync(String recordingId) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.getRecordingResult(this.client.getEndpoint(), recordingId, - this.client.getApiVersion(), accept, context)); - } - - /** - * Get recording result. This includes the download URLs for the recording chunks. - * - * @param recordingId The recording id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recording result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getRecordingResultWithResponseAsync(String recordingId, - Context context) { - final String accept = "application/json"; - return service.getRecordingResult(this.client.getEndpoint(), recordingId, this.client.getApiVersion(), accept, - context); - } - - /** - * Get recording result. This includes the download URLs for the recording chunks. - * - * @param recordingId The recording id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recording result on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getRecordingResultAsync(String recordingId) { - return getRecordingResultWithResponseAsync(recordingId).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get recording result. This includes the download URLs for the recording chunks. - * - * @param recordingId The recording id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recording result on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getRecordingResultAsync(String recordingId, Context context) { - return getRecordingResultWithResponseAsync(recordingId, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get recording result. This includes the download URLs for the recording chunks. - * - * @param recordingId The recording id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recording result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRecordingResultWithResponse(String recordingId, Context context) { - return getRecordingResultWithResponseAsync(recordingId, context).block(); - } - - /** - * Get recording result. This includes the download URLs for the recording chunks. - * - * @param recordingId The recording id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws CommunicationErrorResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recording result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecordingResultResponse getRecordingResult(String recordingId) { - return getRecordingResultWithResponse(recordingId, Context.NONE).getValue(); - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/DialogStateResponseConstructorProxy.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/DialogStateResponseConstructorProxy.java deleted file mode 100644 index 82bb62ff8d49..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/DialogStateResponseConstructorProxy.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.implementation.accesshelpers; - -import com.azure.communication.callautomation.implementation.models.DialogStateResponse; -import com.azure.communication.callautomation.models.DialogStateResult; - -/** - * Helper class to access private values of {@link DialogStateResult} across package boundaries. - */ -public final class DialogStateResponseConstructorProxy { - private static DialogStateResponseConstructorProxy.DialogStateResponseConstructorAccessor accessor; - - private DialogStateResponseConstructorProxy() { - } - - /** - * Type defining the methods to set the non-public properties of a {@link DialogStateResponseConstructorProxy.DialogStateResponseConstructorAccessor} - * instance. - */ - public interface DialogStateResponseConstructorAccessor { - /** - * Creates a new instance of {@link DialogStateResult} backed by an internal instance of - * {@link DialogStateResult}. - * - * @param internalResponse The internal response. - * @return A new instance of {@link DialogStateResult}. - */ - DialogStateResult create(DialogStateResponse internalResponse); - } - - /** - * The method called from {@link DialogStateResult} to set it's accessor. - * - * @param accessor The accessor. - */ - public static void - setAccessor(final DialogStateResponseConstructorProxy.DialogStateResponseConstructorAccessor accessor) { - DialogStateResponseConstructorProxy.accessor = accessor; - } - - /** - * Creates a new instance of {@link DialogStateResult} backed by an internal instance of - * {@link DialogStateResult}. - * - * @param internalResponse The internal response. - * @return A new instance of {@link DialogStateResult}. - */ - public static DialogStateResult create(DialogStateResponse internalResponse) { - // This looks odd but is necessary, it is possible to engage the access helper before anywhere else in the - // application accesses BlobDownloadHeaders which triggers the accessor to be configured. So, if the accessor - // is null this effectively pokes the class to set up the accessor. - if (accessor == null) { - new DialogStateResult(); - } - - assert accessor != null; - return accessor.create(internalResponse); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/UnmuteParticipantsResponseConstructorProxy.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/UnmuteParticipantsResponseConstructorProxy.java deleted file mode 100644 index 189449be0e0b..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/UnmuteParticipantsResponseConstructorProxy.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.implementation.accesshelpers; - -import com.azure.communication.callautomation.implementation.models.UnmuteParticipantsResponseInternal; -import com.azure.communication.callautomation.models.UnmuteParticipantResult; - -/** - * Helper class to access private values of {@link UnmuteParticipantResult} across package boundaries. - */ -public final class UnmuteParticipantsResponseConstructorProxy { - private static UnmuteParticipantsResponseConstructorAccessor accessor; - - private UnmuteParticipantsResponseConstructorProxy() { - } - - /** - * Type defining the methods to set the non-public properties of a {@link UnmuteParticipantsResponseConstructorAccessor} - * instance. - */ - public interface UnmuteParticipantsResponseConstructorAccessor { - /** - * Creates a new instance of {@link UnmuteParticipantResult} backed by an internal instance of - * {@link UnmuteParticipantsResponseInternal}. - * - * @param internalResponse The internal response. - * @return A new instance of {@link UnmuteParticipantResult}. - */ - UnmuteParticipantResult create(UnmuteParticipantsResponseInternal internalResponse); - } - - /** - * The method called from {@link UnmuteParticipantResult} to set it's accessor. - * - * @param accessor The accessor. - */ - public static void setAccessor(final UnmuteParticipantsResponseConstructorAccessor accessor) { - UnmuteParticipantsResponseConstructorProxy.accessor = accessor; - } - - /** - * Creates a new instance of {@link UnmuteParticipantResult} backed by an internal instance of - * {@link UnmuteParticipantsResponseInternal}. - * - * @param internalResponse The internal response. - * @return A new instance of {@link UnmuteParticipantResult}. - */ - public static UnmuteParticipantResult create(UnmuteParticipantsResponseInternal internalResponse) { - // This looks odd but is necessary, it is possible to engage the access helper before anywhere else in the - // application accesses BlobDownloadHeaders which triggers the accessor to be configured. So, if the accessor - // is null this effectively pokes the class to set up the accessor. - if (accessor == null) { - new UnmuteParticipantResult(); - } - - assert accessor != null; - return accessor.create(internalResponse); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AnswerCallRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AnswerCallRequestInternal.java index d84415921046..f6c0b8273c2b 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AnswerCallRequestInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AnswerCallRequestInternal.java @@ -26,11 +26,6 @@ public final class AnswerCallRequestInternal implements JsonSerializable { /** - * Pcm16KMono. + * Static value pcm16KMono for AudioFormatInternal. */ - public static final AudioFormatInternal PCM_16K_MONO = fromString("Pcm16KMono"); + public static final AudioFormatInternal PCM_16K_MONO = fromString("pcm16KMono"); /** - * Pcm24KMono. + * Static value pcm24KMono for AudioFormatInternal. */ - public static final AudioFormatInternal PCM_24K_MONO = fromString("Pcm24KMono"); + public static final AudioFormatInternal PCM_24K_MONO = fromString("pcm24KMono"); /** * Creates a new instance of AudioFormatInternal value. diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallConnectionPropertiesInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallConnectionPropertiesInternal.java index 7154b494c06d..c4b83ed1cce0 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallConnectionPropertiesInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallConnectionPropertiesInternal.java @@ -68,16 +68,6 @@ public final class CallConnectionPropertiesInternal implements JsonSerializable< */ private CommunicationUserIdentifierModel answeredBy; - /* - * SubscriptionId for media streaming - */ - private String mediaSubscriptionId; - - /* - * SubscriptionId for transcription - */ - private String dataSubscriptionId; - /* * The state of media streaming subscription for the call */ @@ -306,46 +296,6 @@ public CallConnectionPropertiesInternal setAnsweredBy(CommunicationUserIdentifie return this; } - /** - * Get the mediaSubscriptionId property: SubscriptionId for media streaming. - * - * @return the mediaSubscriptionId value. - */ - public String getMediaSubscriptionId() { - return this.mediaSubscriptionId; - } - - /** - * Set the mediaSubscriptionId property: SubscriptionId for media streaming. - * - * @param mediaSubscriptionId the mediaSubscriptionId value to set. - * @return the CallConnectionPropertiesInternal object itself. - */ - public CallConnectionPropertiesInternal setMediaSubscriptionId(String mediaSubscriptionId) { - this.mediaSubscriptionId = mediaSubscriptionId; - return this; - } - - /** - * Get the dataSubscriptionId property: SubscriptionId for transcription. - * - * @return the dataSubscriptionId value. - */ - public String getDataSubscriptionId() { - return this.dataSubscriptionId; - } - - /** - * Set the dataSubscriptionId property: SubscriptionId for transcription. - * - * @param dataSubscriptionId the dataSubscriptionId value to set. - * @return the CallConnectionPropertiesInternal object itself. - */ - public CallConnectionPropertiesInternal setDataSubscriptionId(String dataSubscriptionId) { - this.dataSubscriptionId = dataSubscriptionId; - return this; - } - /** * Get the mediaStreamingSubscription property: The state of media streaming subscription for the call. * @@ -427,8 +377,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("source", this.source); jsonWriter.writeStringField("correlationId", this.correlationId); jsonWriter.writeJsonField("answeredBy", this.answeredBy); - jsonWriter.writeStringField("mediaSubscriptionId", this.mediaSubscriptionId); - jsonWriter.writeStringField("dataSubscriptionId", this.dataSubscriptionId); jsonWriter.writeJsonField("mediaStreamingSubscription", this.mediaStreamingSubscription); jsonWriter.writeJsonField("transcriptionSubscription", this.transcriptionSubscription); jsonWriter.writeJsonField("answeredFor", this.answeredFor); @@ -476,10 +424,6 @@ public static CallConnectionPropertiesInternal fromJson(JsonReader jsonReader) t } else if ("answeredBy".equals(fieldName)) { deserializedCallConnectionPropertiesInternal.answeredBy = CommunicationUserIdentifierModel.fromJson(reader); - } else if ("mediaSubscriptionId".equals(fieldName)) { - deserializedCallConnectionPropertiesInternal.mediaSubscriptionId = reader.getString(); - } else if ("dataSubscriptionId".equals(fieldName)) { - deserializedCallConnectionPropertiesInternal.dataSubscriptionId = reader.getString(); } else if ("mediaStreamingSubscription".equals(fieldName)) { deserializedCallConnectionPropertiesInternal.mediaStreamingSubscription = MediaStreamingSubscriptionInternal.fromJson(reader); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallIntelligenceOptionsInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallIntelligenceOptionsInternal.java index a5f84949726e..3ee92c645bb8 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallIntelligenceOptionsInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallIntelligenceOptionsInternal.java @@ -21,11 +21,6 @@ public final class CallIntelligenceOptionsInternal implements JsonSerializable { diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingContentTypeInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingContentTypeInternal.java index b3ec6c3eb4ea..31a69696762a 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingContentTypeInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingContentTypeInternal.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Content type to stream, eg. audio. + * Defines values for MediaStreamingContentTypeInternal. */ public final class MediaStreamingContentTypeInternal extends ExpandableStringEnum { /** diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingOptionsInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingOptionsInternal.java index 6a5901c787d4..664ce84c14e4 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingOptionsInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingOptionsInternal.java @@ -12,113 +12,39 @@ import java.io.IOException; /** - * Configuration of Media streaming. + * Options for media streaming. */ @Fluent -public final class MediaStreamingOptionsInternal implements JsonSerializable { +public class MediaStreamingOptionsInternal implements JsonSerializable { /* - * Transport URL for media streaming + * Defines the transport type used for streaming. Note that future values may be introduced that are not currently documented. */ - private String transportUrl; + private StreamingTransportType transportType; /* - * The type of transport to be used for media streaming, eg. Websocket - */ - private MediaStreamingTransportTypeInternal transportType; - - /* - * Content type to stream, eg. audio - */ - private MediaStreamingContentTypeInternal contentType; - - /* - * Audio channel type to stream, eg. unmixed audio, mixed audio + * The audio channel type to stream, e.g., unmixed audio, mixed audio. */ private MediaStreamingAudioChannelTypeInternal audioChannelType; - /* - * Determines if the media streaming should be started immediately after call is answered or not. - */ - private Boolean startMediaStreaming; - - /* - * A value indicating whether bidirectional streaming is enabled. - */ - private Boolean enableBidirectional; - - /* - * Specifies the audio format used for encoding, including sample rate and channel type. - */ - private AudioFormatInternal audioFormat; - /** * Creates an instance of MediaStreamingOptionsInternal class. */ public MediaStreamingOptionsInternal() { + this.transportType = StreamingTransportType.fromString("MediaStreamingOptionsInternal"); } /** - * Get the transportUrl property: Transport URL for media streaming. - * - * @return the transportUrl value. - */ - public String getTransportUrl() { - return this.transportUrl; - } - - /** - * Set the transportUrl property: Transport URL for media streaming. - * - * @param transportUrl the transportUrl value to set. - * @return the MediaStreamingOptionsInternal object itself. - */ - public MediaStreamingOptionsInternal setTransportUrl(String transportUrl) { - this.transportUrl = transportUrl; - return this; - } - - /** - * Get the transportType property: The type of transport to be used for media streaming, eg. Websocket. + * Get the transportType property: Defines the transport type used for streaming. Note that future values may be + * introduced that are not currently documented. * * @return the transportType value. */ - public MediaStreamingTransportTypeInternal getTransportType() { + public StreamingTransportType getTransportType() { return this.transportType; } /** - * Set the transportType property: The type of transport to be used for media streaming, eg. Websocket. - * - * @param transportType the transportType value to set. - * @return the MediaStreamingOptionsInternal object itself. - */ - public MediaStreamingOptionsInternal setTransportType(MediaStreamingTransportTypeInternal transportType) { - this.transportType = transportType; - return this; - } - - /** - * Get the contentType property: Content type to stream, eg. audio. - * - * @return the contentType value. - */ - public MediaStreamingContentTypeInternal getContentType() { - return this.contentType; - } - - /** - * Set the contentType property: Content type to stream, eg. audio. - * - * @param contentType the contentType value to set. - * @return the MediaStreamingOptionsInternal object itself. - */ - public MediaStreamingOptionsInternal setContentType(MediaStreamingContentTypeInternal contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the audioChannelType property: Audio channel type to stream, eg. unmixed audio, mixed audio. + * Get the audioChannelType property: The audio channel type to stream, e.g., unmixed audio, mixed audio. * * @return the audioChannelType value. */ @@ -127,7 +53,7 @@ public MediaStreamingAudioChannelTypeInternal getAudioChannelType() { } /** - * Set the audioChannelType property: Audio channel type to stream, eg. unmixed audio, mixed audio. + * Set the audioChannelType property: The audio channel type to stream, e.g., unmixed audio, mixed audio. * * @param audioChannelType the audioChannelType value to set. * @return the MediaStreamingOptionsInternal object itself. @@ -137,84 +63,15 @@ public MediaStreamingOptionsInternal setAudioChannelType(MediaStreamingAudioChan return this; } - /** - * Get the startMediaStreaming property: Determines if the media streaming should be started immediately after call - * is answered or not. - * - * @return the startMediaStreaming value. - */ - public Boolean isStartMediaStreaming() { - return this.startMediaStreaming; - } - - /** - * Set the startMediaStreaming property: Determines if the media streaming should be started immediately after call - * is answered or not. - * - * @param startMediaStreaming the startMediaStreaming value to set. - * @return the MediaStreamingOptionsInternal object itself. - */ - public MediaStreamingOptionsInternal setStartMediaStreaming(Boolean startMediaStreaming) { - this.startMediaStreaming = startMediaStreaming; - return this; - } - - /** - * Get the enableBidirectional property: A value indicating whether bidirectional streaming is enabled. - * - * @return the enableBidirectional value. - */ - public Boolean isEnableBidirectional() { - return this.enableBidirectional; - } - - /** - * Set the enableBidirectional property: A value indicating whether bidirectional streaming is enabled. - * - * @param enableBidirectional the enableBidirectional value to set. - * @return the MediaStreamingOptionsInternal object itself. - */ - public MediaStreamingOptionsInternal setEnableBidirectional(Boolean enableBidirectional) { - this.enableBidirectional = enableBidirectional; - return this; - } - - /** - * Get the audioFormat property: Specifies the audio format used for encoding, including sample rate and channel - * type. - * - * @return the audioFormat value. - */ - public AudioFormatInternal getAudioFormat() { - return this.audioFormat; - } - - /** - * Set the audioFormat property: Specifies the audio format used for encoding, including sample rate and channel - * type. - * - * @param audioFormat the audioFormat value to set. - * @return the MediaStreamingOptionsInternal object itself. - */ - public MediaStreamingOptionsInternal setAudioFormat(AudioFormatInternal audioFormat) { - this.audioFormat = audioFormat; - return this; - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("transportUrl", this.transportUrl); - jsonWriter.writeStringField("transportType", this.transportType == null ? null : this.transportType.toString()); - jsonWriter.writeStringField("contentType", this.contentType == null ? null : this.contentType.toString()); jsonWriter.writeStringField("audioChannelType", this.audioChannelType == null ? null : this.audioChannelType.toString()); - jsonWriter.writeBooleanField("startMediaStreaming", this.startMediaStreaming); - jsonWriter.writeBooleanField("enableBidirectional", this.enableBidirectional); - jsonWriter.writeStringField("audioFormat", this.audioFormat == null ? null : this.audioFormat.toString()); + jsonWriter.writeStringField("transportType", this.transportType == null ? null : this.transportType.toString()); return jsonWriter.writeEndObject(); } @@ -228,6 +85,31 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @throws IOException If an error occurs while reading the MediaStreamingOptionsInternal. */ public static MediaStreamingOptionsInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("transportType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("websocket".equals(discriminatorValue)) { + return WebSocketMediaStreamingOptionsInternal.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static MediaStreamingOptionsInternal fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { MediaStreamingOptionsInternal deserializedMediaStreamingOptionsInternal = new MediaStreamingOptionsInternal(); @@ -235,26 +117,12 @@ public static MediaStreamingOptionsInternal fromJson(JsonReader jsonReader) thro String fieldName = reader.getFieldName(); reader.nextToken(); - if ("transportUrl".equals(fieldName)) { - deserializedMediaStreamingOptionsInternal.transportUrl = reader.getString(); - } else if ("transportType".equals(fieldName)) { - deserializedMediaStreamingOptionsInternal.transportType - = MediaStreamingTransportTypeInternal.fromString(reader.getString()); - } else if ("contentType".equals(fieldName)) { - deserializedMediaStreamingOptionsInternal.contentType - = MediaStreamingContentTypeInternal.fromString(reader.getString()); - } else if ("audioChannelType".equals(fieldName)) { + if ("audioChannelType".equals(fieldName)) { deserializedMediaStreamingOptionsInternal.audioChannelType = MediaStreamingAudioChannelTypeInternal.fromString(reader.getString()); - } else if ("startMediaStreaming".equals(fieldName)) { - deserializedMediaStreamingOptionsInternal.startMediaStreaming - = reader.getNullable(JsonReader::getBoolean); - } else if ("enableBidirectional".equals(fieldName)) { - deserializedMediaStreamingOptionsInternal.enableBidirectional - = reader.getNullable(JsonReader::getBoolean); - } else if ("audioFormat".equals(fieldName)) { - deserializedMediaStreamingOptionsInternal.audioFormat - = AudioFormatInternal.fromString(reader.getString()); + } else if ("transportType".equals(fieldName)) { + deserializedMediaStreamingOptionsInternal.transportType + = StreamingTransportType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PlayOptionsInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PlayOptionsInternal.java index 3270d9e10960..0fba42db686e 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PlayOptionsInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PlayOptionsInternal.java @@ -21,16 +21,6 @@ public final class PlayOptionsInternal implements JsonSerializable { */ private List playTo; + /* + * If set play can barge into other existing queued-up/currently-processing requests. + */ + private Boolean interruptCallMediaOperation; + /* * Defines options for playing the audio. */ @@ -92,6 +97,28 @@ public PlayRequest setPlayTo(List playTo) { return this; } + /** + * Get the interruptCallMediaOperation property: If set play can barge into other existing + * queued-up/currently-processing requests. + * + * @return the interruptCallMediaOperation value. + */ + public Boolean isInterruptCallMediaOperation() { + return this.interruptCallMediaOperation; + } + + /** + * Set the interruptCallMediaOperation property: If set play can barge into other existing + * queued-up/currently-processing requests. + * + * @param interruptCallMediaOperation the interruptCallMediaOperation value to set. + * @return the PlayRequest object itself. + */ + public PlayRequest setInterruptCallMediaOperation(Boolean interruptCallMediaOperation) { + this.interruptCallMediaOperation = interruptCallMediaOperation; + return this; + } + /** * Get the playOptions property: Defines options for playing the audio. * @@ -164,6 +191,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("playSources", this.playSources, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("playTo", this.playTo, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("interruptCallMediaOperation", this.interruptCallMediaOperation); jsonWriter.writeJsonField("playOptions", this.playOptions); jsonWriter.writeStringField("operationContext", this.operationContext); jsonWriter.writeStringField("operationCallbackUri", this.operationCallbackUri); @@ -194,6 +222,8 @@ public static PlayRequest fromJson(JsonReader jsonReader) throws IOException { List playTo = reader.readArray(reader1 -> CommunicationIdentifierModel.fromJson(reader1)); deserializedPlayRequest.playTo = playTo; + } else if ("interruptCallMediaOperation".equals(fieldName)) { + deserializedPlayRequest.interruptCallMediaOperation = reader.getNullable(JsonReader::getBoolean); } else if ("playOptions".equals(fieldName)) { deserializedPlayRequest.playOptions = PlayOptionsInternal.fromJson(reader); } else if ("operationContext".equals(fieldName)) { diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RedirectCallRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RedirectCallRequestInternal.java index 406e2f39ec9b..8fe85bf39e87 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RedirectCallRequestInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RedirectCallRequestInternal.java @@ -26,11 +26,6 @@ public final class RedirectCallRequestInternal implements JsonSerializable { /* - * The call locator. (Only one of callLocator or callConnectionId to be used) + * The call locator. */ private CallLocatorInternal callLocator; - /* - * The call connectionId. (Only one of callLocator or callConnectionId to be used) - */ - private String callConnectionId; - /* * The uri to send notifications to. */ @@ -80,7 +75,7 @@ public StartCallRecordingRequestInternal() { } /** - * Get the callLocator property: The call locator. (Only one of callLocator or callConnectionId to be used). + * Get the callLocator property: The call locator. * * @return the callLocator value. */ @@ -89,7 +84,7 @@ public CallLocatorInternal getCallLocator() { } /** - * Set the callLocator property: The call locator. (Only one of callLocator or callConnectionId to be used). + * Set the callLocator property: The call locator. * * @param callLocator the callLocator value to set. * @return the StartCallRecordingRequestInternal object itself. @@ -99,28 +94,6 @@ public StartCallRecordingRequestInternal setCallLocator(CallLocatorInternal call return this; } - /** - * Get the callConnectionId property: The call connectionId. (Only one of callLocator or callConnectionId to be - * used). - * - * @return the callConnectionId value. - */ - public String getCallConnectionId() { - return this.callConnectionId; - } - - /** - * Set the callConnectionId property: The call connectionId. (Only one of callLocator or callConnectionId to be - * used). - * - * @param callConnectionId the callConnectionId value to set. - * @return the StartCallRecordingRequestInternal object itself. - */ - public StartCallRecordingRequestInternal setCallConnectionId(String callConnectionId) { - this.callConnectionId = callConnectionId; - return this; - } - /** * Get the recordingStateCallbackUri property: The uri to send notifications to. * @@ -305,7 +278,6 @@ public StartCallRecordingRequestInternal setExternalStorage(RecordingStorageInte public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("callLocator", this.callLocator); - jsonWriter.writeStringField("callConnectionId", this.callConnectionId); jsonWriter.writeStringField("recordingStateCallbackUri", this.recordingStateCallbackUri); jsonWriter.writeStringField("recordingContentType", this.recordingContentType == null ? null : this.recordingContentType.toString()); @@ -328,6 +300,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of StartCallRecordingRequestInternal if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the StartCallRecordingRequestInternal. */ public static StartCallRecordingRequestInternal fromJson(JsonReader jsonReader) throws IOException { @@ -340,8 +313,6 @@ public static StartCallRecordingRequestInternal fromJson(JsonReader jsonReader) if ("callLocator".equals(fieldName)) { deserializedStartCallRecordingRequestInternal.callLocator = CallLocatorInternal.fromJson(reader); - } else if ("callConnectionId".equals(fieldName)) { - deserializedStartCallRecordingRequestInternal.callConnectionId = reader.getString(); } else if ("recordingStateCallbackUri".equals(fieldName)) { deserializedStartCallRecordingRequestInternal.recordingStateCallbackUri = reader.getString(); } else if ("recordingContentType".equals(fieldName)) { diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartTranscriptionRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartTranscriptionRequestInternal.java index 4a882459472d..4e15b19b26e2 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartTranscriptionRequestInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartTranscriptionRequestInternal.java @@ -17,14 +17,14 @@ @Fluent public final class StartTranscriptionRequestInternal implements JsonSerializable { /* - * Defines Locale for the transcription e,g en-US + * Specifies the Locale used for transcription, e.g., en-CA or en-AU. */ private String locale; /* - * Endpoint where the custom model was deployed. + * The ID of the deployed custom model in GUID format. The GUID is generated by Azure Speech Studio, e.g., a259c255-1cdw-4ed7-a693-dd58563b6f6a. */ - private String speechRecognitionModelEndpointId; + private String speechModelEndpointId; /* * The value to identify context of the operation. @@ -44,7 +44,7 @@ public StartTranscriptionRequestInternal() { } /** - * Get the locale property: Defines Locale for the transcription e,g en-US. + * Get the locale property: Specifies the Locale used for transcription, e.g., en-CA or en-AU. * * @return the locale value. */ @@ -53,7 +53,7 @@ public String getLocale() { } /** - * Set the locale property: Defines Locale for the transcription e,g en-US. + * Set the locale property: Specifies the Locale used for transcription, e.g., en-CA or en-AU. * * @param locale the locale value to set. * @return the StartTranscriptionRequestInternal object itself. @@ -64,23 +64,24 @@ public StartTranscriptionRequestInternal setLocale(String locale) { } /** - * Get the speechRecognitionModelEndpointId property: Endpoint where the custom model was deployed. + * Get the speechModelEndpointId property: The ID of the deployed custom model in GUID format. The GUID is generated + * by Azure Speech Studio, e.g., a259c255-1cdw-4ed7-a693-dd58563b6f6a. * - * @return the speechRecognitionModelEndpointId value. + * @return the speechModelEndpointId value. */ - public String getSpeechRecognitionModelEndpointId() { - return this.speechRecognitionModelEndpointId; + public String getSpeechModelEndpointId() { + return this.speechModelEndpointId; } /** - * Set the speechRecognitionModelEndpointId property: Endpoint where the custom model was deployed. + * Set the speechModelEndpointId property: The ID of the deployed custom model in GUID format. The GUID is generated + * by Azure Speech Studio, e.g., a259c255-1cdw-4ed7-a693-dd58563b6f6a. * - * @param speechRecognitionModelEndpointId the speechRecognitionModelEndpointId value to set. + * @param speechModelEndpointId the speechModelEndpointId value to set. * @return the StartTranscriptionRequestInternal object itself. */ - public StartTranscriptionRequestInternal - setSpeechRecognitionModelEndpointId(String speechRecognitionModelEndpointId) { - this.speechRecognitionModelEndpointId = speechRecognitionModelEndpointId; + public StartTranscriptionRequestInternal setSpeechModelEndpointId(String speechModelEndpointId) { + this.speechModelEndpointId = speechModelEndpointId; return this; } @@ -135,7 +136,7 @@ public StartTranscriptionRequestInternal setOperationCallbackUri(String operatio public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("locale", this.locale); - jsonWriter.writeStringField("speechRecognitionModelEndpointId", this.speechRecognitionModelEndpointId); + jsonWriter.writeStringField("speechModelEndpointId", this.speechModelEndpointId); jsonWriter.writeStringField("operationContext", this.operationContext); jsonWriter.writeStringField("operationCallbackUri", this.operationCallbackUri); return jsonWriter.writeEndObject(); @@ -159,8 +160,8 @@ public static StartTranscriptionRequestInternal fromJson(JsonReader jsonReader) if ("locale".equals(fieldName)) { deserializedStartTranscriptionRequestInternal.locale = reader.getString(); - } else if ("speechRecognitionModelEndpointId".equals(fieldName)) { - deserializedStartTranscriptionRequestInternal.speechRecognitionModelEndpointId = reader.getString(); + } else if ("speechModelEndpointId".equals(fieldName)) { + deserializedStartTranscriptionRequestInternal.speechModelEndpointId = reader.getString(); } else if ("operationContext".equals(fieldName)) { deserializedStartTranscriptionRequestInternal.operationContext = reader.getString(); } else if ("operationCallbackUri".equals(fieldName)) { diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StreamingTransportType.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StreamingTransportType.java new file mode 100644 index 000000000000..0837ae91d9a1 --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StreamingTransportType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines the transport type used for streaming. Note that future values may be introduced that are not currently + * documented. + */ +public final class StreamingTransportType extends ExpandableStringEnum { + /** + * Static value websocket for StreamingTransportType. + */ + public static final StreamingTransportType WEBSOCKET = fromString("websocket"); + + /** + * Creates a new instance of StreamingTransportType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StreamingTransportType() { + } + + /** + * Creates or finds a StreamingTransportType from its string representation. + * + * @param name a name to look for. + * @return the corresponding StreamingTransportType. + */ + public static StreamingTransportType fromString(String name) { + return fromString(name, StreamingTransportType.class); + } + + /** + * Gets known StreamingTransportType values. + * + * @return known StreamingTransportType values. + */ + public static Collection values() { + return values(StreamingTransportType.class); + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionOptionsInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionOptionsInternal.java index 1d21508b62cb..1cea85d9e89c 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionOptionsInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionOptionsInternal.java @@ -12,88 +12,39 @@ import java.io.IOException; /** - * Configuration of live transcription. + * Options for live transcription. */ @Fluent -public final class TranscriptionOptionsInternal implements JsonSerializable { +public class TranscriptionOptionsInternal implements JsonSerializable { /* - * Transport URL for live transcription + * Defines the transport type used for streaming. Note that future values may be introduced that are not currently documented. */ - private String transportUrl; + private StreamingTransportType transportType; /* - * The type of transport to be used for live transcription, eg. Websocket - */ - private TranscriptionTransportTypeInternal transportType; - - /* - * Defines the locale for the data e.g en-CA, en-AU + * Specifies the Locale used for transcription, e.g., en-CA or en-AU. */ private String locale; - /* - * Endpoint where the custom model was deployed. - */ - private String speechRecognitionModelEndpointId; - - /* - * Determines if the transcription should be started immediately after call is answered or not. - */ - private boolean startTranscription; - - /* - * Enables intermediate results for the transcribed speech. - */ - private Boolean enableIntermediateResults; - /** * Creates an instance of TranscriptionOptionsInternal class. */ public TranscriptionOptionsInternal() { + this.transportType = StreamingTransportType.fromString("TranscriptionOptionsInternal"); } /** - * Get the transportUrl property: Transport URL for live transcription. - * - * @return the transportUrl value. - */ - public String getTransportUrl() { - return this.transportUrl; - } - - /** - * Set the transportUrl property: Transport URL for live transcription. - * - * @param transportUrl the transportUrl value to set. - * @return the TranscriptionOptionsInternal object itself. - */ - public TranscriptionOptionsInternal setTransportUrl(String transportUrl) { - this.transportUrl = transportUrl; - return this; - } - - /** - * Get the transportType property: The type of transport to be used for live transcription, eg. Websocket. + * Get the transportType property: Defines the transport type used for streaming. Note that future values may be + * introduced that are not currently documented. * * @return the transportType value. */ - public TranscriptionTransportTypeInternal getTransportType() { + public StreamingTransportType getTransportType() { return this.transportType; } /** - * Set the transportType property: The type of transport to be used for live transcription, eg. Websocket. - * - * @param transportType the transportType value to set. - * @return the TranscriptionOptionsInternal object itself. - */ - public TranscriptionOptionsInternal setTransportType(TranscriptionTransportTypeInternal transportType) { - this.transportType = transportType; - return this; - } - - /** - * Get the locale property: Defines the locale for the data e.g en-CA, en-AU. + * Get the locale property: Specifies the Locale used for transcription, e.g., en-CA or en-AU. * * @return the locale value. */ @@ -102,7 +53,7 @@ public String getLocale() { } /** - * Set the locale property: Defines the locale for the data e.g en-CA, en-AU. + * Set the locale property: Specifies the Locale used for transcription, e.g., en-CA or en-AU. * * @param locale the locale value to set. * @return the TranscriptionOptionsInternal object itself. @@ -112,80 +63,14 @@ public TranscriptionOptionsInternal setLocale(String locale) { return this; } - /** - * Get the speechRecognitionModelEndpointId property: Endpoint where the custom model was deployed. - * - * @return the speechRecognitionModelEndpointId value. - */ - public String getSpeechRecognitionModelEndpointId() { - return this.speechRecognitionModelEndpointId; - } - - /** - * Set the speechRecognitionModelEndpointId property: Endpoint where the custom model was deployed. - * - * @param speechRecognitionModelEndpointId the speechRecognitionModelEndpointId value to set. - * @return the TranscriptionOptionsInternal object itself. - */ - public TranscriptionOptionsInternal setSpeechRecognitionModelEndpointId(String speechRecognitionModelEndpointId) { - this.speechRecognitionModelEndpointId = speechRecognitionModelEndpointId; - return this; - } - - /** - * Get the startTranscription property: Determines if the transcription should be started immediately after call is - * answered or not. - * - * @return the startTranscription value. - */ - public boolean isStartTranscription() { - return this.startTranscription; - } - - /** - * Set the startTranscription property: Determines if the transcription should be started immediately after call is - * answered or not. - * - * @param startTranscription the startTranscription value to set. - * @return the TranscriptionOptionsInternal object itself. - */ - public TranscriptionOptionsInternal setStartTranscription(boolean startTranscription) { - this.startTranscription = startTranscription; - return this; - } - - /** - * Get the enableIntermediateResults property: Enables intermediate results for the transcribed speech. - * - * @return the enableIntermediateResults value. - */ - public Boolean isEnableIntermediateResults() { - return this.enableIntermediateResults; - } - - /** - * Set the enableIntermediateResults property: Enables intermediate results for the transcribed speech. - * - * @param enableIntermediateResults the enableIntermediateResults value to set. - * @return the TranscriptionOptionsInternal object itself. - */ - public TranscriptionOptionsInternal setEnableIntermediateResults(Boolean enableIntermediateResults) { - this.enableIntermediateResults = enableIntermediateResults; - return this; - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("transportUrl", this.transportUrl); - jsonWriter.writeStringField("transportType", this.transportType == null ? null : this.transportType.toString()); jsonWriter.writeStringField("locale", this.locale); - jsonWriter.writeBooleanField("startTranscription", this.startTranscription); - jsonWriter.writeStringField("speechRecognitionModelEndpointId", this.speechRecognitionModelEndpointId); - jsonWriter.writeBooleanField("enableIntermediateResults", this.enableIntermediateResults); + jsonWriter.writeStringField("transportType", this.transportType == null ? null : this.transportType.toString()); return jsonWriter.writeEndObject(); } @@ -199,26 +84,42 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @throws IOException If an error occurs while reading the TranscriptionOptionsInternal. */ public static TranscriptionOptionsInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("transportType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("websocket".equals(discriminatorValue)) { + return WebSocketTranscriptionOptionsInternal.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static TranscriptionOptionsInternal fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { TranscriptionOptionsInternal deserializedTranscriptionOptionsInternal = new TranscriptionOptionsInternal(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("transportUrl".equals(fieldName)) { - deserializedTranscriptionOptionsInternal.transportUrl = reader.getString(); + if ("locale".equals(fieldName)) { + deserializedTranscriptionOptionsInternal.locale = reader.getString(); } else if ("transportType".equals(fieldName)) { deserializedTranscriptionOptionsInternal.transportType - = TranscriptionTransportTypeInternal.fromString(reader.getString()); - } else if ("locale".equals(fieldName)) { - deserializedTranscriptionOptionsInternal.locale = reader.getString(); - } else if ("startTranscription".equals(fieldName)) { - deserializedTranscriptionOptionsInternal.startTranscription = reader.getBoolean(); - } else if ("speechRecognitionModelEndpointId".equals(fieldName)) { - deserializedTranscriptionOptionsInternal.speechRecognitionModelEndpointId = reader.getString(); - } else if ("enableIntermediateResults".equals(fieldName)) { - deserializedTranscriptionOptionsInternal.enableIntermediateResults - = reader.getNullable(JsonReader::getBoolean); + = StreamingTransportType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionSubscriptionInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionSubscriptionInternal.java index 755e31111401..b88e925c1a7b 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionSubscriptionInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionSubscriptionInternal.java @@ -32,6 +32,11 @@ public final class TranscriptionSubscriptionInternal implements JsonSerializable */ private List subscribedResultTypes; + /* + * Specifies the locale used for transcription, e.g., en-CA or en-AU. + */ + private String locale; + /** * Creates an instance of TranscriptionSubscriptionInternal class. */ @@ -99,6 +104,26 @@ public List getSubscribedResultTypes() { return this; } + /** + * Get the locale property: Specifies the locale used for transcription, e.g., en-CA or en-AU. + * + * @return the locale value. + */ + public String getLocale() { + return this.locale; + } + + /** + * Set the locale property: Specifies the locale used for transcription, e.g., en-CA or en-AU. + * + * @param locale the locale value to set. + * @return the TranscriptionSubscriptionInternal object itself. + */ + public TranscriptionSubscriptionInternal setLocale(String locale) { + this.locale = locale; + return this; + } + /** * {@inheritDoc} */ @@ -109,6 +134,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); jsonWriter.writeArrayField("subscribedResultTypes", this.subscribedResultTypes, (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeStringField("locale", this.locale); return jsonWriter.writeEndObject(); } @@ -137,6 +163,8 @@ public static TranscriptionSubscriptionInternal fromJson(JsonReader jsonReader) List subscribedResultTypes = reader.readArray(reader1 -> TranscriptionResultTypeInternal.fromString(reader1.getString())); deserializedTranscriptionSubscriptionInternal.subscribedResultTypes = subscribedResultTypes; + } else if ("locale".equals(fieldName)) { + deserializedTranscriptionSubscriptionInternal.locale = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnholdRequest.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnholdRequest.java index e4e051b2d165..bfe55fc2401a 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnholdRequest.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnholdRequest.java @@ -27,6 +27,12 @@ public final class UnholdRequest implements JsonSerializable { */ private String operationContext; + /* + * Set a callback URI that overrides the default callback URI set by CreateCall/AnswerCall for this operation. + * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used. + */ + private String operationCallbackUri; + /** * Creates an instance of UnholdRequest class. */ @@ -77,6 +83,30 @@ public UnholdRequest setOperationContext(String operationContext) { return this; } + /** + * Get the operationCallbackUri property: Set a callback URI that overrides the default callback URI set by + * CreateCall/AnswerCall for this operation. + * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used. + * + * @return the operationCallbackUri value. + */ + public String getOperationCallbackUri() { + return this.operationCallbackUri; + } + + /** + * Set the operationCallbackUri property: Set a callback URI that overrides the default callback URI set by + * CreateCall/AnswerCall for this operation. + * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used. + * + * @param operationCallbackUri the operationCallbackUri value to set. + * @return the UnholdRequest object itself. + */ + public UnholdRequest setOperationCallbackUri(String operationCallbackUri) { + this.operationCallbackUri = operationCallbackUri; + return this; + } + /** * {@inheritDoc} */ @@ -85,6 +115,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("targetParticipant", this.targetParticipant); jsonWriter.writeStringField("operationContext", this.operationContext); + jsonWriter.writeStringField("operationCallbackUri", this.operationCallbackUri); return jsonWriter.writeEndObject(); } @@ -108,6 +139,8 @@ public static UnholdRequest fromJson(JsonReader jsonReader) throws IOException { deserializedUnholdRequest.targetParticipant = CommunicationIdentifierModel.fromJson(reader); } else if ("operationContext".equals(fieldName)) { deserializedUnholdRequest.operationContext = reader.getString(); + } else if ("operationCallbackUri".equals(fieldName)) { + deserializedUnholdRequest.operationCallbackUri = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UpdateTranscriptionRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UpdateTranscriptionRequestInternal.java index 3cde00350b30..24f9861f4210 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UpdateTranscriptionRequestInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UpdateTranscriptionRequestInternal.java @@ -17,14 +17,14 @@ @Fluent public final class UpdateTranscriptionRequestInternal implements JsonSerializable { /* - * Defines new locale for transcription. + * Specifies the Locale used for transcription, e.g., en-CA or en-AU. */ private String locale; /* - * Sets Endpoint id where the custom model was deployed. + * The ID of the deployed custom model, in GUID format, e.g., a259c255-1cdw-4ed7-a693-dd58563b6f6a. */ - private String speechRecognitionModelEndpointId; + private String speechModelEndpointId; /* * The value to identify context of the operation. @@ -44,7 +44,7 @@ public UpdateTranscriptionRequestInternal() { } /** - * Get the locale property: Defines new locale for transcription. + * Get the locale property: Specifies the Locale used for transcription, e.g., en-CA or en-AU. * * @return the locale value. */ @@ -53,7 +53,7 @@ public String getLocale() { } /** - * Set the locale property: Defines new locale for transcription. + * Set the locale property: Specifies the Locale used for transcription, e.g., en-CA or en-AU. * * @param locale the locale value to set. * @return the UpdateTranscriptionRequestInternal object itself. @@ -64,23 +64,24 @@ public UpdateTranscriptionRequestInternal setLocale(String locale) { } /** - * Get the speechRecognitionModelEndpointId property: Sets Endpoint id where the custom model was deployed. + * Get the speechModelEndpointId property: The ID of the deployed custom model, in GUID format, e.g., + * a259c255-1cdw-4ed7-a693-dd58563b6f6a. * - * @return the speechRecognitionModelEndpointId value. + * @return the speechModelEndpointId value. */ - public String getSpeechRecognitionModelEndpointId() { - return this.speechRecognitionModelEndpointId; + public String getSpeechModelEndpointId() { + return this.speechModelEndpointId; } /** - * Set the speechRecognitionModelEndpointId property: Sets Endpoint id where the custom model was deployed. + * Set the speechModelEndpointId property: The ID of the deployed custom model, in GUID format, e.g., + * a259c255-1cdw-4ed7-a693-dd58563b6f6a. * - * @param speechRecognitionModelEndpointId the speechRecognitionModelEndpointId value to set. + * @param speechModelEndpointId the speechModelEndpointId value to set. * @return the UpdateTranscriptionRequestInternal object itself. */ - public UpdateTranscriptionRequestInternal - setSpeechRecognitionModelEndpointId(String speechRecognitionModelEndpointId) { - this.speechRecognitionModelEndpointId = speechRecognitionModelEndpointId; + public UpdateTranscriptionRequestInternal setSpeechModelEndpointId(String speechModelEndpointId) { + this.speechModelEndpointId = speechModelEndpointId; return this; } @@ -135,7 +136,7 @@ public UpdateTranscriptionRequestInternal setOperationCallbackUri(String operati public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("locale", this.locale); - jsonWriter.writeStringField("speechRecognitionModelEndpointId", this.speechRecognitionModelEndpointId); + jsonWriter.writeStringField("speechModelEndpointId", this.speechModelEndpointId); jsonWriter.writeStringField("operationContext", this.operationContext); jsonWriter.writeStringField("operationCallbackUri", this.operationCallbackUri); return jsonWriter.writeEndObject(); @@ -147,7 +148,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of UpdateTranscriptionRequestInternal if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the UpdateTranscriptionRequestInternal. */ public static UpdateTranscriptionRequestInternal fromJson(JsonReader jsonReader) throws IOException { @@ -160,9 +160,8 @@ public static UpdateTranscriptionRequestInternal fromJson(JsonReader jsonReader) if ("locale".equals(fieldName)) { deserializedUpdateTranscriptionRequestInternal.locale = reader.getString(); - } else if ("speechRecognitionModelEndpointId".equals(fieldName)) { - deserializedUpdateTranscriptionRequestInternal.speechRecognitionModelEndpointId - = reader.getString(); + } else if ("speechModelEndpointId".equals(fieldName)) { + deserializedUpdateTranscriptionRequestInternal.speechModelEndpointId = reader.getString(); } else if ("operationContext".equals(fieldName)) { deserializedUpdateTranscriptionRequestInternal.operationContext = reader.getString(); } else if ("operationCallbackUri".equals(fieldName)) { diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/WebSocketMediaStreamingOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/WebSocketMediaStreamingOptions.java new file mode 100644 index 000000000000..91f9f15c6121 --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/WebSocketMediaStreamingOptions.java @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Represents the options for WebSocket transport. + */ +@Fluent +public final class WebSocketMediaStreamingOptions extends MediaStreamingOptionsInternal { + /* + * Defines the transport type used for streaming. Note that future values may be introduced that are not currently documented. + */ + private StreamingTransportType transportType = StreamingTransportType.WEBSOCKET; + + /* + * The transport URL for media streaming. + */ + private String transportUrl; + + /* + * The contentType property. + */ + private MediaStreamingContentTypeInternal contentType; + + /* + * A value indicating whether the media streaming should start immediately after the call is answered. + */ + private Boolean startMediaStreaming; + + /* + * A value indicating whether bidirectional streaming is enabled. + */ + private Boolean enableBidirectional; + + /* + * The audio format used for encoding, including sample rate and channel type. The default is Pcm16KMono. + */ + private AudioFormatInternal audioFormat; + + /* + * A value that indicates whether to stream the DTMF tones. + */ + private Boolean enableDtmfTones; + + /** + * Creates an instance of WebSocketMediaStreamingOptions class. + */ + public WebSocketMediaStreamingOptions() { + } + + /** + * Get the transportType property: Defines the transport type used for streaming. Note that future values may be + * introduced that are not currently documented. + * + * @return the transportType value. + */ + @Override + public StreamingTransportType getTransportType() { + return this.transportType; + } + + /** + * Get the transportUrl property: The transport URL for media streaming. + * + * @return the transportUrl value. + */ + public String getTransportUrl() { + return this.transportUrl; + } + + /** + * Set the transportUrl property: The transport URL for media streaming. + * + * @param transportUrl the transportUrl value to set. + * @return the WebSocketMediaStreamingOptions object itself. + */ + public WebSocketMediaStreamingOptions setTransportUrl(String transportUrl) { + this.transportUrl = transportUrl; + return this; + } + + /** + * Get the contentType property: The contentType property. + * + * @return the contentType value. + */ + public MediaStreamingContentTypeInternal getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The contentType property. + * + * @param contentType the contentType value to set. + * @return the WebSocketMediaStreamingOptions object itself. + */ + public WebSocketMediaStreamingOptions setContentType(MediaStreamingContentTypeInternal contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the startMediaStreaming property: A value indicating whether the media streaming should start immediately + * after the call is answered. + * + * @return the startMediaStreaming value. + */ + public Boolean isStartMediaStreaming() { + return this.startMediaStreaming; + } + + /** + * Set the startMediaStreaming property: A value indicating whether the media streaming should start immediately + * after the call is answered. + * + * @param startMediaStreaming the startMediaStreaming value to set. + * @return the WebSocketMediaStreamingOptions object itself. + */ + public WebSocketMediaStreamingOptions setStartMediaStreaming(Boolean startMediaStreaming) { + this.startMediaStreaming = startMediaStreaming; + return this; + } + + /** + * Get the enableBidirectional property: A value indicating whether bidirectional streaming is enabled. + * + * @return the enableBidirectional value. + */ + public Boolean isEnableBidirectional() { + return this.enableBidirectional; + } + + /** + * Set the enableBidirectional property: A value indicating whether bidirectional streaming is enabled. + * + * @param enableBidirectional the enableBidirectional value to set. + * @return the WebSocketMediaStreamingOptions object itself. + */ + public WebSocketMediaStreamingOptions setEnableBidirectional(Boolean enableBidirectional) { + this.enableBidirectional = enableBidirectional; + return this; + } + + /** + * Get the audioFormat property: The audio format used for encoding, including sample rate and channel type. The + * default is Pcm16KMono. + * + * @return the audioFormat value. + */ + public AudioFormatInternal getAudioFormat() { + return this.audioFormat; + } + + /** + * Set the audioFormat property: The audio format used for encoding, including sample rate and channel type. The + * default is Pcm16KMono. + * + * @param audioFormat the audioFormat value to set. + * @return the WebSocketMediaStreamingOptions object itself. + */ + public WebSocketMediaStreamingOptions setAudioFormat(AudioFormatInternal audioFormat) { + this.audioFormat = audioFormat; + return this; + } + + /** + * Get the enableDtmfTones property: A value that indicates whether to stream the DTMF tones. + * + * @return the enableDtmfTones value. + */ + public Boolean isEnableDtmfTones() { + return this.enableDtmfTones; + } + + /** + * Set the enableDtmfTones property: A value that indicates whether to stream the DTMF tones. + * + * @param enableDtmfTones the enableDtmfTones value to set. + * @return the WebSocketMediaStreamingOptions object itself. + */ + public WebSocketMediaStreamingOptions setEnableDtmfTones(Boolean enableDtmfTones) { + this.enableDtmfTones = enableDtmfTones; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public WebSocketMediaStreamingOptions setAudioChannelType(MediaStreamingAudioChannelTypeInternal audioChannelType) { + super.setAudioChannelType(audioChannelType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("audioChannelType", + getAudioChannelType() == null ? null : getAudioChannelType().toString()); + jsonWriter.writeStringField("transportType", this.transportType == null ? null : this.transportType.toString()); + jsonWriter.writeStringField("transportUrl", this.transportUrl); + jsonWriter.writeStringField("contentType", this.contentType == null ? null : this.contentType.toString()); + jsonWriter.writeBooleanField("startMediaStreaming", this.startMediaStreaming); + jsonWriter.writeBooleanField("enableBidirectional", this.enableBidirectional); + jsonWriter.writeStringField("audioFormat", this.audioFormat == null ? null : this.audioFormat.toString()); + jsonWriter.writeBooleanField("enableDtmfTones", this.enableDtmfTones); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebSocketMediaStreamingOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebSocketMediaStreamingOptions if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WebSocketMediaStreamingOptions. + */ + public static WebSocketMediaStreamingOptions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebSocketMediaStreamingOptions deserializedWebSocketMediaStreamingOptions + = new WebSocketMediaStreamingOptions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("audioChannelType".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptions + .setAudioChannelType(MediaStreamingAudioChannelTypeInternal.fromString(reader.getString())); + } else if ("transportType".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptions.transportType + = StreamingTransportType.fromString(reader.getString()); + } else if ("transportUrl".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptions.transportUrl = reader.getString(); + } else if ("contentType".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptions.contentType + = MediaStreamingContentTypeInternal.fromString(reader.getString()); + } else if ("startMediaStreaming".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptions.startMediaStreaming + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableBidirectional".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptions.enableBidirectional + = reader.getNullable(JsonReader::getBoolean); + } else if ("audioFormat".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptions.audioFormat + = AudioFormatInternal.fromString(reader.getString()); + } else if ("enableDtmfTones".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptions.enableDtmfTones + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedWebSocketMediaStreamingOptions; + }); + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/WebSocketMediaStreamingOptionsInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/WebSocketMediaStreamingOptionsInternal.java new file mode 100644 index 000000000000..c52f1143cd93 --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/WebSocketMediaStreamingOptionsInternal.java @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Represents the options for WebSocket transport. + */ +@Fluent +public final class WebSocketMediaStreamingOptionsInternal extends MediaStreamingOptionsInternal { + /* + * Defines the transport type used for streaming. Note that future values may be introduced that are not currently documented. + */ + private StreamingTransportType transportType = StreamingTransportType.WEBSOCKET; + + /* + * The transport URL for media streaming. + */ + private String transportUrl; + + /* + * The contentType property. + */ + private MediaStreamingContentTypeInternal contentType; + + /* + * A value indicating whether the media streaming should start immediately after the call is answered. + */ + private Boolean startMediaStreaming; + + /* + * A value indicating whether bidirectional streaming is enabled. + */ + private Boolean enableBidirectional; + + /* + * The audio format used for encoding, including sample rate and channel type. The default is Pcm16KMono. + */ + private AudioFormatInternal audioFormat; + + /* + * A value that indicates whether to stream the DTMF tones. + */ + private Boolean enableDtmfTones; + + /** + * Creates an instance of WebSocketMediaStreamingOptionsInternal class. + */ + public WebSocketMediaStreamingOptionsInternal() { + } + + /** + * Get the transportType property: Defines the transport type used for streaming. Note that future values may be + * introduced that are not currently documented. + * + * @return the transportType value. + */ + @Override + public StreamingTransportType getTransportType() { + return this.transportType; + } + + /** + * Get the transportUrl property: The transport URL for media streaming. + * + * @return the transportUrl value. + */ + public String getTransportUrl() { + return this.transportUrl; + } + + /** + * Set the transportUrl property: The transport URL for media streaming. + * + * @param transportUrl the transportUrl value to set. + * @return the WebSocketMediaStreamingOptionsInternal object itself. + */ + public WebSocketMediaStreamingOptionsInternal setTransportUrl(String transportUrl) { + this.transportUrl = transportUrl; + return this; + } + + /** + * Get the contentType property: The contentType property. + * + * @return the contentType value. + */ + public MediaStreamingContentTypeInternal getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The contentType property. + * + * @param contentType the contentType value to set. + * @return the WebSocketMediaStreamingOptionsInternal object itself. + */ + public WebSocketMediaStreamingOptionsInternal setContentType(MediaStreamingContentTypeInternal contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the startMediaStreaming property: A value indicating whether the media streaming should start immediately + * after the call is answered. + * + * @return the startMediaStreaming value. + */ + public Boolean isStartMediaStreaming() { + return this.startMediaStreaming; + } + + /** + * Set the startMediaStreaming property: A value indicating whether the media streaming should start immediately + * after the call is answered. + * + * @param startMediaStreaming the startMediaStreaming value to set. + * @return the WebSocketMediaStreamingOptionsInternal object itself. + */ + public WebSocketMediaStreamingOptionsInternal setStartMediaStreaming(Boolean startMediaStreaming) { + this.startMediaStreaming = startMediaStreaming; + return this; + } + + /** + * Get the enableBidirectional property: A value indicating whether bidirectional streaming is enabled. + * + * @return the enableBidirectional value. + */ + public Boolean isEnableBidirectional() { + return this.enableBidirectional; + } + + /** + * Set the enableBidirectional property: A value indicating whether bidirectional streaming is enabled. + * + * @param enableBidirectional the enableBidirectional value to set. + * @return the WebSocketMediaStreamingOptionsInternal object itself. + */ + public WebSocketMediaStreamingOptionsInternal setEnableBidirectional(Boolean enableBidirectional) { + this.enableBidirectional = enableBidirectional; + return this; + } + + /** + * Get the audioFormat property: The audio format used for encoding, including sample rate and channel type. The + * default is Pcm16KMono. + * + * @return the audioFormat value. + */ + public AudioFormatInternal getAudioFormat() { + return this.audioFormat; + } + + /** + * Set the audioFormat property: The audio format used for encoding, including sample rate and channel type. The + * default is Pcm16KMono. + * + * @param audioFormat the audioFormat value to set. + * @return the WebSocketMediaStreamingOptionsInternal object itself. + */ + public WebSocketMediaStreamingOptionsInternal setAudioFormat(AudioFormatInternal audioFormat) { + this.audioFormat = audioFormat; + return this; + } + + /** + * Get the enableDtmfTones property: A value that indicates whether to stream the DTMF tones. + * + * @return the enableDtmfTones value. + */ + public Boolean isEnableDtmfTones() { + return this.enableDtmfTones; + } + + /** + * Set the enableDtmfTones property: A value that indicates whether to stream the DTMF tones. + * + * @param enableDtmfTones the enableDtmfTones value to set. + * @return the WebSocketMediaStreamingOptionsInternal object itself. + */ + public WebSocketMediaStreamingOptionsInternal setEnableDtmfTones(Boolean enableDtmfTones) { + this.enableDtmfTones = enableDtmfTones; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public WebSocketMediaStreamingOptionsInternal + setAudioChannelType(MediaStreamingAudioChannelTypeInternal audioChannelType) { + super.setAudioChannelType(audioChannelType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("audioChannelType", + getAudioChannelType() == null ? null : getAudioChannelType().toString()); + jsonWriter.writeStringField("transportType", this.transportType == null ? null : this.transportType.toString()); + jsonWriter.writeStringField("transportUrl", this.transportUrl); + jsonWriter.writeStringField("contentType", this.contentType == null ? null : this.contentType.toString()); + jsonWriter.writeBooleanField("startMediaStreaming", this.startMediaStreaming); + jsonWriter.writeBooleanField("enableBidirectional", this.enableBidirectional); + jsonWriter.writeStringField("audioFormat", this.audioFormat == null ? null : this.audioFormat.toString()); + jsonWriter.writeBooleanField("enableDtmfTones", this.enableDtmfTones); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebSocketMediaStreamingOptionsInternal from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebSocketMediaStreamingOptionsInternal if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WebSocketMediaStreamingOptionsInternal. + */ + public static WebSocketMediaStreamingOptionsInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebSocketMediaStreamingOptionsInternal deserializedWebSocketMediaStreamingOptionsInternal + = new WebSocketMediaStreamingOptionsInternal(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("audioChannelType".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptionsInternal + .setAudioChannelType(MediaStreamingAudioChannelTypeInternal.fromString(reader.getString())); + } else if ("transportType".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptionsInternal.transportType + = StreamingTransportType.fromString(reader.getString()); + } else if ("transportUrl".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptionsInternal.transportUrl = reader.getString(); + } else if ("contentType".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptionsInternal.contentType + = MediaStreamingContentTypeInternal.fromString(reader.getString()); + } else if ("startMediaStreaming".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptionsInternal.startMediaStreaming + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableBidirectional".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptionsInternal.enableBidirectional + = reader.getNullable(JsonReader::getBoolean); + } else if ("audioFormat".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptionsInternal.audioFormat + = AudioFormatInternal.fromString(reader.getString()); + } else if ("enableDtmfTones".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptionsInternal.enableDtmfTones + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedWebSocketMediaStreamingOptionsInternal; + }); + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/WebSocketTranscriptionOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/WebSocketTranscriptionOptions.java new file mode 100644 index 000000000000..8d0db227fbe0 --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/WebSocketTranscriptionOptions.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Represents the options for WebSocket transport. + */ +@Fluent +public final class WebSocketTranscriptionOptions extends TranscriptionOptionsInternal { + /* + * Defines the transport type used for streaming. Note that future values may be introduced that are not currently documented. + */ + private StreamingTransportType transportType = StreamingTransportType.WEBSOCKET; + + /* + * The URL used for live transcription transport. + */ + private String transportUrl; + + /* + * The ID of the deployed custom model in GUID format. The GUID is generated by Azure Speech Studio, e.g., a259c255-1cdw-4ed7-a693-dd58563b6f6a. + */ + private String speechModelEndpointId; + + /* + * Indicates whether the transcription should start immediately after the call is answered. + */ + private Boolean startTranscription; + + /* + * Enables intermediate results for the transcribed speech. + */ + private Boolean enableIntermediateResults; + + /** + * Creates an instance of WebSocketTranscriptionOptions class. + */ + public WebSocketTranscriptionOptions() { + } + + /** + * Get the transportType property: Defines the transport type used for streaming. Note that future values may be + * introduced that are not currently documented. + * + * @return the transportType value. + */ + @Override + public StreamingTransportType getTransportType() { + return this.transportType; + } + + /** + * Get the transportUrl property: The URL used for live transcription transport. + * + * @return the transportUrl value. + */ + public String getTransportUrl() { + return this.transportUrl; + } + + /** + * Set the transportUrl property: The URL used for live transcription transport. + * + * @param transportUrl the transportUrl value to set. + * @return the WebSocketTranscriptionOptions object itself. + */ + public WebSocketTranscriptionOptions setTransportUrl(String transportUrl) { + this.transportUrl = transportUrl; + return this; + } + + /** + * Get the speechModelEndpointId property: The ID of the deployed custom model in GUID format. The GUID is generated + * by Azure Speech Studio, e.g., a259c255-1cdw-4ed7-a693-dd58563b6f6a. + * + * @return the speechModelEndpointId value. + */ + public String getSpeechModelEndpointId() { + return this.speechModelEndpointId; + } + + /** + * Set the speechModelEndpointId property: The ID of the deployed custom model in GUID format. The GUID is generated + * by Azure Speech Studio, e.g., a259c255-1cdw-4ed7-a693-dd58563b6f6a. + * + * @param speechModelEndpointId the speechModelEndpointId value to set. + * @return the WebSocketTranscriptionOptions object itself. + */ + public WebSocketTranscriptionOptions setSpeechModelEndpointId(String speechModelEndpointId) { + this.speechModelEndpointId = speechModelEndpointId; + return this; + } + + /** + * Get the startTranscription property: Indicates whether the transcription should start immediately after the call + * is answered. + * + * @return the startTranscription value. + */ + public Boolean isStartTranscription() { + return this.startTranscription; + } + + /** + * Set the startTranscription property: Indicates whether the transcription should start immediately after the call + * is answered. + * + * @param startTranscription the startTranscription value to set. + * @return the WebSocketTranscriptionOptions object itself. + */ + public WebSocketTranscriptionOptions setStartTranscription(Boolean startTranscription) { + this.startTranscription = startTranscription; + return this; + } + + /** + * Get the enableIntermediateResults property: Enables intermediate results for the transcribed speech. + * + * @return the enableIntermediateResults value. + */ + public Boolean isEnableIntermediateResults() { + return this.enableIntermediateResults; + } + + /** + * Set the enableIntermediateResults property: Enables intermediate results for the transcribed speech. + * + * @param enableIntermediateResults the enableIntermediateResults value to set. + * @return the WebSocketTranscriptionOptions object itself. + */ + public WebSocketTranscriptionOptions setEnableIntermediateResults(Boolean enableIntermediateResults) { + this.enableIntermediateResults = enableIntermediateResults; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public WebSocketTranscriptionOptions setLocale(String locale) { + super.setLocale(locale); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("locale", getLocale()); + jsonWriter.writeStringField("transportType", this.transportType == null ? null : this.transportType.toString()); + jsonWriter.writeStringField("transportUrl", this.transportUrl); + jsonWriter.writeStringField("speechModelEndpointId", this.speechModelEndpointId); + jsonWriter.writeBooleanField("startTranscription", this.startTranscription); + jsonWriter.writeBooleanField("enableIntermediateResults", this.enableIntermediateResults); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebSocketTranscriptionOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebSocketTranscriptionOptions if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WebSocketTranscriptionOptions. + */ + public static WebSocketTranscriptionOptions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebSocketTranscriptionOptions deserializedWebSocketTranscriptionOptions + = new WebSocketTranscriptionOptions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("locale".equals(fieldName)) { + deserializedWebSocketTranscriptionOptions.setLocale(reader.getString()); + } else if ("transportType".equals(fieldName)) { + deserializedWebSocketTranscriptionOptions.transportType + = StreamingTransportType.fromString(reader.getString()); + } else if ("transportUrl".equals(fieldName)) { + deserializedWebSocketTranscriptionOptions.transportUrl = reader.getString(); + } else if ("speechModelEndpointId".equals(fieldName)) { + deserializedWebSocketTranscriptionOptions.speechModelEndpointId = reader.getString(); + } else if ("startTranscription".equals(fieldName)) { + deserializedWebSocketTranscriptionOptions.startTranscription + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableIntermediateResults".equals(fieldName)) { + deserializedWebSocketTranscriptionOptions.enableIntermediateResults + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedWebSocketTranscriptionOptions; + }); + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/WebSocketTranscriptionOptionsInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/WebSocketTranscriptionOptionsInternal.java new file mode 100644 index 000000000000..8257bf7ff4ea --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/WebSocketTranscriptionOptionsInternal.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Represents the options for WebSocket transport. + */ +@Fluent +public final class WebSocketTranscriptionOptionsInternal extends TranscriptionOptionsInternal { + /* + * Defines the transport type used for streaming. Note that future values may be introduced that are not currently documented. + */ + private StreamingTransportType transportType = StreamingTransportType.WEBSOCKET; + + /* + * The URL used for live transcription transport. + */ + private String transportUrl; + + /* + * The ID of the deployed custom model in GUID format. The GUID is generated by Azure Speech Studio, e.g., a259c255-1cdw-4ed7-a693-dd58563b6f6a. + */ + private String speechModelEndpointId; + + /* + * Indicates whether the transcription should start immediately after the call is answered. + */ + private Boolean startTranscription; + + /* + * Enables intermediate results for the transcribed speech. + */ + private Boolean enableIntermediateResults; + + /** + * Creates an instance of WebSocketTranscriptionOptionsInternal class. + */ + public WebSocketTranscriptionOptionsInternal() { + } + + /** + * Get the transportType property: Defines the transport type used for streaming. Note that future values may be + * introduced that are not currently documented. + * + * @return the transportType value. + */ + @Override + public StreamingTransportType getTransportType() { + return this.transportType; + } + + /** + * Get the transportUrl property: The URL used for live transcription transport. + * + * @return the transportUrl value. + */ + public String getTransportUrl() { + return this.transportUrl; + } + + /** + * Set the transportUrl property: The URL used for live transcription transport. + * + * @param transportUrl the transportUrl value to set. + * @return the WebSocketTranscriptionOptionsInternal object itself. + */ + public WebSocketTranscriptionOptionsInternal setTransportUrl(String transportUrl) { + this.transportUrl = transportUrl; + return this; + } + + /** + * Get the speechModelEndpointId property: The ID of the deployed custom model in GUID format. The GUID is generated + * by Azure Speech Studio, e.g., a259c255-1cdw-4ed7-a693-dd58563b6f6a. + * + * @return the speechModelEndpointId value. + */ + public String getSpeechModelEndpointId() { + return this.speechModelEndpointId; + } + + /** + * Set the speechModelEndpointId property: The ID of the deployed custom model in GUID format. The GUID is generated + * by Azure Speech Studio, e.g., a259c255-1cdw-4ed7-a693-dd58563b6f6a. + * + * @param speechModelEndpointId the speechModelEndpointId value to set. + * @return the WebSocketTranscriptionOptionsInternal object itself. + */ + public WebSocketTranscriptionOptionsInternal setSpeechModelEndpointId(String speechModelEndpointId) { + this.speechModelEndpointId = speechModelEndpointId; + return this; + } + + /** + * Get the startTranscription property: Indicates whether the transcription should start immediately after the call + * is answered. + * + * @return the startTranscription value. + */ + public Boolean isStartTranscription() { + return this.startTranscription; + } + + /** + * Set the startTranscription property: Indicates whether the transcription should start immediately after the call + * is answered. + * + * @param startTranscription the startTranscription value to set. + * @return the WebSocketTranscriptionOptionsInternal object itself. + */ + public WebSocketTranscriptionOptionsInternal setStartTranscription(Boolean startTranscription) { + this.startTranscription = startTranscription; + return this; + } + + /** + * Get the enableIntermediateResults property: Enables intermediate results for the transcribed speech. + * + * @return the enableIntermediateResults value. + */ + public Boolean isEnableIntermediateResults() { + return this.enableIntermediateResults; + } + + /** + * Set the enableIntermediateResults property: Enables intermediate results for the transcribed speech. + * + * @param enableIntermediateResults the enableIntermediateResults value to set. + * @return the WebSocketTranscriptionOptionsInternal object itself. + */ + public WebSocketTranscriptionOptionsInternal setEnableIntermediateResults(Boolean enableIntermediateResults) { + this.enableIntermediateResults = enableIntermediateResults; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public WebSocketTranscriptionOptionsInternal setLocale(String locale) { + super.setLocale(locale); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("locale", getLocale()); + jsonWriter.writeStringField("transportType", this.transportType == null ? null : this.transportType.toString()); + jsonWriter.writeStringField("transportUrl", this.transportUrl); + jsonWriter.writeStringField("speechModelEndpointId", this.speechModelEndpointId); + jsonWriter.writeBooleanField("startTranscription", this.startTranscription); + jsonWriter.writeBooleanField("enableIntermediateResults", this.enableIntermediateResults); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebSocketTranscriptionOptionsInternal from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebSocketTranscriptionOptionsInternal if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WebSocketTranscriptionOptionsInternal. + */ + public static WebSocketTranscriptionOptionsInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebSocketTranscriptionOptionsInternal deserializedWebSocketTranscriptionOptionsInternal + = new WebSocketTranscriptionOptionsInternal(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("locale".equals(fieldName)) { + deserializedWebSocketTranscriptionOptionsInternal.setLocale(reader.getString()); + } else if ("transportType".equals(fieldName)) { + deserializedWebSocketTranscriptionOptionsInternal.transportType + = StreamingTransportType.fromString(reader.getString()); + } else if ("transportUrl".equals(fieldName)) { + deserializedWebSocketTranscriptionOptionsInternal.transportUrl = reader.getString(); + } else if ("speechModelEndpointId".equals(fieldName)) { + deserializedWebSocketTranscriptionOptionsInternal.speechModelEndpointId = reader.getString(); + } else if ("startTranscription".equals(fieldName)) { + deserializedWebSocketTranscriptionOptionsInternal.startTranscription + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableIntermediateResults".equals(fieldName)) { + deserializedWebSocketTranscriptionOptionsInternal.enableIntermediateResults + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedWebSocketTranscriptionOptionsInternal; + }); + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AddParticipantEventResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AddParticipantEventResult.java deleted file mode 100644 index 7e38a60a48d6..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AddParticipantEventResult.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.models.events.AddParticipantFailed; -import com.azure.communication.callautomation.models.events.AddParticipantSucceeded; -import com.azure.communication.common.CommunicationIdentifier; -import com.azure.core.annotation.Immutable; - -/** - * The result of an add participant event. - */ -@Immutable -public final class AddParticipantEventResult { - private final boolean isSuccess; - private final AddParticipantSucceeded successResult; - private final AddParticipantFailed failureResult; - private final CommunicationIdentifier participant; - - /** - * Initializes a new instance of AddParticipantEventResult. - * - * @param isSuccess the success status of the add participant operation. - * @param successResult the add participant succeeded event. - * @param failureResult the add participant failed event. - * @param participant the participant. - */ - AddParticipantEventResult(boolean isSuccess, AddParticipantSucceeded successResult, - AddParticipantFailed failureResult, CommunicationIdentifier participant) { - this.isSuccess = isSuccess; - this.successResult = successResult; - this.failureResult = failureResult; - this.participant = participant; - } - - /** - * Gets the success status of the add participant operation. - * - * @return the success status of the add participant operation. - */ - public boolean isSuccess() { - return isSuccess; - } - - /** - * Gets the add participant succeeded event. - * - * @return the add participant succeeded event. - */ - public AddParticipantSucceeded getSuccessResult() { - return successResult; - } - - /** - * Gets the add participant failed event. - * - * @return the add participant failed event. - */ - public AddParticipantFailed getFailureResult() { - return failureResult; - } - - /** - * Gets the participant. - * - * @return the participant. - */ - public CommunicationIdentifier getParticipant() { - return participant; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AddParticipantResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AddParticipantResult.java index 9ca78f6740ea..0dd343cf690e 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AddParticipantResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AddParticipantResult.java @@ -6,18 +6,12 @@ import com.azure.communication.callautomation.implementation.accesshelpers.AddParticipantResponseConstructorProxy; import com.azure.communication.callautomation.implementation.converters.CallParticipantConverter; import com.azure.communication.callautomation.implementation.models.AddParticipantResponseInternal; -import com.azure.communication.callautomation.models.events.AddParticipantFailed; -import com.azure.communication.callautomation.models.events.AddParticipantSucceeded; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; import com.azure.core.annotation.Immutable; -import reactor.core.publisher.Mono; - -import java.time.Duration; import java.util.Objects; /** The AddParticipantResult model. */ @Immutable -public class AddParticipantResult extends ResultWithEventHandling { +public final class AddParticipantResult { /* * The participant property. */ @@ -95,40 +89,4 @@ public String getOperationContext() { public String getInvitationId() { return invitationId; } - - @Override - public Mono waitForEventProcessorAsync(Duration timeout) { - if (eventProcessor == null) { - return Mono.empty(); - } - - return (timeout == null - ? eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == AddParticipantSucceeded.class - || event.getClass() == AddParticipantFailed.class)) - : eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == AddParticipantSucceeded.class - || event.getClass() == AddParticipantFailed.class), - timeout)).flatMap(event -> Mono.just(getReturnedEvent(event))); - } - - @Override - protected AddParticipantEventResult getReturnedEvent(CallAutomationEventBase event) { - AddParticipantEventResult result = null; - if (event.getClass() == AddParticipantSucceeded.class) { - result = new AddParticipantEventResult(true, (AddParticipantSucceeded) event, null, - ((AddParticipantSucceeded) event).getParticipant()); - } else if (event.getClass() == AddParticipantFailed.class) { - result = new AddParticipantEventResult(false, null, (AddParticipantFailed) event, - ((AddParticipantFailed) event).getParticipant()); - } - - return result; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallEventResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallEventResult.java deleted file mode 100644 index 74fd35fe0e34..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallEventResult.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.models.events.AnswerFailed; -import com.azure.communication.callautomation.models.events.CallConnected; -import com.azure.core.annotation.Immutable; - -/** - * The result of an answer call event. - */ -@Immutable -public final class AnswerCallEventResult { - private final boolean isSuccess; - private final CallConnected successResult; - private final AnswerFailed failureResult; - - /** - * Initializes a new instance of AnswerCallEventResult. - * - * @param isSuccess the success status of the answer call operation. - * @param successResult the call connected success event. - */ - AnswerCallEventResult(boolean isSuccess, CallConnected successResult, AnswerFailed failureResult) { - this.isSuccess = isSuccess; - this.successResult = successResult; - this.failureResult = failureResult; - } - - /** - * Gets the success status of the answer call operation. - * - * @return the success status of the answer call operation. - */ - public boolean isSuccess() { - return isSuccess; - } - - /** - * Gets the call connected success event. - * - * @return the call connected success event. - */ - public CallConnected getSuccessResult() { - return successResult; - } - - /** - * Gets the answer failed failure event. - * - * @return the answer failed failure event. - */ - public AnswerFailed getFailureResult() { - return failureResult; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallOptions.java index 284af397e034..e8ab5c0e92fe 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallOptions.java @@ -3,8 +3,6 @@ package com.azure.communication.callautomation.models; -import java.util.HashMap; - import com.azure.core.annotation.Fluent; /** @@ -42,11 +40,6 @@ public final class AnswerCallOptions { */ private String operationContext; - /** - * Custom Context - */ - private final CustomCallingContext customCallingContext; - /** * Constructor * @@ -56,8 +49,6 @@ public final class AnswerCallOptions { public AnswerCallOptions(String incomingCallContext, String callbackUrl) { this.incomingCallContext = incomingCallContext; this.callbackUrl = callbackUrl; - this.customCallingContext - = new CustomCallingContext(new HashMap(), new HashMap()); } /** @@ -157,12 +148,4 @@ public AnswerCallOptions setMediaStreamingOptions(MediaStreamingOptions mediaStr this.mediaStreamingOptions = mediaStreamingOptions; return this; } - - /** - * get custom context - * @return custom context - */ - public CustomCallingContext getCustomCallingContext() { - return customCallingContext; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallResult.java index 1378a0f80324..5375dbd653cf 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallResult.java @@ -5,14 +5,7 @@ import com.azure.communication.callautomation.CallConnection; import com.azure.communication.callautomation.CallConnectionAsync; -import com.azure.communication.callautomation.models.events.AnswerFailed; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; -import com.azure.communication.callautomation.models.events.CallConnected; import com.azure.core.annotation.Immutable; -import reactor.core.publisher.Mono; - -import java.time.Duration; -import java.util.Objects; /** * The result of answering a call @@ -30,76 +23,4 @@ public AnswerCallResult(CallConnectionProperties callConnectionProperties, CallC CallConnectionAsync callConnectionAsync) { super(callConnectionProperties, callConnection, callConnectionAsync); } - - /** - * Waits for the event processor to process the event - * - * @return the result of the event processing - */ - public AnswerCallEventResult waitForEventProcessor() { - return waitForEventProcessorAsync().block(); - } - - /** - * Waits for the event processor to process the event - * - * @param timeout the timeout - * @return the result of the event processing - */ - public AnswerCallEventResult waitForEventProcessor(Duration timeout) { - return waitForEventProcessorAsync(timeout).block(); - } - - /** - * Waits for the event processor to process the event - * - * @return the result of the event processing - */ - public Mono waitForEventProcessorAsync() { - return waitForEventProcessorAsync(null); - } - - /** - * Waits for the event processor to process the event - * - * @param timeout the timeout - * @return the result of the event processing - */ - public Mono waitForEventProcessorAsync(Duration timeout) { - if (eventProcessor == null) { - return Mono.empty(); - } - - return (timeout == null - ? eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CallConnected.class || event.getClass() == AnswerFailed.class)) - : eventProcessor - .waitForEventProcessorAsync( - event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CallConnected.class || event.getClass() == AnswerFailed.class), - timeout)).flatMap(event -> Mono.just(getReturnedEvent(event))); - } - - /** - * Sets the returned event - * - * @param event the event to set - * @return the result of the event processing - */ - private AnswerCallEventResult getReturnedEvent(CallAutomationEventBase event) { - if (event.getClass() == CallConnected.class) { - return new AnswerCallEventResult(true, (CallConnected) event, null); - } - - if (event.getClass() == AnswerFailed.class) { - return new AnswerCallEventResult(false, null, (AnswerFailed) event); - } - - return null; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallIntelligenceOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallIntelligenceOptions.java index 49b91b15fd26..c4be09281142 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallIntelligenceOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallIntelligenceOptions.java @@ -16,11 +16,6 @@ public final class CallIntelligenceOptions { */ private String cognitiveServicesEndpoint; - /** - * A backup endpoint URL of the Azure Cognitive Services resource attached - */ - private String backupCognitiveServicesEndpoint; - /** * Creates an instance of {@link CallIntelligenceOptions}. */ @@ -48,26 +43,4 @@ public CallIntelligenceOptions setCognitiveServicesEndpoint(String cognitiveServ this.cognitiveServicesEndpoint = cognitiveServicesEndpoint; return this; } - - /** - * Get the backupCognitiveServicesEndpoint property: A backup endpoint URL of the Azure Cognitive Services resource - * attached. - * - * @return the backupCognitiveServicesEndpoint value. - */ - public String getBackupCognitiveServicesEndpoint() { - return this.backupCognitiveServicesEndpoint; - } - - /** - * Set the backupCognitiveServicesEndpoint property: A backup endpoint URL of the Azure Cognitive Services resource - * attached. - * - * @param backupCognitiveServicesEndpoint the backupCognitiveServicesEndpoint value to set. - * @return the CallIntelligenceOptions object itself. - */ - public CallIntelligenceOptions setBackupCognitiveServicesEndpoint(String backupCognitiveServicesEndpoint) { - this.backupCognitiveServicesEndpoint = backupCognitiveServicesEndpoint; - return this; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallInvite.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallInvite.java index 023368b4be2e..2569b4468f03 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallInvite.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallInvite.java @@ -4,15 +4,14 @@ package com.azure.communication.callautomation.models; +import java.util.HashMap; + import com.azure.communication.common.CommunicationIdentifier; import com.azure.communication.common.CommunicationUserIdentifier; -import com.azure.communication.common.MicrosoftTeamsAppIdentifier; import com.azure.communication.common.MicrosoftTeamsUserIdentifier; import com.azure.communication.common.PhoneNumberIdentifier; import com.azure.core.annotation.Fluent; -import java.util.HashMap; - /** * Call invite details. */ @@ -55,16 +54,6 @@ public CallInvite(MicrosoftTeamsUserIdentifier targetIdentity) { this.customCallingContext = new CustomCallingContext(null, new HashMap<>()); } - /** - * Create a CallInvite object with MicrosoftTeamsAppIdentifier - * @param targetIdentity Target's MicrosoftTeamsAppIdentifier - */ - public CallInvite(MicrosoftTeamsAppIdentifier targetIdentity) { - this.targetParticipant = targetIdentity; - this.sourceCallerIdNumber = null; - this.customCallingContext = new CustomCallingContext(null, new HashMap<>()); - } - /** * Get target's CommunicationIdentifier * @return target's CommunicationIdentifier diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallResult.java index b8c47be7eb43..0efd271b8048 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallResult.java @@ -5,7 +5,6 @@ import com.azure.communication.callautomation.CallConnection; import com.azure.communication.callautomation.CallConnectionAsync; -import com.azure.communication.callautomation.CallAutomationEventProcessor; /** * The abstract class used as parent of [action]CallResult @@ -26,19 +25,6 @@ public abstract class CallResult { */ private final CallConnectionAsync callConnectionAsync; - /** - * The event processor that handles events. - */ - protected CallAutomationEventProcessor eventProcessor; - /** - * The call's connection id. - */ - protected String callConnectionId; - /** - * Operation context from the api request. - */ - protected String operationContextFromRequest; - CallResult(CallConnectionProperties callConnectionProperties, CallConnection callConnection, CallConnectionAsync callConnectionAsync) { this.callConnectionProperties = callConnectionProperties; @@ -46,20 +32,6 @@ public abstract class CallResult { this.callConnectionAsync = callConnectionAsync; } - /** - * Sets the event processor - * - * @param eventProcessor the event processor - * @param callConnectionId the call connection id - * @param operationContext the operation context - */ - public void setEventProcessor(CallAutomationEventProcessor eventProcessor, String callConnectionId, - String operationContext) { - this.eventProcessor = eventProcessor; - this.callConnectionId = callConnectionId; - this.operationContextFromRequest = operationContext; - } - /** * Get the callConnectionProperties. * diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantEventResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantEventResult.java deleted file mode 100644 index 3d4c4f04bee2..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantEventResult.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.models.events.CancelAddParticipantSucceeded; -import com.azure.communication.callautomation.models.events.CancelAddParticipantFailed; -import com.azure.core.annotation.Immutable; - -/** - * The result of a cancel add participant event. - */ -@Immutable -public final class CancelAddParticipantEventResult { - private final boolean isSuccess; - private final CancelAddParticipantSucceeded successResult; - private final CancelAddParticipantFailed failureResult; - private final String invitationId; - - /** - * Initializes a new instance of CancelAddParticipantEventResult. - * - * @param isSuccess the success status of the cancel add participant operation. - * @param successResult the add participant cancelled success event. - * @param failureResult the cancel add participant failed event. - * @param participant the participant. - * @param invitationId the invitation id. - */ - CancelAddParticipantEventResult(boolean isSuccess, CancelAddParticipantSucceeded successResult, - CancelAddParticipantFailed failureResult, String invitationId) { - this.isSuccess = isSuccess; - this.successResult = successResult; - this.failureResult = failureResult; - this.invitationId = invitationId; - } - - /** - * Gets the success status of the cancel add participant operation. - * - * @return the success status of the cancel add participant operation. - */ - public boolean isSuccess() { - return isSuccess; - } - - /** - * Gets the add participant cancelled success event. - * - * @return the add participant cancelled success event. - */ - public CancelAddParticipantSucceeded getSuccessResult() { - return successResult; - } - - /** - * Gets the cancel add participant failed event. - * - * @return the cancel add participant failed event. - */ - public CancelAddParticipantFailed getFailureResult() { - return failureResult; - } - - /** - * Gets the invitation id. - * - * @return the invitation id. - */ - public String getInvitationId() { - return invitationId; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantOperationResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantOperationResult.java index defcd4325638..ce258f9a8d1d 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantOperationResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantOperationResult.java @@ -6,19 +6,12 @@ import com.azure.communication.callautomation.implementation.accesshelpers.CancelAddParticipantResponseConstructorProxy; import com.azure.communication.callautomation.implementation.accesshelpers.CancelAddParticipantResponseConstructorProxy.CancelAddParticipantResponseConstructorAccessor; import com.azure.communication.callautomation.implementation.models.CancelAddParticipantResponse; -import com.azure.communication.callautomation.models.events.CancelAddParticipantSucceeded; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; -import com.azure.communication.callautomation.models.events.CancelAddParticipantFailed; import com.azure.core.annotation.Immutable; -import reactor.core.publisher.Mono; - -import java.time.Duration; import java.util.Objects; /** The CancelAddParticipantResult model. */ @Immutable -public final class CancelAddParticipantOperationResult - extends ResultWithEventHandling { +public final class CancelAddParticipantOperationResult { /** * The invitation ID used to cancel the add participant request. @@ -78,39 +71,4 @@ public String getInvitationId() { public String getOperationContext() { return operationContext; } - - @Override - public Mono waitForEventProcessorAsync(Duration timeout) { - if (eventProcessor == null) { - return Mono.empty(); - } - - return (timeout == null - ? eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CancelAddParticipantSucceeded.class - || event.getClass() == CancelAddParticipantFailed.class)) - : eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CancelAddParticipantSucceeded.class - || event.getClass() == CancelAddParticipantFailed.class), - timeout)).flatMap(event -> Mono.just(getReturnedEvent(event))); - } - - @Override - protected CancelAddParticipantEventResult getReturnedEvent(CallAutomationEventBase event) { - CancelAddParticipantEventResult result = null; - if (event.getClass() == CancelAddParticipantSucceeded.class) { - result = new CancelAddParticipantEventResult(true, (CancelAddParticipantSucceeded) event, null, - ((CancelAddParticipantSucceeded) event).getInvitationId()); - } else if (event.getClass() == CancelAddParticipantFailed.class) { - result = new CancelAddParticipantEventResult(false, null, (CancelAddParticipantFailed) event, - ((CancelAddParticipantFailed) event).getInvitationId()); - } - return result; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ChoiceResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ChoiceResult.java index b08be534852d..e5f856e321db 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ChoiceResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ChoiceResult.java @@ -40,17 +40,6 @@ public String getLabel() { return this.label; } - /** - * Set the label property: Label is the primary identifier for the choice detected. - * - * @param label the label value to set. - * @return the ChoiceResult object itself. - */ - public ChoiceResult setLabel(String label) { - this.label = label; - return this; - } - /** * Get the recognizedPhrase property: Phrases are set to the value if choice is selected via phrase detection. If * Dtmf input is recognized, then Label will be the identifier for the choice detected and phrases will be set to @@ -62,19 +51,6 @@ public String getRecognizedPhrase() { return this.recognizedPhrase; } - /** - * Set the recognizedPhrase property: Phrases are set to the value if choice is selected via phrase detection. If - * Dtmf input is recognized, then Label will be the identifier for the choice detected and phrases will be set to - * null. - * - * @param recognizedPhrase the recognizedPhrase value to set. - * @return the ChoiceResult object itself. - */ - public ChoiceResult setRecognizedPhrase(String recognizedPhrase) { - this.recognizedPhrase = recognizedPhrase; - return this; - } - @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ConnectCallEventResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ConnectCallEventResult.java deleted file mode 100644 index 7c132d0c6045..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ConnectCallEventResult.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.models.events.CallConnected; -import com.azure.communication.callautomation.models.events.ConnectFailed; -import com.azure.core.annotation.Immutable; - -/** - * The result of a connect call event. - */ -@Immutable -public final class ConnectCallEventResult { - private final boolean isSuccess; - private final CallConnected successResult; - private final ConnectFailed failureResult; - - /** - * Initializes a new instance of ConnectCallEventResult. - * - * @param isSuccess the success status of the connect call operation. - * @param successResult the call connected success event. - */ - ConnectCallEventResult(boolean isSuccess, CallConnected successResult, ConnectFailed failureResult) { - this.isSuccess = isSuccess; - this.successResult = successResult; - this.failureResult = failureResult; - } - - /** - * Gets the success status of the connect call operation. - * - * @return the success status of the connect call operation. - */ - public boolean isSuccess() { - return isSuccess; - } - - /** - * Gets the call connected success event. - * - * @return the call connected success event. - */ - public CallConnected getSuccessResult() { - return successResult; - } - - /** - * Gets the connect failed event. - * @return the connect call failure event. - */ - public ConnectFailed getFailureResult() { - return failureResult; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ConnectCallResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ConnectCallResult.java index 66b88bd51b20..313d8a224bd2 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ConnectCallResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ConnectCallResult.java @@ -3,18 +3,10 @@ package com.azure.communication.callautomation.models; -import java.time.Duration; -import java.util.Objects; - import com.azure.communication.callautomation.CallConnection; import com.azure.communication.callautomation.CallConnectionAsync; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; -import com.azure.communication.callautomation.models.events.CallConnected; -import com.azure.communication.callautomation.models.events.ConnectFailed; import com.azure.core.annotation.Immutable; -import reactor.core.publisher.Mono; - /** The result of connect request. */ @Immutable public final class ConnectCallResult extends CallResult { @@ -29,76 +21,4 @@ public ConnectCallResult(CallConnectionProperties callConnectionProperties, Call CallConnectionAsync callConnectionAsync) { super(callConnectionProperties, callConnection, callConnectionAsync); } - - /** - * Waits for the event processor to process the event - * - * @return the result of the event processing - */ - public ConnectCallEventResult waitForEventProcessor() { - return waitForEventProcessorAsync().block(); - } - - /** - * Waits for the event processor to process the event - * - * @param timeout the timeout - * @return the result of the event processing - */ - public ConnectCallEventResult waitForEventProcessor(Duration timeout) { - return waitForEventProcessorAsync(timeout).block(); - } - - /** - * Waits for the event processor to process the event - * - * @return the result of the event processing - */ - public Mono waitForEventProcessorAsync() { - return waitForEventProcessorAsync(null); - } - - /** - * Waits for the event processor to process the event - * - * @param timeout the timeout - * @return the result of the event processing - */ - public Mono waitForEventProcessorAsync(Duration timeout) { - if (eventProcessor == null) { - return Mono.empty(); - } - - return (timeout == null - ? eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CallConnected.class || event.getClass() == ConnectFailed.class)) - : eventProcessor - .waitForEventProcessorAsync( - event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CallConnected.class || event.getClass() == ConnectFailed.class), - timeout)).flatMap(event -> Mono.just(getReturnedEvent(event))); - } - - /** - * Sets the returned event - * - * @param event the event to set - * @return the result of the event processing - */ - private ConnectCallEventResult getReturnedEvent(CallAutomationEventBase event) { - if (event.getClass() == CallConnected.class) { - return new ConnectCallEventResult(true, (CallConnected) event, null); - } - - if (event.getClass() == ConnectFailed.class) { - return new ConnectCallEventResult(false, null, (ConnectFailed) event); - } - - return null; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallEventResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallEventResult.java deleted file mode 100644 index 10cf91ecbdfc..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallEventResult.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.models.events.CallConnected; -import com.azure.communication.callautomation.models.events.CreateCallFailed; -import com.azure.core.annotation.Immutable; - -/** - * The result of a create call event. - */ -@Immutable -public final class CreateCallEventResult { - private final boolean isSuccess; - private final CallConnected successResult; - private final CreateCallFailed failureResult; - - /** - * Initializes a new instance of CreateCallEventResult. - * - * @param isSuccess the success status of the create call operation. - * @param successResult the call connected success event. - */ - CreateCallEventResult(boolean isSuccess, CallConnected successResult, CreateCallFailed failureResult) { - this.isSuccess = isSuccess; - this.successResult = successResult; - this.failureResult = failureResult; - } - - /** - * Gets the success status of the create call operation. - * - * @return the success status of the create call operation. - */ - public boolean isSuccess() { - return isSuccess; - } - - /** - * Gets the call connected success event. - * - * @return the call connected success event. - */ - public CallConnected getSuccessResult() { - return successResult; - } - - /** - * Gets the create call failure event. - * - * @return the create call failure event. - */ - public CreateCallFailed getFailureResult() { - return failureResult; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallOptions.java index fecc04be6d47..fe0f9e8ea87d 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallOptions.java @@ -3,7 +3,6 @@ package com.azure.communication.callautomation.models; -import com.azure.communication.common.MicrosoftTeamsAppIdentifier; import com.azure.core.annotation.Fluent; /** @@ -41,13 +40,6 @@ public final class CreateCallOptions { */ private TranscriptionOptions transcriptionOptions; - /** - * Overrides default client source by a MicrosoftTeamsAppIdentifier type source. - * Required for creating call with Teams resource account ID. - * This is per-operation setting and does not change the client's default source. - */ - private MicrosoftTeamsAppIdentifier teamsAppSource; - /** * Constructor * @param callInvite Call invitee information. @@ -154,26 +146,4 @@ public CreateCallOptions setMediaStreamingOptions(MediaStreamingOptions mediaStr this.mediaStreamingOptions = mediaStreamingOptions; return this; } - - /** - * Get the TeamsAppSource property: it overrides default client source by a MicrosoftTeamsAppIdentifier type source. - * - * @return the teamsAppSource. - */ - public MicrosoftTeamsAppIdentifier getTeamsAppSource() { - return teamsAppSource; - } - - /** - * Overrides default client source by a MicrosoftTeamsAppIdentifier type source. - * Required for creating call with Teams resource account ID. - * This is per-operation setting and does not change the client's default source. - * - * @param teamsAppSource The MicrosoftTeamsAppIdentifier type source for overriding default client source. - * @return the CreateCallOptions object itself. - */ - public CreateCallOptions setTeamsAppSource(MicrosoftTeamsAppIdentifier teamsAppSource) { - this.teamsAppSource = teamsAppSource; - return this; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallResult.java index 8a3704316ec0..1cb02b0aefff 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallResult.java @@ -5,14 +5,7 @@ import com.azure.communication.callautomation.CallConnection; import com.azure.communication.callautomation.CallConnectionAsync; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; -import com.azure.communication.callautomation.models.events.CallConnected; -import com.azure.communication.callautomation.models.events.CreateCallFailed; import com.azure.core.annotation.Immutable; -import reactor.core.publisher.Mono; - -import java.time.Duration; -import java.util.Objects; /** * The result of answering a call @@ -31,75 +24,4 @@ public CreateCallResult(CallConnectionProperties callConnectionProperties, CallC CallConnectionAsync callConnectionAsync) { super(callConnectionProperties, callConnection, callConnectionAsync); } - - /** - * Waits for the event processor to process the event - * - * @return the result of the event processing - */ - public CreateCallEventResult waitForEventProcessor() { - return waitForEventProcessorAsync().block(); - } - - /** - * Waits for the event processor to process the event - * - * @param timeout the timeout - * @return the result of the event processing - */ - public CreateCallEventResult waitForEventProcessor(Duration timeout) { - return waitForEventProcessorAsync(timeout).block(); - } - - /** - * Waits for the event processor to process the event - * - * @return the result of the event processing - */ - public Mono waitForEventProcessorAsync() { - return waitForEventProcessorAsync(null); - } - - /** - * Waits for the event processor to process the event - * - * @param timeout the timeout - * @return the result of the event processing - */ - public Mono waitForEventProcessorAsync(Duration timeout) { - if (eventProcessor == null) { - return Mono.empty(); - } - - return (timeout == null - ? eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CallConnected.class || event.getClass() == CreateCallFailed.class)) - : eventProcessor.waitForEventProcessorAsync( - event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CallConnected.class || event.getClass() == CreateCallFailed.class), - timeout)).flatMap(event -> Mono.just(getReturnedEvent(event))); - } - - /** - * Sets the returned event - * - * @param event the event to set - * @return the result of the event processing - */ - private CreateCallEventResult getReturnedEvent(CallAutomationEventBase event) { - if (event.getClass() == CallConnected.class) { - return new CreateCallEventResult(true, (CallConnected) event, null); - } - - if (event.getClass() == CreateCallFailed.class) { - return new CreateCallEventResult(false, null, (CreateCallFailed) event); - } - - return null; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateGroupCallOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateGroupCallOptions.java index 3c1142ac45a8..39109119a4c6 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateGroupCallOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateGroupCallOptions.java @@ -3,14 +3,12 @@ package com.azure.communication.callautomation.models; +import java.util.List; + import com.azure.communication.common.CommunicationIdentifier; -import com.azure.communication.common.MicrosoftTeamsAppIdentifier; import com.azure.communication.common.PhoneNumberIdentifier; import com.azure.core.annotation.Fluent; -import java.util.HashMap; -import java.util.List; - /** * The options for creating a group call. */ @@ -56,18 +54,6 @@ public final class CreateGroupCallOptions { */ private CallIntelligenceOptions callIntelligenceOptions; - /** - * Custom Context - */ - private final CustomCallingContext customContext; - - /** - * Overrides default client source by a MicrosoftTeamsAppIdentifier type source. - * Required for creating call with Teams resource account ID. - * This is per-operation setting and does not change the client's default source. - */ - private MicrosoftTeamsAppIdentifier teamsAppSource; - /** * Constructor * @@ -79,7 +65,6 @@ public CreateGroupCallOptions(List targetParticipants, this.callbackUrl = callbackUrl; this.sourceDisplayName = null; this.sourceCallIdNumber = null; - this.customContext = new CustomCallingContext(new HashMap(), new HashMap()); } /** @@ -215,34 +200,4 @@ public MediaStreamingOptions getMediaStreamingOptions() { public TranscriptionOptions getTranscriptionOptions() { return transcriptionOptions; } - - /** - * get custom context - * @return custom context - */ - public CustomCallingContext getCustomContext() { - return customContext; - } - - /** - * Get the TeamsAppSource property: it overrides default client source by a MicrosoftTeamsAppIdentifier type source. - * - * @return the teamsAppSource. - */ - public MicrosoftTeamsAppIdentifier getTeamsAppSource() { - return teamsAppSource; - } - - /** - * Overrides default client source by a MicrosoftTeamsAppIdentifier type source. - * Required for creating call with Teams resource account ID. - * This is per-operation setting and does not change the client's default source. - * - * @param teamsAppSource The MicrosoftTeamsAppIdentifier type source for overriding default client source. - * @return the CreateCallOptions object itself. - */ - public CreateGroupCallOptions setTeamsAppSource(MicrosoftTeamsAppIdentifier teamsAppSource) { - this.teamsAppSource = teamsAppSource; - return this; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/DialogInputType.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/DialogInputType.java deleted file mode 100644 index 1a96ec6d5ddc..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/DialogInputType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.communication.callautomation.models; - -import com.azure.core.util.ExpandableStringEnum; - -import java.util.Collection; - -/** Determines the type of the dialog. */ -public final class DialogInputType extends ExpandableStringEnum { - /** Static value powerVirtualAgents for DialogInputType. */ - public static final DialogInputType POWER_VIRTUAL_AGENTS = fromString("powerVirtualAgents"); - - /** Static value azureOpenAI for DialogInputType. */ - public static final DialogInputType AZURE_OPEN_AI = fromString("azureOpenAI"); - - /** - * Creates a new instance of DialogInputType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DialogInputType() { - } - - /** - * Creates or finds a DialogInputType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DialogInputType. - */ - public static DialogInputType fromString(String name) { - return fromString(name, DialogInputType.class); - } - - /** - * Gets known DialogInputType values. - * - * @return known DialogInputType values. - */ - public static Collection values() { - return values(DialogInputType.class); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/DialogStateResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/DialogStateResult.java deleted file mode 100644 index 76231fd9c846..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/DialogStateResult.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.implementation.accesshelpers.DialogStateResponseConstructorProxy; -import com.azure.communication.callautomation.implementation.models.DialogStateResponse; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; -import java.util.Objects; - -/** The DialogStateResult model. */ -@Immutable -public class DialogStateResult implements JsonSerializable { - - /* - * The dialog ID. - */ - private String dialogId; - - /* - * Defines options for dialog. - */ - private StartDialogOptions dialogOptions; - - /* - * Determines the type of the dialog. - */ - private DialogInputType dialogInputType; - - /* - * The value to identify context of the operation. - */ - private String operationContext; - - static { - DialogStateResponseConstructorProxy - .setAccessor(new DialogStateResponseConstructorProxy.DialogStateResponseConstructorAccessor() { - @Override - public DialogStateResult create(DialogStateResponse internalHeaders) { - return new DialogStateResult(internalHeaders); - } - }); - } - - /** - * Public constructor. - * - */ - public DialogStateResult() { - this.dialogId = null; - this.operationContext = null; - } - - /** - * Constructor of the class - * - * @param dialogStateResponse The response from the dialog service - */ - DialogStateResult(DialogStateResponse dialogStateResponse) { - Objects.requireNonNull(dialogStateResponse, "dialogStateResponse must not be null"); - - this.dialogId = dialogStateResponse.getDialogId(); - this.operationContext = dialogStateResponse.getOperationContext(); - } - - /** - * Get the dialogId property: The dialog ID. - * - * @return the dialogId value. - */ - public String getDialogId() { - return dialogId; - } - - /** - * Get the operationContext property: The value to identify context of the operation. - * - * @return the operationContext value. - */ - public String getOperationContext() { - return operationContext; - } - - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dialogId", this.dialogId); - jsonWriter.writeStringField("operationContext", this.operationContext); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DialogStateResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DialogStateResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DialogStateResult. - */ - public static DialogStateResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final DialogStateResult result = new DialogStateResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("dialogId".equals(fieldName)) { - result.dialogId = reader.getString(); - } else if ("operationContext".equals(fieldName)) { - result.operationContext = reader.getString(); - } else { - reader.skipChildren(); - } - } - return result; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/InterruptAudioAndAnnounceOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/InterruptAudioAndAnnounceOptions.java deleted file mode 100644 index e2b89e5047c3..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/InterruptAudioAndAnnounceOptions.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.common.CommunicationIdentifier; -import com.azure.core.annotation.Fluent; - -import java.util.ArrayList; -import java.util.List; - -/** The InterruptAudioAndAnnounceOptions model. */ -@Fluent -public final class InterruptAudioAndAnnounceOptions { - /* - * A List of {@link PlaySource} representing the sources to play. - * Currently only single play source per request is supported. - */ - private final List playSources; - - /* - * The targets to play to - */ - private final CommunicationIdentifier playTo; - - /* - * The operation context - */ - private String operationContext; - - /** - * Constructor - * @param playSources A List of {@link PlaySource} representing the sources to play. - * @param playTo The target to play to. - */ - public InterruptAudioAndAnnounceOptions(List playSources, CommunicationIdentifier playTo) { - this.playSources = playSources; - this.playTo = playTo; - } - - /** - * Constructor - * @param playSource A {@link PlaySource} representing the source to play. - * @param playTo The target to play to. - */ - public InterruptAudioAndAnnounceOptions(PlaySource playSource, CommunicationIdentifier playTo) { - this.playSources = new ArrayList<>(); - this.playSources.add(playSource); - this.playTo = playTo; - } - - /** - * Get the play sources. - * - * @return the playSources value. - */ - public List getPlaySources() { - return this.playSources; - } - - /** - * Get the target to play to. - * - * @return the playTo value. - */ - public CommunicationIdentifier getPlayTo() { - return this.playTo; - } - - /** - * Get the operationContext property. - * - * @return the operationContext value. - */ - public String getOperationContext() { - return this.operationContext; - } - - /** - * Set the operationContext property. - * - * @param operationContext the operationContext value to set. - * @return the InterruptAudioAndAnnounceOptions object itself. - */ - public InterruptAudioAndAnnounceOptions setOperationContext(String operationContext) { - this.operationContext = operationContext; - return this; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/PlayOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/PlayOptions.java index f53db7ff5f63..51bf6ca25e3f 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/PlayOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/PlayOptions.java @@ -39,11 +39,6 @@ public final class PlayOptions { */ private String operationCallbackUrl; - /* - * If set, hold audio will be interrupted, then this request will be played, and then the hold audio will be resumed. - */ - private Boolean interruptHoldAudio; - /** * Constructor * @param playSources A List of {@link PlaySource} representing the sources to play. @@ -143,24 +138,4 @@ public PlayOptions setOperationCallbackUrl(String operationCallbackUrl) { this.operationCallbackUrl = operationCallbackUrl; return this; } - - /** - * Get the interruptHoldAudio property. - * - * @return the interruptHoldAudio value. - */ - public Boolean isInterruptHoldAudio() { - return this.interruptHoldAudio; - } - - /** - * Set the interruptHoldAudio property - * - * @param interruptHoldAudio the interruptHoldAudio value to set. - * @return the PlayOptions object itself. - */ - public PlayOptions setInterruptHoldAudio(Boolean interruptHoldAudio) { - this.interruptHoldAudio = interruptHoldAudio; - return this; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/RemoveParticipantResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/RemoveParticipantResult.java index d16ffac6c503..c8c9f4c841de 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/RemoveParticipantResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/RemoveParticipantResult.java @@ -5,18 +5,12 @@ import com.azure.communication.callautomation.implementation.accesshelpers.RemoveParticipantResponseConstructorProxy; import com.azure.communication.callautomation.implementation.models.RemoveParticipantResponseInternal; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; -import com.azure.communication.callautomation.models.events.RemoveParticipantFailed; -import com.azure.communication.callautomation.models.events.RemoveParticipantSucceeded; import com.azure.core.annotation.Immutable; -import reactor.core.publisher.Mono; - -import java.time.Duration; import java.util.Objects; /** The RemoveParticipantResult model. */ @Immutable -public final class RemoveParticipantResult extends ResultWithEventHandling { +public final class RemoveParticipantResult { /* * The operation context provided by client. */ @@ -58,41 +52,4 @@ public RemoveParticipantResult() { public String getOperationContext() { return this.operationContext; } - - @Override - public Mono waitForEventProcessorAsync(Duration timeout) { - if (eventProcessor == null) { - return Mono.empty(); - } - - return (timeout == null - ? eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == RemoveParticipantSucceeded.class - || event.getClass() == RemoveParticipantFailed.class)) - : eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == RemoveParticipantSucceeded.class - || event.getClass() == RemoveParticipantFailed.class), - timeout)).flatMap(event -> Mono.just(getReturnedEvent(event))); - } - - @Override - protected RemoveParticipantEventResult getReturnedEvent(CallAutomationEventBase event) { - RemoveParticipantEventResult result = null; - - if (event.getClass() == RemoveParticipantSucceeded.class) { - result = new RemoveParticipantEventResult(true, (RemoveParticipantSucceeded) event, null, - ((RemoveParticipantSucceeded) event).getParticipant()); - } else if (event.getClass() == RemoveParticipantFailed.class) { - result = new RemoveParticipantEventResult(false, null, (RemoveParticipantFailed) event, - ((RemoveParticipantFailed) event).getParticipant()); - } - - return result; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ResultWithEventHandling.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ResultWithEventHandling.java deleted file mode 100644 index ec06e824c386..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ResultWithEventHandling.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.CallAutomationEventProcessor; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; -import reactor.core.publisher.Mono; - -import java.time.Duration; - -/** - * Injects the event handling into the result - * - * @param the type of the event result - */ -public abstract class ResultWithEventHandling { - /** - * The event processor that handles events. - */ - protected CallAutomationEventProcessor eventProcessor; - /** - * The call's connection id. - */ - protected String callConnectionId; - /** - * Operation context from the api request. - */ - protected String operationContextFromRequest; - - /** - * Creates a new instance of {@link ResultWithEventHandling}. - */ - public ResultWithEventHandling() { - } - - /** - * Sets the event processor - * - * @param eventProcessor the event processor - * @param callConnectionId the call connection id - * @param operationContext the operation context - */ - public void setEventProcessor(CallAutomationEventProcessor eventProcessor, String callConnectionId, - String operationContext) { - this.eventProcessor = eventProcessor; - this.callConnectionId = callConnectionId; - this.operationContextFromRequest = operationContext; - } - - /** - * Waits for the event processor to process the event - * - * @return the result of the event processing - */ - public TEventResult waitForEventProcessor() { - return waitForEventProcessorAsync().block(); - } - - /** - * Waits for the event processor to process the event - * - * @param timeout the timeout - * @return the result of the event processing - */ - public TEventResult waitForEventProcessor(Duration timeout) { - return waitForEventProcessorAsync(timeout).block(); - } - - /** - * Waits for the event processor to process the event - * - * @return the result of the event processing - */ - public Mono waitForEventProcessorAsync() { - return waitForEventProcessorAsync(null); - } - - /** - * Waits for the event processor to process the event - * - * @param timeout the timeout - * @return the result of the event processing - */ - public abstract Mono waitForEventProcessorAsync(Duration timeout); - - /** - * Sets the returned event - * - * @param event the event to set - * @return the result of the event processing - */ - protected abstract TEventResult getReturnedEvent(CallAutomationEventBase event); -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/SpeechResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/SpeechResult.java index 52c7ea7d8266..900865b471bd 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/SpeechResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/SpeechResult.java @@ -3,16 +3,14 @@ package com.azure.communication.callautomation.models; -import com.azure.core.annotation.Fluent; +import java.io.IOException; + import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import java.io.IOException; - /** The continuous speech recognition result. */ -@Fluent @Immutable public final class SpeechResult extends RecognizeResult { diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartDialogOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartDialogOptions.java deleted file mode 100644 index 966d8eec8964..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartDialogOptions.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import java.util.Map; -import java.util.UUID; - -/** - * The options for starting a dialog. - */ -public class StartDialogOptions { - - /* - * Bot identifier. - */ - private String botId; - - /* - * The dialog ID. - */ - private final String dialogId; - - /* - * Determines the type of the dialog. - */ - private final DialogInputType dialogInputType; - - /* - * Dialog context. - */ - private final Map dialogContext; - - /* - * The value to identify context of the operation. - */ - private String operationContext; - - /** - * Creates a new instance of the DialogOptions. - * - * @param dialogInputType type of dialog - * @param dialogContext context of the dialog - */ - public StartDialogOptions(DialogInputType dialogInputType, Map dialogContext) { - this.dialogInputType = dialogInputType; - this.dialogContext = dialogContext; - this.dialogId = UUID.randomUUID().toString(); - } - - /** - * Creates a new instance of the DialogOptions. - * - * @param dialogId id of the dialog - * @param dialogInputType type of dialog - * @param dialogContext context of the dialog - */ - public StartDialogOptions(String dialogId, DialogInputType dialogInputType, Map dialogContext) { - this.dialogId = dialogId; - this.dialogInputType = dialogInputType; - this.dialogContext = dialogContext; - } - - /** - * Get the botAppId property: Bot identifier. - * - * @return the botAppId value. - */ - public String getBotId() { - return botId; - } - - /** - * Set the botAppId property: Bot identifier. - * - * @param botId context of the operation - */ - public void setBotId(String botId) { - this.botId = botId; - } - - /** - * Get the dialogId property: The dialog ID. - * - * @return the dialogId value. - */ - public String getDialogId() { - return dialogId; - } - - /** - * Get the dialogOptions property: Defines options for dialog. - * - * @return the dialogOptions value. - */ - public DialogInputType getDialogInputType() { - return dialogInputType; - } - - /** - * Get the dialogContext property: Dialog context. - * - * @return the dialogContext value. - */ - public Map getDialogContext() { - return dialogContext; - } - - /** - * Get the operationContext property: The value to identify context of the operation. - * - * @return the operationContext value. - */ - public String getOperationContext() { - return operationContext; - } - - /** - * Set the operationContext property: The value to identify context of the operation. - * - * @param operationContext context of the operation - */ - public void setOperationContext(String operationContext) { - this.operationContext = operationContext; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartHoldMusicOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartHoldMusicOptions.java deleted file mode 100644 index 121a0ab4b833..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartHoldMusicOptions.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.common.CommunicationIdentifier; - -/** - * Options for the Start Hold Music operation. - */ -public class StartHoldMusicOptions { - - /** - * Participant to put on hold. - */ - private final CommunicationIdentifier targetParticipant; - - /** - * Audio to play while on hold. - */ - private final PlaySource playSourceInfo; - - /** - * Operation context. - */ - private String operationContext; - - /** - * Create a new StartHoldMusicOptions object. - * @param targetParticipant Participant to be put on hold. - * @param playSourceInfo Audio to be played while on hold. - */ - public StartHoldMusicOptions(CommunicationIdentifier targetParticipant, PlaySource playSourceInfo) { - this.targetParticipant = targetParticipant; - this.playSourceInfo = playSourceInfo; - } - - /** - * Get Participant to be put on hold. - * @return participant. - */ - public CommunicationIdentifier getTargetParticipant() { - return targetParticipant; - } - - /** - * Get PlaySourceInfo - * @return the playSourceInfo. - */ - public PlaySource getPlaySourceInfo() { - return playSourceInfo; - } - - /** - * Get the operation context. - * @return operation context. - */ - public String getOperationContext() { - return operationContext; - } - - /** - * Sets the operation context. - * @param operationContext Operation Context - * @return The StartHoldMusicOptions object. - */ - public StartHoldMusicOptions setOperationContext(String operationContext) { - this.operationContext = operationContext; - return this; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartRecordingOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartRecordingOptions.java index ee0159146a71..cf3a60c10ab4 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartRecordingOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartRecordingOptions.java @@ -18,8 +18,6 @@ public final class StartRecordingOptions { */ private final CallLocator callLocator; - private final String callConnectionId; - private String recordingStateCallbackUrl; private RecordingChannel recordingChannel; @@ -43,17 +41,6 @@ public final class StartRecordingOptions { */ public StartRecordingOptions(CallLocator callLocator) { this.callLocator = callLocator; - this.callConnectionId = null; - } - - /** - * Constructor - * - * @param callConnectionId the ID of the call connection. - */ - public StartRecordingOptions(String callConnectionId) { - this.callConnectionId = callConnectionId; - this.callLocator = null; } /** @@ -65,15 +52,6 @@ public CallLocator getCallLocator() { return this.callLocator; } - /** - * Get callConnectionId for the call - * - * @return callConnectionId for the call - */ - public String getCallConnectionId() { - return callConnectionId; - } - /** * Uri to send state change callbacks. * diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallResult.java index cc5d09704374..379a73e19f70 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallResult.java @@ -5,18 +5,12 @@ import com.azure.communication.callautomation.implementation.accesshelpers.TransferCallResponseConstructorProxy; import com.azure.communication.callautomation.implementation.models.TransferCallResponseInternal; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; -import com.azure.communication.callautomation.models.events.CallTransferAccepted; -import com.azure.communication.callautomation.models.events.CallTransferFailed; import com.azure.core.annotation.Immutable; -import reactor.core.publisher.Mono; - -import java.time.Duration; import java.util.Objects; /** The TransferCallResult model. */ @Immutable -public final class TransferCallResult extends ResultWithEventHandling { +public final class TransferCallResult { /* * The operation context provided by client. */ @@ -59,37 +53,4 @@ public TransferCallResult() { public String getOperationContext() { return this.operationContext; } - - @Override - public Mono waitForEventProcessorAsync(Duration timeout) { - if (eventProcessor == null) { - return Mono.empty(); - } - - return (timeout == null - ? eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CallTransferAccepted.class || event.getClass() == CallTransferFailed.class)) - : eventProcessor.waitForEventProcessorAsync( - event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CallTransferAccepted.class || event.getClass() == CallTransferFailed.class), - timeout)).flatMap(event -> Mono.just(getReturnedEvent(event))); - } - - @Override - protected TransferCallToParticipantEventResult getReturnedEvent(CallAutomationEventBase event) { - TransferCallToParticipantEventResult result = null; - - if (event.getClass() == CallTransferAccepted.class) { - result = new TransferCallToParticipantEventResult(true, (CallTransferAccepted) event, null); - } else if (event.getClass() == CallTransferFailed.class) { - result = new TransferCallToParticipantEventResult(false, null, (CallTransferFailed) event); - } - - return result; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallToParticipantEventResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallToParticipantEventResult.java deleted file mode 100644 index 03ccefe0ac48..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallToParticipantEventResult.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.models.events.CallTransferAccepted; -import com.azure.communication.callautomation.models.events.CallTransferFailed; -import com.azure.core.annotation.Immutable; - -/** - * The result of a transfer call to participant event. - */ -@Immutable -public final class TransferCallToParticipantEventResult { - private final boolean isSuccess; - private final CallTransferAccepted successResult; - private final CallTransferFailed failureResult; - - /** - * Initializes a new instance of TransferCallToParticipantEventResult. - * - * @param isSuccess the success status of the transfer call to participant operation. - * @param successResult the transfer call to participant succeeded event. - * @param failureResult the transfer call to participant failed event. - */ - TransferCallToParticipantEventResult(boolean isSuccess, CallTransferAccepted successResult, - CallTransferFailed failureResult) { - this.isSuccess = isSuccess; - this.successResult = successResult; - this.failureResult = failureResult; - } - - /** - * Gets the success status of the transfer call to participant operation. - * - * @return the success status of the transfer call to participant operation. - */ - public boolean isSuccess() { - return isSuccess; - } - - /** - * Gets the transfer call to participant succeeded event. - * - * @return the transfer call to participant succeeded event. - */ - public CallTransferAccepted getSuccessResult() { - return successResult; - } - - /** - * Gets the transfer call to participant failed event. - * - * @return the transfer call to participant failed event. - */ - public CallTransferFailed getFailureResult() { - return failureResult; - } - -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallToParticipantOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallToParticipantOptions.java index c1e4903d5487..26237f3482e6 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallToParticipantOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallToParticipantOptions.java @@ -7,7 +7,6 @@ import com.azure.communication.common.CommunicationIdentifier; import com.azure.communication.common.CommunicationUserIdentifier; -import com.azure.communication.common.MicrosoftTeamsAppIdentifier; import com.azure.communication.common.MicrosoftTeamsUserIdentifier; import com.azure.communication.common.PhoneNumberIdentifier; import com.azure.core.annotation.Fluent; @@ -80,16 +79,6 @@ public TransferCallToParticipantOptions(MicrosoftTeamsUserIdentifier targetParti this.customCallingContext = new CustomCallingContext(null, new HashMap<>()); } - /** - * Constructor - * - * @param targetParticipant {@link MicrosoftTeamsAppIdentifier} contains information for TransferTarget(to whom the call is transferred). - */ - public TransferCallToParticipantOptions(MicrosoftTeamsAppIdentifier targetParticipant) { - this.targetParticipant = targetParticipant; - this.customCallingContext = new CustomCallingContext(null, new HashMap<>()); - } - /** * Get the operationContext. * diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UnmuteParticipantOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UnmuteParticipantOptions.java deleted file mode 100644 index 6c1341c81709..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UnmuteParticipantOptions.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.common.CommunicationIdentifier; -import com.azure.core.annotation.Fluent; - -/** - * The options for unmuting a participant. - */ -@Fluent -public final class UnmuteParticipantOptions { - /** - * The participants to unmute. - * Only ACS Users are currently supported. - */ - private final CommunicationIdentifier targetParticipant; - - /** - * The operational context - */ - private String operationContext; - - /** - * Constructor - * - * @param targetParticipant The participants to unmute. - */ - public UnmuteParticipantOptions(CommunicationIdentifier targetParticipant) { - this.targetParticipant = targetParticipant; - } - - /** - * Get the participant. - * - * @return the participant to unmute. - */ - public CommunicationIdentifier getTargetParticipant() { - return targetParticipant; - } - - /** - * Get the operationContext. - * - * @return the operationContext - */ - public String getOperationContext() { - return operationContext; - } - - /** - * Set the operationContext. - * - * @param operationContext the operationContext to set - * @return the UnmuteParticipantOptions object itself. - */ - public UnmuteParticipantOptions setOperationContext(String operationContext) { - this.operationContext = operationContext; - return this; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UnmuteParticipantResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UnmuteParticipantResult.java deleted file mode 100644 index 9d63a71a78be..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UnmuteParticipantResult.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.implementation.accesshelpers.UnmuteParticipantsResponseConstructorProxy; -import com.azure.communication.callautomation.implementation.models.UnmuteParticipantsResponseInternal; -import com.azure.core.annotation.Immutable; - -import java.util.Objects; - -/** The UnmuteParticipantsResult model. */ -@Immutable -public final class UnmuteParticipantResult { - /* - * The operation context provided by client. - */ - private final String operationContext; - - static { - UnmuteParticipantsResponseConstructorProxy.setAccessor(UnmuteParticipantResult::new); - } - - /** - * Public constructor. - * - */ - public UnmuteParticipantResult() { - this.operationContext = null; - } - - /** - * Package-private constructor of the class, used internally only. - * - * @param unmuteParticipantsResponseInternal The response from the service - */ - UnmuteParticipantResult(UnmuteParticipantsResponseInternal unmuteParticipantsResponseInternal) { - Objects.requireNonNull(unmuteParticipantsResponseInternal, - "unmuteParticipantsResponseInternal must not be null"); - - this.operationContext = unmuteParticipantsResponseInternal.getOperationContext(); - } - - /** - * Get the operationContext property: The operation context provided by client. - * - * @return the operationContext value. - */ - public String getOperationContext() { - return this.operationContext; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UserConsent.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UserConsent.java deleted file mode 100644 index 976373ec521b..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UserConsent.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The UserConsent model. */ -@Fluent -public final class UserConsent implements JsonSerializable { - /* - * The recording property. - */ - private Integer recording; - - /** Creates an instance of UserConsent class. */ - public UserConsent() { - } - - /** - * Get the recording property: The recording property. - * - * @return the recording value. - */ - public Integer getRecording() { - return this.recording; - } - - /** - * Set the recording property: The recording property. - * - * @param recording the recording value to set. - * @return the UserConsent object itself. - */ - public UserConsent setRecording(Integer recording) { - this.recording = recording; - return this; - } - - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("recording", recording); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserConsent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserConsent if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UserConsent. - */ - public static UserConsent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserConsent consent = new UserConsent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("recording".equals(fieldName)) { - consent.recording = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - return consent; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogCompleted.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogCompleted.java deleted file mode 100644 index c0f022699fd2..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogCompleted.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The DialogCompleted model. */ -@Immutable -public class DialogCompleted extends CallAutomationEventBase { - - /* - * Contains the resulting SIP code/sub-code and message from NGC services. - */ - private ResultInformation resultInformation; - - /* - * Determines the type of the dialog. - */ - private DialogInputType dialogInputType; - - /* - * Dialog ID - */ - private String dialogId; - - /** Creates an instance of DialogCompleted class. */ - public DialogCompleted() { - } - - /** - * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services. - * - * @return the resultInformation value. - */ - public ResultInformation getResultInformation() { - return this.resultInformation; - } - - /** - * Get the dialogInputType property: Determines the type of the dialog. - * - * @return the dialogInputType value. - */ - public DialogInputType getDialogInputType() { - return this.dialogInputType; - } - - /** - * Get the dialogId property: Dialog ID. - * - * @return the dialogId value. - */ - public String getDialogId() { - return this.dialogId; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("resultInformation", resultInformation); - jsonWriter.writeStringField("dialogInputType", dialogInputType != null ? dialogInputType.toString() : null); - jsonWriter.writeStringField("dialogId", dialogId); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DialogCompleted from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DialogCompleted if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DialogCompleted. - */ - public static DialogCompleted fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final DialogCompleted event = new DialogCompleted(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("resultInformation".equals(fieldName)) { - event.resultInformation = ResultInformation.fromJson(reader); - } else if ("dialogInputType".equals(fieldName)) { - event.dialogInputType = DialogInputType.fromString(reader.getString()); - } else if ("dialogId".equals(fieldName)) { - event.dialogId = reader.getString(); - } else { - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogConsent.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogConsent.java deleted file mode 100644 index 9bcece409fa4..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogConsent.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.communication.callautomation.models.UserConsent; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The DialogConsent model. */ -@Immutable -public final class DialogConsent extends CallAutomationEventBase { - - /* - * Contains the resulting SIP code/sub-code and message from NGC services. - */ - private ResultInformation resultInformation; - - /* - * Determines the type of the dialog. - */ - private DialogInputType dialogInputType; - - /* - * UserConsent data from the Conversation Conductor - */ - private UserConsent userConsent; - - /* - * Dialog ID - */ - private String dialogId; - - /** Creates an instance of DialogConsent class. */ - public DialogConsent() { - } - - /** - * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services. - * - * @return the resultInformation value. - */ - public ResultInformation getResultInformation() { - return this.resultInformation; - } - - /** - * Get the dialogInputType property: Determines the type of the dialog. - * - * @return the dialogInputType value. - */ - public DialogInputType getDialogInputType() { - return this.dialogInputType; - } - - /** - * Get the userConsent property: UserConsent data from the Conversation Conductor. - * - * @return the userConsent value. - */ - public UserConsent getUserConsent() { - return this.userConsent; - } - - /** - * Get the dialogId property: Dialog ID. - * - * @return the dialogId value. - */ - public String getDialogId() { - return this.dialogId; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("resultInformation", resultInformation); - jsonWriter.writeStringField("dialogInputType", dialogInputType != null ? dialogInputType.toString() : null); - jsonWriter.writeJsonField("userConsent", userConsent); - jsonWriter.writeStringField("dialogId", dialogId); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DialogConsent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DialogConsent if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DialogConsent. - */ - public static DialogConsent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final DialogConsent event = new DialogConsent(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("resultInformation".equals(fieldName)) { - event.resultInformation = ResultInformation.fromJson(reader); - } else if ("dialogInputType".equals(fieldName)) { - event.dialogInputType = DialogInputType.fromString(reader.getString()); - } else if ("userConsent".equals(fieldName)) { - event.userConsent = UserConsent.fromJson(reader); - } else if ("dialogId".equals(fieldName)) { - event.dialogId = reader.getString(); - } else { - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogFailed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogFailed.java deleted file mode 100644 index 301fc27f8859..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogFailed.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The DialogFailed model. */ -public final class DialogFailed extends CallAutomationEventBase { - /* - * Contains the resulting SIP code/sub-code and message from NGC services. - */ - private ResultInformation resultInformation; - - /* - * Determines the type of the dialog. - */ - private DialogInputType dialogInputType; - - /* - * Dialog ID - */ - private String dialogId; - - /** Creates an instance of DialogCompleted class. */ - public DialogFailed() { - } - - /** - * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services. - * - * @return the resultInformation value. - */ - public ResultInformation getResultInformation() { - return this.resultInformation; - } - - /** - * Get the dialogInputType property: Determines the type of the dialog. - * - * @return the dialogInputType value. - */ - public DialogInputType getDialogInputType() { - return this.dialogInputType; - } - - /** - * Get the dialogId property: Dialog ID. - * - * @return the dialogId value. - */ - public String getDialogId() { - return this.dialogId; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("resultInformation", resultInformation); - jsonWriter.writeStringField("dialogInputType", dialogInputType != null ? dialogInputType.toString() : null); - jsonWriter.writeStringField("dialogId", dialogId); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DialogFailed from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DialogFailed if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DialogFailed. - */ - public static DialogFailed fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final DialogFailed event = new DialogFailed(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("resultInformation".equals(fieldName)) { - event.resultInformation = ResultInformation.fromJson(reader); - } else if ("dialogInputType".equals(fieldName)) { - event.dialogInputType = DialogInputType.fromString(reader.getString()); - } else if ("dialogId".equals(fieldName)) { - event.dialogId = reader.getString(); - } else { - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogHangup.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogHangup.java deleted file mode 100644 index 0524fb9f7805..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogHangup.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The DialogHangup model. */ -@Fluent -public final class DialogHangup extends CallAutomationEventBase { - /* - * Contains the resulting SIP code/sub-code and message from NGC services. - */ - private ResultInformation resultInformation; - - /* - * Determines the type of the dialog. - */ - private DialogInputType dialogInputType; - - /* - * Dialog ID - */ - private String dialogId; - - /* - * Ivr Context - */ - private Object ivrContext; - - /** Creates an instance of DialogHangup class. */ - public DialogHangup() { - } - - /** - * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services. - * - * @return the resultInformation value. - */ - public ResultInformation getResultInformation() { - return this.resultInformation; - } - - /** - * Get the dialogInputType property: Determines the type of the dialog. - * - * @return the dialogInputType value. - */ - public DialogInputType getDialogInputType() { - return this.dialogInputType; - } - - /** - * Get the dialogId property: Dialog ID. - * - * @return the dialogId value. - */ - public String getDialogId() { - return this.dialogId; - } - - /** - * Get the ivrContext property: Ivr Context. - * - * @return the ivrContext value. - */ - public Object getIvrContext() { - return this.ivrContext; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("resultInformation", resultInformation); - jsonWriter.writeStringField("dialogInputType", dialogInputType != null ? dialogInputType.toString() : null); - jsonWriter.writeStringField("dialogId", dialogId); - jsonWriter.writeUntypedField("ivrContext", ivrContext); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DialogHangup from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DialogHangup if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DialogHangup. - */ - public static DialogHangup fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final DialogHangup event = new DialogHangup(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("resultInformation".equals(fieldName)) { - event.resultInformation = ResultInformation.fromJson(reader); - } else if ("dialogInputType".equals(fieldName)) { - event.dialogInputType = DialogInputType.fromString(reader.getString()); - } else if ("dialogId".equals(fieldName)) { - event.dialogId = reader.getString(); - } else if ("ivrContext".equals(fieldName)) { - event.ivrContext = reader.readUntyped(); - } else { - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogLanguageChange.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogLanguageChange.java deleted file mode 100644 index 9baf46a20f2a..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogLanguageChange.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The DialogLanguageChange model. */ -@Fluent -public final class DialogLanguageChange extends CallAutomationEventBase { - - /* - * Contains the resulting SIP code/sub-code and message from NGC services. - */ - private ResultInformation resultInformation; - - /* - * Determines the type of the dialog. - */ - private DialogInputType dialogInputType; - - /* - * Dialog ID - */ - private String dialogId; - - /* - * Selected Language - */ - private String selectedLanguage; - - /* - * Ivr Context - */ - private Object ivrContext; - - /** Creates an instance of DialogLanguageChange class. */ - public DialogLanguageChange() { - } - - /** - * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services. - * - * @return the resultInformation value. - */ - public ResultInformation getResultInformation() { - return this.resultInformation; - } - - /** - * Get the dialogInputType property: Determines the type of the dialog. - * - * @return the dialogInputType value. - */ - public DialogInputType getDialogInputType() { - return this.dialogInputType; - } - - /** - * Get the dialogId property: Dialog ID. - * - * @return the dialogId value. - */ - public String getDialogId() { - return this.dialogId; - } - - /** - * Get the selectedLanguage property: Selected Language. - * - * @return the selectedLanguage value. - */ - public String getSelectedLanguage() { - return this.selectedLanguage; - } - - /** - * Get the ivrContext property: Ivr Context. - * - * @return the ivrContext value. - */ - public Object getIvrContext() { - return this.ivrContext; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("resultInformation", resultInformation); - jsonWriter.writeStringField("dialogInputType", dialogInputType != null ? dialogInputType.toString() : null); - jsonWriter.writeStringField("dialogId", dialogId); - jsonWriter.writeStringField("selectedLanguage", selectedLanguage); - jsonWriter.writeUntypedField("ivrContext", ivrContext); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DialogLanguageChange from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DialogLanguageChange if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DialogLanguageChange. - */ - public static DialogLanguageChange fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final DialogLanguageChange event = new DialogLanguageChange(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("resultInformation".equals(fieldName)) { - event.resultInformation = ResultInformation.fromJson(reader); - } else if ("dialogInputType".equals(fieldName)) { - event.dialogInputType = DialogInputType.fromString(reader.getString()); - } else if ("dialogId".equals(fieldName)) { - event.dialogId = reader.getString(); - } else if ("selectedLanguage".equals(fieldName)) { - event.selectedLanguage = reader.getString(); - } else if ("ivrContext".equals(fieldName)) { - event.ivrContext = reader.readUntyped(); - } else { - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogSensitivityUpdate.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogSensitivityUpdate.java deleted file mode 100644 index a477b0ddf1af..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogSensitivityUpdate.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The DialogSensitivityUpdate model. */ -@Fluent -public final class DialogSensitivityUpdate extends CallAutomationEventBase { - /* - * Contains the resulting SIP code/sub-code and message from NGC services. - */ - private ResultInformation resultInformation; - - /* - * Determines the type of the dialog. - */ - private DialogInputType dialogInputType; - - /* - * Dialog ID - */ - private String dialogId; - - /* - * SensitiveMask - */ - private Boolean sensitiveMask; - - /** Creates an instance of DialogSensitivityUpdate class. */ - public DialogSensitivityUpdate() { - } - - /** - * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services. - * - * @return the resultInformation value. - */ - public ResultInformation getResultInformation() { - return this.resultInformation; - } - - /** - * Get the dialogInputType property: Determines the type of the dialog. - * - * @return the dialogInputType value. - */ - public DialogInputType getDialogInputType() { - return this.dialogInputType; - } - - /** - * Get the dialogId property: Dialog ID. - * - * @return the dialogId value. - */ - public String getDialogId() { - return this.dialogId; - } - - /** - * Get the sensitiveMask property: SensitiveMask. - * - * @return the sensitiveMask value. - */ - public Boolean isSensitiveMask() { - return this.sensitiveMask; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("resultInformation", resultInformation); - jsonWriter.writeStringField("dialogInputType", dialogInputType != null ? dialogInputType.toString() : null); - jsonWriter.writeStringField("dialogId", dialogId); - jsonWriter.writeBooleanField("sensitiveMask", sensitiveMask); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DialogSensitivityUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DialogSensitivityUpdate if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DialogSensitivityUpdate. - */ - public static DialogSensitivityUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final DialogSensitivityUpdate event = new DialogSensitivityUpdate(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("resultInformation".equals(fieldName)) { - event.resultInformation = ResultInformation.fromJson(reader); - } else if ("dialogInputType".equals(fieldName)) { - event.dialogInputType = DialogInputType.fromString(reader.getString()); - } else if ("dialogId".equals(fieldName)) { - event.dialogId = reader.getString(); - } else if ("sensitiveMask".equals(fieldName)) { - event.sensitiveMask = reader.getBoolean(); - } else { - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogStarted.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogStarted.java deleted file mode 100644 index 3b25f91b461f..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogStarted.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The DialogStarted model. */ -@Immutable -public class DialogStarted extends CallAutomationEventBase { - - /* - * Contains the resulting SIP code/sub-code and message from NGC services. - */ - private ResultInformation resultInformation; - - /* - * Determines the type of the dialog. - */ - private DialogInputType dialogInputType; - - /* - * Dialog ID - */ - private String dialogId; - - /** Creates an instance of DialogStarted class. */ - public DialogStarted() { - } - - /** - * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services. - * - * @return the resultInformation value. - */ - public ResultInformation getResultInformation() { - return this.resultInformation; - } - - /** - * Get the dialogInputType property: Determines the type of the dialog. - * - * @return the dialogInputType value. - */ - public DialogInputType getDialogInputType() { - return this.dialogInputType; - } - - /** - * Get the dialogId property: Dialog ID. - * - * @return the dialogId value. - */ - public String getDialogId() { - return this.dialogId; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("resultInformation", resultInformation); - jsonWriter.writeStringField("dialogInputType", dialogInputType != null ? dialogInputType.toString() : null); - jsonWriter.writeStringField("dialogId", dialogId); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DialogStarted from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DialogStarted if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DialogStarted. - */ - public static DialogStarted fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final DialogStarted event = new DialogStarted(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("resultInformation".equals(fieldName)) { - event.resultInformation = ResultInformation.fromJson(reader); - } else if ("dialogInputType".equals(fieldName)) { - event.dialogInputType = DialogInputType.fromString(reader.getString()); - } else if ("dialogId".equals(fieldName)) { - event.dialogId = reader.getString(); - } else { - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogTransfer.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogTransfer.java deleted file mode 100644 index 69c6a7ddc56a..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogTransfer.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The DialogTransfer model. */ -@Fluent -public final class DialogTransfer extends CallAutomationEventBase { - /* - * Contains the resulting SIP code/sub-code and message from NGC services. - */ - private ResultInformation resultInformation; - - /* - * Determines the type of the dialog. - */ - private DialogInputType dialogInputType; - - /* - * Dialog ID - */ - private String dialogId; - - /* - * Transfer type - */ - private String transferType; - - /* - * Transfer destination - */ - private String transferDestination; - - /* - * IVR context - */ - private Object ivrContext; - - /** Creates an instance of DialogTransfer class. */ - public DialogTransfer() { - } - - /** - * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services. - * - * @return the resultInformation value. - */ - public ResultInformation getResultInformation() { - return this.resultInformation; - } - - /** - * Get the dialogInputType property: Determines the type of the dialog. - * - * @return the dialogInputType value. - */ - public DialogInputType getDialogInputType() { - return this.dialogInputType; - } - - /** - * Get the dialogId property: Dialog ID. - * - * @return the dialogId value. - */ - public String getDialogId() { - return this.dialogId; - } - - /** - * Get the transferType property: Transfer type. - * - * @return the transferType value. - */ - public String getTransferType() { - return this.transferType; - } - - /** - * Get the transferDestination property: Transfer destination. - * - * @return the transferDestination value. - */ - public String getTransferDestination() { - return this.transferDestination; - } - - /** - * Get the ivrContext property: IVR context. - * - * @return the ivrContext value. - */ - public Object getIvrContext() { - return this.ivrContext; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("resultInformation", resultInformation); - jsonWriter.writeStringField("dialogInputType", dialogInputType != null ? dialogInputType.toString() : null); - jsonWriter.writeStringField("dialogId", dialogId); - jsonWriter.writeStringField("transferType", transferType); - jsonWriter.writeStringField("transferDestination", transferDestination); - jsonWriter.writeUntypedField("ivrContext", ivrContext); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DialogTransfer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DialogTransfer if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DialogTransfer. - */ - public static DialogTransfer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final DialogTransfer event = new DialogTransfer(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("resultInformation".equals(fieldName)) { - event.resultInformation = ResultInformation.fromJson(reader); - } else if ("dialogInputType".equals(fieldName)) { - event.dialogInputType = DialogInputType.fromString(reader.getString()); - } else if ("dialogId".equals(fieldName)) { - event.dialogId = reader.getString(); - } else if ("transferType".equals(fieldName)) { - event.transferType = reader.getString(); - } else if ("transferDestination".equals(fieldName)) { - event.transferDestination = reader.getString(); - } else if ("ivrContext".equals(fieldName)) { - event.ivrContext = reader.readUntyped(); - } else { - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioCompleted.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioCompleted.java deleted file mode 100644 index 014044a82f5b..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioCompleted.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import java.io.IOException; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -/** The HoldAudioCompleted model. */ -@Immutable -public final class HoldAudioCompleted extends CallAutomationEventBase { - - private HoldAudioCompleted() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HoldAudioCompleted from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HoldAudioCompleted if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HoldAudioCompleted. - */ - public static HoldAudioCompleted fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final HoldAudioCompleted event = new HoldAudioCompleted(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioPaused.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioPaused.java deleted file mode 100644 index 23497dde03f4..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioPaused.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import java.io.IOException; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -/** The HoldAudioPaused model. */ -@Immutable -public final class HoldAudioPaused extends CallAutomationEventBase { - - private HoldAudioPaused() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HoldAudioPaused from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HoldAudioPaused if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HoldAudioPaused. - */ - public static HoldAudioPaused fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final HoldAudioPaused event = new HoldAudioPaused(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioResumed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioResumed.java deleted file mode 100644 index 86b80a6924e6..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioResumed.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import java.io.IOException; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -/** The HoldAudioResumed model. */ -@Immutable -public final class HoldAudioResumed extends CallAutomationEventBase { - - private HoldAudioResumed() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HoldAudioResumed from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HoldAudioResumed if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HoldAudioResumed. - */ - public static HoldAudioResumed fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final HoldAudioResumed event = new HoldAudioResumed(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioStarted.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioStarted.java deleted file mode 100644 index 0a4aaf3ea8d3..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioStarted.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import java.io.IOException; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -/** The HoldAudioStarted model. */ -@Immutable -public final class HoldAudioStarted extends CallAutomationEventBase { - - private HoldAudioStarted() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HoldAudioStarted from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HoldAudioStarted if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HoldAudioStarted. - */ - public static HoldAudioStarted fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final HoldAudioStarted event = new HoldAudioStarted(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/IncomingCall.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/IncomingCall.java deleted file mode 100644 index 8ee03d2beed9..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/IncomingCall.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import java.io.IOException; - -import com.azure.communication.common.CommunicationIdentifier; -import com.azure.communication.callautomation.models.CustomCallingContext; -import com.azure.communication.callautomation.implementation.models.CommunicationIdentifierModel; -import com.azure.communication.callautomation.implementation.converters.CommunicationIdentifierConverter; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -/** The IncomingCall model. */ -@Immutable -public final class IncomingCall extends CallAutomationEventBase { - private CommunicationIdentifier to; - private CommunicationIdentifier from; - private String callerDisplayName; - private CustomCallingContext customContext; - private String incomingCallContext; - private CommunicationIdentifier onBehalfOfCallee; - - private IncomingCall() { - } - - private IncomingCall(CommunicationIdentifier to, CommunicationIdentifier from, String callerDisplayName, - CustomCallingContext customContext, String incomingCallContext, CommunicationIdentifier onBehalfOfCallee) { - this.to = to; - this.from = from; - this.callerDisplayName = callerDisplayName; - this.customContext = customContext; - this.incomingCallContext = incomingCallContext; - this.onBehalfOfCallee = onBehalfOfCallee; - } - - /** - * Get the to property: The communication identifier of the target user. - * - * @return the to value. - */ - public CommunicationIdentifier getTo() { - return this.to; - } - - /** - * Get the from property: The communication identifier of the user who initiated the call. - * - * @return the from value. - */ - public CommunicationIdentifier getFrom() { - return this.from; - } - - /** - * Get the callerDisplayName property: Display name of caller. - * - * @return the callerDisplayName value. - */ - public String getCallerDisplayName() { - return this.callerDisplayName; - } - - /** - * Get the customContext property: Custom Context of Incoming Call. - * - * @return the customContext value - */ - public CustomCallingContext getCustomContext() { - return this.customContext; - } - - /** - * Get the incomingCallContext property: Incoming call context. - * - * @return the incomingCallContext value. - */ - public String getIncomingCallContext() { - return this.incomingCallContext; - } - - /** - * Get the onBehalfOfCallee property: The communication identifier of the user who is being called on behalf of. - * - * @return the onBehalfOfCallee value. - */ - public CommunicationIdentifier getOnBehalfOfCallee() { - return this.onBehalfOfCallee; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("to", CommunicationIdentifierConverter.convert(to)); - jsonWriter.writeJsonField("from", CommunicationIdentifierConverter.convert(from)); - jsonWriter.writeStringField("callerDisplayName", callerDisplayName); - jsonWriter.writeJsonField("customContext", customContext); - jsonWriter.writeStringField("incomingCallContext", incomingCallContext); - jsonWriter.writeJsonField("onBehalfOfCallee", CommunicationIdentifierConverter.convert(onBehalfOfCallee)); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IncomingCall from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IncomingCall if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IncomingCall. - */ - public static IncomingCall fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final IncomingCall event = new IncomingCall(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("to".equals(fieldName)) { - event.to = CommunicationIdentifierConverter.convert(CommunicationIdentifierModel.fromJson(reader)); - } else if ("from".equals(fieldName)) { - event.from - = CommunicationIdentifierConverter.convert(CommunicationIdentifierModel.fromJson(reader)); - } else if ("callerDisplayName".equals(fieldName)) { - event.callerDisplayName = reader.getString(); - } else if ("customContext".equals(fieldName)) { - event.customContext = CustomCallingContext.fromJson(reader); - } else if ("incomingCallContext".equals(fieldName)) { - event.incomingCallContext = reader.getString(); - } else if ("onBehalfOfCallee".equals(fieldName)) { - event.onBehalfOfCallee - = CommunicationIdentifierConverter.convert(CommunicationIdentifierModel.fromJson(reader)); - } else { - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/PlayPaused.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/PlayPaused.java deleted file mode 100644 index d9db803df0a2..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/PlayPaused.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import java.io.IOException; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -/** The PlayPaused model. */ -@Immutable -public final class PlayPaused extends CallAutomationEventBase { - - private PlayPaused() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PlayPaused from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PlayPaused if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PlayPaused. - */ - public static PlayPaused fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final PlayPaused event = new PlayPaused(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/PlayResumed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/PlayResumed.java deleted file mode 100644 index 4e336c05d3bd..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/PlayResumed.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import java.io.IOException; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -/** The PlayResumed model. */ -@Immutable -public final class PlayResumed extends CallAutomationEventBase { - - private PlayResumed() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PlayResumed from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PlayPaused if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PlayResumed. - */ - public static PlayResumed fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final PlayResumed event = new PlayResumed(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/StartRecordingFailed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/StartRecordingFailed.java deleted file mode 100644 index 39616d313e21..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/StartRecordingFailed.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.communication.callautomation.models.events; - -import java.io.IOException; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -/** - * The StartRecordingFailed model. - */ -@Immutable -public final class StartRecordingFailed extends CallAutomationEventBase { - - private StartRecordingFailed() { - - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StartRecordingFailed from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StartRecordingFailed if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the StartRecordingFailed. - */ - public static StartRecordingFailed fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final StartRecordingFailed event = new StartRecordingFailed(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/module-info.java b/sdk/communication/azure-communication-callautomation/src/main/java/module-info.java index bda469a80dd0..b8a1cc7c42ea 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/module-info.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/module-info.java @@ -9,7 +9,6 @@ exports com.azure.communication.callautomation; exports com.azure.communication.callautomation.models; exports com.azure.communication.callautomation.models.events; - exports com.azure.communication.callautomation.implementation.eventprocessor; // exporting some packages specifically for azure-core opens com.azure.communication.callautomation.implementation.models to com.azure.core; diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientAutomatedLiveTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientAutomatedLiveTests.java index 7b5c107f1c2d..d32417718c58 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientAutomatedLiveTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientAutomatedLiveTests.java @@ -213,121 +213,6 @@ public void createVOIPCallAndRejectAutomatedTest(HttpClient httpClient) { } } - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - @DisabledIfEnvironmentVariable( - named = "SKIP_LIVE_TEST", - matches = "(?i)(true)", - disabledReason = "Requires environment to be set up") - public void createVOIPCallAndAnswerWithCustomContextThenHangupAutomatedTest(HttpClient httpClient) { - /* Test case: ACS to ACS call - * 1. create a CallAutomationClient. - * 2. create a call from source to one ACS target. - * 3. get updated call properties and check for the connected state. - * 4. hang up the call. - * 5. once call is hung up, verify disconnected event - */ - - CommunicationIdentityAsyncClient identityAsyncClient - = getCommunicationIdentityClientUsingConnectionString(httpClient).addPolicy( - (context, next) -> logHeaders("createVOIPCallAndAnswerWithCustomContextThenHangupAutomatedTest", next)) - .buildAsyncClient(); - - List callDestructors = new ArrayList<>(); - - try { - // create caller and receiver - CommunicationUserIdentifier caller = identityAsyncClient.createUser().block(); - CommunicationIdentifier target = identityAsyncClient.createUser().block(); - - // Create call automation client and use source as the caller. - CallAutomationAsyncClient callerAsyncClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, - next) -> logHeaders("createVOIPCallAndAnswerWithCustomContextThenHangupAutomatedTest", next)) - .sourceIdentity(caller) - .buildAsyncClient(); - // Create call automation client for receivers. - CallAutomationAsyncClient receiverAsyncClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, - next) -> logHeaders("createVOIPCallAndAnswerWithCustomContextThenHangupAutomatedTest", next)) - .buildAsyncClient(); - - String uniqueId = serviceBusWithNewCall(caller, target); - - // create a call - List targets = new ArrayList<>(Collections.singletonList(target)); - CreateGroupCallOptions createCallOptions - = new CreateGroupCallOptions(targets, DISPATCHER_CALLBACK + String.format("?q=%s", uniqueId)); - Response createCallResultResponse - = callerAsyncClient.createGroupCallWithResponse(createCallOptions).block(); - - assertNotNull(createCallResultResponse); - CreateCallResult createCallResult = createCallResultResponse.getValue(); - assertNotNull(createCallResult); - assertNotNull(createCallResult.getCallConnectionProperties()); - String callerConnectionId = createCallResult.getCallConnectionProperties().getCallConnectionId(); - assertNotNull(callerConnectionId); - - // wait for the incomingCallContext - String incomingCallContext = waitForIncomingCallContext(uniqueId, Duration.ofSeconds(10)); - assertNotNull(incomingCallContext); - - // answer the call - AnswerCallOptions answerCallOptions - = new AnswerCallOptions(incomingCallContext, DISPATCHER_CALLBACK + String.format("?q=%s", uniqueId)); - answerCallOptions.getCustomCallingContext().addSipUui("OBOuuivalue"); - answerCallOptions.getCustomCallingContext().addSipX("XheaderOBO", "value"); - - AnswerCallResult answerCallResult - = Objects.requireNonNull(receiverAsyncClient.answerCallWithResponse(answerCallOptions).block()) - .getValue(); - assertNotNull(answerCallResult); - assertNotNull(answerCallResult.getCallConnectionAsync()); - assertNotNull(answerCallResult.getCallConnectionProperties()); - String receiverConnectionId = answerCallResult.getCallConnectionProperties().getCallConnectionId(); - callDestructors.add(answerCallResult.getCallConnectionAsync()); - - // check events to caller side - CallConnected callerCallConnected - = waitForEvent(CallConnected.class, callerConnectionId, Duration.ofSeconds(10)); - ParticipantsUpdated callerParticipantUpdatedEvent - = waitForEvent(ParticipantsUpdated.class, callerConnectionId, Duration.ofSeconds(10)); - assertNotNull(callerCallConnected); - assertNotNull(callerParticipantUpdatedEvent); - - // check events to receiver side - CallConnected receiverCallConnected - = waitForEvent(CallConnected.class, receiverConnectionId, Duration.ofSeconds(10)); - ParticipantsUpdated receiverParticipantUpdatedEvent - = waitForEvent(ParticipantsUpdated.class, callerConnectionId, Duration.ofSeconds(10)); - assertNotNull(receiverCallConnected); - assertNotNull(receiverParticipantUpdatedEvent); - - // hang up the call. - answerCallResult.getCallConnectionAsync().hangUp(true).block(); - - // check if both parties had the call terminated. - CallDisconnected callerCallDisconnected - = waitForEvent(CallDisconnected.class, receiverConnectionId, Duration.ofSeconds(10)); - CallDisconnected receiverCallDisconnected - = waitForEvent(CallDisconnected.class, callerConnectionId, Duration.ofSeconds(10)); - assertNotNull(callerCallDisconnected); - assertNotNull(receiverCallDisconnected); - - } catch (Exception ex) { - fail("Unexpected exception received", ex); - } finally { - if (!callDestructors.isEmpty()) { - try { - callDestructors.forEach(callConnection -> callConnection.hangUpWithResponse(true).block()); - } catch (Exception ignored) { - // Some call might have been terminated during the test, and it will cause exceptions here. - // Do nothing and iterate to next call connection. - } - } - } - } - @ParameterizedTest @MethodSource("com.azure.core.test.TestBase#getHttpClients") @DisabledIfEnvironmentVariable( diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientUnitTests.java index b3148f6c8baa..b44f72d2f7a1 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientUnitTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientUnitTests.java @@ -112,25 +112,6 @@ public void answerCall() { assertNotNull(answerCallResult); } - @Test - public void answerCallWithResponseAndCustomContext() { - CallAutomationAsyncClient callAutomationAsyncClient = getCallAutomationAsyncClient(new ArrayList<>( - Collections.singletonList(new AbstractMap.SimpleEntry<>(generateCallProperties(CALL_CONNECTION_ID, - CALL_SERVER_CALL_ID, CALL_CALLER_ID, CALL_CALLER_DISPLAY_NAME, CALL_TARGET_ID, CALL_CONNECTION_STATE, - CALL_SUBJECT, CALL_CALLBACK_URL, null, null), 200)))); - - AnswerCallOptions answerCallOptions = new AnswerCallOptions(CALL_INCOMING_CALL_CONTEXT, CALL_CALLBACK_URL); - answerCallOptions.getCustomCallingContext().addSipUui("OBOuuivalue"); - answerCallOptions.getCustomCallingContext().addSipX("XheaderOBO", "value"); - - Response answerCallResult - = callAutomationAsyncClient.answerCallWithResponse(answerCallOptions).block(); - - assertNotNull(answerCallResult); - assertEquals(200, answerCallResult.getStatusCode()); - assertNotNull(answerCallResult.getValue()); - } - @Test public void answerCallWithResponse() { CallAutomationAsyncClient callAutomationAsyncClient = getCallAutomationAsyncClient(new ArrayList<>( diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationClientUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationClientUnitTests.java index 48f02f12d437..138902f8c85b 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationClientUnitTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationClientUnitTests.java @@ -7,15 +7,12 @@ import com.azure.communication.callautomation.models.AnswerCallResult; import com.azure.communication.callautomation.models.CallInvite; import com.azure.communication.callautomation.models.CallRejectReason; -import com.azure.communication.callautomation.models.CreateCallOptions; import com.azure.communication.callautomation.models.CreateGroupCallOptions; import com.azure.communication.callautomation.models.CreateCallResult; import com.azure.communication.callautomation.models.RedirectCallOptions; import com.azure.communication.callautomation.models.RejectCallOptions; import com.azure.communication.common.CommunicationIdentifier; import com.azure.communication.common.CommunicationUserIdentifier; -import com.azure.communication.common.MicrosoftTeamsAppIdentifier; -import com.azure.communication.common.PhoneNumberIdentifier; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import org.junit.jupiter.api.Test; @@ -66,26 +63,6 @@ public void createCallWithResponse() { assertNotNull(createCallResult.getValue()); } - @Test - public void createTeamsAppCallWithResponse() { - MicrosoftTeamsAppIdentifier caller = new MicrosoftTeamsAppIdentifier(TEAMS_APP_CALL_CALLER_ID); - - CallAutomationClient callAutomationClient = getCallAutomationClient(new ArrayList<>(Collections - .singletonList(new SimpleEntry<>(generateTeamsAppCallProperties(CALL_CONNECTION_ID, CALL_SERVER_CALL_ID, - CALL_TARGET_ID, CALL_CONNECTION_STATE, CALL_CALLBACK_URL, TEAMS_APP_CALL_CALLER_ID), 201)))); - PhoneNumberIdentifier target = new PhoneNumberIdentifier(CALL_TARGET_ID); - - Response createCallResult = callAutomationClient.createCallWithResponse( - new CreateCallOptions(new CallInvite(target, null), CALL_CALLBACK_URL).setTeamsAppSource(caller), - Context.NONE); - - assertNotNull(createCallResult); - assertEquals(201, createCallResult.getStatusCode()); - assertEquals(TEAMS_APP_CALL_CALLER_ID, - ((MicrosoftTeamsAppIdentifier) (createCallResult.getValue().getCallConnectionProperties().getSource())) - .getAppId()); - } - @Test public void answerCall() { CallAutomationClient callAutomationClient = getCallAutomationClient( diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationEventParserAndProcessorUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationEventParserAndProcessorUnitTests.java deleted file mode 100644 index dad2eb6fe612..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationEventParserAndProcessorUnitTests.java +++ /dev/null @@ -1,1442 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation; - -import com.azure.communication.callautomation.models.ChoiceResult; -import com.azure.communication.callautomation.models.CustomCallingContext; -import com.azure.communication.callautomation.models.DtmfResult; -import com.azure.communication.callautomation.models.RecognizeResult; -import com.azure.communication.callautomation.models.RecordingState; -import com.azure.communication.callautomation.models.events.AnswerFailed; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; -import com.azure.communication.callautomation.models.events.CallConnected; -import com.azure.communication.callautomation.models.events.CallTransferAccepted; -import com.azure.communication.callautomation.models.events.CancelAddParticipantFailed; -import com.azure.communication.callautomation.models.events.CancelAddParticipantSucceeded; -import com.azure.communication.callautomation.models.events.ContinuousDtmfRecognitionStopped; -import com.azure.communication.callautomation.models.events.ContinuousDtmfRecognitionToneFailed; -import com.azure.communication.callautomation.models.events.ContinuousDtmfRecognitionToneReceived; -import com.azure.communication.callautomation.models.events.CreateCallFailed; -import com.azure.communication.callautomation.models.events.DialogCompleted; -import com.azure.communication.callautomation.models.events.DialogConsent; -import com.azure.communication.callautomation.models.events.DialogFailed; -import com.azure.communication.callautomation.models.events.DialogHangup; -import com.azure.communication.callautomation.models.events.DialogLanguageChange; -import com.azure.communication.callautomation.models.events.DialogSensitivityUpdate; -import com.azure.communication.callautomation.models.events.DialogStarted; -import com.azure.communication.callautomation.models.events.DialogTransfer; -import com.azure.communication.callautomation.models.events.HoldAudioCompleted; -import com.azure.communication.callautomation.models.events.HoldAudioPaused; -import com.azure.communication.callautomation.models.events.HoldAudioResumed; -import com.azure.communication.callautomation.models.events.HoldAudioStarted; -import com.azure.communication.callautomation.models.events.HoldFailed; -import com.azure.communication.callautomation.models.events.ParticipantsUpdated; -import com.azure.communication.callautomation.models.events.PlayCanceled; -import com.azure.communication.callautomation.models.events.PlayCompleted; -import com.azure.communication.callautomation.models.events.PlayPaused; -import com.azure.communication.callautomation.models.events.PlayResumed; -import com.azure.communication.callautomation.models.events.PlayFailed; -import com.azure.communication.callautomation.models.events.ReasonCode; -import com.azure.communication.callautomation.models.events.ReasonCode.Recognize; -import com.azure.communication.callautomation.models.events.RecognizeCanceled; -import com.azure.communication.callautomation.models.events.RecognizeCompleted; -import com.azure.communication.callautomation.models.events.RecognizeFailed; -import com.azure.communication.callautomation.models.events.RecordingStateChanged; -import com.azure.communication.callautomation.models.events.RemoveParticipantFailed; -import com.azure.communication.callautomation.models.events.RemoveParticipantSucceeded; -import com.azure.communication.callautomation.models.events.SendDtmfTonesCompleted; -import com.azure.communication.callautomation.models.events.SendDtmfTonesFailed; -import com.azure.communication.callautomation.models.events.TranscriptionFailed; -import com.azure.communication.callautomation.models.events.TranscriptionResumed; -import com.azure.communication.callautomation.models.events.TranscriptionStarted; -import com.azure.communication.callautomation.models.events.TranscriptionStatus; -import com.azure.communication.callautomation.models.events.TranscriptionStatusDetails; -import com.azure.communication.callautomation.models.events.TranscriptionStopped; -import com.azure.communication.callautomation.models.events.TranscriptionUpdated; -import com.azure.communication.common.CommunicationIdentifier; -import com.azure.communication.common.PhoneNumberIdentifier; -import com.azure.communication.callautomation.models.events.MediaStreamingStarted; -import com.azure.communication.callautomation.models.events.MediaStreamingStopped; -import com.azure.communication.callautomation.models.events.MediaStreamingFailed; -import com.azure.communication.callautomation.models.events.MediaStreamingStatus; -import com.azure.communication.callautomation.models.events.MediaStreamingStatusDetails; -import com.azure.communication.callautomation.models.events.IncomingCall; -import org.junit.jupiter.api.Test; - -import java.util.List; -import java.util.Objects; -import java.util.Optional; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertInstanceOf; -import static org.junit.jupiter.api.Assertions.assertNotNull; - -public class CallAutomationEventParserAndProcessorUnitTests { - static final String EVENT_PARTICIPANT_UPDATED - = "{\"id\":\"61069ef9-5ca9-457f-ac36-e2bb5e8400ca\",\"source\":\"calling/callConnections/401f3500-62bd-46a9-8c09-9e1b06caca01/ParticipantsUpdated\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\": {\"rawId\":\"8:acs:816df1ca-971b-44d7-b8b1-8fba90748500_00000013-2ff6-dd51-54b7-a43a0d001998\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"8:acs:816df1ca-971b-44d7-b8b1-8fba90748500_00000013-2ff6-dd51-54b7-a43a0d001998\"}}, \"isMuted\": false, \"isOnHold\": false},{\"identifier\": {\"rawId\":\"8:acs:816df1ca-971b-44d7-b8b1-8fba90748500_00000013-2ff7-1579-99bf-a43a0d0010bc\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"8:acs:816df1ca-971b-44d7-b8b1-8fba90748500_00000013-2ff7-1579-99bf-a43a0d0010bc\"}}, \"isMuted\": false, \"isOnHold\": false}],\"type\":\"participantsUpdated\",\"callConnectionId\":\"401f3500-62bd-46a9-8c09-9e1b06caca01\",\"correlationId\":\"ebd8bf1f-0794-494f-bdda-913042c06ef7\"},\"time\":\"2022-08-12T03:35:07.9129474+00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/401f3500-62bd-46a9-8c09-9e1b06caca01/ParticipantsUpdated\"}"; - static final String EVENT_CALL_CONNECTED - = "{\"id\":\"46116fb7-27e0-4a99-9478-a659c8fd4815\",\"source\":\"calling/callConnections/401f3500-62bd-46a9-8c09-9e1b06caca01/CallConnected\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"type\":\"callConnected\",\"callConnectionId\":\"401f3500-62bd-46a9-8c09-9e1b06caca01\",\"correlationId\":\"ebd8bf1f-0794-494f-bdda-913042c06ef7\"},\"time\":\"2022-08-12T03:35:07.8174402+00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/401f3500-62bd-46a9-8c09-9e1b06caca01/CallConnected\"}"; - static final String EVENT_RECOGNIZE_DTMF - = "[{\"id\":\"ac2cb537-2d62-48bf-909e-cc93534c4258\",\"source\":\"calling/callConnections/401f7000-c1c0-41e2-962d-85d0dc1d6f01\",\"type\":\"Microsoft.Communication.RecognizeCompleted\",\"data\":{\"eventSource\":\"calling/callConnections/401f7000-c1c0-41e2-962d-85d0dc1d6f01\",\"operationContext\":\"OperationalContextValue-1118-1049\",\"resultInformation\":{\"code\":200,\"subCode\":8533,\"message\":\"Action completed, DTMF option matched.\"},\"recognitionType\":\"dtmf\",\"dtmfResult\":{\"tones\":[\"five\", \"six\", \"pound\"]},\"choiceResult\":{\"label\":\"Marketing\"},\"callConnectionId\":\"401f7000-c1c0-41e2-962d-85d0dc1d6f01\",\"serverCallId\":\"serverCallId\",\"correlationId\":\"d4f4c1be-59d8-4850-b9bf-ee564c15839d\"},\"time\":\"2022-11-22T01:41:44.5582769+00:00\",\"specversion\":\"1.0\",\"subject\":\"calling/callConnections/401f7000-c1c0-41e2-962d-85d0dc1d6f01\"}]"; - static final String EVENT_RECOGNIZE_CHOICE - = "[{\"id\":\"e25b99ef-3632-45bb-96d1-d9191547ff33\",\"source\":\"calling/callConnections/401f7000-c1c0-41e2-962d-85d0dc1d6f01\",\"type\":\"Microsoft.Communication.RecognizeCompleted\",\"data\":{\"eventSource\":\"calling/callConnections/401f7000-c1c0-41e2-962d-85d0dc1d6f01\",\"operationContext\":\"OperationalContextValue-1118-1049\",\"resultInformation\":{\"code\":200,\"subCode\":8545,\"message\":\"Action completed, Recognized phrase matches a valid option.\"},\"recognitionType\":\"choices\",\"choiceResult\":{\"label\":\"Support\",\"recognizedPhrase\":\"customer help\"},\"callConnectionId\":\"401f7000-c1c0-41e2-962d-85d0dc1d6f01\",\"serverCallId\":\"serverCallId\",\"correlationId\":\"d4f4c1be-59d8-4850-b9bf-ee564c15839d\"},\"time\":\"2022-11-22T01:41:00.1967145+00:00\",\"specversion\":\"1.0\",\"subject\":\"calling/callConnections/401f7000-c1c0-41e2-962d-85d0dc1d6f01\"}]"; - - @Test - public void parseEvent() { - CallAutomationEventBase callAutomationEvent - = CallAutomationEventParser.parseEvents(EVENT_PARTICIPANT_UPDATED).get(0); - - assertNotNull(callAutomationEvent); - assertEquals(callAutomationEvent.getClass(), ParticipantsUpdated.class); - ParticipantsUpdated participantsUpdated = (ParticipantsUpdated) callAutomationEvent; - assertNotNull((participantsUpdated).getParticipants()); - participantsUpdated.getParticipants().forEach(participant -> { - assertNotNull(participant); - assertNotNull(participant.getIdentifier()); - assertNotNull(participant.isMuted()); - assertNotNull(participant.isOnHold()); - }); - } - - @Test - public void parseEventList() { - List callAutomationEventList - = CallAutomationEventParser.parseEvents("[" + EVENT_CALL_CONNECTED + "," + EVENT_PARTICIPANT_UPDATED + "]"); - - assertNotNull(callAutomationEventList); - assertEquals(callAutomationEventList.get(0).getClass(), CallConnected.class); - assertEquals(callAutomationEventList.get(1).getClass(), ParticipantsUpdated.class); - assertNotNull(callAutomationEventList.get(0).getCallConnectionId()); - } - - @Test - public void parseRecordingStateChangedEvent() { - String receivedEvent = "[\n" + " {\n" + " \"id\": \"bf59843a-888f-47ca-8d1c-885c1f5e71dc\",\n" - + " \"source\": \"calling/recordings/serverCallId/recordingId/recordingId/RecordingStateChanged\",\n" - + " \"type\": \"Microsoft.Communication.RecordingStateChanged\",\n" + " \"data\": {\n" - + " \"type\": \"recordingStateChanged\",\n" + " \"recordingId\": \"recordingId\",\n" - + " \"state\": \"active\",\n" - + " \"startDateTime\": \"2022-08-11T23:42:45.4394211+00:00\",\n" - + " \"callConnectionId\": \"callConnectionId\",\n" - + " \"serverCallId\": \"serverCallId\",\n" + " \"correlationId\": \"correlationId\"\n" - + " },\n" + " \"time\": \"2022-08-11T23:42:45.5346632+00:00\",\n" - + " \"specversion\": \"1.0\",\n" + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/recordings/serverCallId/recordingId/recordingId\"\n" + " }\n" + "]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - RecordingStateChanged recordingEvent = (RecordingStateChanged) event; - assertNotNull(recordingEvent); - assertEquals("serverCallId", recordingEvent.getServerCallId()); - assertEquals("recordingId", recordingEvent.getRecordingId()); - assertEquals(RecordingState.ACTIVE, recordingEvent.getRecordingState()); - } - - @Test - public void parsePlayCompletedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/PlayCompleted\",\n" - + "\"type\": \"Microsoft.Communication.PlayCompleted\",\n" + "\"data\": {\n" + "\"resultInformation\": {\n" - + "\"code\": 200,\n" + "\"subCode\": 0,\n" + "\"message\": \"Action completed successfully.\"\n" + "},\n" - + "\"type\": \"playCompleted\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"correlationId\": \"correlationId\"\n" + "},\n" - + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - PlayCompleted playCompleted = (PlayCompleted) event; - assertNotNull(playCompleted); - assertEquals("serverCallId", playCompleted.getServerCallId()); - assertEquals(200, playCompleted.getResultInformation().getCode()); - assertEquals(ReasonCode.COMPLETED_SUCCESSFULLY, playCompleted.getReasonCode()); - } - - @Test - public void parsePlayFailedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/PlayFailed\",\n" - + "\"type\": \"Microsoft.Communication.PlayFailed\",\n" + "\"data\": {\n" + "\"resultInformation\": {\n" - + "\"code\": 400,\n" + "\"subCode\": 8536,\n" - + "\"message\": \"Action failed, file could not be downloaded.\"\n" + "},\n" + "\"type\": \"playFailed\",\n" - + "\"callConnectionId\": \"callConnectionId\",\n" + "\"serverCallId\": \"serverCallId\",\n" - + "\"correlationId\": \"correlationId\"\n" + "},\n" + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" - + "\"specversion\": \"1.0\",\n" + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - PlayFailed playFailed = (PlayFailed) event; - assertNotNull(playFailed); - assertEquals("serverCallId", playFailed.getServerCallId()); - assertEquals(400, playFailed.getResultInformation().getCode()); - assertEquals(ReasonCode.Play.DOWNLOAD_FAILED, playFailed.getReasonCode()); - } - - @Test - public void parsePlayCanceledEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/PlayCanceled\",\n" - + "\"type\": \"Microsoft.Communication.PlayCanceled\",\n" + "\"data\": {\n" - + "\"type\": \"playCanceled\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"correlationId\": \"correlationId\"\n" + "},\n" - + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - PlayCanceled playCanceled = (PlayCanceled) event; - assertNotNull(playCanceled); - assertEquals("serverCallId", playCanceled.getServerCallId()); - } - - @Test - public void parseRecognizeCompletedWithChoiceEvent() { - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(EVENT_RECOGNIZE_CHOICE).get(0); - assertNotNull(event); - RecognizeCompleted recognizeCompleted = (RecognizeCompleted) event; - assertNotNull(recognizeCompleted); - Optional choiceResult = recognizeCompleted.getRecognizeResult(); - assertInstanceOf(ChoiceResult.class, choiceResult.get()); - assertEquals("serverCallId", recognizeCompleted.getServerCallId()); - assertEquals(200, recognizeCompleted.getResultInformation().getCode()); - assertEquals(Recognize.SPEECH_OPTION_MATCHED, recognizeCompleted.getReasonCode()); - } - - @Test - public void parseRecognizeCompletedWithDtmfEvent() { - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(EVENT_RECOGNIZE_DTMF).get(0); - assertNotNull(event); - RecognizeCompleted recognizeCompleted = (RecognizeCompleted) event; - Optional dtmfResult = recognizeCompleted.getRecognizeResult(); - DtmfResult tonesResult = (DtmfResult) dtmfResult.get(); - assertInstanceOf(DtmfResult.class, dtmfResult.get()); - String tonesInString = tonesResult.convertToString(); - assertEquals(tonesInString, "56#"); - assertNotNull(recognizeCompleted); - assertEquals("serverCallId", recognizeCompleted.getServerCallId()); - assertEquals(200, recognizeCompleted.getResultInformation().getCode()); - assertEquals(Recognize.DMTF_OPTION_MATCHED, recognizeCompleted.getReasonCode()); - } - - @Test - public void parseRecognizeFailedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/RecognizeCompleted\",\n" - + "\"type\": \"Microsoft.Communication.RecognizeFailed\",\n" + "\"data\": {\n" - + "\"resultInformation\": {\n" + "\"code\": 400,\n" + "\"subCode\": 8510,\n" - + "\"message\": \"Action failed, initial silence timeout reached.\"\n" + "},\n" - + "\"type\": \"recognizeFailed\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"correlationId\": \"correlationId\"\n" + "},\n" - + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - RecognizeFailed recognizeFailed = (RecognizeFailed) event; - assertNotNull(recognizeFailed); - assertEquals("serverCallId", recognizeFailed.getServerCallId()); - assertEquals(400, recognizeFailed.getResultInformation().getCode()); - assertEquals(ReasonCode.Recognize.INITIAL_SILENCE_TIMEOUT, recognizeFailed.getReasonCode()); - } - - @Test - public void parseRecognizeCanceledEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/RecognizeCanceled\",\n" - + "\"type\": \"Microsoft.Communication.RecognizeCanceled\",\n" + "\"data\": {\n" - + "\"type\": \"recognizeCanceled\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"correlationId\": \"correlationId\"\n" + "},\n" - + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - RecognizeCanceled recognizeCanceled = (RecognizeCanceled) event; - assertNotNull(recognizeCanceled); - assertEquals("serverCallId", recognizeCanceled.getServerCallId()); - } - - @Test - public void parseAndProcessRemoveParticipantSucceededEvent() { - String receivedEvent = "[{\n" + "\"id\": \"c3220fa3-79bd-473e-96a2-3ecb5be7d71f\",\n" - + "\"source\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\",\n" - + "\"type\": \"Microsoft.Communication.RemoveParticipantSucceeded\",\n" + "\"data\": {\n" - + "\"operationContext\": \"context\",\n" + "\"participant\": {\n" + "\"rawId\": \"rawId\",\n" - + "\"phoneNumber\": {\n" + "\"value\": \"value\"\n" + "}\n" + "},\n" - + "\"callConnectionId\": \"callConnectionId\",\n" + "\"serverCallId\": \"serverCallId\",\n" - + "\"correlationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\"\n" + "},\n" - + "\"time\": \"2023-03-22T16:57:09.287755+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\"\n" + "}]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - - RemoveParticipantSucceeded removeParticipantSucceeded = (RemoveParticipantSucceeded) event; - - assertNotNull(removeParticipantSucceeded); - assertEquals("serverCallId", removeParticipantSucceeded.getServerCallId()); - assertEquals("callConnectionId", removeParticipantSucceeded.getCallConnectionId()); - assertEquals("rawId", removeParticipantSucceeded.getParticipant().getRawId()); - - CallAutomationEventProcessor callAutomationEventProcessor = new CallAutomationEventProcessor(); - callAutomationEventProcessor.processEvents(receivedEvent); - RemoveParticipantSucceeded eventFromProcessor - = callAutomationEventProcessor.waitForEventProcessor(removeParticipantSucceeded.getCallConnectionId(), - removeParticipantSucceeded.getOperationContext(), RemoveParticipantSucceeded.class); - assertEquals("serverCallId", eventFromProcessor.getServerCallId()); - assertEquals("callConnectionId", eventFromProcessor.getCallConnectionId()); - assertEquals("rawId", eventFromProcessor.getParticipant().getRawId()); - } - - @Test - public void parseAndProcessRemoveParticipantFailedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"c3220fa3-79bd-473e-96a2-3ecb5be7d71f\",\n" - + "\"source\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\",\n" - + "\"type\": \"Microsoft.Communication.RemoveParticipantFailed\",\n" + "\"data\": {\n" - + "\"operationContext\": \"context\",\n" + "\"participant\": {\n" + "\"rawId\": \"rawId\",\n" - + "\"phoneNumber\": {\n" + "\"value\": \"value\"\n" + "}\n" + "},\n" - + "\"callConnectionId\": \"callConnectionId\",\n" + "\"serverCallId\": \"serverCallId\",\n" - + "\"correlationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\"\n" + "},\n" - + "\"time\": \"2023-03-22T16:57:09.287755+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\"\n" + "}]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - - RemoveParticipantFailed removeParticipantFailed = (RemoveParticipantFailed) event; - - assertNotNull(removeParticipantFailed); - assertEquals("serverCallId", removeParticipantFailed.getServerCallId()); - assertEquals("callConnectionId", removeParticipantFailed.getCallConnectionId()); - assertEquals("rawId", removeParticipantFailed.getParticipant().getRawId()); - - CallAutomationEventProcessor callAutomationEventProcessor = new CallAutomationEventProcessor(); - callAutomationEventProcessor - .waitForEventProcessorAsync(removeParticipantFailed.getCallConnectionId(), - removeParticipantFailed.getOperationContext(), RemoveParticipantFailed.class) - .subscribe(eventFromProcessor -> { - assertEquals("serverCallId", eventFromProcessor.getServerCallId()); - assertEquals("callConnectionId", eventFromProcessor.getCallConnectionId()); - assertEquals("rawId", eventFromProcessor.getParticipant().getRawId()); - }); - callAutomationEventProcessor.processEvents(receivedEvent); - } - - @Test - public void parseContinuousDtmfRecognitionToneReceivedEvent() { - - String receivedEvent = "[\n" + " {\n" + " \"id\":\"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + " \"source\":\"calling/callConnections/callConnectionId/ContinuousDtmfRecognitionToneReceived\",\n" - + " \"type\":\"Microsoft.Communication.ContinuousDtmfRecognitionToneReceived\",\n" - + " \"specversion\":\"1.0\",\n" + " \"data\":{\n" - + " \"eventSource\":\"calling/callConnections/callConnectionId/ContinuousDtmfRecognitionToneReceived\",\n" - + " \"resultInformation\":{\n" + " \"code\":200,\n" + " \"subCode\":0,\n" - + " \"message\":\"DTMF tone received successfully.\"\n" + " },\n" - + " \"type\":\"ContinuousDtmfRecognitionToneReceived\",\n" + " \"sequenceId\":1,\n" - + " \"tone\":\"eight\",\n" + " \"callConnectionId\":\"callConnectionId\",\n" - + " \"serverCallId\":\"serverCallId\",\n" + " \"correlationId\":\"correlationId\",\n" - + " \"operationContext\":\"context\",\n" - + " \"time\":\"2022-08-12T03:13:25.0252763+00:00\",\n" + " \"specversion\":\"1.0\",\n" - + " \"datacontenttype\":\"application/json\",\n" - + " \"subject\":\"calling/callConnections/callConnectionId/ContinuousDtmfRecognitionToneReceived\"\n" - + " }\n" + " }\n" + "]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - - ContinuousDtmfRecognitionToneReceived continuousDtmfRecognitionToneReceived - = (ContinuousDtmfRecognitionToneReceived) event; - - assertNotNull(continuousDtmfRecognitionToneReceived); - assertEquals("serverCallId", continuousDtmfRecognitionToneReceived.getServerCallId()); - assertEquals("callConnectionId", continuousDtmfRecognitionToneReceived.getCallConnectionId()); - assertEquals("eight", continuousDtmfRecognitionToneReceived.getTone().toString()); - assertEquals(1, continuousDtmfRecognitionToneReceived.getSequenceId()); - assertEquals("correlationId", continuousDtmfRecognitionToneReceived.getCorrelationId()); - assertEquals(200, continuousDtmfRecognitionToneReceived.getResultInformation().getCode()); - assertEquals(0, continuousDtmfRecognitionToneReceived.getResultInformation().getSubCode()); - assertEquals("context", continuousDtmfRecognitionToneReceived.getOperationContext()); - assertEquals("DTMF tone received successfully.", - continuousDtmfRecognitionToneReceived.getResultInformation().getMessage()); - } - - @Test - public void parseContinuousDtmfRecognitionToneFailedEvent() { - - String receivedEvent = "[\n" + " {\n" + " \"id\":\"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + " \"source\":\"calling/callConnections/callConnectionId/ContinuousDtmfRecognitionToneFailed\",\n" - + " \"type\":\"Microsoft.Communication.ContinuousDtmfRecognitionToneFailed\",\n" - + " \"specversion\":\"1.0\",\n" + " \"data\":{\n" - + " \"eventSource\":\"calling/callConnections/callConnectionId/ContinuousDtmfRecognitionToneFailed\",\n" - + " \"resultInformation\":{\n" + " \"code\":400,\n" + " \"subCode\":12323,\n" - + " \"message\":\"Continuous DTMF tone Couldn't be received successfully.\"\n" + " },\n" - + " \"type\":\"ContinuousDtmfRecognitionToneFailed\",\n" - + " \"callConnectionId\":\"callConnectionId\",\n" + " \"serverCallId\":\"serverCallId\",\n" - + " \"correlationId\":\"correlationId\",\n" + " \"operationContext\":\"context\",\n" - + " \"time\":\"2022-08-12T03:13:25.0252763+00:00\",\n" + " \"specversion\":\"1.0\",\n" - + " \"datacontenttype\":\"application/json\",\n" - + " \"subject\":\"calling/callConnections/callConnectionId/ContinuousDtmfRecognitionToneFailed\"\n" - + " }\n" + " }\n" + "]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - - ContinuousDtmfRecognitionToneFailed continuousDtmfRecognitionToneFailed - = (ContinuousDtmfRecognitionToneFailed) event; - - assertNotNull(continuousDtmfRecognitionToneFailed); - assertEquals("serverCallId", continuousDtmfRecognitionToneFailed.getServerCallId()); - assertEquals("callConnectionId", continuousDtmfRecognitionToneFailed.getCallConnectionId()); - assertEquals("correlationId", continuousDtmfRecognitionToneFailed.getCorrelationId()); - assertEquals(400, continuousDtmfRecognitionToneFailed.getResultInformation().getCode()); - assertEquals(12323, continuousDtmfRecognitionToneFailed.getResultInformation().getSubCode()); - assertEquals("context", continuousDtmfRecognitionToneFailed.getOperationContext()); - assertEquals("Continuous DTMF tone Couldn't be received successfully.", - continuousDtmfRecognitionToneFailed.getResultInformation().getMessage()); - } - - @Test - public void parseContinuousDtmfRecognitionStoppedEvent() { - - String receivedEvent = "[\n" + " {\n" + " \"id\":\"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + " \"source\":\"calling/callConnections/callConnectionId/ContinuousDtmfRecognitionStopped\",\n" - + " \"type\":\"Microsoft.Communication.ContinuousDtmfRecognitionStopped\",\n" - + " \"specversion\":\"1.0\",\n" + " \"data\":{\n" - + " \"eventSource\":\"calling/callConnections/callConnectionId/ContinuousDtmfRecognitionStopped\",\n" - + " \"resultInformation\":{\n" + " \"code\":200,\n" + " \"subCode\":0,\n" - + " \"message\":\"Continuous DTMF Recognition stopped successfully.\"\n" + " },\n" - + " \"type\":\"ContinuousDtmfRecognitionStopped\",\n" - + " \"callConnectionId\":\"callConnectionId\",\n" + " \"serverCallId\":\"serverCallId\",\n" - + " \"correlationId\":\"correlationId\",\n" + " \"operationContext\":\"context\",\n" - + " \"time\":\"2022-08-12T03:13:25.0252763+00:00\",\n" + " \"specversion\":\"1.0\",\n" - + " \"datacontenttype\":\"application/json\",\n" - + " \"subject\":\"calling/callConnections/callConnectionId/ContinuousDtmfRecognitionStopped\"\n" - + " }\n" + " }\n" + "]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - - ContinuousDtmfRecognitionStopped continuousDtmfRecognitionStopped = (ContinuousDtmfRecognitionStopped) event; - - assertNotNull(continuousDtmfRecognitionStopped); - assertEquals("serverCallId", continuousDtmfRecognitionStopped.getServerCallId()); - assertEquals("callConnectionId", continuousDtmfRecognitionStopped.getCallConnectionId()); - assertEquals("correlationId", continuousDtmfRecognitionStopped.getCorrelationId()); - assertEquals(200, continuousDtmfRecognitionStopped.getResultInformation().getCode()); - assertEquals(0, continuousDtmfRecognitionStopped.getResultInformation().getSubCode()); - assertEquals("context", continuousDtmfRecognitionStopped.getOperationContext()); - assertEquals("Continuous DTMF Recognition stopped successfully.", - continuousDtmfRecognitionStopped.getResultInformation().getMessage()); - } - - @Test - public void parseSendDtmfTonesCompletedEvent() { - - String receivedEvent = "[\n" + " {\n" + " \"id\":\"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + " \"source\":\"calling/callConnections/callConnectionId/SendDtmfTonesCompleted\",\n" - + " \"type\":\"Microsoft.Communication.SendDtmfTonesCompleted\",\n" - + " \"specversion\":\"1.0\",\n" + " \"data\":{\n" - + " \"eventSource\":\"calling/callConnections/callConnectionId/SendDtmfTonesCompleted\",\n" - + " \"resultInformation\":{\n" + " \"code\":200,\n" + " \"subCode\":0,\n" - + " \"message\":\"Send DTMF completed successfully.\"\n" + " },\n" - + " \"type\":\"SendDtmfTonesCompleted\",\n" - + " \"callConnectionId\":\"callConnectionId\",\n" + " \"serverCallId\":\"serverCallId\",\n" - + " \"correlationId\":\"correlationId\",\n" + " \"operationContext\":\"context\",\n" - + " \"time\":\"2022-08-12T03:13:25.0252763+00:00\",\n" + " \"specversion\":\"1.0\",\n" - + " \"datacontenttype\":\"application/json\",\n" - + " \"subject\":\"calling/callConnections/callConnectionId/SendDtmfTonesCompleted\"\n" + " }\n" - + " }\n" + "]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - - SendDtmfTonesCompleted sendDtmfTonesCompleted = (SendDtmfTonesCompleted) event; - - assertNotNull(sendDtmfTonesCompleted); - assertEquals("serverCallId", sendDtmfTonesCompleted.getServerCallId()); - assertEquals("callConnectionId", sendDtmfTonesCompleted.getCallConnectionId()); - assertEquals("correlationId", sendDtmfTonesCompleted.getCorrelationId()); - assertEquals(200, sendDtmfTonesCompleted.getResultInformation().getCode()); - assertEquals(0, sendDtmfTonesCompleted.getResultInformation().getSubCode()); - assertEquals("context", sendDtmfTonesCompleted.getOperationContext()); - assertEquals("Send DTMF completed successfully.", sendDtmfTonesCompleted.getResultInformation().getMessage()); - } - - @Test - public void parseSendDtmfTonesFailedEvent() { - - String receivedEvent = "[\n" + " {\n" + " \"id\":\"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + " \"source\":\"calling/callConnections/callConnectionId/SendDtmfTonesFailed\",\n" - + " \"type\":\"Microsoft.Communication.SendDtmfTonesFailed\",\n" + " \"specversion\":\"1.0\",\n" - + " \"data\":{\n" - + " \"eventSource\":\"calling/callConnections/callConnectionId/SendDtmfTonesFailed\",\n" - + " \"resultInformation\":{\n" + " \"code\":200,\n" + " \"subCode\":0,\n" - + " \"message\":\"Send DTMF couldn't be completed successfully.\"\n" + " },\n" - + " \"type\":\"SendDtmfTonesFailed\",\n" + " \"callConnectionId\":\"callConnectionId\",\n" - + " \"serverCallId\":\"serverCallId\",\n" + " \"correlationId\":\"correlationId\",\n" - + " \"operationContext\":\"context\",\n" - + " \"time\":\"2022-08-12T03:13:25.0252763+00:00\",\n" + " \"specversion\":\"1.0\",\n" - + " \"datacontenttype\":\"application/json\",\n" - + " \"subject\":\"calling/callConnections/callConnectionId/SendDtmfTonesFailed\"\n" + " }\n" - + " }\n" + "]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - - SendDtmfTonesFailed sendDtmfTonesFailed = (SendDtmfTonesFailed) event; - - assertNotNull(sendDtmfTonesFailed); - assertEquals("serverCallId", sendDtmfTonesFailed.getServerCallId()); - assertEquals("callConnectionId", sendDtmfTonesFailed.getCallConnectionId()); - assertEquals("correlationId", sendDtmfTonesFailed.getCorrelationId()); - assertEquals(200, sendDtmfTonesFailed.getResultInformation().getCode()); - assertEquals(0, sendDtmfTonesFailed.getResultInformation().getSubCode()); - assertEquals("context", sendDtmfTonesFailed.getOperationContext()); - assertEquals("Send DTMF couldn't be completed successfully.", - sendDtmfTonesFailed.getResultInformation().getMessage()); - } - - @Test - public void parseTransferAccptedEvent() { - String receivedEvent = "[\n" + " {\n" + " \"id\": \"91f8b34b-383c-431d-9fa5-79d39fad9300\",\n" - + " \"source\": \"calling/callConnections/411f0b00-dc73-4528-a9e6-968ba983d2a1\",\n" - + " \"type\": \"Microsoft.Communication.CallTransferAccepted\",\n" + " \"data\": {\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" - + " \"subCode\": 7015,\n" - + " \"message\": \"The transfer operation completed successfully.\"\n" + " },\n" - + " \"transferTarget\": {\n" - + " \"rawId\": \"8:acs:3afbe310-c6d9-4b6f-a11e-c2aeb352f207_0000001a-0f2f-2234-655d-573a0d00443e\",\n" - + " \"kind\": \"communicationUser\",\n" + " \"communicationUser\": {\n" - + " \"id\": \"8:acs:3afbe310-c6d9-4b6f-a11e-c2aeb352f207_0000001a-0f2f-2234-655d-573a0d00443e\"\n" - + " }\n" + " },\n" + " \"transferee\": {\n" - + " \"rawId\": \"8:acs:3afbe310-c6d9-4b6f-a11e-c2aeb352f207_0000001a-0f2e-e2b4-655d-573a0d004434\",\n" - + " \"kind\": \"communicationUser\",\n" + " \"communicationUser\": {\n" - + " \"id\": \"8:acs:3afbe310-c6d9-4b6f-a11e-c2aeb352f207_0000001a-0f2e-e2b4-655d-573a0d004434\"\n" - + " }\n" + " },\n" - + " \"callConnectionId\": \"411f0b00-dc73-4528-a9e6-968ba983d2a1\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDEuY29udi5za3lwZS5jb20vY29udi8yZWtNYmJRN3VVbUY1RDJERFdITWJnP2k9MTUmZT02MzgyNTMwMzY2ODQ5NzkwMDI=\",\n" - + " \"correlationId\": \"be43dd55-38e9-4de8-9d75-e20b6b32744f\"\n" + " },\n" - + " \"time\": \"2023-07-19T18:31:16.6795146+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/411f0b00-dc73-4528-a9e6-968ba983d2a1\"\n" + " }\n" - + "]"; - CallTransferAccepted event = (CallTransferAccepted) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDEuY29udi5za3lwZS5jb20vY29udi8yZWtNYmJRN3VVbUY1RDJERFdITWJnP2k9MTUmZT02MzgyNTMwMzY2ODQ5NzkwMDI=", - event.getServerCallId()); - assertEquals("411f0b00-dc73-4528-a9e6-968ba983d2a1", event.getCallConnectionId()); - assertEquals("be43dd55-38e9-4de8-9d75-e20b6b32744f", event.getCorrelationId()); - assertEquals("The transfer operation completed successfully.", event.getResultInformation().getMessage()); - assertEquals("8:acs:3afbe310-c6d9-4b6f-a11e-c2aeb352f207_0000001a-0f2f-2234-655d-573a0d00443e", - event.getTransferTarget().getRawId()); - assertEquals("8:acs:3afbe310-c6d9-4b6f-a11e-c2aeb352f207_0000001a-0f2e-e2b4-655d-573a0d004434", - event.getTransferee().getRawId()); - - CallAutomationEventProcessor callAutomationEventProcessor = new CallAutomationEventProcessor(); - callAutomationEventProcessor.processEvents(receivedEvent); - CallAutomationEventBase eventComing = callAutomationEventProcessor.waitForEventProcessor( - eventFromProcessor -> Objects.equals(event.getServerCallId(), eventFromProcessor.getServerCallId()) - && Objects.equals(event.getCallConnectionId(), eventFromProcessor.getCallConnectionId())); - - assertNotNull(eventComing); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDEuY29udi5za3lwZS5jb20vY29udi8yZWtNYmJRN3VVbUY1RDJERFdITWJnP2k9MTUmZT02MzgyNTMwMzY2ODQ5NzkwMDI=", - eventComing.getServerCallId()); - assertEquals("411f0b00-dc73-4528-a9e6-968ba983d2a1", eventComing.getCallConnectionId()); - assertEquals("be43dd55-38e9-4de8-9d75-e20b6b32744f", eventComing.getCorrelationId()); - assertEquals("The transfer operation completed successfully.", - ((CallTransferAccepted) eventComing).getResultInformation().getMessage()); - assertEquals("8:acs:3afbe310-c6d9-4b6f-a11e-c2aeb352f207_0000001a-0f2f-2234-655d-573a0d00443e", - ((CallTransferAccepted) eventComing).getTransferTarget().getRawId()); - assertEquals("8:acs:3afbe310-c6d9-4b6f-a11e-c2aeb352f207_0000001a-0f2e-e2b4-655d-573a0d004434", - ((CallTransferAccepted) eventComing).getTransferee().getRawId()); - } - - @Test - public void parseCancelAddParticipantSucceededEvent() { - String receivedEvent = "[{\n" + "\"id\": \"c3220fa3-79bd-473e-96a2-3ecb5be7d71f\",\n" - + "\"source\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\",\n" - + "\"type\": \"Microsoft.Communication.CancelAddParticipantSucceeded\",\n" + "\"data\": {\n" - + "\"operationContext\": \"context\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"invitationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\",\n" - + "\"correlationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\"\n" + "},\n" - + "\"time\": \"2023-03-22T16:57:09.287755+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\"\n" + "}]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - - CancelAddParticipantSucceeded cancelAddParticipantSucceeded = (CancelAddParticipantSucceeded) event; - - assertNotNull(cancelAddParticipantSucceeded); - assertEquals("serverCallId", cancelAddParticipantSucceeded.getServerCallId()); - assertEquals("callConnectionId", cancelAddParticipantSucceeded.getCallConnectionId()); - assertEquals("b880bd5a-1916-470a-b43d-aabf3caff91c", cancelAddParticipantSucceeded.getInvitationId()); - } - - @Test - public void parseCancelAddParticipantFailedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"c3220fa3-79bd-473e-96a2-3ecb5be7d71f\",\n" - + "\"source\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\",\n" - + "\"type\": \"Microsoft.Communication.CancelAddParticipantFailed\",\n" + "\"data\": {\n" - + "\"operationContext\": \"context\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"invitationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\",\n" - + "\"correlationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\"\n" + "},\n" - + "\"time\": \"2023-03-22T16:57:09.287755+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\"\n" + "}]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - - CancelAddParticipantFailed cancelAddParticipantFailed = (CancelAddParticipantFailed) event; - - assertNotNull(cancelAddParticipantFailed); - assertEquals("serverCallId", cancelAddParticipantFailed.getServerCallId()); - assertEquals("callConnectionId", cancelAddParticipantFailed.getCallConnectionId()); - assertEquals("b880bd5a-1916-470a-b43d-aabf3caff91c", cancelAddParticipantFailed.getInvitationId()); - - CallAutomationEventProcessor callAutomationEventProcessor = new CallAutomationEventProcessor(); - callAutomationEventProcessor.attachOngoingEventProcessor(cancelAddParticipantFailed.getCallConnectionId(), - eventToHandle -> { - assertEquals("serverCallId", eventToHandle.getServerCallId()); - assertEquals("callConnectionId", eventToHandle.getCallConnectionId()); - assertEquals("b880bd5a-1916-470a-b43d-aabf3caff91c", eventToHandle.getInvitationId()); - }, CancelAddParticipantFailed.class); - callAutomationEventProcessor.processEvents(receivedEvent); - callAutomationEventProcessor.detachOngoingEventProcessor(cancelAddParticipantFailed.getCallConnectionId(), - CancelAddParticipantFailed.class); - } - - @Test - public void parseDialogCompletedEvent() { - String receivedEvent = "\n" + " {\n" + " \"id\": \"91f8b34b-383c-431d-9fa5-79d39fad9300\",\n" - + " \"source\": \"calling/callConnections/441fbf00-5b21-4beb-bd4d-fd665ca4b65f\",\n" - + " \"type\": \"Microsoft.Communication.DialogCompleted\",\n" + " \"data\": {\n" - + " \"operationContext\": \"context\",\n" + " \"resultInformation\": {\n" - + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Success Result\"\n" + " },\n" - + " \"dialogInputType\": \"powerVirtualAgents\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"441fbf00-5b21-4beb-bd4d-fd665ca4b65f\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzc2MtMDkuY29udi5za3lwZS5jb20vY29udi9ubUpvbG9wMUhrdWhDVllYNUlxTTZnP2k9OCZlPTYzODI1NjEzMTYxNDIwOTA2MQ==\",\n" - + " \"correlationId\": \"fb2d738b-d9cb-496c-8be6-416aeecd4d96\"\n" + " },\n" - + " \"time\": \"2023-07-27T07:48:56.0766803+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/441fbf00-5b21-4beb-bd4d-fd665ca4b65f\"\n" + " }]"; - DialogCompleted event = (DialogCompleted) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzc2MtMDkuY29udi5za3lwZS5jb20vY29udi9ubUpvbG9wMUhrdWhDVllYNUlxTTZnP2k9OCZlPTYzODI1NjEzMTYxNDIwOTA2MQ==", - event.getServerCallId()); - assertEquals("441fbf00-5b21-4beb-bd4d-fd665ca4b65f", event.getCallConnectionId()); - assertEquals("fb2d738b-d9cb-496c-8be6-416aeecd4d96", event.getCorrelationId()); - assertEquals("Success Result", event.getResultInformation().getMessage()); - assertEquals("92e08834-b6ee-4ede-8956-9fefa27a691c", event.getDialogId()); - assertEquals("powerVirtualAgents", event.getDialogInputType().toString()); - } - - @Test - public void parseDialogStartedEvent() { - String receivedEvent = "[{\n" + " \"id\": \"91f8b34b-383c-431d-9fa5-79d39fad9300\",\n" - + " \"source\": \"calling/callConnections/441fbf00-5b21-4beb-bd4d-fd665ca4b65f\",\n" - + " \"type\": \"Microsoft.Communication.DialogStarted\",\n" + " \"data\": {\n" - + " \"operationContext\": \"context\",\n" + " \"resultInformation\": {\n" - + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Success Result\"\n" + " },\n" - + " \"dialogInputType\": \"powerVirtualAgents\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"441fbf00-5b21-4beb-bd4d-fd665ca4b65f\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzc2MtMDkuY29udi5za3lwZS5jb20vY29udi9ubUpvbG9wMUhrdWhDVllYNUlxTTZnP2k9OCZlPTYzODI1NjEzMTYxNDIwOTA2MQ==\",\n" - + " \"correlationId\": \"fb2d738b-d9cb-496c-8be6-416aeecd4d96\"\n" + " },\n" - + " \"time\": \"2023-07-27T07:48:55.2765079+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/441fbf00-5b21-4beb-bd4d-fd665ca4b65f\"\n" + "}]"; - DialogStarted event = (DialogStarted) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzc2MtMDkuY29udi5za3lwZS5jb20vY29udi9ubUpvbG9wMUhrdWhDVllYNUlxTTZnP2k9OCZlPTYzODI1NjEzMTYxNDIwOTA2MQ==", - event.getServerCallId()); - assertEquals("441fbf00-5b21-4beb-bd4d-fd665ca4b65f", event.getCallConnectionId()); - assertEquals("fb2d738b-d9cb-496c-8be6-416aeecd4d96", event.getCorrelationId()); - assertEquals("Success Result", event.getResultInformation().getMessage()); - assertEquals("92e08834-b6ee-4ede-8956-9fefa27a691c", event.getDialogId()); - assertEquals("powerVirtualAgents", event.getDialogInputType().toString()); - } - - @Test - public void parseDialogFailedEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"91f8b34b-383c-431d-9fa5-79d39fad9300\",\n" - + " \"source\": \"calling/callConnections/441fbf00-5b21-4beb-bd4d-fd665ca4b65f\",\n" - + " \"type\": \"Microsoft.Communication.DialogFailed\",\n" + " \"data\": {\n" - + " \"operationContext\": \"context\",\n" + " \"resultInformation\": {\n" - + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Operation Failed\"\n" + " },\n" - + " \"dialogInputType\": \"powerVirtualAgents\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"441fbf00-5b21-4beb-bd4d-fd665ca4b65f\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzc2MtMDkuY29udi5za3lwZS5jb20vY29udi9ubUpvbG9wMUhrdWhDVllYNUlxTTZnP2k9OCZlPTYzODI1NjEzMTYxNDIwOTA2MQ==\",\n" - + " \"correlationId\": \"fb2d738b-d9cb-496c-8be6-416aeecd4d96\"\n" + " },\n" - + " \"time\": \"2023-07-27T07:48:55.5109544+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/441fbf00-5b21-4beb-bd4d-fd665ca4b65f\"\n" + "}]"; - DialogFailed event = (DialogFailed) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzc2MtMDkuY29udi5za3lwZS5jb20vY29udi9ubUpvbG9wMUhrdWhDVllYNUlxTTZnP2k9OCZlPTYzODI1NjEzMTYxNDIwOTA2MQ==", - event.getServerCallId()); - assertEquals("441fbf00-5b21-4beb-bd4d-fd665ca4b65f", event.getCallConnectionId()); - assertEquals("fb2d738b-d9cb-496c-8be6-416aeecd4d96", event.getCorrelationId()); - assertEquals("Operation Failed", event.getResultInformation().getMessage()); - assertEquals("92e08834-b6ee-4ede-8956-9fefa27a691c", event.getDialogId()); - assertEquals("powerVirtualAgents", event.getDialogInputType().toString()); - } - - @Test - public void parseDialogLanguageChangeEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/441fbf00-5b21-4beb-bd4d-fd665ca4b65f\",\n" - + " \"type\": \"Microsoft.Communication.DialogLanguageChange\",\n" + " \"data\": {\n" - + " \"selectedLanguage\": \"eng-USA\",\n" + " \"operationContext\": \"context\",\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Success Result\"\n" + " },\n" - + " \"dialogInputType\": \"powerVirtualAgents\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"ivrContext\": \"Sanitized\",\n" - + " \"callConnectionId\": \"441fbf00-5b21-4beb-bd4d-fd665ca4b65f\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzc2MtMDkuY29udi5za3lwZS5jb20vY29udi9ubUpvbG9wMUhrdWhDVllYNUlxTTZnP2k9OCZlPTYzODI1NjEzMTYxNDIwOTA2MQ==\",\n" - + " \"correlationId\": \"fb2d738b-d9cb-496c-8be6-416aeecd4d96\"\n" + " },\n" - + " \"time\": \"2023-07-27T07:48:55.5109544+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/441fbf00-5b21-4beb-bd4d-fd665ca4b65f\"\n" + "}]"; - - DialogLanguageChange event = (DialogLanguageChange) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzc2MtMDkuY29udi5za3lwZS5jb20vY29udi9ubUpvbG9wMUhrdWhDVllYNUlxTTZnP2k9OCZlPTYzODI1NjEzMTYxNDIwOTA2MQ==", - event.getServerCallId()); - assertEquals("441fbf00-5b21-4beb-bd4d-fd665ca4b65f", event.getCallConnectionId()); - assertEquals("fb2d738b-d9cb-496c-8be6-416aeecd4d96", event.getCorrelationId()); - assertEquals("Success Result", event.getResultInformation().getMessage()); - assertEquals("92e08834-b6ee-4ede-8956-9fefa27a691c", event.getDialogId()); - assertEquals("powerVirtualAgents", event.getDialogInputType().toString()); - assertEquals("Sanitized", event.getIvrContext()); - } - - @Test - public void parseDialogSensitivityUpdateEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"type\": \"Microsoft.Communication.DialogSensitivityUpdate\",\n" + " \"data\": {\n" - + " \"sensitiveMask\": false,\n" + " \"operationContext\": \"context\",\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Success Result\"\n" + " },\n" - + " \"dialogInputType\": \"powerVirtualAgents\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==\",\n" - + " \"correlationId\": \"ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5\"\n" + " },\n" - + " \"time\": \"2023-08-02T08:44:58.9826643+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\"\n" + "}]"; - DialogSensitivityUpdate event - = (DialogSensitivityUpdate) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==", - event.getServerCallId()); - assertEquals("491f1300-0c70-4f8c-97b4-94474f2a371b", event.getCallConnectionId()); - assertEquals("ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5", event.getCorrelationId()); - assertEquals("Success Result", event.getResultInformation().getMessage()); - assertEquals("92e08834-b6ee-4ede-8956-9fefa27a691c", event.getDialogId()); - assertEquals("powerVirtualAgents", event.getDialogInputType().toString()); - } - - @Test - public void parseDialogConsentEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"type\": \"Microsoft.Communication.DialogConsent\",\n" + " \"data\": {\n" - + " \"sensitiveMask\": false,\n" + " \"operationContext\": \"context\",\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Success Result\"\n" + " },\n" - + " \"dialogInputType\": \"powerVirtualAgents\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==\",\n" - + " \"correlationId\": \"ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5\"\n" + " },\n" - + " \"time\": \"2023-08-02T08:44:58.9826643+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\"\n" + "}]"; - DialogConsent event = (DialogConsent) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==", - event.getServerCallId()); - assertEquals("491f1300-0c70-4f8c-97b4-94474f2a371b", event.getCallConnectionId()); - assertEquals("ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5", event.getCorrelationId()); - assertEquals("Success Result", event.getResultInformation().getMessage()); - assertEquals("92e08834-b6ee-4ede-8956-9fefa27a691c", event.getDialogId()); - assertEquals("powerVirtualAgents", event.getDialogInputType().toString()); - } - - @Test - public void parseDialogHangupEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"type\": \"Microsoft.Communication.DialogHangup\",\n" + " \"data\": {\n" - + " \"sensitiveMask\": false,\n" + " \"operationContext\": \"context\",\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Success Result\"\n" + " },\n" - + " \"dialogInputType\": \"powerVirtualAgents\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==\",\n" - + " \"correlationId\": \"ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5\"\n" + " },\n" - + " \"time\": \"2023-08-02T08:44:58.9826643+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\"\n" + "}]"; - DialogHangup event = (DialogHangup) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==", - event.getServerCallId()); - assertEquals("491f1300-0c70-4f8c-97b4-94474f2a371b", event.getCallConnectionId()); - assertEquals("ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5", event.getCorrelationId()); - assertEquals("Success Result", event.getResultInformation().getMessage()); - assertEquals("92e08834-b6ee-4ede-8956-9fefa27a691c", event.getDialogId()); - assertEquals("powerVirtualAgents", event.getDialogInputType().toString()); - } - - @Test - public void parseDialogTransferEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"type\": \"Microsoft.Communication.DialogTransfer\",\n" + " \"data\": {\n" - + " \"sensitiveMask\": false,\n" + " \"operationContext\": \"context\",\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Success Result\"\n" + " },\n" - + " \"dialogInputType\": \"powerVirtualAgents\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==\",\n" - + " \"correlationId\": \"ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5\"\n" + " },\n" - + " \"time\": \"2023-08-02T08:44:58.9826643+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\"\n" + "}]"; - DialogTransfer event = (DialogTransfer) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==", - event.getServerCallId()); - assertEquals("491f1300-0c70-4f8c-97b4-94474f2a371b", event.getCallConnectionId()); - assertEquals("ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5", event.getCorrelationId()); - assertEquals("Success Result", event.getResultInformation().getMessage()); - assertEquals("92e08834-b6ee-4ede-8956-9fefa27a691c", event.getDialogId()); - assertEquals("powerVirtualAgents", event.getDialogInputType().toString()); - } - - @Test - public void parseTranscriptionStartedEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"type\": \"Microsoft.Communication.TranscriptionStarted\",\n" + " \"data\": {\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Transcription started successfully.\"\n" + " },\n" - + " \"transcriptionUpdate\": {\n" - + " \"transcriptionStatus\": \"transcriptionStarted\",\n" - + " \"transcriptionStatusDetails\": \"subscriptionStarted\"\n" + " },\n" - + " \"version\": \"2023-01-15-preview\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==\",\n" - + " \"correlationId\": \"ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5\",\n" - + " \"publicEventType\": \"Microsoft.Communication.TranscriptionStarted\"\n" + " },\n" - + " \"time\": \"2023-08-02T08:44:58.9826643+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\"\n" + "}]"; - - TranscriptionStarted event = (TranscriptionStarted) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==", - event.getServerCallId()); - assertEquals("491f1300-0c70-4f8c-97b4-94474f2a371b", event.getCallConnectionId()); - assertEquals("ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5", event.getCorrelationId()); - assertEquals("Transcription started successfully.", event.getResultInformation().getMessage()); - - assertNotNull(event.getTranscriptionUpdateResult()); - assertEquals(TranscriptionStatus.TRANSCRIPTION_STARTED, - event.getTranscriptionUpdateResult().getTranscriptionStatus()); - assertEquals(TranscriptionStatusDetails.SUBSCRIPTION_STARTED, - event.getTranscriptionUpdateResult().getTranscriptionStatusDetails()); - } - - @Test - public void parseTranscriptionResumedEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"type\": \"Microsoft.Communication.TranscriptionResumed\",\n" + " \"data\": {\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Transcription resumed.\"\n" + " },\n" - + " \"transcriptionUpdate\": {\n" - + " \"transcriptionStatus\": \"transcriptionResumed\",\n" - + " \"transcriptionStatusDetails\": \"streamConnectionReestablished\"\n" + " },\n" - + " \"version\": \"2023-01-15-preview\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==\",\n" - + " \"correlationId\": \"ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5\",\n" - + " \"publicEventType\": \"icrosoft.Communication.TranscriptionResumed\"\n" + " },\n" - + " \"time\": \"2023-08-02T08:44:58.9826643+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\"\n" + "}]"; - - TranscriptionResumed event = (TranscriptionResumed) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==", - event.getServerCallId()); - assertEquals("491f1300-0c70-4f8c-97b4-94474f2a371b", event.getCallConnectionId()); - assertEquals("ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5", event.getCorrelationId()); - assertEquals("Transcription resumed.", event.getResultInformation().getMessage()); - - assertNotNull(event.getTranscriptionUpdateResult()); - assertEquals(TranscriptionStatus.TRANSCRIPTION_RESUMED, - event.getTranscriptionUpdateResult().getTranscriptionStatus()); - assertEquals(TranscriptionStatusDetails.STREAM_CONNECTION_REESTABLISHED, - event.getTranscriptionUpdateResult().getTranscriptionStatusDetails()); - } - - @Test - public void parseTranscriptionStoppedEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"type\": \"Microsoft.Communication.TranscriptionStopped\",\n" + " \"data\": {\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Transcription stopped.\"\n" + " },\n" - + " \"transcriptionUpdate\": {\n" - + " \"transcriptionStatus\": \"transcriptionStopped\",\n" - + " \"transcriptionStatusDetails\": \"subscriptionStopped\"\n" + " },\n" - + " \"version\": \"2023-01-15-preview\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==\",\n" - + " \"correlationId\": \"ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5\",\n" - + " \"publicEventType\": \"icrosoft.Communication.TranscriptionStopped\"\n" + " },\n" - + " \"time\": \"2023-08-02T08:44:58.9826643+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\"\n" + "}]"; - - TranscriptionStopped event = (TranscriptionStopped) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==", - event.getServerCallId()); - assertEquals("491f1300-0c70-4f8c-97b4-94474f2a371b", event.getCallConnectionId()); - assertEquals("ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5", event.getCorrelationId()); - assertEquals("Transcription stopped.", event.getResultInformation().getMessage()); - - assertNotNull(event.getTranscriptionUpdateResult()); - assertEquals(TranscriptionStatus.TRANSCRIPTION_STOPPED, - event.getTranscriptionUpdateResult().getTranscriptionStatus()); - assertEquals(TranscriptionStatusDetails.SUBSCRIPTION_STOPPED, - event.getTranscriptionUpdateResult().getTranscriptionStatusDetails()); - } - - @Test - public void parseTranscriptionFailedEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"type\": \"Microsoft.Communication.TranscriptionFailed\",\n" + " \"data\": {\n" - + " \"resultInformation\": {\n" + " \"code\": 500,\n" + " \"subCode\": 9999,\n" - + " \"message\": \"Unknown internal server error.\"\n" + " },\n" - + " \"transcriptionUpdate\": {\n" + " \"transcriptionStatus\": \"transcriptionFailed\",\n" - + " \"transcriptionStatusDetails\": \"unspecifiedError\"\n" + " },\n" - + " \"version\": \"2023-01-15-preview\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==\",\n" - + " \"correlationId\": \"ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5\",\n" - + " \"publicEventType\": \"icrosoft.Communication.TranscriptionFailed\"\n" + " },\n" - + " \"time\": \"2023-08-02T08:44:58.9826643+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\"\n" + "}]"; - - TranscriptionFailed event = (TranscriptionFailed) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==", - event.getServerCallId()); - assertEquals("491f1300-0c70-4f8c-97b4-94474f2a371b", event.getCallConnectionId()); - assertEquals("ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5", event.getCorrelationId()); - assertEquals("Unknown internal server error.", event.getResultInformation().getMessage()); - - assertNotNull(event.getTranscriptionUpdateResult()); - assertEquals(TranscriptionStatus.TRANSCRIPTION_FAILED, - event.getTranscriptionUpdateResult().getTranscriptionStatus()); - assertEquals(TranscriptionStatusDetails.UNSPECIFIED_ERROR, - event.getTranscriptionUpdateResult().getTranscriptionStatusDetails()); - } - - @Test - public void parseTranscriptionUpdatedEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"type\": \"Microsoft.Communication.TranscriptionUpdated\",\n" + " \"data\": {\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Transcription updated.\"\n" + " },\n" - + " \"transcriptionUpdate\": {\n" - + " \"transcriptionStatus\": \"transcriptionLocaleUpdated\",\n" - + " \"transcriptionStatusDetails\": \"subscriptionStarted\"\n" + " },\n" - + " \"version\": \"2023-01-15-preview\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==\",\n" - + " \"correlationId\": \"ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5\",\n" - + " \"publicEventType\": \"Microsoft.Communication.TranscriptionUpdated\"\n" + " },\n" - + " \"time\": \"2023-08-02T08:44:58.9826643+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\"\n" + "}]"; - - TranscriptionUpdated event = (TranscriptionUpdated) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==", - event.getServerCallId()); - assertEquals("491f1300-0c70-4f8c-97b4-94474f2a371b", event.getCallConnectionId()); - assertEquals("ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5", event.getCorrelationId()); - assertEquals("Transcription updated.", event.getResultInformation().getMessage()); - - assertNotNull(event.getTranscriptionUpdateResult()); - assertEquals(TranscriptionStatus.TRANSCRIPTION_LOCALE_UPDATED, - event.getTranscriptionUpdateResult().getTranscriptionStatus()); - assertEquals(TranscriptionStatusDetails.SUBSCRIPTION_STARTED, - event.getTranscriptionUpdateResult().getTranscriptionStatusDetails()); - } - - @Test - public void parseAnswerFailedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"c3220fa3-79bd-473e-96a2-3ecb5be7d71f\",\n" - + "\"source\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\",\n" - + "\"type\": \"Microsoft.Communication.AnswerFailed\",\n" + "\"data\": {\n" - + "\"operationContext\": \"context\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"correlationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\"\n" - + "},\n" + "\"time\": \"2023-03-22T16:57:09.287755+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\"\n" + "}]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - - AnswerFailed answerFailed = (AnswerFailed) event; - - assertNotNull(answerFailed); - assertEquals("serverCallId", answerFailed.getServerCallId()); - assertEquals("callConnectionId", answerFailed.getCallConnectionId()); - - CallAutomationEventProcessor callAutomationEventProcessor = new CallAutomationEventProcessor(); - callAutomationEventProcessor.attachOngoingEventProcessor(answerFailed.getCallConnectionId(), eventToHandle -> { - assertEquals("serverCallId", eventToHandle.getServerCallId()); - assertEquals("callConnectionId", eventToHandle.getCallConnectionId()); - }, AnswerFailed.class); - callAutomationEventProcessor.processEvents(receivedEvent); - callAutomationEventProcessor.detachOngoingEventProcessor(answerFailed.getCallConnectionId(), - AnswerFailed.class); - } - - @Test - public void parseCreateCallFailedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"c3220fa3-79bd-473e-96a2-3ecb5be7d71f\",\n" - + "\"source\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\",\n" - + "\"type\": \"Microsoft.Communication.CreateCallFailed\",\n" + "\"data\": {\n" - + "\"operationContext\": \"context\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"correlationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\"\n" - + "},\n" + "\"time\": \"2023-03-22T16:57:09.287755+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\"\n" + "}]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - - CreateCallFailed createCallFailed = (CreateCallFailed) event; - - assertNotNull(createCallFailed); - assertEquals("serverCallId", createCallFailed.getServerCallId()); - assertEquals("callConnectionId", createCallFailed.getCallConnectionId()); - - CallAutomationEventProcessor callAutomationEventProcessor = new CallAutomationEventProcessor(); - callAutomationEventProcessor.attachOngoingEventProcessor(createCallFailed.getCallConnectionId(), - eventToHandle -> { - assertEquals("serverCallId", eventToHandle.getServerCallId()); - assertEquals("callConnectionId", eventToHandle.getCallConnectionId()); - }, CreateCallFailed.class); - callAutomationEventProcessor.processEvents(receivedEvent); - callAutomationEventProcessor.detachOngoingEventProcessor(createCallFailed.getCallConnectionId(), - CreateCallFailed.class); - } - - @Test - public void parseHoldFailedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/HoldFailed\",\n" - + "\"type\": \"Microsoft.Communication.HoldFailed\",\n" + "\"data\": {\n" + "\"resultInformation\": {\n" - + "\"code\": 400,\n" + "\"subCode\": 8536,\n" - + "\"message\": \"Action failed, file could not be downloaded.\"\n" + "},\n" + "\"type\": \"HoldFailed\",\n" - + "\"callConnectionId\": \"callConnectionId\",\n" + "\"serverCallId\": \"serverCallId\",\n" - + "\"correlationId\": \"correlationId\"\n" + "},\n" + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" - + "\"specversion\": \"1.0\",\n" + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - HoldFailed holdFailed = (HoldFailed) event; - assertNotNull(holdFailed); - assertEquals("correlationId", holdFailed.getCorrelationId()); - assertEquals("serverCallId", holdFailed.getServerCallId()); - assertEquals(400, holdFailed.getResultInformation().getCode()); - assertEquals(ReasonCode.Play.DOWNLOAD_FAILED, holdFailed.getReasonCode()); - } - - @Test - public void parseMediaStreamingStartedEvent() { - String receivedEvent = "[{\n" + "\"id\":\"d13c62c5-721e-44b9-a680-9866c33db7e7\",\n" - + "\"source\":\"calling/callConnections/4c1f5600-a9c6-4343-8979-b638a98de98f\",\n" - + "\"type\":\"Microsoft.Communication.MediaStreamingStarted\",\n" - + "\"data\":{\"eventSource\":\"calling/callConnections/4c1f5600-a9c6-4343-8979-b638a98de98f\",\n" - + "\"operationContext\":\"startMediaStreamingContext\",\n" - + "\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\n" - + "\"mediaStreamingUpdate\":{\"contentType\":\"Audio\",\n" - + "\"mediaStreamingStatus\":\"mediaStreamingStarted\",\n" - + "\"mediaStreamingStatusDetails\":\"subscriptionStarted\"},\n" + "\"version\":\"2024-06-15-preview\",\n" - + "\"callConnectionId\":\"4c1f5600-a9c6-4343-8979-b638a98de98f\",\n" - + "\"serverCallId\":\"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LW1hc28tMDEtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9LTTQteUZBUmhVYXN3T1RqbklPSXZnP2k9MTAtMTI4LTk1LTUyJmU9NjM4NTAwMTgzOTYwNzY2MzQ0\",\n" - + "\"correlationId\":\"30f0ad34-d615-4bf3-8476-5630ae7fc3db\",\n" - + "\"publicEventType\":\"Microsoft.Communication.MediaStreamingStarted\"},\n" - + "\"time\":\"2024-05-02T11:20:42.9110236+00:00\",\n" + "\"specversion\":\"1.0\",\n" - + "\"datacontenttype\":\"application/json\",\n" - + "\"subject\":\"calling/callConnections/4c1f5600-a9c6-4343-8979-b638a98de98f\"}]"; - - MediaStreamingStarted event - = (MediaStreamingStarted) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LW1hc28tMDEtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9LTTQteUZBUmhVYXN3T1RqbklPSXZnP2k9MTAtMTI4LTk1LTUyJmU9NjM4NTAwMTgzOTYwNzY2MzQ0", - event.getServerCallId()); - assertEquals("4c1f5600-a9c6-4343-8979-b638a98de98f", event.getCallConnectionId()); - assertEquals("30f0ad34-d615-4bf3-8476-5630ae7fc3db", event.getCorrelationId()); - assertEquals("Action completed successfully.", event.getResultInformation().getMessage()); - - assertNotNull(event.getMediaStreamingUpdateResult()); - assertEquals(MediaStreamingStatus.MEDIA_STREAMING_STARTED, - event.getMediaStreamingUpdateResult().getMediaStreamingStatus()); - assertEquals(MediaStreamingStatusDetails.SUBSCRIPTION_STARTED, - event.getMediaStreamingUpdateResult().getMediaStreamingStatusDetails()); - } - - @Test - public void parseMediaStreamingStoppedEvent() { - String receivedEvent = "[{\n" + "\"id\":\"41039554-9475-491a-875b-08d23c5d0e75\",\n" - + "\"source\":\"calling/callConnections/4c1f5600-a9c6-4343-8979-b638a98de98f\",\n" - + "\"type\":\"Microsoft.Communication.MediaStreamingStopped\",\n" - + "\"data\":{\"eventSource\":\"calling/callConnections/4c1f5600-a9c6-4343-8979-b638a98de98f\",\n" - + "\"operationContext\":\"startMediaStreamingContext\",\n" - + "\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\n" - + "\"mediaStreamingUpdate\":{\"contentType\":\"Audio\",\"mediaStreamingStatus\":\"mediaStreamingStopped\",\n" - + "\"mediaStreamingStatusDetails\":\"subscriptionStopped\"},\n" - + "\"version\":\"2024-06-15-preview\",\"callConnectionId\":\"4c1f5600-a9c6-4343-8979-b638a98de98f\",\n" - + "\"serverCallId\":\"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LW1hc28tMDEtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9LTTQteUZBUmhVYXN3T1RqbklPSXZnP2k9MTAtMTI4LTk1LTUyJmU9NjM4NTAwMTgzOTYwNzY2MzQ0\",\n" - + "\"correlationId\":\"30f0ad34-d615-4bf3-8476-5630ae7fc3db\",\n" - + "\"publicEventType\":\"Microsoft.Communication.MediaStreamingStopped\"},\n" - + "\"time\":\"2024-05-02T11:21:10.0261068+00:00\",\"specversion\":\"1.0\",\n" - + "\"datacontenttype\":\"application/json\",\n" - + "\"subject\":\"calling/callConnections/4c1f5600-a9c6-4343-8979-b638a98de98f\"}]"; - - MediaStreamingStopped event - = (MediaStreamingStopped) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LW1hc28tMDEtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9LTTQteUZBUmhVYXN3T1RqbklPSXZnP2k9MTAtMTI4LTk1LTUyJmU9NjM4NTAwMTgzOTYwNzY2MzQ0", - event.getServerCallId()); - assertEquals("4c1f5600-a9c6-4343-8979-b638a98de98f", event.getCallConnectionId()); - assertEquals("30f0ad34-d615-4bf3-8476-5630ae7fc3db", event.getCorrelationId()); - assertEquals("Action completed successfully.", event.getResultInformation().getMessage()); - - assertNotNull(event.getMediaStreamingUpdateResult()); - assertEquals(MediaStreamingStatus.MEDIA_STREAMING_STOPPED, - event.getMediaStreamingUpdateResult().getMediaStreamingStatus()); - assertEquals(MediaStreamingStatusDetails.SUBSCRIPTION_STOPPED, - event.getMediaStreamingUpdateResult().getMediaStreamingStatusDetails()); - } - - @Test - public void parseMediaStreamingFailedEvent() { - String receivedEvent = "[{\n" + "\"id\":\"a9bb7545-8f87-42aa-85d0-d7120dbe2414\",\n" - + "\"source\":\"calling/callConnections/761f5600-43ab-48a0-bbad-ecc5ad5b15bb\",\n" - + "\"type\":\"Microsoft.Communication.MediaStreamingFailed\",\n" - + "\"data\":{\"eventSource\":\"calling/callConnections/761f5600-43ab-48a0-bbad-ecc5ad5b15bb\",\n" - + "\"operationContext\":\"startMediaStreamingContext\",\n" - + "\"resultInformation\":{\"code\":500,\"subCode\":8603,\n" - + "\"message\":\"Action failed, not able to establish websocket connection.\"},\n" - + "\"mediaStreamingUpdate\":{\"contentType\":\"Audio\",\n" - + "\"mediaStreamingStatus\":\"mediaStreamingFailed\",\n" - + "\"mediaStreamingStatusDetails\":\"streamConnectionUnsuccessful\"},\n" - + "\"version\":\"2024-06-15-preview\",\"callConnectionId\":\"761f5600-43ab-48a0-bbad-ecc5ad5b15bb\",\n" - + "\"serverCallId\":\"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LW1hc28tMDQtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi94MVdMX0p3NnlVaW1aOEkzVi1MN3hnP2k9MTAtMTI4LTg0LTE3MSZlPTYzODQ5NzU2ODQ3MzUxNzU3Mg==\",\n" - + "\"correlationId\":\"6032c474-201d-4ad1-8900-f92a595a6d94\",\n" - + "\"publicEventType\":\"Microsoft.Communication.MediaStreamingFailed\"},\n" - + "\"time\":\"2024-05-02T12:38:31.242039+00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\n" - + "\"subject\":\"calling/callConnections/761f5600-43ab-48a0-bbad-ecc5ad5b15bb\"}]"; - - MediaStreamingFailed event = (MediaStreamingFailed) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LW1hc28tMDQtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi94MVdMX0p3NnlVaW1aOEkzVi1MN3hnP2k9MTAtMTI4LTg0LTE3MSZlPTYzODQ5NzU2ODQ3MzUxNzU3Mg==", - event.getServerCallId()); - assertEquals("761f5600-43ab-48a0-bbad-ecc5ad5b15bb", event.getCallConnectionId()); - assertEquals("6032c474-201d-4ad1-8900-f92a595a6d94", event.getCorrelationId()); - assertEquals("Action failed, not able to establish websocket connection.", - event.getResultInformation().getMessage()); - - assertNotNull(event.getMediaStreamingUpdateResult()); - assertEquals(MediaStreamingStatus.MEDIA_STREAMING_FAILED, - event.getMediaStreamingUpdateResult().getMediaStreamingStatus()); - assertEquals(MediaStreamingStatusDetails.STREAM_CONNECTION_UNSUCCESSFUL, - event.getMediaStreamingUpdateResult().getMediaStreamingStatusDetails()); - } - - @Test - public void parsePlayPausedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/PlayPaused\",\n" - + "\"type\": \"Microsoft.Communication.PlayPaused\",\n" + "\"data\": {\n" + "\"resultInformation\": {\n" - + "\"code\": 200,\n" + "\"subCode\": 0,\n" + "\"message\": \"Action completed successfully.\"\n" + "},\n" - + "\"type\": \"PlayPaused\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"correlationId\": \"correlationId\"\n" + "},\n" - + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - PlayPaused playPaused = (PlayPaused) event; - assertNotNull(playPaused); - assertEquals("serverCallId", playPaused.getServerCallId()); - assertEquals(200, playPaused.getResultInformation().getCode()); - } - - @Test - public void parsePlayResumedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/PlayResumed\",\n" - + "\"type\": \"Microsoft.Communication.PlayResumed\",\n" + "\"data\": {\n" + "\"resultInformation\": {\n" - + "\"code\": 200,\n" + "\"subCode\": 0,\n" + "\"message\": \"Action completed successfully.\"\n" + "},\n" - + "\"type\": \"PlayResumed\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"correlationId\": \"correlationId\"\n" + "},\n" - + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - PlayResumed playResumed = (PlayResumed) event; - assertNotNull(playResumed); - assertEquals("serverCallId", playResumed.getServerCallId()); - assertEquals(200, playResumed.getResultInformation().getCode()); - } - - @Test - public void parseHoldAudioCompletedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/HoldAudioCompleted\",\n" - + "\"type\": \"Microsoft.Communication.HoldAudioCompleted\",\n" + "\"data\": {\n" - + "\"resultInformation\": {\n" + "\"code\": 200,\n" + "\"subCode\": 0,\n" - + "\"message\": \"Action completed successfully.\"\n" + "},\n" + "\"type\": \"HoldAudioCompleted\",\n" - + "\"callConnectionId\": \"callConnectionId\",\n" + "\"serverCallId\": \"serverCallId\",\n" - + "\"correlationId\": \"correlationId\"\n" + "},\n" + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" - + "\"specversion\": \"1.0\",\n" + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - HoldAudioCompleted holdAudioCompleted = (HoldAudioCompleted) event; - assertNotNull(holdAudioCompleted); - assertEquals("serverCallId", holdAudioCompleted.getServerCallId()); - assertEquals(200, holdAudioCompleted.getResultInformation().getCode()); - } - - @Test - public void parseHoldAudioStartedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/HoldAudioStarted\",\n" - + "\"type\": \"Microsoft.Communication.HoldAudioStarted\",\n" + "\"data\": {\n" - + "\"resultInformation\": {\n" + "\"code\": 200,\n" + "\"subCode\": 0,\n" - + "\"message\": \"Action completed successfully.\"\n" + "},\n" + "\"type\": \"HoldAudioStarted\",\n" - + "\"callConnectionId\": \"callConnectionId\",\n" + "\"serverCallId\": \"serverCallId\",\n" - + "\"correlationId\": \"correlationId\"\n" + "},\n" + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" - + "\"specversion\": \"1.0\",\n" + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - HoldAudioStarted holdAudioStarted = (HoldAudioStarted) event; - assertNotNull(holdAudioStarted); - assertEquals("serverCallId", holdAudioStarted.getServerCallId()); - assertEquals(200, holdAudioStarted.getResultInformation().getCode()); - } - - @Test - public void parseHoldAudioPausedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/HoldAudioPaused\",\n" - + "\"type\": \"Microsoft.Communication.HoldAudioPaused\",\n" + "\"data\": {\n" - + "\"resultInformation\": {\n" + "\"code\": 200,\n" + "\"subCode\": 0,\n" - + "\"message\": \"Action completed successfully.\"\n" + "},\n" + "\"type\": \"HoldAudioPaused\",\n" - + "\"callConnectionId\": \"callConnectionId\",\n" + "\"serverCallId\": \"serverCallId\",\n" - + "\"correlationId\": \"correlationId\"\n" + "},\n" + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" - + "\"specversion\": \"1.0\",\n" + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - HoldAudioPaused holdAudioPaused = (HoldAudioPaused) event; - assertNotNull(holdAudioPaused); - assertEquals("serverCallId", holdAudioPaused.getServerCallId()); - assertEquals(200, holdAudioPaused.getResultInformation().getCode()); - } - - @Test - public void parseHoldAudioResumedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/HoldAudioResumed\",\n" - + "\"type\": \"Microsoft.Communication.HoldAudioResumed\",\n" + "\"data\": {\n" - + "\"resultInformation\": {\n" + "\"code\": 200,\n" + "\"subCode\": 0,\n" - + "\"message\": \"Action completed successfully.\"\n" + "},\n" + "\"type\": \"HoldAudioResumed\",\n" - + "\"callConnectionId\": \"callConnectionId\",\n" + "\"serverCallId\": \"serverCallId\",\n" - + "\"correlationId\": \"correlationId\"\n" + "},\n" + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" - + "\"specversion\": \"1.0\",\n" + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - HoldAudioResumed holdAudioResumed = (HoldAudioResumed) event; - assertNotNull(holdAudioResumed); - assertEquals("serverCallId", holdAudioResumed.getServerCallId()); - assertEquals(200, holdAudioResumed.getResultInformation().getCode()); - } - - @Test - public void incomingCallEventParsedXMSHeaderTest() { - String serverCallId = "serverCallId"; - String correlationId = "correlationId"; - CommunicationIdentifier to = new PhoneNumberIdentifier("+11234567890"); - CommunicationIdentifier from = new PhoneNumberIdentifier("+1098754321"); - String callerDisplayName = "callerDisplayName"; - String incomingCallContext = "incomingCallContext"; - CommunicationIdentifier onBehalfofCallee = from; - - CustomCallingContext customCallingContext = new CustomCallingContext(); - customCallingContext.addSipX("Test-SIP-Header", "TestSIPValue", CustomCallingContext.SipHeaderPrefix.XMSCustom); - customCallingContext.addVoip("Test-VoIP-Header", "TestVoIPValue"); - System.out.println("Added sip and voip headers successfully."); - String receivedEvent = "[{\n" + " \"id\": \"91cdb8e2-c4c2-4888-bc60-3003f09245b3\",\n" - + " \"source\": \"calling/callConnections/callConnectionId/IncomingCall\",\n" - + " \"type\": \"Microsoft.Communication.IncomingCall\",\n" + " \"data\": {\n" - + " \"to\": { \"rawId\": \"" + to.getRawId() + "\" },\n" + " \"from\": { \"rawId\": \"" - + from.getRawId() + "\" },\n" + " \"callerDisplayName\": \"" + callerDisplayName + "\",\n" - + " \"serverCallId\": \"" + serverCallId + "\",\n" + " \"customContext\": {\n" - + " \"sipHeaders\": {\n" + " \"" - + customCallingContext.getSipHeaders().keySet().iterator().next() + "\": \"" - + customCallingContext.getSipHeaders().values().iterator().next() + "\"\n" + " },\n" - + " \"voipHeaders\": {\n" + " \"" - + customCallingContext.getVoipHeaders().keySet().iterator().next() + "\": \"" - + customCallingContext.getVoipHeaders().values().iterator().next() + "\"\n" + " }\n" + " },\n" - + " \"incomingCallContext\": \"" + incomingCallContext + "\",\n" - + " \"onBehalfOfCallee\": { \"rawId\": \"" + onBehalfofCallee.getRawId() + "\" },\n" - + " \"correlationId\": \"" + correlationId + "\"\n" + " }\n" + "}]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - IncomingCall incomingCall = (IncomingCall) event; - assertNotNull(incomingCall); - assertEquals("serverCallId", incomingCall.getServerCallId()); - assertEquals("correlationId", incomingCall.getCorrelationId()); - assertEquals(to.getRawId(), incomingCall.getTo().getRawId()); - assertEquals(from.getRawId(), incomingCall.getFrom().getRawId()); - assertEquals(callerDisplayName, incomingCall.getCallerDisplayName()); - assertEquals(incomingCallContext, incomingCall.getIncomingCallContext()); - assertEquals(onBehalfofCallee.getRawId(), incomingCall.getOnBehalfOfCallee().getRawId()); - assertEquals(customCallingContext.getSipHeaders().keySet().iterator().next(), - incomingCall.getCustomContext().getSipHeaders().keySet().iterator().next()); - assertEquals(customCallingContext.getVoipHeaders().values().iterator().next(), - incomingCall.getCustomContext().getVoipHeaders().values().iterator().next()); - - } - - @Test - public void incomingCallEventParsedXHeaderTest() { - String serverCallId = "serverCallId"; - String correlationId = "correlationId"; - CommunicationIdentifier to = new PhoneNumberIdentifier("+11234567890"); - CommunicationIdentifier from = new PhoneNumberIdentifier("+1098754321"); - String callerDisplayName = "callerDisplayName"; - String incomingCallContext = "incomingCallContext"; - CommunicationIdentifier onBehalfofCallee = from; - CustomCallingContext customCallingContext = new CustomCallingContext(); - customCallingContext.addSipX("Test-SIP-Header", "TestSIPValue", CustomCallingContext.SipHeaderPrefix.X); - customCallingContext.addVoip("Test-VoIP-Header", "TestVoIPValue"); - System.out.println("Added sip and voip headers successfully."); - String receivedEvent = "[{\n" + " \"id\": \"91cdb8e2-c4c2-4888-bc60-3003f09245b3\",\n" - + " \"source\": \"calling/callConnections/callConnectionId/IncomingCall\",\n" - + " \"type\": \"Microsoft.Communication.IncomingCall\",\n" + " \"data\": {\n" - + " \"to\": { \"rawId\": \"" + to.getRawId() + "\" },\n" + " \"from\": { \"rawId\": \"" - + from.getRawId() + "\" },\n" + " \"callerDisplayName\": \"" + callerDisplayName + "\",\n" - + " \"serverCallId\": \"" + serverCallId + "\",\n" + " \"customContext\": {\n" - + " \"sipHeaders\": {\n" + " \"" - + customCallingContext.getSipHeaders().keySet().iterator().next() + "\": \"" - + customCallingContext.getSipHeaders().values().iterator().next() + "\"\n" + " },\n" - + " \"voipHeaders\": {\n" + " \"" - + customCallingContext.getVoipHeaders().keySet().iterator().next() + "\": \"" - + customCallingContext.getVoipHeaders().values().iterator().next() + "\"\n" + " }\n" + " },\n" - + " \"incomingCallContext\": \"" + incomingCallContext + "\",\n" - + " \"onBehalfOfCallee\": { \"rawId\": \"" + onBehalfofCallee.getRawId() + "\" },\n" - + " \"correlationId\": \"" + correlationId + "\"\n" + " }\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - IncomingCall incomingCall = (IncomingCall) event; - assertNotNull(incomingCall); - assertEquals("serverCallId", incomingCall.getServerCallId()); - assertEquals("correlationId", incomingCall.getCorrelationId()); - assertEquals(to.getRawId(), incomingCall.getTo().getRawId()); - assertEquals(from.getRawId(), incomingCall.getFrom().getRawId()); - assertEquals(callerDisplayName, incomingCall.getCallerDisplayName()); - assertEquals(incomingCallContext, incomingCall.getIncomingCallContext()); - assertEquals(onBehalfofCallee.getRawId(), incomingCall.getOnBehalfOfCallee().getRawId()); - assertEquals(customCallingContext.getSipHeaders().keySet().iterator().next(), - incomingCall.getCustomContext().getSipHeaders().keySet().iterator().next()); - assertEquals(customCallingContext.getVoipHeaders().values().iterator().next(), - incomingCall.getCustomContext().getVoipHeaders().values().iterator().next()); - - } - -} diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationUnitTestBase.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationUnitTestBase.java index 0bb706866c1c..44909bb61c51 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationUnitTestBase.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationUnitTestBase.java @@ -81,8 +81,6 @@ public static String generateCallProperties(String callConnectionId, String serv .setServerCallId(serverCallId) .setCallbackUri(callbackUri) .setCallConnectionState(CallConnectionStateModelInternal.fromString(connectionState)) - .setMediaSubscriptionId(mediaSubscriptionId) - .setDataSubscriptionId(dataSubscriptionId) .setSourceDisplayName(callerDisplayName) .setTargets( new ArrayList<>(Collections.singletonList(ModelGenerator.generateUserIdentifierModel(targetId)))); diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallDialogAsyncAutomatedLiveTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallDialogAsyncAutomatedLiveTests.java deleted file mode 100644 index 4b93ca460a69..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallDialogAsyncAutomatedLiveTests.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation; - -import com.azure.communication.callautomation.models.*; -import com.azure.communication.callautomation.models.events.CallConnected; -import com.azure.communication.callautomation.models.events.DialogCompleted; -import com.azure.communication.callautomation.models.events.DialogStarted; -import com.azure.communication.common.CommunicationIdentifier; -import com.azure.communication.common.CommunicationUserIdentifier; -import com.azure.communication.identity.CommunicationIdentityAsyncClient; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.Response; -import com.azure.core.test.annotation.DoNotRecord; - -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; - -import java.time.Duration; -import java.util.*; - -import static org.junit.jupiter.api.Assertions.*; - -public class CallDialogAsyncAutomatedLiveTests extends CallAutomationAutomatedLiveTestBase { - - @DoNotRecord(skipInPlayback = true) - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - @DisabledIfEnvironmentVariable( - named = "SKIP_LIVE_TEST", - matches = "(?i)(true)", - disabledReason = "Requires environment to be set up") - @Disabled("Disabling this for now as there is service issue with this test case") - public void dialogActionInACallAutomatedTest(HttpClient httpClient) { - /* Test case:Start and Stop Dialog on ACS to ACS call - * 1. create a CallAutomationClient. - * 2. create a call from source to one ACS target. - * 3. get updated call properties and check for the connected state. - * 4. Start dialog, expect no failure(exception) - * 5. Stop dialog, expect DialogCompletedEvent - * 6. hang up the call. - */ - - CommunicationIdentityAsyncClient identityAsyncClient - = getCommunicationIdentityClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("dialogActionInACallAutomatedTest", next)) - .buildAsyncClient(); - - List callDestructors = new ArrayList<>(); - - try { - // create caller and receiver - CommunicationUserIdentifier caller = identityAsyncClient.createUser().block(); - CommunicationUserIdentifier receiver = identityAsyncClient.createUser().block(); - - CallAutomationAsyncClient callerAsyncClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("dialogActionInACallAutomatedTest", next)) - .sourceIdentity(caller) - .buildAsyncClient(); - - // Create call automation client for receivers. - CallAutomationAsyncClient receiverAsyncClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("dialogActionInACallAutomatedTest", next)) - .buildAsyncClient(); - - String uniqueId = serviceBusWithNewCall(caller, receiver); - - // create a call - List targets = Collections.singletonList(receiver); - CreateGroupCallOptions createCallOptions - = new CreateGroupCallOptions(targets, DISPATCHER_CALLBACK + String.format("?q=%s", uniqueId)); - Response createCallResultResponse - = callerAsyncClient.createGroupCallWithResponse(createCallOptions).block(); - - assertNotNull(createCallResultResponse); - CreateCallResult createCallResult = createCallResultResponse.getValue(); - assertNotNull(createCallResult); - assertNotNull(createCallResult.getCallConnectionProperties()); - String callerConnectionId = createCallResult.getCallConnectionProperties().getCallConnectionId(); - assertNotNull(callerConnectionId); - - // wait for the incomingCallContext - String incomingCallContext = waitForIncomingCallContext(uniqueId, Duration.ofSeconds(10)); - assertNotNull(incomingCallContext); - - // answer the call - AnswerCallOptions answerCallOptions - = new AnswerCallOptions(incomingCallContext, DISPATCHER_CALLBACK + String.format("?q=%s", uniqueId)); - AnswerCallResult answerCallResult - = Objects.requireNonNull(receiverAsyncClient.answerCallWithResponse(answerCallOptions).block()) - .getValue(); - String receiverConnectionId = answerCallResult.getCallConnectionProperties().getCallConnectionId(); - assertNotNull(answerCallResult); - assertNotNull(answerCallResult.getCallConnectionAsync()); - assertNotNull(answerCallResult.getCallConnectionProperties()); - callDestructors.add(answerCallResult.getCallConnectionAsync()); - - // wait for callConnected - CallConnected callConnected = waitForEvent(CallConnected.class, callerConnectionId, Duration.ofSeconds(10)); - assertNotNull(callConnected); - - // start dialog - String dialogId = "92e08834-b6ee-4ede-8956-9fefa27a691c"; - Map dialogContext = new HashMap<>(); - StartDialogOptions options - = new StartDialogOptions(dialogId, DialogInputType.POWER_VIRTUAL_AGENTS, dialogContext); - options.setBotId(BOT_APP_ID); - - CallDialogAsync callDialogAsync = answerCallResult.getCallConnectionAsync().getCallDialogAsync(); - Response dialogStateResultResponse - = callDialogAsync.startDialogWithResponse(options).block(); - assertNotNull(dialogStateResultResponse); - assertEquals(201, dialogStateResultResponse.getStatusCode()); - DialogStateResult dialogStateResult = dialogStateResultResponse.getValue(); - assertNotNull(dialogStateResult); - assertEquals(dialogId, dialogStateResult.getDialogId()); - DialogStarted dialogStarted - = waitForEvent(DialogStarted.class, receiverConnectionId, Duration.ofSeconds(20)); - assertNotNull(dialogStarted); - - // stop dialog - callDialogAsync.stopDialog(dialogId).block(); - DialogCompleted dialogCompleted - = waitForEvent(DialogCompleted.class, receiverConnectionId, Duration.ofSeconds(20)); - assertNotNull(dialogCompleted); - } catch (Exception ex) { - fail("Unexpected exception received", ex); - } finally { - if (!callDestructors.isEmpty()) { - try { - callDestructors.forEach(callConnection -> callConnection.hangUpWithResponse(true).block()); - } catch (Exception ignored) { - // Some call might have been terminated during the test, and it will cause exceptions here. - // Do nothing and iterate to next call connection. - } - } - } - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallDialogAsyncUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallDialogAsyncUnitTests.java deleted file mode 100644 index 92f010017ac9..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallDialogAsyncUnitTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.communication.callautomation.models.DialogStateResult; -import com.azure.communication.callautomation.models.StartDialogOptions; -import com.azure.core.http.rest.Response; -import org.junit.jupiter.api.Test; - -import java.util.*; - -import static com.azure.communication.callautomation.CallAutomationUnitTestBase.*; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - -public class CallDialogAsyncUnitTests { - - private CallDialogAsync callDialogAsync; - - @Test - public void startDialogWithResponseTest() { - // override callDialog to mock 201 response code - CallConnectionAsync callConnectionAsync = CallAutomationUnitTestBase.getCallConnectionAsync(new ArrayList<>( - Collections.singletonList(new AbstractMap.SimpleEntry<>(generateDialogStateResponse(), 201)))); - callDialogAsync = callConnectionAsync.getCallDialogAsync(); - - Map dialogContext = new HashMap<>(); - StartDialogOptions options = new StartDialogOptions(DialogInputType.POWER_VIRTUAL_AGENTS, dialogContext); - - options.setOperationContext("operationContext"); - options.setBotId(BOT_APP_ID); - - Response response = callDialogAsync.startDialogWithResponse(options).block(); - - assertNotNull(response); - assertEquals(response.getStatusCode(), 201); - } - - @Test - public void stopDialogWithResponseTest() { - // override callDialog to mock 204 response code - CallConnectionAsync callConnectionAsync = CallAutomationUnitTestBase - .getCallConnectionAsync(new ArrayList<>(Collections.singletonList(new AbstractMap.SimpleEntry<>("", 204)))); - callDialogAsync = callConnectionAsync.getCallDialogAsync(); - - Response response = callDialogAsync.stopDialogWithResponse(DIALOG_ID).block(); - - assertEquals(response.getStatusCode(), 204); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallDialogUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallDialogUnitTests.java deleted file mode 100644 index 1e509c3fe988..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallDialogUnitTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.communication.callautomation.models.DialogStateResult; -import com.azure.communication.callautomation.models.StartDialogOptions; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import org.junit.jupiter.api.Test; - -import java.util.*; - -import static com.azure.communication.callautomation.CallAutomationUnitTestBase.*; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - -public class CallDialogUnitTests { - - private CallDialog callDialog; - - @Test - public void startDialogTest() { - // override callDialog to mock 201 response code - CallConnection callConnection = CallAutomationUnitTestBase.getCallConnection(new ArrayList<>( - Collections.singletonList(new AbstractMap.SimpleEntry<>(generateDialogStateResponse(), 201)))); - callDialog = callConnection.getCallDialog(); - - Map dialogContext = new HashMap<>(); - StartDialogOptions options - = new StartDialogOptions(DIALOG_ID, DialogInputType.POWER_VIRTUAL_AGENTS, dialogContext); - - DialogStateResult response = callDialog.startDialog(options); - - assertNotNull(response); - assertEquals(response.getDialogId(), DIALOG_ID); - } - - @Test - public void startDialogWithResponseTest() { - // override callDialog to mock 201 response code - CallConnection callConnection = CallAutomationUnitTestBase.getCallConnection(new ArrayList<>( - Collections.singletonList(new AbstractMap.SimpleEntry<>(generateDialogStateResponse(), 201)))); - callDialog = callConnection.getCallDialog(); - - Map dialogContext = new HashMap<>(); - StartDialogOptions options = new StartDialogOptions(DialogInputType.AZURE_OPEN_AI, dialogContext); - - options.setOperationContext("operationContext"); - options.setBotId(BOT_APP_ID); - - Response response = callDialog.startDialogWithResponse(options, Context.NONE); - - assertNotNull(response); - assertEquals(response.getStatusCode(), 201); - } - - @Test - public void stopDialogWithResponseTest() { - // override callDialog to mock 204 response code - CallConnection callConnection = CallAutomationUnitTestBase - .getCallConnection(new ArrayList<>(Collections.singletonList(new AbstractMap.SimpleEntry<>("", 204)))); - callDialog = callConnection.getCallDialog(); - - Response response = callDialog.stopDialogWithResponse(DIALOG_ID, Context.NONE); - - assertEquals(response.getStatusCode(), 204); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncAutomatedLiveTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncAutomatedLiveTests.java index 013bc0aa6260..7476ad4af5c5 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncAutomatedLiveTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncAutomatedLiveTests.java @@ -14,7 +14,6 @@ import com.azure.communication.callautomation.models.events.CallConnected; import com.azure.communication.callautomation.models.events.ContinuousDtmfRecognitionStopped; import com.azure.communication.callautomation.models.events.PlayCompleted; -import com.azure.communication.callautomation.models.events.PlayStarted; import com.azure.communication.callautomation.models.events.SendDtmfTonesCompleted; import com.azure.communication.common.CommunicationIdentifier; import com.azure.communication.common.CommunicationUserIdentifier; @@ -28,7 +27,6 @@ import com.azure.communication.callautomation.models.MediaStreamingContent; import com.azure.communication.callautomation.models.MediaStreamingOptions; import com.azure.communication.callautomation.models.MediaStreamingTransport; -import com.azure.communication.callautomation.models.PlayOptions; import com.azure.communication.callautomation.models.TranscriptionOptions; import com.azure.communication.callautomation.models.StartMediaStreamingOptions; import com.azure.communication.callautomation.models.StopMediaStreamingOptions; @@ -63,11 +61,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; -import com.azure.communication.callautomation.models.events.HoldAudioResumed; -import com.azure.communication.callautomation.models.events.HoldAudioCompleted; -import com.azure.communication.callautomation.models.events.HoldAudioPaused; -import com.azure.communication.callautomation.models.events.HoldAudioStarted; - public class CallMediaAsyncAutomatedLiveTests extends CallAutomationAutomatedLiveTestBase { @ParameterizedTest @@ -1213,247 +1206,4 @@ public void playMultipleCombinedSourcesWithPlayMediaAllTest(HttpClient httpClien } } } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - @DisabledIfEnvironmentVariable( - named = "SKIP_LIVE_TEST", - matches = "(?i)(true)", - disabledReason = "Requires environment to be set up") - public void interruptAudioAndAnnounceToholdParticipantInACallTest(HttpClient httpClient) { - /* Test case: ACS to ACS call - * 1. create a CallAutomationClient. - * 2. create a call from source to one ACS target. - * 3. get updated call properties and check for the connected state. - * 4. hold the participant - * 5. interrupt audio and announce. - * 6. unhold the participant - * 7. hang up the call. - */ - - CommunicationIdentityAsyncClient identityAsyncClient - = getCommunicationIdentityClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("interruptAudioAndAnnounceToholdParticipantInACallTest", next)) - .buildAsyncClient(); - - List callDestructors = new ArrayList<>(); - - try { - // create caller and receiver - CommunicationUserIdentifier caller = identityAsyncClient.createUser().block(); - CommunicationUserIdentifier receiver = identityAsyncClient.createUser().block(); - - CallAutomationAsyncClient callerAsyncClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("interruptAudioAndAnnounceToholdParticipantInACallTest", next)) - .sourceIdentity(caller) - .buildAsyncClient(); - - // Create call automation client for receivers. - CallAutomationAsyncClient receiverAsyncClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("interruptAudioAndAnnounceToholdParticipantInACallTest", next)) - .buildAsyncClient(); - - String uniqueId = serviceBusWithNewCall(caller, receiver); - - // create a call - List targets = Collections.singletonList(receiver); - CreateGroupCallOptions createCallOptions - = new CreateGroupCallOptions(targets, DISPATCHER_CALLBACK + String.format("?q=%s", uniqueId)); - Response createCallResultResponse - = callerAsyncClient.createGroupCallWithResponse(createCallOptions).block(); - assertNotNull(createCallResultResponse); - CreateCallResult createCallResult = createCallResultResponse.getValue(); - assertNotNull(createCallResult); - assertNotNull(createCallResult.getCallConnectionProperties()); - String callerConnectionId = createCallResult.getCallConnectionProperties().getCallConnectionId(); - assertNotNull(callerConnectionId); - - // wait for the incomingCallContext - String incomingCallContext = waitForIncomingCallContext(uniqueId, Duration.ofSeconds(10)); - assertNotNull(incomingCallContext); - - // answer the call - AnswerCallOptions answerCallOptions - = new AnswerCallOptions(incomingCallContext, DISPATCHER_CALLBACK + String.format("?q=%s", uniqueId)); - AnswerCallResult answerCallResult - = Objects.requireNonNull(receiverAsyncClient.answerCallWithResponse(answerCallOptions).block()) - .getValue(); - assertNotNull(answerCallResult); - assertNotNull(answerCallResult.getCallConnectionAsync()); - assertNotNull(answerCallResult.getCallConnectionProperties()); - callDestructors.add(answerCallResult.getCallConnectionAsync()); - - // wait for callConnected - CallConnected callConnected = waitForEvent(CallConnected.class, callerConnectionId, Duration.ofSeconds(10)); - assertNotNull(callConnected); - System.out.println("CALL CONNECTED: " + callConnected); - - // hold the participant - CallMediaAsync callMediaAsync = createCallResult.getCallConnectionAsync().getCallMediaAsync(); - callMediaAsync.hold(receiver).block(); - - sleepIfRunningAgainstService(3000); - CallConnectionAsync callConnectionAsync = callerAsyncClient.getCallConnectionAsync(callerConnectionId); - - CallParticipant participantResult = callConnectionAsync.getParticipant(receiver).block(); - assertNotNull(participantResult); - assertTrue(participantResult.isOnHold()); - - callMediaAsync.interruptAudioAndAnnounce(new FileSource().setUrl(MEDIA_SOURCE), receiver).block(); - - sleepIfRunningAgainstService(3000); - - // unhold the participant - callMediaAsync.unhold(receiver).block(); - - sleepIfRunningAgainstService(3000); - participantResult = callConnectionAsync.getParticipant(receiver).block(); - assertNotNull(participantResult); - assertFalse(participantResult.isOnHold()); - } catch (Exception ex) { - fail("Unexpected exception received", ex); - } finally { - if (!callDestructors.isEmpty()) { - try { - callDestructors.forEach(callConnection -> callConnection.hangUpWithResponse(true).block()); - } catch (Exception ignored) { - // Some call might have been terminated during the test, and it will cause exceptions here. - // Do nothing and iterate to next call connection. - } - } - } - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - @DisabledIfEnvironmentVariable( - named = "SKIP_LIVE_TEST", - matches = "(?i)(true)", - disabledReason = "Requires environment to be set up") - public void playMultipleFileSourcesWhenParticipantOnHoldTest(HttpClient httpClient) { - /* Test case: ACS to ACS call - * 1. create a CallAutomationClient. - * 2. create a call from source to one ACS target. - * 3. get updated call properties and check for the connected state. - * 4. hold the participant - * 5. play a media to target participant with mutiple file prompts - * 6. unhold the participant - * 7. hang up the call. - */ - - CommunicationIdentityAsyncClient identityAsyncClient - = getCommunicationIdentityClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("playMultipleFileSourcesWhenParticipantOnHoldTest", next)) - .buildAsyncClient(); - - List callDestructors = new ArrayList<>(); - - try { - // create caller and receiver - CommunicationUserIdentifier caller = identityAsyncClient.createUser().block(); - CommunicationIdentifier receiver = identityAsyncClient.createUser().block(); - - CallAutomationAsyncClient callerAsyncClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("playMultipleFileSourcesWhenParticipantOnHoldTest", next)) - .sourceIdentity(caller) - .buildAsyncClient(); - - // Create call automation client for receivers. - CallAutomationAsyncClient receiverAsyncClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("playMultipleFileSourcesWhenParticipantOnHoldTest", next)) - .buildAsyncClient(); - - String uniqueId = serviceBusWithNewCall(caller, receiver); - - // create a call - List targets = Collections.singletonList(receiver); - CreateGroupCallOptions createCallOptions - = new CreateGroupCallOptions(targets, DISPATCHER_CALLBACK + String.format("?q=%s", uniqueId)); - Response createCallResultResponse - = callerAsyncClient.createGroupCallWithResponse(createCallOptions).block(); - assertNotNull(createCallResultResponse); - CreateCallResult createCallResult = createCallResultResponse.getValue(); - assertNotNull(createCallResult); - assertNotNull(createCallResult.getCallConnectionProperties()); - String callerConnectionId = createCallResult.getCallConnectionProperties().getCallConnectionId(); - assertNotNull(callerConnectionId); - - // wait for the incomingCallContext - String incomingCallContext = waitForIncomingCallContext(uniqueId, Duration.ofSeconds(10)); - assertNotNull(incomingCallContext); - - // answer the call - AnswerCallOptions answerCallOptions - = new AnswerCallOptions(incomingCallContext, DISPATCHER_CALLBACK + String.format("?q=%s", uniqueId)); - AnswerCallResult answerCallResult - = Objects.requireNonNull(receiverAsyncClient.answerCallWithResponse(answerCallOptions).block()) - .getValue(); - assertNotNull(answerCallResult); - assertNotNull(answerCallResult.getCallConnectionAsync()); - assertNotNull(answerCallResult.getCallConnectionProperties()); - callDestructors.add(answerCallResult.getCallConnectionAsync()); - - // wait for callConnected - CallConnected callConnected = waitForEvent(CallConnected.class, callerConnectionId, Duration.ofSeconds(10)); - assertNotNull(callConnected); - - // hold the participant - CallMediaAsync callMediaAsync = createCallResult.getCallConnectionAsync().getCallMediaAsync(); - PlaySource holdPlaySource = new FileSource().setUrl(MEDIA_SOURCE); - callMediaAsync.hold(receiver, holdPlaySource).block(); - sleepIfRunningAgainstService(3000); - HoldAudioStarted holdAudioStarted - = waitForEvent(HoldAudioStarted.class, callerConnectionId, Duration.ofSeconds(20)); - assertNotNull(holdAudioStarted); - - CallConnectionAsync callConnectionAsync = callerAsyncClient.getCallConnectionAsync(callerConnectionId); - CallParticipant participantResult = callConnectionAsync.getParticipant(receiver).block(); - assertNotNull(participantResult); - assertTrue(participantResult.isOnHold()); - - // Assert multiple File Sources - List playFileSources = new ArrayList(); - playFileSources.add(new FileSource().setUrl(MEDIA_SOURCE)); - playFileSources.add(new FileSource().setUrl(MEDIA_SOURCE)); - PlayOptions playOptions = new PlayOptions(playFileSources, targets); - playOptions.setInterruptHoldAudio(true); - // Play multiple files sources - callMediaAsync.playWithResponse(playOptions).block(); - HoldAudioPaused holdAudioPaused - = waitForEvent(HoldAudioPaused.class, callerConnectionId, Duration.ofSeconds(20)); - assertNotNull(holdAudioPaused); - - PlayStarted playStarted = waitForEvent(PlayStarted.class, callerConnectionId, Duration.ofSeconds(20)); - assertNotNull(playStarted); - - PlayCompleted playCompleted = waitForEvent(PlayCompleted.class, callerConnectionId, Duration.ofSeconds(20)); - assertNotNull(playCompleted); - - HoldAudioResumed holdAudioResumed - = waitForEvent(HoldAudioResumed.class, callerConnectionId, Duration.ofSeconds(20)); - assertNotNull(holdAudioResumed); - - // unhold the participant - callMediaAsync.unhold(receiver).block(); - HoldAudioCompleted holdAudioCompleted - = waitForEvent(HoldAudioCompleted.class, callerConnectionId, Duration.ofSeconds(20)); - assertNotNull(holdAudioCompleted); - - sleepIfRunningAgainstService(3000); - participantResult = callConnectionAsync.getParticipant(receiver).block(); - assertNotNull(participantResult); - assertFalse(participantResult.isOnHold()); - } catch (Exception ex) { - fail("Unexpected exception received", ex); - } finally { - if (!callDestructors.isEmpty()) { - try { - callDestructors.forEach(callConnection -> callConnection.hangUpWithResponse(true).block()); - } catch (Exception ignored) { - // Some call might have been terminated during the test, and it will cause exceptions here. - // Do nothing and iterate to next call connection. - } - } - } - } } diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncUnitTests.java index 0877974a5d00..4210f03113af 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncUnitTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncUnitTests.java @@ -12,7 +12,6 @@ import com.azure.communication.callautomation.models.DtmfTone; import com.azure.communication.callautomation.models.FileSource; import com.azure.communication.callautomation.models.HoldOptions; -import com.azure.communication.callautomation.models.InterruptAudioAndAnnounceOptions; import com.azure.communication.callautomation.models.PlayOptions; import com.azure.communication.callautomation.models.PlayToAllOptions; import com.azure.communication.callautomation.models.RecognitionChoice; @@ -566,15 +565,4 @@ public void stopMediaStreamingWithResponse() { .consumeNextWith(response -> assertEquals(202, response.getStatusCode())) .verifyComplete(); } - - @Test - public void interruptAudioAndAnnounceWithResponseTest() { - callMedia = getMockCallMedia(202); - InterruptAudioAndAnnounceOptions options - = new InterruptAudioAndAnnounceOptions(playTextSource, new CommunicationUserIdentifier("id")); - options.setOperationContext("operationContext"); - StepVerifier.create(callMedia.interruptAudioAndAnnounceWithResponse(options)) - .consumeNextWith(response -> assertEquals(202, response.getStatusCode())) - .verifyComplete(); - } } diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaUnitTests.java index 14822d09c7b5..c9083ddfa884 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaUnitTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaUnitTests.java @@ -271,13 +271,4 @@ public void stopMediaStremaingWithResponse() { Response response = callMedia.stopMediaStreamingWithResponse(options, Context.NONE); assertEquals(response.getStatusCode(), 202); } - - @Test - public void interruptAudioAndAnnounceWithResponseTest() { - InterruptAudioAndAnnounceOptions options - = new InterruptAudioAndAnnounceOptions(playTextSource, new CommunicationUserIdentifier("id")); - options.setOperationContext("operationContext"); - Response response = callMedia.interruptAudioAndAnnounceWithResponse(options, Context.NONE); - assertEquals(response.getStatusCode(), 202); - } } diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallRecordingAsyncUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallRecordingAsyncUnitTests.java index 363bcea85597..90daf237cc3c 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallRecordingAsyncUnitTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallRecordingAsyncUnitTests.java @@ -45,25 +45,6 @@ public void recordingOperationsTest() { assertThrows(HttpResponseException.class, () -> callRecording.getState(RECORDING_ID).block()); } - @Test - public void recordingOperationsWithCallConnectionIdTest() { - CallAutomationAsyncClient callingServerClient - = CallAutomationUnitTestBase.getCallAutomationAsyncClient(recordingOperationsResponses); - callRecording = callingServerClient.getCallRecordingAsync(); - - validateRecordingState( - callRecording.start( - new StartRecordingOptions(CALL_CONNECTION_ID).setRecordingStateCallbackUrl("https://localhost/")), - RecordingState.ACTIVE); - - validateOperationWithRecordingState(callRecording.pause(RECORDING_ID), RecordingState.INACTIVE); - - validateOperationWithRecordingState(callRecording.resume(RECORDING_ID), RecordingState.ACTIVE); - - validateOperation(callRecording.stop(RECORDING_ID)); - assertThrows(HttpResponseException.class, () -> callRecording.getState(RECORDING_ID).block()); - } - private void validateRecordingState(Publisher publisher, RecordingState status) { StepVerifier.create(publisher) .consumeNextWith(recordingStateResponse -> validateRecording(recordingStateResponse, status)) diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallRecordingAutomatedLiveTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallRecordingAutomatedLiveTests.java index 2bdb35ea314f..7dd21d7fb41b 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallRecordingAutomatedLiveTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallRecordingAutomatedLiveTests.java @@ -21,7 +21,6 @@ import com.azure.communication.common.CommunicationUserIdentifier; import com.azure.communication.identity.CommunicationIdentityClient; import com.azure.core.http.HttpClient; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -215,92 +214,4 @@ public void createACSCallUnmixedAudioAffinityTest(HttpClient httpClient) { fail("Unexpected exception received", ex); } } - - @Disabled("This test is failing in the pipeline, needs to be fixed.") - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void createACSCallAndStartRecordingWithCallConnectionIdTest(HttpClient httpClient) { - /* Test case: ACS to ACS call - * 1. create a CallAutomationClient. - * 2. create a call from source to one ACS target. - * 3. get updated call properties and check for the connected state. - * 4. start recording with callConnectionId and the call without channel affinity - * 5. stop recording the call - * 6. hang up the call. - * 7. once call is hung up, verify disconnected event - */ - CommunicationIdentityClient communicationIdentityClient - = getCommunicationIdentityClientUsingConnectionString(httpClient).buildClient(); - - String callConnectionId = ""; - try { - // Create caller and receiver - CommunicationUserIdentifier source = communicationIdentityClient.createUser(); - CommunicationUserIdentifier target = communicationIdentityClient.createUser(); - - // Create call automation client and use source as the caller. - CallAutomationClient callerClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("recordingOperations", next)) - .sourceIdentity(source) - .buildClient(); - - // Create call automation client for receivers. - CallAutomationClient receiverClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("recordingOperations", next)) - .buildClient(); - - // setup service bus - String uniqueId = serviceBusWithNewCall(source, target); - - // create call and assert response - CreateGroupCallOptions createCallOptions = new CreateGroupCallOptions(Arrays.asList(target), - String.format("%s?q=%s", DISPATCHER_CALLBACK, uniqueId)); - CreateCallResult createCallResult - = callerClient.createGroupCallWithResponse(createCallOptions, null).getValue(); - callConnectionId = createCallResult.getCallConnectionProperties().getCallConnectionId(); - assertNotNull(callConnectionId); - - // wait for incoming call context - String incomingCallContext = waitForIncomingCallContext(uniqueId, Duration.ofSeconds(10)); - assertNotNull(incomingCallContext); - - // answer the call - AnswerCallOptions answerCallOptions = new AnswerCallOptions(incomingCallContext, DISPATCHER_CALLBACK); - AnswerCallResult answerCallResult - = receiverClient.answerCallWithResponse(answerCallOptions, null).getValue(); - assertNotNull(answerCallResult); - - // wait for callConnected - CallConnected callConnected = waitForEvent(CallConnected.class, callConnectionId, Duration.ofSeconds(10)); - assertNotNull(callConnected); - - // get properties - CallConnectionProperties callConnectionProperties - = createCallResult.getCallConnection().getCallProperties(); - assertEquals(CallConnectionState.CONNECTED, callConnectionProperties.getCallConnectionState()); - - // start recording - RecordingStateResult recordingStateResult = callerClient.getCallRecording() - .start(new StartRecordingOptions(callConnectionId).setRecordingChannel(RecordingChannel.UNMIXED) - .setRecordingContent(RecordingContent.AUDIO) - .setRecordingFormat(RecordingFormat.WAV) - .setRecordingStateCallbackUrl(DISPATCHER_CALLBACK)); - - assertNotNull(recordingStateResult.getRecordingId()); - - // stop recording - callerClient.getCallRecording().stop(recordingStateResult.getRecordingId()); - - // hangup - if (!callConnectionId.isEmpty()) { - CallConnection callConnection = callerClient.getCallConnection(callConnectionId); - callConnection.hangUp(true); - CallDisconnected callDisconnected - = waitForEvent(CallDisconnected.class, callConnectionId, Duration.ofSeconds(10)); - assertNotNull(callDisconnected); - } - } catch (Exception ex) { - fail("Unexpected exception received", ex); - } - } } diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallAndUnmixedAudioTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallAndUnmixedAudioTest.json index c619abbdc48e..e155168a4440 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallAndUnmixedAudioTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallAndUnmixedAudioTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"73078c8e-47d1-4614-9a2e-a0fb0314a2aa\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-f7c7-45e9-b142-a3a205f4a8dd\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-f7c7-45e9-b142-a3a205f4a8dd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"73078c8e-47d1-4614-9a2e-a0fb0314a2aa\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:11:41.6073482\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-f7c7-45e9-b142-a3a205f4a8dd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-f7c7-45e9-b142-a3a205f4a8dd\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-f7c7-45e9-b142-a3a205f4a8dd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"73078c8e-47d1-4614-9a2e-a0fb0314a2aa\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:11:41.6546675\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-f7c7-45e9-b142-a3a205f4a8dd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-f7c7-45e9-b142-a3a205f4a8dd\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-f7c7-45e9-b142-a3a205f4a8dd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"73078c8e-47d1-4614-9a2e-a0fb0314a2aa\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:11:48.0723857\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-f7c7-45e9-b142-a3a205f4a8dd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-f7c7-45e9-b142-a3a205f4a8dd\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-f7c7-45e9-b142-a3a205f4a8dd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"73078c8e-47d1-4614-9a2e-a0fb0314a2aa\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:11:48.4456209\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-f7c7-45e9-b142-a3a205f4a8dd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-f7c7-45e9-b142-a3a205f4a8dd\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"00002680-f7c7-45e9-b142-a3a205f4a8dd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"73078c8e-47d1-4614-9a2e-a0fb0314a2aa\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-03-05T05:11:48.496922\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-f7c7-45e9-b142-a3a205f4a8dd\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"57e2d3b3-1940-4bc1-81ba-ac726dfe09c5\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-119c-41cb-84f1-da4c256fb4bb\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-119c-41cb-84f1-da4c256fb4bb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"57e2d3b3-1940-4bc1-81ba-ac726dfe09c5\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:27:14.2881205\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-119c-41cb-84f1-da4c256fb4bb\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-119c-41cb-84f1-da4c256fb4bb\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-119c-41cb-84f1-da4c256fb4bb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"57e2d3b3-1940-4bc1-81ba-ac726dfe09c5\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:27:14.4402639\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-119c-41cb-84f1-da4c256fb4bb\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-119c-41cb-84f1-da4c256fb4bb\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-119c-41cb-84f1-da4c256fb4bb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"57e2d3b3-1940-4bc1-81ba-ac726dfe09c5\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:27:18.3962831\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-119c-41cb-84f1-da4c256fb4bb\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-119c-41cb-84f1-da4c256fb4bb\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-119c-41cb-84f1-da4c256fb4bb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"57e2d3b3-1940-4bc1-81ba-ac726dfe09c5\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:27:18.7471729\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-119c-41cb-84f1-da4c256fb4bb\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-119c-41cb-84f1-da4c256fb4bb\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"05002380-119c-41cb-84f1-da4c256fb4bb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"57e2d3b3-1940-4bc1-81ba-ac726dfe09c5\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-09T06:27:18.800256\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-119c-41cb-84f1-da4c256fb4bb\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallUnmixedAudioAffinityTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallUnmixedAudioAffinityTest.json index 7ed0bb528f8a..165ed693b77c 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallUnmixedAudioAffinityTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallUnmixedAudioAffinityTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"7d5756d0-129e-4f56-83ef-52bb83957f86\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-367e-4e96-a974-0f74dc9b9665\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-367e-4e96-a974-0f74dc9b9665\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7d5756d0-129e-4f56-83ef-52bb83957f86\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:11:57.8684639\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-367e-4e96-a974-0f74dc9b9665\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-367e-4e96-a974-0f74dc9b9665\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-367e-4e96-a974-0f74dc9b9665\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7d5756d0-129e-4f56-83ef-52bb83957f86\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:11:57.8684639\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-367e-4e96-a974-0f74dc9b9665\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-367e-4e96-a974-0f74dc9b9665\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-367e-4e96-a974-0f74dc9b9665\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7d5756d0-129e-4f56-83ef-52bb83957f86\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:12:01.858633\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-367e-4e96-a974-0f74dc9b9665\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-367e-4e96-a974-0f74dc9b9665\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":6,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-367e-4e96-a974-0f74dc9b9665\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7d5756d0-129e-4f56-83ef-52bb83957f86\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:12:02.3131944\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-367e-4e96-a974-0f74dc9b9665\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-367e-4e96-a974-0f74dc9b9665\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"00002680-367e-4e96-a974-0f74dc9b9665\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7d5756d0-129e-4f56-83ef-52bb83957f86\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-03-05T05:12:02.5478732\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-367e-4e96-a974-0f74dc9b9665\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"1b83f055-61ec-4edb-b915-9f951219e688\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-4c53-4d63-a814-45d68dc2d1d7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-4c53-4d63-a814-45d68dc2d1d7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"1b83f055-61ec-4edb-b915-9f951219e688\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:27:26.8295566\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-4c53-4d63-a814-45d68dc2d1d7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-4c53-4d63-a814-45d68dc2d1d7\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-4c53-4d63-a814-45d68dc2d1d7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"1b83f055-61ec-4edb-b915-9f951219e688\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:27:26.9873876\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-4c53-4d63-a814-45d68dc2d1d7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-4c53-4d63-a814-45d68dc2d1d7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-4c53-4d63-a814-45d68dc2d1d7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"1b83f055-61ec-4edb-b915-9f951219e688\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:27:30.9550215\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-4c53-4d63-a814-45d68dc2d1d7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-4c53-4d63-a814-45d68dc2d1d7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-4c53-4d63-a814-45d68dc2d1d7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"1b83f055-61ec-4edb-b915-9f951219e688\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:27:31.2839295\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-4c53-4d63-a814-45d68dc2d1d7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-4c53-4d63-a814-45d68dc2d1d7\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"05002380-4c53-4d63-a814-45d68dc2d1d7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"1b83f055-61ec-4edb-b915-9f951219e688\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-09T06:27:31.2995863\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-4c53-4d63-a814-45d68dc2d1d7\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenAddParticipantFinallyCancelAddParticipant.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenAddParticipantFinallyCancelAddParticipant.json index c9d2aeac3417..d6120c24caab 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenAddParticipantFinallyCancelAddParticipant.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenAddParticipantFinallyCancelAddParticipant.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"7ebb1af4-7128-484c-a195-84b7dddcf6a5\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9fe2-4103-a268-f2808d080e57\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-9fe2-4103-a268-f2808d080e57\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7ebb1af4-7128-484c-a195-84b7dddcf6a5\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:07:06.6992364\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9fe2-4103-a268-f2808d080e57\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-8f91-42e5-bcbf-8ce44bb54de9\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-8f91-42e5-bcbf-8ce44bb54de9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7ebb1af4-7128-484c-a195-84b7dddcf6a5\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:07:06.7016009\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-8f91-42e5-bcbf-8ce44bb54de9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9fe2-4103-a268-f2808d080e57\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"09002680-9fe2-4103-a268-f2808d080e57\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7ebb1af4-7128-484c-a195-84b7dddcf6a5\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:07:06.7022265\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9fe2-4103-a268-f2808d080e57\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-8f91-42e5-bcbf-8ce44bb54de9\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"09002680-8f91-42e5-bcbf-8ce44bb54de9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7ebb1af4-7128-484c-a195-84b7dddcf6a5\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:07:06.7716479\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-8f91-42e5-bcbf-8ce44bb54de9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9fe2-4103-a268-f2808d080e57\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-9fe2-4103-a268-f2808d080e57\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7ebb1af4-7128-484c-a195-84b7dddcf6a5\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:07:09.2896178\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9fe2-4103-a268-f2808d080e57\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-8f91-42e5-bcbf-8ce44bb54de9\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-8f91-42e5-bcbf-8ce44bb54de9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7ebb1af4-7128-484c-a195-84b7dddcf6a5\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:07:09.2896178\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-8f91-42e5-bcbf-8ce44bb54de9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-8f91-42e5-bcbf-8ce44bb54de9\",\"type\":\"Microsoft.Communication.CancelAddParticipantSucceeded\",\"data\":{\"invitationId\":\"8067ff1e-2472-4db1-bff8-67a63e6c7ab2\",\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":5300,\"message\":\"addParticipants failed for participant 8:acs:6d889502-3d7a-41a8-befa-d21fd80e8767_00000026-0494-d3bb-85f4-343a0d0061cb. Underlying reason: The conversation has ended. DiagCode: 0#5300.@\"},\"callConnectionId\":\"09002680-8f91-42e5-bcbf-8ce44bb54de9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7ebb1af4-7128-484c-a195-84b7dddcf6a5\",\"publicEventType\":\"Microsoft.Communication.CancelAddParticipantSucceeded\"},\"time\":\"2025-03-05T05:07:11.4374908\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-8f91-42e5-bcbf-8ce44bb54de9\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"cfdf999c-2d89-4b7c-913c-8cbd46c8cde6\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-3601-44e7-94d4-b03111a70bfd\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-3601-44e7-94d4-b03111a70bfd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cfdf999c-2d89-4b7c-913c-8cbd46c8cde6\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:19.5280414\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-3601-44e7-94d4-b03111a70bfd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-e136-4b36-b231-15bc505470b5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-e136-4b36-b231-15bc505470b5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cfdf999c-2d89-4b7c-913c-8cbd46c8cde6\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:19.5436658\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-e136-4b36-b231-15bc505470b5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-e136-4b36-b231-15bc505470b5\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-e136-4b36-b231-15bc505470b5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cfdf999c-2d89-4b7c-913c-8cbd46c8cde6\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:23:19.6063339\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-e136-4b36-b231-15bc505470b5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-3601-44e7-94d4-b03111a70bfd\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-3601-44e7-94d4-b03111a70bfd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cfdf999c-2d89-4b7c-913c-8cbd46c8cde6\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:23:19.6231445\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-3601-44e7-94d4-b03111a70bfd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-e136-4b36-b231-15bc505470b5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-e136-4b36-b231-15bc505470b5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cfdf999c-2d89-4b7c-913c-8cbd46c8cde6\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:22.8488549\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-e136-4b36-b231-15bc505470b5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-3601-44e7-94d4-b03111a70bfd\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-3601-44e7-94d4-b03111a70bfd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cfdf999c-2d89-4b7c-913c-8cbd46c8cde6\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:22.8488549\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-3601-44e7-94d4-b03111a70bfd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-3601-44e7-94d4-b03111a70bfd\",\"type\":\"Microsoft.Communication.CancelAddParticipantSucceeded\",\"data\":{\"invitationId\":\"33e8436e-7348-4966-872a-56815a0fc474\",\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":5300,\"message\":\"addParticipants failed for participant 8:acs:6d889502-3d7a-41a8-befa-d21fd80e8767_00000027-5397-eef2-f24b-09bd4560332c. Underlying reason: The conversation has ended. DiagCode: 0#5300.@\"},\"callConnectionId\":\"05002380-3601-44e7-94d4-b03111a70bfd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cfdf999c-2d89-4b7c-913c-8cbd46c8cde6\",\"publicEventType\":\"Microsoft.Communication.CancelAddParticipantSucceeded\"},\"time\":\"2025-05-09T06:23:25.3130761\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-3601-44e7-94d4-b03111a70bfd\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenAddParticipantFinallyRemoveParticipantAutomatedTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenAddParticipantFinallyRemoveParticipantAutomatedTest.json index ba726c547c31..fe47e32a81da 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenAddParticipantFinallyRemoveParticipantAutomatedTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenAddParticipantFinallyRemoveParticipantAutomatedTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-cb8a-40e5-b225-f5026d191283\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-cb8a-40e5-b225-f5026d191283\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:46.3538501\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-cb8a-40e5-b225-f5026d191283\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-9e6d-44c4-ad76-e627a9bdf093\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:46.3538501\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-cb8a-40e5-b225-f5026d191283\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"09002680-cb8a-40e5-b225-f5026d191283\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:06:46.3850956\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-cb8a-40e5-b225-f5026d191283\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"09002680-9e6d-44c4-ad76-e627a9bdf093\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:06:46.4937384\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-cb8a-40e5-b225-f5026d191283\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-cb8a-40e5-b225-f5026d191283\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:49.3731169\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-cb8a-40e5-b225-f5026d191283\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-9e6d-44c4-ad76-e627a9bdf093\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:49.3731169\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\"}]","{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"09002680-fa2b-429a-bf56-85418121eea5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:06:51.6893582\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\",\"type\":\"Microsoft.Communication.AddParticipantSucceeded\",\"data\":{\"participant\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"09002680-9e6d-44c4-ad76-e627a9bdf093\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.AddParticipantSucceeded\"},\"time\":\"2025-03-05T05:06:51.990545\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-fa2b-429a-bf56-85418121eea5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:52.0374514\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-9e6d-44c4-ad76-e627a9bdf093\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:51.990545\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":6,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-fa2b-429a-bf56-85418121eea5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:52.425134\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-cb8a-40e5-b225-f5026d191283\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-cb8a-40e5-b225-f5026d191283\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:51.990545\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-cb8a-40e5-b225-f5026d191283\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":7,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-fa2b-429a-bf56-85418121eea5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:52.8042529\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-cb8a-40e5-b225-f5026d191283\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-cb8a-40e5-b225-f5026d191283\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:52.3675687\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-cb8a-40e5-b225-f5026d191283\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-fa2b-429a-bf56-85418121eea5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:53.166662\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":9,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-fa2b-429a-bf56-85418121eea5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:53.5439266\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-9e6d-44c4-ad76-e627a9bdf093\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:52.3517692\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":10,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-fa2b-429a-bf56-85418121eea5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:53.9278232\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-cb8a-40e5-b225-f5026d191283\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-cb8a-40e5-b225-f5026d191283\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:52.7371451\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-cb8a-40e5-b225-f5026d191283\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-9e6d-44c4-ad76-e627a9bdf093\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:52.7409013\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":11,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-fa2b-429a-bf56-85418121eea5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:54.2806653\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-cb8a-40e5-b225-f5026d191283\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-cb8a-40e5-b225-f5026d191283\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:53.1194526\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-cb8a-40e5-b225-f5026d191283\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":12,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-fa2b-429a-bf56-85418121eea5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:54.6576011\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-9e6d-44c4-ad76-e627a9bdf093\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:53.1345043\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":13,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-fa2b-429a-bf56-85418121eea5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:55.0292462\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-cb8a-40e5-b225-f5026d191283\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-cb8a-40e5-b225-f5026d191283\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:53.5124042\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-cb8a-40e5-b225-f5026d191283\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":14,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-fa2b-429a-bf56-85418121eea5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:55.3806345\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-9e6d-44c4-ad76-e627a9bdf093\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:53.5124042\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":15,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-fa2b-429a-bf56-85418121eea5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:55.7417547\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\",\"type\":\"Microsoft.Communication.RemoveParticipantSucceeded\",\"data\":{\"participant\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"09002680-9e6d-44c4-ad76-e627a9bdf093\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.RemoveParticipantSucceeded\"},\"time\":\"2025-03-05T05:06:53.5751461\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":16,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-fa2b-429a-bf56-85418121eea5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:56.1731107\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-cb8a-40e5-b225-f5026d191283\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":5300,\"message\":\"The conversation has ended. DiagCode: 0#5300.@\"},\"callConnectionId\":\"09002680-cb8a-40e5-b225-f5026d191283\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-03-05T05:06:53.7327175\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-cb8a-40e5-b225-f5026d191283\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":17,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-fa2b-429a-bf56-85418121eea5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:56.6215817\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-fa2b-429a-bf56-85418121eea5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":12,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-9e6d-44c4-ad76-e627a9bdf093\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"54749c24-977a-48ce-baf9-c862bcf657e3\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:53.8942696\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9e6d-44c4-ad76-e627a9bdf093\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-673f-4af6-b556-08a7de509385\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:22:58.4237671\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2c05-4e29-89e0-eb7ca62a5085\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-2c05-4e29-89e0-eb7ca62a5085\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:22:58.455042\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2c05-4e29-89e0-eb7ca62a5085\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-673f-4af6-b556-08a7de509385\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:22:58.5182809\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2c05-4e29-89e0-eb7ca62a5085\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-2c05-4e29-89e0-eb7ca62a5085\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:22:59.1339079\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2c05-4e29-89e0-eb7ca62a5085\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2c05-4e29-89e0-eb7ca62a5085\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-2c05-4e29-89e0-eb7ca62a5085\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:00.7362542\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2c05-4e29-89e0-eb7ca62a5085\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-673f-4af6-b556-08a7de509385\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:00.7362542\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\"}]","{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-5620-4769-8fe6-3bf65d6c41f7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:23:02.8667987\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2c05-4e29-89e0-eb7ca62a5085\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-2c05-4e29-89e0-eb7ca62a5085\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:03.0642564\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2c05-4e29-89e0-eb7ca62a5085\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-5620-4769-8fe6-3bf65d6c41f7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:03.1178463\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\",\"type\":\"Microsoft.Communication.AddParticipantSucceeded\",\"data\":{\"participant\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-673f-4af6-b556-08a7de509385\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.AddParticipantSucceeded\"},\"time\":\"2025-05-09T06:23:03.070954\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-5620-4769-8fe6-3bf65d6c41f7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:03.4587767\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-673f-4af6-b556-08a7de509385\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:03.0636833\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-5620-4769-8fe6-3bf65d6c41f7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:03.8046792\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2c05-4e29-89e0-eb7ca62a5085\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-2c05-4e29-89e0-eb7ca62a5085\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:03.3968051\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2c05-4e29-89e0-eb7ca62a5085\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":9,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-5620-4769-8fe6-3bf65d6c41f7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:04.1513087\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-673f-4af6-b556-08a7de509385\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:03.4205115\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":9,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-5620-4769-8fe6-3bf65d6c41f7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:04.4831647\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2c05-4e29-89e0-eb7ca62a5085\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":7,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-2c05-4e29-89e0-eb7ca62a5085\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:03.7423158\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2c05-4e29-89e0-eb7ca62a5085\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":11,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-5620-4769-8fe6-3bf65d6c41f7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:04.8282044\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":7,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-673f-4af6-b556-08a7de509385\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:03.7736986\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":12,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-5620-4769-8fe6-3bf65d6c41f7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:05.1901934\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-673f-4af6-b556-08a7de509385\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:04.1193196\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":13,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-5620-4769-8fe6-3bf65d6c41f7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:05.5582213\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2c05-4e29-89e0-eb7ca62a5085\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":7,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-2c05-4e29-89e0-eb7ca62a5085\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:04.103801\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2c05-4e29-89e0-eb7ca62a5085\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":14,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-5620-4769-8fe6-3bf65d6c41f7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:05.900844\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-5620-4769-8fe6-3bf65d6c41f7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":9,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-673f-4af6-b556-08a7de509385\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:04.4363881\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2c05-4e29-89e0-eb7ca62a5085\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-2c05-4e29-89e0-eb7ca62a5085\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:04.4363881\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2c05-4e29-89e0-eb7ca62a5085\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2c05-4e29-89e0-eb7ca62a5085\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":5300,\"message\":\"The conversation has ended. DiagCode: 0#5300.@\"},\"callConnectionId\":\"05002380-2c05-4e29-89e0-eb7ca62a5085\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-09T06:23:04.4514963\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2c05-4e29-89e0-eb7ca62a5085\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\",\"type\":\"Microsoft.Communication.RemoveParticipantSucceeded\",\"data\":{\"participant\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-673f-4af6-b556-08a7de509385\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c507bb43-f2de-4e7b-9052-1a9a9f60837d\",\"publicEventType\":\"Microsoft.Communication.RemoveParticipantSucceeded\"},\"time\":\"2025-05-09T06:23:04.4514963\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-673f-4af6-b556-08a7de509385\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenHangupAutomatedTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenHangupAutomatedTest.json index fd8cb079883c..f4f150d2276f 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenHangupAutomatedTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenHangupAutomatedTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"7358f836-7518-4122-8e1c-a10dae27157d\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-8943-45ff-9f77-0c54434c66fd\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-8943-45ff-9f77-0c54434c66fd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7358f836-7518-4122-8e1c-a10dae27157d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:34.6640995\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-8943-45ff-9f77-0c54434c66fd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-7911-4f79-b1a4-44d873153897\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"09002680-7911-4f79-b1a4-44d873153897\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7358f836-7518-4122-8e1c-a10dae27157d\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:06:34.6640995\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-7911-4f79-b1a4-44d873153897\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-7911-4f79-b1a4-44d873153897\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-7911-4f79-b1a4-44d873153897\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7358f836-7518-4122-8e1c-a10dae27157d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:34.6640995\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-7911-4f79-b1a4-44d873153897\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-8943-45ff-9f77-0c54434c66fd\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"09002680-8943-45ff-9f77-0c54434c66fd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7358f836-7518-4122-8e1c-a10dae27157d\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:06:34.7115432\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-8943-45ff-9f77-0c54434c66fd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-7911-4f79-b1a4-44d873153897\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"09002680-7911-4f79-b1a4-44d873153897\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7358f836-7518-4122-8e1c-a10dae27157d\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-03-05T05:06:36.7602543\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-7911-4f79-b1a4-44d873153897\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-8943-45ff-9f77-0c54434c66fd\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"09002680-8943-45ff-9f77-0c54434c66fd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7358f836-7518-4122-8e1c-a10dae27157d\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-03-05T05:06:36.9906406\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-8943-45ff-9f77-0c54434c66fd\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"bdde3aa6-a71e-4e5f-af0e-fa436cee7587\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-70b1-4a26-b1ba-3019fea7731b\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-70b1-4a26-b1ba-3019fea7731b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"bdde3aa6-a71e-4e5f-af0e-fa436cee7587\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:22:43.1549157\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-70b1-4a26-b1ba-3019fea7731b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-ec8d-429e-b334-48decbdaa12f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-ec8d-429e-b334-48decbdaa12f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"bdde3aa6-a71e-4e5f-af0e-fa436cee7587\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:22:43.1705886\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-ec8d-429e-b334-48decbdaa12f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-ec8d-429e-b334-48decbdaa12f\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-ec8d-429e-b334-48decbdaa12f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"bdde3aa6-a71e-4e5f-af0e-fa436cee7587\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:22:43.2345525\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-ec8d-429e-b334-48decbdaa12f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-70b1-4a26-b1ba-3019fea7731b\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-70b1-4a26-b1ba-3019fea7731b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"bdde3aa6-a71e-4e5f-af0e-fa436cee7587\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:22:43.3129448\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-70b1-4a26-b1ba-3019fea7731b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-70b1-4a26-b1ba-3019fea7731b\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"05002380-70b1-4a26-b1ba-3019fea7731b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"bdde3aa6-a71e-4e5f-af0e-fa436cee7587\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-09T06:22:45.9881753\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-70b1-4a26-b1ba-3019fea7731b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-ec8d-429e-b334-48decbdaa12f\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"05002380-ec8d-429e-b334-48decbdaa12f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"bdde3aa6-a71e-4e5f-af0e-fa436cee7587\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-09T06:22:46.0044058\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-ec8d-429e-b334-48decbdaa12f\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndConnectCallTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndConnectCallTest.json index 697fd82f3d78..2c55f0afab4f 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndConnectCallTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndConnectCallTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"7c6c686b-ba40-421a-8b92-e4e278730789\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-a836-475c-8c1f-58bceffba0a1\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-a836-475c-8c1f-58bceffba0a1\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7c6c686b-ba40-421a-8b92-e4e278730789\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:03.2180262\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-a836-475c-8c1f-58bceffba0a1\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-a836-475c-8c1f-58bceffba0a1\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"09002680-a836-475c-8c1f-58bceffba0a1\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7c6c686b-ba40-421a-8b92-e4e278730789\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:06:03.2493338\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-a836-475c-8c1f-58bceffba0a1\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-4aad-4475-aef6-174e6efb4ee9\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"09002680-4aad-4475-aef6-174e6efb4ee9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7c6c686b-ba40-421a-8b92-e4e278730789\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:06:03.2805992\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-4aad-4475-aef6-174e6efb4ee9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-4aad-4475-aef6-174e6efb4ee9\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-4aad-4475-aef6-174e6efb4ee9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7c6c686b-ba40-421a-8b92-e4e278730789\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:03.2805992\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-4aad-4475-aef6-174e6efb4ee9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-777a-432f-bd28-534333d1b7bd\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":2,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-777a-432f-bd28-534333d1b7bd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7c6c686b-ba40-421a-8b92-e4e278730789\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:07.3307313\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-777a-432f-bd28-534333d1b7bd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-777a-432f-bd28-534333d1b7bd\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"09002680-777a-432f-bd28-534333d1b7bd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7c6c686b-ba40-421a-8b92-e4e278730789\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:06:07.346421\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-777a-432f-bd28-534333d1b7bd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-777a-432f-bd28-534333d1b7bd\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-777a-432f-bd28-534333d1b7bd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7c6c686b-ba40-421a-8b92-e4e278730789\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:07.7076641\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-777a-432f-bd28-534333d1b7bd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-777a-432f-bd28-534333d1b7bd\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"09002680-777a-432f-bd28-534333d1b7bd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7c6c686b-ba40-421a-8b92-e4e278730789\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-03-05T05:06:09.2617903\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-777a-432f-bd28-534333d1b7bd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-a836-475c-8c1f-58bceffba0a1\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":5001,\"message\":\"This conversation has ended.. DiagCode: 0#5001.@\"},\"callConnectionId\":\"09002680-a836-475c-8c1f-58bceffba0a1\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7c6c686b-ba40-421a-8b92-e4e278730789\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-03-05T05:06:09.2740451\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-a836-475c-8c1f-58bceffba0a1\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-4aad-4475-aef6-174e6efb4ee9\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":5001,\"message\":\"This conversation has ended.. DiagCode: 0#5001.@\"},\"callConnectionId\":\"09002680-4aad-4475-aef6-174e6efb4ee9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"7c6c686b-ba40-421a-8b92-e4e278730789\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-03-05T05:06:09.4158514\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-4aad-4475-aef6-174e6efb4ee9\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"8deeb2ec-e0e9-4116-8bc7-45fe6c94e849\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2c18-4aca-9bdf-9bc8c033713d\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-2c18-4aca-9bdf-9bc8c033713d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8deeb2ec-e0e9-4116-8bc7-45fe6c94e849\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:22:25.5674189\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2c18-4aca-9bdf-9bc8c033713d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2c18-4aca-9bdf-9bc8c033713d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-2c18-4aca-9bdf-9bc8c033713d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8deeb2ec-e0e9-4116-8bc7-45fe6c94e849\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:22:25.4881896\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2c18-4aca-9bdf-9bc8c033713d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-d6b9-45f4-9421-e0d50047a3a5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-d6b9-45f4-9421-e0d50047a3a5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8deeb2ec-e0e9-4116-8bc7-45fe6c94e849\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:22:25.472542\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-d6b9-45f4-9421-e0d50047a3a5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-d6b9-45f4-9421-e0d50047a3a5\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-d6b9-45f4-9421-e0d50047a3a5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8deeb2ec-e0e9-4116-8bc7-45fe6c94e849\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:22:25.5478\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-d6b9-45f4-9421-e0d50047a3a5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-d6a2-424e-9389-c3ca0d0f9ead\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-d6a2-424e-9389-c3ca0d0f9ead\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8deeb2ec-e0e9-4116-8bc7-45fe6c94e849\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:22:29.822184\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-d6a2-424e-9389-c3ca0d0f9ead\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-d6a2-424e-9389-c3ca0d0f9ead\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":2,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-d6a2-424e-9389-c3ca0d0f9ead\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8deeb2ec-e0e9-4116-8bc7-45fe6c94e849\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:22:29.822184\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-d6a2-424e-9389-c3ca0d0f9ead\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-d6a2-424e-9389-c3ca0d0f9ead\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-d6a2-424e-9389-c3ca0d0f9ead\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8deeb2ec-e0e9-4116-8bc7-45fe6c94e849\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:22:30.1843543\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-d6a2-424e-9389-c3ca0d0f9ead\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-d6a2-424e-9389-c3ca0d0f9ead\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"05002380-d6a2-424e-9389-c3ca0d0f9ead\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8deeb2ec-e0e9-4116-8bc7-45fe6c94e849\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-09T06:22:30.4997737\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-d6a2-424e-9389-c3ca0d0f9ead\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-d6b9-45f4-9421-e0d50047a3a5\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":5001,\"message\":\"This conversation has ended.. DiagCode: 0#5001.@\"},\"callConnectionId\":\"05002380-d6b9-45f4-9421-e0d50047a3a5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8deeb2ec-e0e9-4116-8bc7-45fe6c94e849\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-09T06:22:30.5153993\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-d6b9-45f4-9421-e0d50047a3a5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2c18-4aca-9bdf-9bc8c033713d\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":5001,\"message\":\"This conversation has ended.. DiagCode: 0#5001.@\"},\"callConnectionId\":\"05002380-2c18-4aca-9bdf-9bc8c033713d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8deeb2ec-e0e9-4116-8bc7-45fe6c94e849\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-09T06:22:30.5153993\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2c18-4aca-9bdf-9bc8c033713d\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndMediaStreamingTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndMediaStreamingTest.json index 64ad343aa610..be35b8d3c1bd 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndMediaStreamingTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndMediaStreamingTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"a0a4ce36-d74b-4155-8659-3b0e5d2c09b4\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-9f1f-437d-b004-4ea4924fddb5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-9f1f-437d-b004-4ea4924fddb5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a0a4ce36-d74b-4155-8659-3b0e5d2c09b4\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:10:53.6079705\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-9f1f-437d-b004-4ea4924fddb5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-fbf3-4b55-ab4c-3caaf7f2a583\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-fbf3-4b55-ab4c-3caaf7f2a583\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a0a4ce36-d74b-4155-8659-3b0e5d2c09b4\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:10:53.6079705\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-fbf3-4b55-ab4c-3caaf7f2a583\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-fbf3-4b55-ab4c-3caaf7f2a583\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-fbf3-4b55-ab4c-3caaf7f2a583\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a0a4ce36-d74b-4155-8659-3b0e5d2c09b4\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:10:53.6079705\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-fbf3-4b55-ab4c-3caaf7f2a583\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-9f1f-437d-b004-4ea4924fddb5\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-9f1f-437d-b004-4ea4924fddb5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a0a4ce36-d74b-4155-8659-3b0e5d2c09b4\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:10:53.6870147\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-9f1f-437d-b004-4ea4924fddb5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-9f1f-437d-b004-4ea4924fddb5\",\"type\":\"Microsoft.Communication.MediaStreamingStarted\",\"data\":{\"mediaStreamingUpdate\":{\"contentType\":\"Audio\",\"mediaStreamingStatus\":\"mediaStreamingStarted\",\"mediaStreamingStatusDetails\":\"subscriptionStarted\"},\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00002680-9f1f-437d-b004-4ea4924fddb5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a0a4ce36-d74b-4155-8659-3b0e5d2c09b4\",\"publicEventType\":\"Microsoft.Communication.MediaStreamingStarted\"},\"time\":\"2025-03-05T05:10:56.9546699\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-9f1f-437d-b004-4ea4924fddb5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-9f1f-437d-b004-4ea4924fddb5\",\"type\":\"Microsoft.Communication.MediaStreamingStopped\",\"data\":{\"mediaStreamingUpdate\":{\"contentType\":\"Audio\",\"mediaStreamingStatus\":\"mediaStreamingStopped\",\"mediaStreamingStatusDetails\":\"subscriptionStopped\"},\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00002680-9f1f-437d-b004-4ea4924fddb5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a0a4ce36-d74b-4155-8659-3b0e5d2c09b4\",\"publicEventType\":\"Microsoft.Communication.MediaStreamingStopped\"},\"time\":\"2025-03-05T05:10:58.1240543\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-9f1f-437d-b004-4ea4924fddb5\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"57fe4864-0252-4c05-bace-6326803f8e71\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-8f86-49df-add0-fb58663a6f7d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-8f86-49df-add0-fb58663a6f7d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"57fe4864-0252-4c05-bace-6326803f8e71\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:26:23.8638752\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-8f86-49df-add0-fb58663a6f7d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-6d9d-4b15-b8db-e4689c747c49\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-6d9d-4b15-b8db-e4689c747c49\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"57fe4864-0252-4c05-bace-6326803f8e71\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:26:23.8638752\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-6d9d-4b15-b8db-e4689c747c49\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-6d9d-4b15-b8db-e4689c747c49\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-6d9d-4b15-b8db-e4689c747c49\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"57fe4864-0252-4c05-bace-6326803f8e71\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:26:23.9906322\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-6d9d-4b15-b8db-e4689c747c49\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-8f86-49df-add0-fb58663a6f7d\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-8f86-49df-add0-fb58663a6f7d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"57fe4864-0252-4c05-bace-6326803f8e71\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:26:24.0373004\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-8f86-49df-add0-fb58663a6f7d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-8f86-49df-add0-fb58663a6f7d\",\"type\":\"Microsoft.Communication.MediaStreamingStarted\",\"data\":{\"mediaStreamingUpdate\":{\"contentType\":\"Audio\",\"mediaStreamingStatus\":\"mediaStreamingStarted\",\"mediaStreamingStatusDetails\":\"subscriptionStarted\"},\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"05002380-8f86-49df-add0-fb58663a6f7d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"57fe4864-0252-4c05-bace-6326803f8e71\",\"publicEventType\":\"Microsoft.Communication.MediaStreamingStarted\"},\"time\":\"2025-05-09T06:26:27.8088625\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-8f86-49df-add0-fb58663a6f7d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-8f86-49df-add0-fb58663a6f7d\",\"type\":\"Microsoft.Communication.MediaStreamingStopped\",\"data\":{\"mediaStreamingUpdate\":{\"contentType\":\"Audio\",\"mediaStreamingStatus\":\"mediaStreamingStopped\",\"mediaStreamingStatusDetails\":\"subscriptionStopped\"},\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"05002380-8f86-49df-add0-fb58663a6f7d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"57fe4864-0252-4c05-bace-6326803f8e71\",\"publicEventType\":\"Microsoft.Communication.MediaStreamingStopped\"},\"time\":\"2025-05-09T06:26:28.9915988\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-8f86-49df-add0-fb58663a6f7d\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndRejectAutomatedTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndRejectAutomatedTest.json index beb48d375ded..6448b576eeff 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndRejectAutomatedTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndRejectAutomatedTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"bf80131a-2147-4577-b660-b6908d4f31d7\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-4a25-4c10-b9a4-5341af3c6021\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":603,\"subCode\":0,\"message\":\"Decline. DiagCode: 603#0.@\"},\"callConnectionId\":\"09002680-4a25-4c10-b9a4-5341af3c6021\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"bf80131a-2147-4577-b660-b6908d4f31d7\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-03-05T05:05:47.9701737\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-4a25-4c10-b9a4-5341af3c6021\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-4a25-4c10-b9a4-5341af3c6021\",\"type\":\"Microsoft.Communication.CreateCallFailed\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":603,\"subCode\":0,\"message\":\"Decline. DiagCode: 603#0.@\"},\"callConnectionId\":\"09002680-4a25-4c10-b9a4-5341af3c6021\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"bf80131a-2147-4577-b660-b6908d4f31d7\",\"publicEventType\":\"Microsoft.Communication.CreateCallFailed\"},\"time\":\"2025-03-05T05:05:47.9701737\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-4a25-4c10-b9a4-5341af3c6021\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"00eab6a3-b612-44ba-9b6f-5d1a641578bc\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-4e62-436f-bdc3-5cfa6cf4f2ff\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":603,\"subCode\":0,\"message\":\"Decline. DiagCode: 603#0.@\"},\"callConnectionId\":\"05002380-4e62-436f-bdc3-5cfa6cf4f2ff\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00eab6a3-b612-44ba-9b6f-5d1a641578bc\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-09T06:22:13.2128589\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-4e62-436f-bdc3-5cfa6cf4f2ff\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-4e62-436f-bdc3-5cfa6cf4f2ff\",\"type\":\"Microsoft.Communication.CreateCallFailed\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":603,\"subCode\":0,\"message\":\"Decline. DiagCode: 603#0.@\"},\"callConnectionId\":\"05002380-4e62-436f-bdc3-5cfa6cf4f2ff\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00eab6a3-b612-44ba-9b6f-5d1a641578bc\",\"publicEventType\":\"Microsoft.Communication.CreateCallFailed\"},\"time\":\"2025-05-09T06:22:13.2128589\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-4e62-436f-bdc3-5cfa6cf4f2ff\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndTranscriptionTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndTranscriptionTest.json index 8203e86f7498..7d4287b7ea4d 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndTranscriptionTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndTranscriptionTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"52a62de0-cc1f-4434-ba2a-ad43bcbfb947\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-2a53-4922-85f3-70195db1d669\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-2a53-4922-85f3-70195db1d669\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"52a62de0-cc1f-4434-ba2a-ad43bcbfb947\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:11:25.7298232\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-2a53-4922-85f3-70195db1d669\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-2a53-4922-85f3-70195db1d669\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-2a53-4922-85f3-70195db1d669\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"52a62de0-cc1f-4434-ba2a-ad43bcbfb947\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:11:25.7773603\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-2a53-4922-85f3-70195db1d669\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-5475-4f84-8842-2222ead9a207\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-5475-4f84-8842-2222ead9a207\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"52a62de0-cc1f-4434-ba2a-ad43bcbfb947\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:11:25.8874441\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-5475-4f84-8842-2222ead9a207\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-5475-4f84-8842-2222ead9a207\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-5475-4f84-8842-2222ead9a207\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"52a62de0-cc1f-4434-ba2a-ad43bcbfb947\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:11:26.2723107\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-5475-4f84-8842-2222ead9a207\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-5475-4f84-8842-2222ead9a207\",\"type\":\"Microsoft.Communication.TranscriptionStarted\",\"data\":{\"transcriptionUpdate\":{\"transcriptionStatus\":\"transcriptionStarted\",\"transcriptionStatusDetails\":\"subscriptionStarted\"},\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00002680-5475-4f84-8842-2222ead9a207\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"52a62de0-cc1f-4434-ba2a-ad43bcbfb947\",\"publicEventType\":\"Microsoft.Communication.TranscriptionStarted\"},\"time\":\"2025-03-05T05:11:29.4717109\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-5475-4f84-8842-2222ead9a207\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-5475-4f84-8842-2222ead9a207\",\"type\":\"Microsoft.Communication.TranscriptionStopped\",\"data\":{\"transcriptionUpdate\":{\"transcriptionStatus\":\"transcriptionStopped\",\"transcriptionStatusDetails\":\"subscriptionStopped\"},\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00002680-5475-4f84-8842-2222ead9a207\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"52a62de0-cc1f-4434-ba2a-ad43bcbfb947\",\"publicEventType\":\"Microsoft.Communication.TranscriptionStopped\"},\"time\":\"2025-03-05T05:11:32.6029876\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-5475-4f84-8842-2222ead9a207\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-5475-4f84-8842-2222ead9a207\",\"type\":\"Microsoft.Communication.TranscriptionStopped\",\"data\":{\"transcriptionUpdate\":{\"transcriptionStatus\":\"transcriptionStopped\",\"transcriptionStatusDetails\":\"streamConnectionInterrupted\"},\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":500,\"subCode\":8579,\"message\":\"Action failed, transcription was canceled.\"},\"callConnectionId\":\"00002680-5475-4f84-8842-2222ead9a207\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"52a62de0-cc1f-4434-ba2a-ad43bcbfb947\",\"publicEventType\":\"Microsoft.Communication.TranscriptionStopped\"},\"time\":\"2025-03-05T05:11:32.6029876\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-5475-4f84-8842-2222ead9a207\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"2e19e4b2-f94e-482d-b514-d2df8b5e33dc\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-91ad-4056-814e-755df308fd47\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-91ad-4056-814e-755df308fd47\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"2e19e4b2-f94e-482d-b514-d2df8b5e33dc\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:26:58.0282011\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-91ad-4056-814e-755df308fd47\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-bab3-47cd-b785-9813fc15ec59\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-bab3-47cd-b785-9813fc15ec59\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"2e19e4b2-f94e-482d-b514-d2df8b5e33dc\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:26:58.0282011\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-bab3-47cd-b785-9813fc15ec59\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-91ad-4056-814e-755df308fd47\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-91ad-4056-814e-755df308fd47\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"2e19e4b2-f94e-482d-b514-d2df8b5e33dc\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:26:58.1229805\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-91ad-4056-814e-755df308fd47\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-bab3-47cd-b785-9813fc15ec59\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-bab3-47cd-b785-9813fc15ec59\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"2e19e4b2-f94e-482d-b514-d2df8b5e33dc\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:26:58.1392474\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-bab3-47cd-b785-9813fc15ec59\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-bab3-47cd-b785-9813fc15ec59\",\"type\":\"Microsoft.Communication.TranscriptionStarted\",\"data\":{\"transcriptionUpdate\":{\"transcriptionStatus\":\"transcriptionStarted\",\"transcriptionStatusDetails\":\"subscriptionStarted\"},\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"05002380-bab3-47cd-b785-9813fc15ec59\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"2e19e4b2-f94e-482d-b514-d2df8b5e33dc\",\"publicEventType\":\"Microsoft.Communication.TranscriptionStarted\"},\"time\":\"2025-05-09T06:27:02.1196502\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-bab3-47cd-b785-9813fc15ec59\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-bab3-47cd-b785-9813fc15ec59\",\"type\":\"Microsoft.Communication.TranscriptionStopped\",\"data\":{\"transcriptionUpdate\":{\"transcriptionStatus\":\"transcriptionStopped\",\"transcriptionStatusDetails\":\"subscriptionStopped\"},\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"05002380-bab3-47cd-b785-9813fc15ec59\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"2e19e4b2-f94e-482d-b514-d2df8b5e33dc\",\"publicEventType\":\"Microsoft.Communication.TranscriptionStopped\"},\"time\":\"2025-05-09T06:27:05.2559903\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-bab3-47cd-b785-9813fc15ec59\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/dtmfActionsInACallAutomatedTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/dtmfActionsInACallAutomatedTest.json index 6932a6b5e7bf..eae4746e1f77 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/dtmfActionsInACallAutomatedTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/dtmfActionsInACallAutomatedTest.json @@ -1 +1 @@ -["[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/08002680-d9b2-43e0-9e4e-4a44ad7dad4f\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"08002680-d9b2-43e0-9e4e-4a44ad7dad4f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"4500fed7-e1cd-4c1f-9c7f-1ec545843a38\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-03-05T05:06:09.2240574\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/08002680-d9b2-43e0-9e4e-4a44ad7dad4f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/08002680-a72d-45ec-aa54-d156ae433b95\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":540000,\"message\":\"The conversation has ended\"},\"callConnectionId\":\"08002680-a72d-45ec-aa54-d156ae433b95\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"d2b98a7f-e0ce-4405-98ae-1b5b85bb9e10\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-03-05T05:06:09.7269266\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/08002680-a72d-45ec-aa54-d156ae433b95\"}]","{\"to\":{\"kind\":\"phoneNumber\",\"rawId\":\"REDACTED\",\"phoneNumber\":{\"value\":\"REDACTED\"}},\"from\":{\"kind\":\"phoneNumber\",\"rawId\":\"REDACTED\",\"phoneNumber\":{\"value\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"716fb88e-7a5a-4ae1-b953-a1d519595a52\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-b0ee-44ac-be45-b6015074d407\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"phoneNumber\",\"phoneNumber\":{\"value\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-b0ee-44ac-be45-b6015074d407\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"4ba75dae-5a1d-4c72-911e-a5d805dedb69\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:08:58.0584334\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-b0ee-44ac-be45-b6015074d407\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-3717-497b-a894-f68c64158883\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-3717-497b-a894-f68c64158883\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"716fb88e-7a5a-4ae1-b953-a1d519595a52\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:08:58.0747348\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-3717-497b-a894-f68c64158883\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-b0ee-44ac-be45-b6015074d407\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-b0ee-44ac-be45-b6015074d407\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"4ba75dae-5a1d-4c72-911e-a5d805dedb69\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:08:58.3583025\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-b0ee-44ac-be45-b6015074d407\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-3717-497b-a894-f68c64158883\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"phoneNumber\",\"phoneNumber\":{\"value\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-3717-497b-a894-f68c64158883\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"716fb88e-7a5a-4ae1-b953-a1d519595a52\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:08:58.609263\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-3717-497b-a894-f68c64158883\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-b0ee-44ac-be45-b6015074d407\",\"type\":\"Microsoft.Communication.SendDtmfTonesCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-b0ee-44ac-be45-b6015074d407\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"4ba75dae-5a1d-4c72-911e-a5d805dedb69\",\"publicEventType\":\"Microsoft.Communication.SendDtmfTonesCompleted\"},\"time\":\"2025-03-05T05:09:05.0583303\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-b0ee-44ac-be45-b6015074d407\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-b0ee-44ac-be45-b6015074d407\",\"type\":\"Microsoft.Communication.ContinuousDtmfRecognitionStopped\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"00002680-b0ee-44ac-be45-b6015074d407\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"4ba75dae-5a1d-4c72-911e-a5d805dedb69\",\"publicEventType\":\"Microsoft.Communication.ContinuousDtmfRecognitionStopped\"},\"time\":\"2025-03-05T05:09:05.6716338\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-b0ee-44ac-be45-b6015074d407\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"phoneNumber\",\"rawId\":\"REDACTED\",\"phoneNumber\":{\"value\":\"REDACTED\"}},\"from\":{\"kind\":\"phoneNumber\",\"rawId\":\"REDACTED\",\"phoneNumber\":{\"value\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"9e71c0a1-c7aa-46ca-abdb-c83fa65e8200\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-dfba-4ac9-8c40-2fb34fe1b203\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"phoneNumber\",\"phoneNumber\":{\"value\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-dfba-4ac9-8c40-2fb34fe1b203\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"61161cb0-5825-4f97-b069-2739c5f47a40\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:24:51.8550972\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-dfba-4ac9-8c40-2fb34fe1b203\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-3def-46e0-897e-5c277f1e187d\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-3def-46e0-897e-5c277f1e187d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"9e71c0a1-c7aa-46ca-abdb-c83fa65e8200\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:24:51.9413415\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-3def-46e0-897e-5c277f1e187d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-dfba-4ac9-8c40-2fb34fe1b203\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-dfba-4ac9-8c40-2fb34fe1b203\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"61161cb0-5825-4f97-b069-2739c5f47a40\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:24:51.9713982\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-dfba-4ac9-8c40-2fb34fe1b203\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-3def-46e0-897e-5c277f1e187d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"phoneNumber\",\"phoneNumber\":{\"value\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-3def-46e0-897e-5c277f1e187d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"9e71c0a1-c7aa-46ca-abdb-c83fa65e8200\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:24:52.5373575\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-3def-46e0-897e-5c277f1e187d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-dfba-4ac9-8c40-2fb34fe1b203\",\"type\":\"Microsoft.Communication.SendDtmfTonesCompleted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-dfba-4ac9-8c40-2fb34fe1b203\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"61161cb0-5825-4f97-b069-2739c5f47a40\",\"publicEventType\":\"Microsoft.Communication.SendDtmfTonesCompleted\"},\"time\":\"2025-05-09T06:24:55.7297359\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-dfba-4ac9-8c40-2fb34fe1b203\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-dfba-4ac9-8c40-2fb34fe1b203\",\"type\":\"Microsoft.Communication.ContinuousDtmfRecognitionStopped\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"05002380-dfba-4ac9-8c40-2fb34fe1b203\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"61161cb0-5825-4f97-b069-2739c5f47a40\",\"publicEventType\":\"Microsoft.Communication.ContinuousDtmfRecognitionStopped\"},\"time\":\"2025-05-09T06:24:56.4377276\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-dfba-4ac9-8c40-2fb34fe1b203\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/holdUnholdParticipantInACallTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/holdUnholdParticipantInACallTest.json index bee4038d7049..93d283e49f68 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/holdUnholdParticipantInACallTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/holdUnholdParticipantInACallTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"a9735b79-beed-4882-8449-5eade4c353cf\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-357e-4638-bcc7-f67c84ff6931\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-357e-4638-bcc7-f67c84ff6931\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a9735b79-beed-4882-8449-5eade4c353cf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:11:07.050362\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-357e-4638-bcc7-f67c84ff6931\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-0bee-4251-a78d-385e6f2930f3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-0bee-4251-a78d-385e6f2930f3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a9735b79-beed-4882-8449-5eade4c353cf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:11:07.0564601\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-0bee-4251-a78d-385e6f2930f3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-357e-4638-bcc7-f67c84ff6931\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-357e-4638-bcc7-f67c84ff6931\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a9735b79-beed-4882-8449-5eade4c353cf\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:11:07.0551994\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-357e-4638-bcc7-f67c84ff6931\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-0bee-4251-a78d-385e6f2930f3\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-0bee-4251-a78d-385e6f2930f3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a9735b79-beed-4882-8449-5eade4c353cf\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:11:07.1401195\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-0bee-4251-a78d-385e6f2930f3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-357e-4638-bcc7-f67c84ff6931\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-357e-4638-bcc7-f67c84ff6931\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a9735b79-beed-4882-8449-5eade4c353cf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:11:11.1252698\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-357e-4638-bcc7-f67c84ff6931\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-0bee-4251-a78d-385e6f2930f3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-0bee-4251-a78d-385e6f2930f3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a9735b79-beed-4882-8449-5eade4c353cf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:11:11.1252698\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-0bee-4251-a78d-385e6f2930f3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-0bee-4251-a78d-385e6f2930f3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-0bee-4251-a78d-385e6f2930f3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a9735b79-beed-4882-8449-5eade4c353cf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:11:14.519588\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-0bee-4251-a78d-385e6f2930f3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-357e-4638-bcc7-f67c84ff6931\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-357e-4638-bcc7-f67c84ff6931\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a9735b79-beed-4882-8449-5eade4c353cf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:11:14.519588\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-357e-4638-bcc7-f67c84ff6931\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"71f45a2b-d4c1-4297-8bfc-2c06c74ac549\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-b094-41fb-8f69-32086ef962ed\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-b094-41fb-8f69-32086ef962ed\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"71f45a2b-d4c1-4297-8bfc-2c06c74ac549\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:26:38.9238684\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-b094-41fb-8f69-32086ef962ed\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-6f7b-43d6-9cf1-6f1db4f5ec5f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-6f7b-43d6-9cf1-6f1db4f5ec5f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"71f45a2b-d4c1-4297-8bfc-2c06c74ac549\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:26:38.9388976\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-6f7b-43d6-9cf1-6f1db4f5ec5f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-6f7b-43d6-9cf1-6f1db4f5ec5f\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-6f7b-43d6-9cf1-6f1db4f5ec5f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"71f45a2b-d4c1-4297-8bfc-2c06c74ac549\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:26:39.0175733\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-6f7b-43d6-9cf1-6f1db4f5ec5f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-b094-41fb-8f69-32086ef962ed\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-b094-41fb-8f69-32086ef962ed\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"71f45a2b-d4c1-4297-8bfc-2c06c74ac549\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:26:39.0175733\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-b094-41fb-8f69-32086ef962ed\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-6f7b-43d6-9cf1-6f1db4f5ec5f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-6f7b-43d6-9cf1-6f1db4f5ec5f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"71f45a2b-d4c1-4297-8bfc-2c06c74ac549\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:26:42.8351754\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-6f7b-43d6-9cf1-6f1db4f5ec5f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-b094-41fb-8f69-32086ef962ed\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-b094-41fb-8f69-32086ef962ed\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"71f45a2b-d4c1-4297-8bfc-2c06c74ac549\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:26:42.8351754\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-b094-41fb-8f69-32086ef962ed\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-b094-41fb-8f69-32086ef962ed\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-b094-41fb-8f69-32086ef962ed\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"71f45a2b-d4c1-4297-8bfc-2c06c74ac549\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:26:46.3701507\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-b094-41fb-8f69-32086ef962ed\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-6f7b-43d6-9cf1-6f1db4f5ec5f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-6f7b-43d6-9cf1-6f1db4f5ec5f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"71f45a2b-d4c1-4297-8bfc-2c06c74ac549\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:26:46.3701507\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-6f7b-43d6-9cf1-6f1db4f5ec5f\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/playMediaInACallAutomatedTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/playMediaInACallAutomatedTest.json index b3d29b52ab95..3081ffdf878c 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/playMediaInACallAutomatedTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/playMediaInACallAutomatedTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"dd4edbb8-36a7-40db-8f4f-3b481d60d5d8\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-062f-4308-ab87-5427daa80363\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-062f-4308-ab87-5427daa80363\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"dd4edbb8-36a7-40db-8f4f-3b481d60d5d8\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:10:38.2941461\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-062f-4308-ab87-5427daa80363\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-6f85-4b4c-938e-9e58586f1fb9\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-6f85-4b4c-938e-9e58586f1fb9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"dd4edbb8-36a7-40db-8f4f-3b481d60d5d8\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:10:38.2941461\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-6f85-4b4c-938e-9e58586f1fb9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-6f85-4b4c-938e-9e58586f1fb9\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-6f85-4b4c-938e-9e58586f1fb9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"dd4edbb8-36a7-40db-8f4f-3b481d60d5d8\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:10:38.3268155\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-6f85-4b4c-938e-9e58586f1fb9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-062f-4308-ab87-5427daa80363\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-062f-4308-ab87-5427daa80363\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"dd4edbb8-36a7-40db-8f4f-3b481d60d5d8\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:10:38.3573005\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-062f-4308-ab87-5427daa80363\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-062f-4308-ab87-5427daa80363\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00002680-062f-4308-ab87-5427daa80363\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"dd4edbb8-36a7-40db-8f4f-3b481d60d5d8\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-03-05T05:10:40.9324277\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-062f-4308-ab87-5427daa80363\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-062f-4308-ab87-5427daa80363\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00002680-062f-4308-ab87-5427daa80363\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"dd4edbb8-36a7-40db-8f4f-3b481d60d5d8\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-03-05T05:10:45.1536721\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-062f-4308-ab87-5427daa80363\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"8ed0cf5a-22cc-4564-b72f-b783da23cb50\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-b544-4ae7-8c28-e6ab1bfd59dd\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-b544-4ae7-8c28-e6ab1bfd59dd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8ed0cf5a-22cc-4564-b72f-b783da23cb50\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:26:07.5048631\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-b544-4ae7-8c28-e6ab1bfd59dd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-4c5e-4e69-90f3-17c24ee1ef9b\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-4c5e-4e69-90f3-17c24ee1ef9b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8ed0cf5a-22cc-4564-b72f-b783da23cb50\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:26:07.5048631\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-4c5e-4e69-90f3-17c24ee1ef9b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-4c5e-4e69-90f3-17c24ee1ef9b\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-4c5e-4e69-90f3-17c24ee1ef9b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8ed0cf5a-22cc-4564-b72f-b783da23cb50\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:26:07.6310973\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-4c5e-4e69-90f3-17c24ee1ef9b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-b544-4ae7-8c28-e6ab1bfd59dd\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-b544-4ae7-8c28-e6ab1bfd59dd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8ed0cf5a-22cc-4564-b72f-b783da23cb50\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:26:07.6159619\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-b544-4ae7-8c28-e6ab1bfd59dd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-4c5e-4e69-90f3-17c24ee1ef9b\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"05002380-4c5e-4e69-90f3-17c24ee1ef9b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8ed0cf5a-22cc-4564-b72f-b783da23cb50\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-05-09T06:26:09.7927926\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-4c5e-4e69-90f3-17c24ee1ef9b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-4c5e-4e69-90f3-17c24ee1ef9b\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"05002380-4c5e-4e69-90f3-17c24ee1ef9b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8ed0cf5a-22cc-4564-b72f-b783da23cb50\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-05-09T06:26:14.0129546\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-4c5e-4e69-90f3-17c24ee1ef9b\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleCombinedSourcesWithPlayMediaAllTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleCombinedSourcesWithPlayMediaAllTest.json index 4edf9039a5ce..c01ffd969103 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleCombinedSourcesWithPlayMediaAllTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleCombinedSourcesWithPlayMediaAllTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"c10105df-684c-4992-8954-6677ec8f04c1\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-9356-4a4b-888f-eb46bfbfc06f\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-9356-4a4b-888f-eb46bfbfc06f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c10105df-684c-4992-8954-6677ec8f04c1\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:09:15.3831389\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-9356-4a4b-888f-eb46bfbfc06f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-b751-4c98-af4e-e6e6231f7c8d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-b751-4c98-af4e-e6e6231f7c8d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c10105df-684c-4992-8954-6677ec8f04c1\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:09:15.3763301\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-b751-4c98-af4e-e6e6231f7c8d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-9356-4a4b-888f-eb46bfbfc06f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-9356-4a4b-888f-eb46bfbfc06f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c10105df-684c-4992-8954-6677ec8f04c1\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:09:15.3861631\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-9356-4a4b-888f-eb46bfbfc06f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-b751-4c98-af4e-e6e6231f7c8d\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-b751-4c98-af4e-e6e6231f7c8d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c10105df-684c-4992-8954-6677ec8f04c1\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:09:15.4835351\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-b751-4c98-af4e-e6e6231f7c8d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-b751-4c98-af4e-e6e6231f7c8d\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00002680-b751-4c98-af4e-e6e6231f7c8d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c10105df-684c-4992-8954-6677ec8f04c1\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-03-05T05:09:20.0184554\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-b751-4c98-af4e-e6e6231f7c8d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-b751-4c98-af4e-e6e6231f7c8d\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00002680-b751-4c98-af4e-e6e6231f7c8d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c10105df-684c-4992-8954-6677ec8f04c1\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-03-05T05:09:26.42697\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-b751-4c98-af4e-e6e6231f7c8d\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"b641a956-e962-4ffb-9993-08c6ed4a1a93\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-1207-4a02-ae56-87aa52525157\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-1207-4a02-ae56-87aa52525157\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b641a956-e962-4ffb-9993-08c6ed4a1a93\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:25:05.7928444\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-1207-4a02-ae56-87aa52525157\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-1207-4a02-ae56-87aa52525157\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-1207-4a02-ae56-87aa52525157\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b641a956-e962-4ffb-9993-08c6ed4a1a93\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:25:05.9333329\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-1207-4a02-ae56-87aa52525157\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-00b5-49d6-ac0f-72e8f7cb8eb1\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-00b5-49d6-ac0f-72e8f7cb8eb1\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b641a956-e962-4ffb-9993-08c6ed4a1a93\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:25:06.2780157\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-00b5-49d6-ac0f-72e8f7cb8eb1\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-00b5-49d6-ac0f-72e8f7cb8eb1\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-00b5-49d6-ac0f-72e8f7cb8eb1\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b641a956-e962-4ffb-9993-08c6ed4a1a93\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:25:07.1379483\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-00b5-49d6-ac0f-72e8f7cb8eb1\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-00b5-49d6-ac0f-72e8f7cb8eb1\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"05002380-00b5-49d6-ac0f-72e8f7cb8eb1\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b641a956-e962-4ffb-9993-08c6ed4a1a93\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-05-09T06:25:08.514525\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-00b5-49d6-ac0f-72e8f7cb8eb1\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-00b5-49d6-ac0f-72e8f7cb8eb1\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"05002380-00b5-49d6-ac0f-72e8f7cb8eb1\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b641a956-e962-4ffb-9993-08c6ed4a1a93\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-05-09T06:25:14.9397009\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-00b5-49d6-ac0f-72e8f7cb8eb1\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleCombinedSourcesWithPlayMediaTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleCombinedSourcesWithPlayMediaTest.json index 66c0e2e88a74..f85d370904b9 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleCombinedSourcesWithPlayMediaTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleCombinedSourcesWithPlayMediaTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"6a3bdb74-6cca-4964-b544-74c1a9301b8a\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-9832-4e1c-bc5b-5b9acd3b2f7b\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-9832-4e1c-bc5b-5b9acd3b2f7b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"6a3bdb74-6cca-4964-b544-74c1a9301b8a\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:09:35.6617539\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-9832-4e1c-bc5b-5b9acd3b2f7b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-a41a-4aac-9c52-7149a7b0344f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-a41a-4aac-9c52-7149a7b0344f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"6a3bdb74-6cca-4964-b544-74c1a9301b8a\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:09:35.6548122\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-a41a-4aac-9c52-7149a7b0344f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-9832-4e1c-bc5b-5b9acd3b2f7b\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-9832-4e1c-bc5b-5b9acd3b2f7b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"6a3bdb74-6cca-4964-b544-74c1a9301b8a\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:09:35.6562069\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-9832-4e1c-bc5b-5b9acd3b2f7b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-a41a-4aac-9c52-7149a7b0344f\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-a41a-4aac-9c52-7149a7b0344f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"6a3bdb74-6cca-4964-b544-74c1a9301b8a\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:09:35.7724452\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-a41a-4aac-9c52-7149a7b0344f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-9832-4e1c-bc5b-5b9acd3b2f7b\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-9832-4e1c-bc5b-5b9acd3b2f7b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"6a3bdb74-6cca-4964-b544-74c1a9301b8a\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:09:39.8231573\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-9832-4e1c-bc5b-5b9acd3b2f7b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-a41a-4aac-9c52-7149a7b0344f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-a41a-4aac-9c52-7149a7b0344f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"6a3bdb74-6cca-4964-b544-74c1a9301b8a\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:09:39.8231573\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-a41a-4aac-9c52-7149a7b0344f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-a41a-4aac-9c52-7149a7b0344f\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00002680-a41a-4aac-9c52-7149a7b0344f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"6a3bdb74-6cca-4964-b544-74c1a9301b8a\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-03-05T05:09:41.3865239\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-a41a-4aac-9c52-7149a7b0344f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-a41a-4aac-9c52-7149a7b0344f\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00002680-a41a-4aac-9c52-7149a7b0344f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"6a3bdb74-6cca-4964-b544-74c1a9301b8a\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-03-05T05:09:47.8448204\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-a41a-4aac-9c52-7149a7b0344f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-a41a-4aac-9c52-7149a7b0344f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-a41a-4aac-9c52-7149a7b0344f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"6a3bdb74-6cca-4964-b544-74c1a9301b8a\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:09:47.8675283\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-a41a-4aac-9c52-7149a7b0344f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-9832-4e1c-bc5b-5b9acd3b2f7b\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-9832-4e1c-bc5b-5b9acd3b2f7b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"6a3bdb74-6cca-4964-b544-74c1a9301b8a\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:09:47.8637087\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-9832-4e1c-bc5b-5b9acd3b2f7b\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"58b59257-c825-47cf-9ff5-defffba20376\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-900d-4f57-8833-1f3d0c180d61\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-900d-4f57-8833-1f3d0c180d61\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"58b59257-c825-47cf-9ff5-defffba20376\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:25:24.3423439\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-900d-4f57-8833-1f3d0c180d61\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-900d-4f57-8833-1f3d0c180d61\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-900d-4f57-8833-1f3d0c180d61\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"58b59257-c825-47cf-9ff5-defffba20376\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:25:24.4678269\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-900d-4f57-8833-1f3d0c180d61\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2fe7-4c6a-89d5-4c8e6f8b9383\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-2fe7-4c6a-89d5-4c8e6f8b9383\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"58b59257-c825-47cf-9ff5-defffba20376\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:25:24.4678269\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2fe7-4c6a-89d5-4c8e6f8b9383\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2fe7-4c6a-89d5-4c8e6f8b9383\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-2fe7-4c6a-89d5-4c8e6f8b9383\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"58b59257-c825-47cf-9ff5-defffba20376\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:25:24.4834519\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2fe7-4c6a-89d5-4c8e6f8b9383\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-900d-4f57-8833-1f3d0c180d61\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-900d-4f57-8833-1f3d0c180d61\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"58b59257-c825-47cf-9ff5-defffba20376\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:25:28.1576841\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-900d-4f57-8833-1f3d0c180d61\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2fe7-4c6a-89d5-4c8e6f8b9383\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-2fe7-4c6a-89d5-4c8e6f8b9383\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"58b59257-c825-47cf-9ff5-defffba20376\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:25:28.1576841\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2fe7-4c6a-89d5-4c8e6f8b9383\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2fe7-4c6a-89d5-4c8e6f8b9383\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"05002380-2fe7-4c6a-89d5-4c8e6f8b9383\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"58b59257-c825-47cf-9ff5-defffba20376\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-05-09T06:25:29.8627629\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2fe7-4c6a-89d5-4c8e6f8b9383\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2fe7-4c6a-89d5-4c8e6f8b9383\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"05002380-2fe7-4c6a-89d5-4c8e6f8b9383\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"58b59257-c825-47cf-9ff5-defffba20376\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-05-09T06:25:36.2722357\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2fe7-4c6a-89d5-4c8e6f8b9383\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-900d-4f57-8833-1f3d0c180d61\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-900d-4f57-8833-1f3d0c180d61\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"58b59257-c825-47cf-9ff5-defffba20376\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:25:36.3081829\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-900d-4f57-8833-1f3d0c180d61\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWithPlayMediaAllTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWithPlayMediaAllTest.json index e1db7df9cbd4..1130fe2353c7 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWithPlayMediaAllTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWithPlayMediaAllTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"0ae4ce89-1565-4c3c-9480-fc4579d920fe\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-bd9a-4964-abdd-a01fa862c675\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-bd9a-4964-abdd-a01fa862c675\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"0ae4ce89-1565-4c3c-9480-fc4579d920fe\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:08:33.3082004\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-bd9a-4964-abdd-a01fa862c675\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-027c-42c0-958f-ae8be373146f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-027c-42c0-958f-ae8be373146f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"0ae4ce89-1565-4c3c-9480-fc4579d920fe\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:08:33.3144374\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-027c-42c0-958f-ae8be373146f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-027c-42c0-958f-ae8be373146f\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-027c-42c0-958f-ae8be373146f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"0ae4ce89-1565-4c3c-9480-fc4579d920fe\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:08:33.3545829\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-027c-42c0-958f-ae8be373146f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-bd9a-4964-abdd-a01fa862c675\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-bd9a-4964-abdd-a01fa862c675\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"0ae4ce89-1565-4c3c-9480-fc4579d920fe\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:08:33.4025175\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-bd9a-4964-abdd-a01fa862c675\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-bd9a-4964-abdd-a01fa862c675\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00002680-bd9a-4964-abdd-a01fa862c675\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"0ae4ce89-1565-4c3c-9480-fc4579d920fe\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-03-05T05:08:36.2223199\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-bd9a-4964-abdd-a01fa862c675\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-bd9a-4964-abdd-a01fa862c675\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00002680-bd9a-4964-abdd-a01fa862c675\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"0ae4ce89-1565-4c3c-9480-fc4579d920fe\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-03-05T05:08:44.6860623\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-bd9a-4964-abdd-a01fa862c675\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"ee379fad-f9cf-4cd7-9b28-10c002ce0c89\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-44b9-4ade-beb1-812b0ae1e3e9\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-44b9-4ade-beb1-812b0ae1e3e9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"ee379fad-f9cf-4cd7-9b28-10c002ce0c89\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:24:17.9401116\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-44b9-4ade-beb1-812b0ae1e3e9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-6622-4ebc-a875-91d2f493119f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-6622-4ebc-a875-91d2f493119f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"ee379fad-f9cf-4cd7-9b28-10c002ce0c89\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:24:17.9401116\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-6622-4ebc-a875-91d2f493119f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-6622-4ebc-a875-91d2f493119f\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-6622-4ebc-a875-91d2f493119f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"ee379fad-f9cf-4cd7-9b28-10c002ce0c89\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:24:18.0397068\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-6622-4ebc-a875-91d2f493119f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-44b9-4ade-beb1-812b0ae1e3e9\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-44b9-4ade-beb1-812b0ae1e3e9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"ee379fad-f9cf-4cd7-9b28-10c002ce0c89\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:24:18.0810478\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-44b9-4ade-beb1-812b0ae1e3e9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-44b9-4ade-beb1-812b0ae1e3e9\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"05002380-44b9-4ade-beb1-812b0ae1e3e9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"ee379fad-f9cf-4cd7-9b28-10c002ce0c89\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-05-09T06:24:21.4299442\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-44b9-4ade-beb1-812b0ae1e3e9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-44b9-4ade-beb1-812b0ae1e3e9\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"05002380-44b9-4ade-beb1-812b0ae1e3e9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"ee379fad-f9cf-4cd7-9b28-10c002ce0c89\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-05-09T06:24:29.9238185\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-44b9-4ade-beb1-812b0ae1e3e9\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWithPlayMediaTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWithPlayMediaTest.json index 1bec9e689fb4..3a871c193d50 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWithPlayMediaTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWithPlayMediaTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"a13c2afd-1cb4-438c-9184-c6232e38b86a\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9d88-4312-84d1-4e54ff22de3b\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-9d88-4312-84d1-4e54ff22de3b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a13c2afd-1cb4-438c-9184-c6232e38b86a\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:07:51.3167081\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9d88-4312-84d1-4e54ff22de3b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-3574-4a62-9ff0-b4a75afbb8b7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-3574-4a62-9ff0-b4a75afbb8b7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a13c2afd-1cb4-438c-9184-c6232e38b86a\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:07:51.3130214\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-3574-4a62-9ff0-b4a75afbb8b7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-3574-4a62-9ff0-b4a75afbb8b7\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-3574-4a62-9ff0-b4a75afbb8b7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a13c2afd-1cb4-438c-9184-c6232e38b86a\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:07:51.3280513\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-3574-4a62-9ff0-b4a75afbb8b7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9d88-4312-84d1-4e54ff22de3b\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"09002680-9d88-4312-84d1-4e54ff22de3b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a13c2afd-1cb4-438c-9184-c6232e38b86a\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:07:51.4151285\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9d88-4312-84d1-4e54ff22de3b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-3574-4a62-9ff0-b4a75afbb8b7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-3574-4a62-9ff0-b4a75afbb8b7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a13c2afd-1cb4-438c-9184-c6232e38b86a\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:07:55.4615213\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-3574-4a62-9ff0-b4a75afbb8b7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9d88-4312-84d1-4e54ff22de3b\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-9d88-4312-84d1-4e54ff22de3b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a13c2afd-1cb4-438c-9184-c6232e38b86a\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:07:55.4678785\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9d88-4312-84d1-4e54ff22de3b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9d88-4312-84d1-4e54ff22de3b\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"09002680-9d88-4312-84d1-4e54ff22de3b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a13c2afd-1cb4-438c-9184-c6232e38b86a\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-03-05T05:07:56.1592327\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9d88-4312-84d1-4e54ff22de3b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9d88-4312-84d1-4e54ff22de3b\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-9d88-4312-84d1-4e54ff22de3b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a13c2afd-1cb4-438c-9184-c6232e38b86a\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:08:04.7077106\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9d88-4312-84d1-4e54ff22de3b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-9d88-4312-84d1-4e54ff22de3b\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"09002680-9d88-4312-84d1-4e54ff22de3b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a13c2afd-1cb4-438c-9184-c6232e38b86a\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-03-05T05:08:04.6864093\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-9d88-4312-84d1-4e54ff22de3b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-3574-4a62-9ff0-b4a75afbb8b7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-3574-4a62-9ff0-b4a75afbb8b7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a13c2afd-1cb4-438c-9184-c6232e38b86a\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:08:04.7068903\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-3574-4a62-9ff0-b4a75afbb8b7\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"66424ef4-78dd-4a67-b604-207ad1082581\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-53cb-4e96-8580-535de17fedff\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-53cb-4e96-8580-535de17fedff\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"66424ef4-78dd-4a67-b604-207ad1082581\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:34.4102704\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-53cb-4e96-8580-535de17fedff\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2daa-43f1-ad40-aa040156730f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-2daa-43f1-ad40-aa040156730f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"66424ef4-78dd-4a67-b604-207ad1082581\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:34.39918\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2daa-43f1-ad40-aa040156730f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2daa-43f1-ad40-aa040156730f\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-2daa-43f1-ad40-aa040156730f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"66424ef4-78dd-4a67-b604-207ad1082581\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:23:34.4772328\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2daa-43f1-ad40-aa040156730f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-53cb-4e96-8580-535de17fedff\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-53cb-4e96-8580-535de17fedff\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"66424ef4-78dd-4a67-b604-207ad1082581\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:23:34.5549195\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-53cb-4e96-8580-535de17fedff\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-2daa-43f1-ad40-aa040156730f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-2daa-43f1-ad40-aa040156730f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"66424ef4-78dd-4a67-b604-207ad1082581\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:38.6668342\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-2daa-43f1-ad40-aa040156730f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-53cb-4e96-8580-535de17fedff\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-53cb-4e96-8580-535de17fedff\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"66424ef4-78dd-4a67-b604-207ad1082581\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:38.6668342\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-53cb-4e96-8580-535de17fedff\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-53cb-4e96-8580-535de17fedff\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"05002380-53cb-4e96-8580-535de17fedff\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"66424ef4-78dd-4a67-b604-207ad1082581\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-05-09T06:23:39.9079622\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-53cb-4e96-8580-535de17fedff\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-53cb-4e96-8580-535de17fedff\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"05002380-53cb-4e96-8580-535de17fedff\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"66424ef4-78dd-4a67-b604-207ad1082581\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-05-09T06:23:48.4594851\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-53cb-4e96-8580-535de17fedff\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleTextSourcesWithPlayMediaAllTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleTextSourcesWithPlayMediaAllTest.json index f6527fe59285..fbc1c79c1671 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleTextSourcesWithPlayMediaAllTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleTextSourcesWithPlayMediaAllTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"51770722-c7d9-4ea4-bb33-003ac9f5943c\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-38fe-451a-ad0f-591871adeded\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-38fe-451a-ad0f-591871adeded\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"51770722-c7d9-4ea4-bb33-003ac9f5943c\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:09:56.9758725\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-38fe-451a-ad0f-591871adeded\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-54e4-4719-85f5-e0a52ec5ff07\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-54e4-4719-85f5-e0a52ec5ff07\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"51770722-c7d9-4ea4-bb33-003ac9f5943c\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:09:56.9608317\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-54e4-4719-85f5-e0a52ec5ff07\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-38fe-451a-ad0f-591871adeded\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-38fe-451a-ad0f-591871adeded\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"51770722-c7d9-4ea4-bb33-003ac9f5943c\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:09:56.9915383\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-38fe-451a-ad0f-591871adeded\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-54e4-4719-85f5-e0a52ec5ff07\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-54e4-4719-85f5-e0a52ec5ff07\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"51770722-c7d9-4ea4-bb33-003ac9f5943c\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:09:57.1219019\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-54e4-4719-85f5-e0a52ec5ff07\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-38fe-451a-ad0f-591871adeded\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-38fe-451a-ad0f-591871adeded\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"51770722-c7d9-4ea4-bb33-003ac9f5943c\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:10:01.3020749\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-38fe-451a-ad0f-591871adeded\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-54e4-4719-85f5-e0a52ec5ff07\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-54e4-4719-85f5-e0a52ec5ff07\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"51770722-c7d9-4ea4-bb33-003ac9f5943c\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:10:01.3020749\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-54e4-4719-85f5-e0a52ec5ff07\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-54e4-4719-85f5-e0a52ec5ff07\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00002680-54e4-4719-85f5-e0a52ec5ff07\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"51770722-c7d9-4ea4-bb33-003ac9f5943c\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-03-05T05:10:02.8798758\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-54e4-4719-85f5-e0a52ec5ff07\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-54e4-4719-85f5-e0a52ec5ff07\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00002680-54e4-4719-85f5-e0a52ec5ff07\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"51770722-c7d9-4ea4-bb33-003ac9f5943c\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-03-05T05:10:07.3180004\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-54e4-4719-85f5-e0a52ec5ff07\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-54e4-4719-85f5-e0a52ec5ff07\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-54e4-4719-85f5-e0a52ec5ff07\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"51770722-c7d9-4ea4-bb33-003ac9f5943c\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:10:07.3337147\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-54e4-4719-85f5-e0a52ec5ff07\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"b2675d33-fa7b-482e-81b4-56575b99b3ca\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-93e9-4a02-ba6a-28991902f263\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-93e9-4a02-ba6a-28991902f263\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b2675d33-fa7b-482e-81b4-56575b99b3ca\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:25:46.6014278\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-93e9-4a02-ba6a-28991902f263\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-d141-4c4e-8e87-9071728e9255\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-d141-4c4e-8e87-9071728e9255\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b2675d33-fa7b-482e-81b4-56575b99b3ca\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:25:46.6014278\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-d141-4c4e-8e87-9071728e9255\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-93e9-4a02-ba6a-28991902f263\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-93e9-4a02-ba6a-28991902f263\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b2675d33-fa7b-482e-81b4-56575b99b3ca\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:25:46.7125669\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-93e9-4a02-ba6a-28991902f263\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-d141-4c4e-8e87-9071728e9255\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-d141-4c4e-8e87-9071728e9255\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b2675d33-fa7b-482e-81b4-56575b99b3ca\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:25:46.7125669\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-d141-4c4e-8e87-9071728e9255\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-d141-4c4e-8e87-9071728e9255\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-d141-4c4e-8e87-9071728e9255\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b2675d33-fa7b-482e-81b4-56575b99b3ca\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:25:49.393651\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-d141-4c4e-8e87-9071728e9255\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-93e9-4a02-ba6a-28991902f263\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-93e9-4a02-ba6a-28991902f263\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b2675d33-fa7b-482e-81b4-56575b99b3ca\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:25:49.3943285\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-93e9-4a02-ba6a-28991902f263\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-d141-4c4e-8e87-9071728e9255\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"05002380-d141-4c4e-8e87-9071728e9255\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b2675d33-fa7b-482e-81b4-56575b99b3ca\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-05-09T06:25:50.3558059\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-d141-4c4e-8e87-9071728e9255\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-d141-4c4e-8e87-9071728e9255\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"05002380-d141-4c4e-8e87-9071728e9255\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b2675d33-fa7b-482e-81b4-56575b99b3ca\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-05-09T06:25:54.7561892\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-d141-4c4e-8e87-9071728e9255\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-d141-4c4e-8e87-9071728e9255\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-d141-4c4e-8e87-9071728e9255\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b2675d33-fa7b-482e-81b4-56575b99b3ca\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:25:54.8037228\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-d141-4c4e-8e87-9071728e9255\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleTextSourcesWithPlayMediaTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleTextSourcesWithPlayMediaTest.json index a76333f087e4..f9db99df2976 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleTextSourcesWithPlayMediaTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleTextSourcesWithPlayMediaTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"e1d3849d-2d55-497a-8829-9def9e225787\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-0aa8-4f75-891a-5aec1a28d4ef\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-0aa8-4f75-891a-5aec1a28d4ef\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e1d3849d-2d55-497a-8829-9def9e225787\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:08:13.9102397\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-0aa8-4f75-891a-5aec1a28d4ef\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-5942-4ba1-9078-66ccb0671665\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-5942-4ba1-9078-66ccb0671665\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e1d3849d-2d55-497a-8829-9def9e225787\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:08:13.9102397\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-5942-4ba1-9078-66ccb0671665\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-0aa8-4f75-891a-5aec1a28d4ef\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-0aa8-4f75-891a-5aec1a28d4ef\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e1d3849d-2d55-497a-8829-9def9e225787\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:08:13.925914\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-0aa8-4f75-891a-5aec1a28d4ef\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-5942-4ba1-9078-66ccb0671665\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-5942-4ba1-9078-66ccb0671665\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e1d3849d-2d55-497a-8829-9def9e225787\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:08:13.9739143\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-5942-4ba1-9078-66ccb0671665\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-5942-4ba1-9078-66ccb0671665\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-5942-4ba1-9078-66ccb0671665\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e1d3849d-2d55-497a-8829-9def9e225787\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:08:18.1852333\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-5942-4ba1-9078-66ccb0671665\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-0aa8-4f75-891a-5aec1a28d4ef\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-0aa8-4f75-891a-5aec1a28d4ef\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e1d3849d-2d55-497a-8829-9def9e225787\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:08:18.1852333\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-0aa8-4f75-891a-5aec1a28d4ef\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-5942-4ba1-9078-66ccb0671665\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00002680-5942-4ba1-9078-66ccb0671665\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e1d3849d-2d55-497a-8829-9def9e225787\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-03-05T05:08:19.9953987\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-5942-4ba1-9078-66ccb0671665\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-5942-4ba1-9078-66ccb0671665\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00002680-5942-4ba1-9078-66ccb0671665\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e1d3849d-2d55-497a-8829-9def9e225787\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-03-05T05:08:24.4084005\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-5942-4ba1-9078-66ccb0671665\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-5942-4ba1-9078-66ccb0671665\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-5942-4ba1-9078-66ccb0671665\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e1d3849d-2d55-497a-8829-9def9e225787\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:08:24.4558662\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-5942-4ba1-9078-66ccb0671665\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"73b8e240-168a-42b2-87b7-c14e7a029899\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-6572-4a21-a960-603c09e8a965\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-6572-4a21-a960-603c09e8a965\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"73b8e240-168a-42b2-87b7-c14e7a029899\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:57.7634221\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-6572-4a21-a960-603c09e8a965\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-836a-4edf-8d00-4818e397be39\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-836a-4edf-8d00-4818e397be39\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"73b8e240-168a-42b2-87b7-c14e7a029899\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:23:57.7951669\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-836a-4edf-8d00-4818e397be39\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-6572-4a21-a960-603c09e8a965\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-6572-4a21-a960-603c09e8a965\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"73b8e240-168a-42b2-87b7-c14e7a029899\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:23:57.8867833\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-6572-4a21-a960-603c09e8a965\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-836a-4edf-8d00-4818e397be39\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"05002380-836a-4edf-8d00-4818e397be39\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"73b8e240-168a-42b2-87b7-c14e7a029899\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-09T06:23:57.8895209\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-836a-4edf-8d00-4818e397be39\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-836a-4edf-8d00-4818e397be39\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-836a-4edf-8d00-4818e397be39\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"73b8e240-168a-42b2-87b7-c14e7a029899\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:24:02.5315182\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-836a-4edf-8d00-4818e397be39\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-6572-4a21-a960-603c09e8a965\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-6572-4a21-a960-603c09e8a965\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"73b8e240-168a-42b2-87b7-c14e7a029899\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:24:02.5315182\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-6572-4a21-a960-603c09e8a965\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-836a-4edf-8d00-4818e397be39\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"05002380-836a-4edf-8d00-4818e397be39\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"73b8e240-168a-42b2-87b7-c14e7a029899\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-05-09T06:24:04.4690248\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-836a-4edf-8d00-4818e397be39\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-836a-4edf-8d00-4818e397be39\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"05002380-836a-4edf-8d00-4818e397be39\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"73b8e240-168a-42b2-87b7-c14e7a029899\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-05-09T06:24:08.9174317\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-836a-4edf-8d00-4818e397be39\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/05002380-6572-4a21-a960-603c09e8a965\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"05002380-6572-4a21-a960-603c09e8a965\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"73b8e240-168a-42b2-87b7-c14e7a029899\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-09T06:24:08.9487782\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/05002380-6572-4a21-a960-603c09e8a965\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/swagger/README.md b/sdk/communication/azure-communication-callautomation/swagger/README.md index bc1b9f104b5a..6ba3fdd90494 100644 --- a/sdk/communication/azure-communication-callautomation/swagger/README.md +++ b/sdk/communication/azure-communication-callautomation/swagger/README.md @@ -29,10 +29,10 @@ autorest README.md --java --v4 ### Code generation settings ``` yaml -tag: package-2024-09-01-preview +tag: package-2025-05-15 use: '@autorest/java@4.1.29' require: - - https://github.com/Azure/azure-rest-api-specs/blob/d1bedfa9c084a2e3f9cbeb075c532d691c3c0095/specification/communication/data-plane/CallAutomation/readme.md + - https://github.com/Azure/azure-rest-api-specs/blob/8bf7f264d186b52eccb579accd3f584788511049/specification/communication/data-plane/CallAutomation/readme.md java: true output-folder: ../ license-header: MICROSOFT_MIT_SMALL @@ -157,12 +157,18 @@ directive: - rename-model: from: MediaStreamingOptions to: MediaStreamingOptionsInternal +- rename-model: + from: WebSocketMediaStreamingOptions + to: WebSocketMediaStreamingOptionsInternal - rename-model: from: MediaStreamingSubscription to: MediaStreamingSubscriptionInternal - rename-model: from: TranscriptionSubscription to: TranscriptionSubscriptionInternal +- rename-model: + from: WebSocketTranscriptionOptions + to: WebSocketTranscriptionOptionsInternal - rename-model: from: DtmfOptions to: DtmfOptionsInternal