diff --git a/sdk/communication/Azure.Communication.CallingServer/api/Azure.Communication.CallingServer.netstandard2.0.cs b/sdk/communication/Azure.Communication.CallingServer/api/Azure.Communication.CallingServer.netstandard2.0.cs index ee57f650c760d..59092993878c2 100644 --- a/sdk/communication/Azure.Communication.CallingServer/api/Azure.Communication.CallingServer.netstandard2.0.cs +++ b/sdk/communication/Azure.Communication.CallingServer/api/Azure.Communication.CallingServer.netstandard2.0.cs @@ -65,6 +65,12 @@ protected CallingServerClient() { } public CallingServerClient(string connectionString, Azure.Communication.CallingServer.CallingServerClientOptions options = null) { } public virtual Azure.Response CreateCallConnection(Azure.Communication.CommunicationIdentifier source, System.Collections.Generic.IEnumerable targets, Azure.Communication.CallingServer.CreateCallOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateCallConnectionAsync(Azure.Communication.CommunicationIdentifier source, System.Collections.Generic.IEnumerable targets, Azure.Communication.CallingServer.CreateCallOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DownloadStreaming(System.Uri sourceEndpoint, Azure.HttpRange range = default(Azure.HttpRange), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DownloadStreamingAsync(System.Uri sourceEndpoint, Azure.HttpRange range = default(Azure.HttpRange), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DownloadTo(System.Uri sourceEndpoint, System.IO.Stream destinationStream, Azure.Communication.CallingServer.ContentTransferOptions transferOptions = default(Azure.Communication.CallingServer.ContentTransferOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DownloadTo(System.Uri sourceEndpoint, string destinationPath, Azure.Communication.CallingServer.ContentTransferOptions transferOptions = default(Azure.Communication.CallingServer.ContentTransferOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DownloadToAsync(System.Uri sourceEndpoint, System.IO.Stream destinationStream, Azure.Communication.CallingServer.ContentTransferOptions transferOptions = default(Azure.Communication.CallingServer.ContentTransferOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DownloadToAsync(System.Uri sourceEndpoint, string destinationPath, Azure.Communication.CallingServer.ContentTransferOptions transferOptions = default(Azure.Communication.CallingServer.ContentTransferOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Communication.CallingServer.CallConnection GetCallConnection(string callConnectionId) { throw null; } public virtual Azure.Communication.CallingServer.ServerCall InitializeServerCall(string serverCallId) { throw null; } public virtual Azure.Response JoinCall(string serverCallId, Azure.Communication.CommunicationIdentifier source, Azure.Communication.CallingServer.JoinCallOptions callOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -204,15 +210,6 @@ public partial class CreateCallResult internal CreateCallResult() { } public string CallConnectionId { get { throw null; } } } - public static partial class DownloadExtentions - { - public static Azure.Response DownloadStreaming(this Azure.Communication.CallingServer.CallingServerClient callingServerClient, System.Uri sourceEndpoint, Azure.HttpRange range = default(Azure.HttpRange), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> DownloadStreamingAsync(this Azure.Communication.CallingServer.CallingServerClient callingServerClient, System.Uri sourceEndpoint, Azure.HttpRange range = default(Azure.HttpRange), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response DownloadTo(this Azure.Communication.CallingServer.CallingServerClient callingServerClient, System.Uri sourceEndpoint, System.IO.Stream destinationStream, Azure.Communication.CallingServer.ContentTransferOptions transferOptions = default(Azure.Communication.CallingServer.ContentTransferOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response DownloadTo(this Azure.Communication.CallingServer.CallingServerClient callingServerClient, System.Uri sourceEndpoint, string destinationPath, Azure.Communication.CallingServer.ContentTransferOptions transferOptions = default(Azure.Communication.CallingServer.ContentTransferOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task DownloadToAsync(this Azure.Communication.CallingServer.CallingServerClient callingServerClient, System.Uri sourceEndpoint, System.IO.Stream destinationStream, Azure.Communication.CallingServer.ContentTransferOptions transferOptions = default(Azure.Communication.CallingServer.ContentTransferOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task DownloadToAsync(this Azure.Communication.CallingServer.CallingServerClient callingServerClient, System.Uri sourceEndpoint, string destinationPath, Azure.Communication.CallingServer.ContentTransferOptions transferOptions = default(Azure.Communication.CallingServer.ContentTransferOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct EventSubscriptionType : System.IEquatable { diff --git a/sdk/communication/Azure.Communication.CallingServer/src/CallingServerClient.cs b/sdk/communication/Azure.Communication.CallingServer/src/CallingServerClient.cs index d7e6338aea9b7..d8b90fa3fc4d0 100644 --- a/sdk/communication/Azure.Communication.CallingServer/src/CallingServerClient.cs +++ b/sdk/communication/Azure.Communication.CallingServer/src/CallingServerClient.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -44,14 +45,6 @@ private CallingServerClient(ConnectionString connectionString, CallingServerClie : this(connectionString.GetRequired("endpoint"), options.BuildHttpPipeline(connectionString), options) { } - private CallingServerClient(string endpoint, TokenCredential tokenCredential, CallingServerClientOptions options) - : this(endpoint, options.BuildHttpPipeline(tokenCredential), options) - { } - - private CallingServerClient(string endpoint, AzureKeyCredential keyCredential, CallingServerClientOptions options) - : this(endpoint, options.BuildHttpPipeline(keyCredential), options) - { } - private CallingServerClient(string endpoint, HttpPipeline httpPipeline, CallingServerClientOptions options) { _pipeline = httpPipeline; @@ -275,5 +268,202 @@ public virtual ServerCall InitializeServerCall(string serverCallId) throw; } } + + /// + /// The + /// operation downloads the recording's content. + /// + /// + /// + /// Recording's content's url location. + /// + /// + /// If provided, only download the bytes of the content in the specified range. + /// If not provided, download the entire content. + /// + /// + /// Optional to propagate + /// notifications that the operation should be cancelled. + /// + /// + /// A containing the + /// downloaded content. + /// + /// + /// A will be thrown if + /// a failure occurs. + /// + public virtual async Task> DownloadStreamingAsync( + Uri sourceEndpoint, + HttpRange range = default, + CancellationToken cancellationToken = default) => + await _contentDownloader.DownloadStreamingInternal( + sourceEndpoint, + range, + async: true, + cancellationToken) + .ConfigureAwait(false); + + /// + /// The + /// operation downloads the recording's content. + /// + /// + /// + /// Recording's content's url location. + /// + /// + /// If provided, only download the bytes of the content in the specified range. + /// If not provided, download the entire content. + /// + /// + /// Optional to propagate + /// notifications that the operation should be cancelled. + /// + /// + /// A containing the + /// downloaded content. + /// + /// + /// A will be thrown if + /// a failure occurs. + /// + public virtual Response DownloadStreaming( + Uri sourceEndpoint, + HttpRange range = default, + CancellationToken cancellationToken = default) => + _contentDownloader.DownloadStreamingInternal( + sourceEndpoint, + range, + async: false, + cancellationToken) + .EnsureCompleted(); + + /// + /// The + /// operation downloads the specified content using parallel requests, + /// and writes the content to . + /// + /// + /// A with the Recording's content's url location. + /// + /// + /// A to write the downloaded content to. + /// + /// + /// Optional to configure + /// parallel transfer behavior. + /// + /// + /// Optional to propagate + /// notifications that the operation should be cancelled. + /// + /// + /// A describing the operation. + /// + /// + /// A will be thrown if + /// a failure occurs. + /// + public virtual Response DownloadTo(Uri sourceEndpoint, Stream destinationStream, + ContentTransferOptions transferOptions = default, CancellationToken cancellationToken = default) => + _contentDownloader.StagedDownloadAsync(sourceEndpoint, destinationStream, transferOptions, async: false, cancellationToken: cancellationToken).EnsureCompleted(); + + /// + /// The + /// operation downloads the specified content using parallel requests, + /// and writes the content to . + /// + /// + /// A with the Recording's content's url location. + /// + /// + /// A to write the downloaded content to. + /// + /// + /// Optional to configure + /// parallel transfer behavior. + /// + /// + /// Optional to propagate + /// notifications that the operation should be cancelled. + /// + /// + /// A describing the operation. + /// + /// + /// A will be thrown if + /// a failure occurs. + /// + public virtual async Task DownloadToAsync(Uri sourceEndpoint, Stream destinationStream, ContentTransferOptions transferOptions = default, CancellationToken cancellationToken = default) => + await _contentDownloader.StagedDownloadAsync(sourceEndpoint, destinationStream, transferOptions, async: true, cancellationToken: cancellationToken).ConfigureAwait(false); + + /// + /// The + /// operation downloads the specified content using parallel requests, + /// and writes the content to . + /// + /// + /// A with the Recording's content's url location. + /// + /// + /// A file path to write the downloaded content to. + /// + /// + /// Optional to configure + /// parallel transfer behavior. + /// + /// + /// Optional to propagate + /// notifications that the operation should be cancelled. + /// + /// + /// A describing the operation. + /// + /// + /// A will be thrown if + /// a failure occurs. + /// + public virtual Response DownloadTo(Uri sourceEndpoint, string destinationPath, + ContentTransferOptions transferOptions = default, CancellationToken cancellationToken = default) + { + using Stream destination = File.Create(destinationPath); + return _contentDownloader.StagedDownloadAsync(sourceEndpoint, destination, transferOptions, + async: false, cancellationToken: cancellationToken).EnsureCompleted(); + } + + /// + /// The + /// operation downloads the specified content using parallel requests, + /// and writes the content to . + /// + /// + /// A with the Recording's content's url location. + /// + /// + /// A file path to write the downloaded content to. + /// + /// + /// Optional to configure + /// parallel transfer behavior. + /// + /// + /// Optional to propagate + /// notifications that the operation should be cancelled. + /// + /// + /// A describing the operation. + /// + /// + /// A will be thrown if + /// a failure occurs. + /// + public virtual async Task DownloadToAsync(Uri sourceEndpoint, string destinationPath, + ContentTransferOptions transferOptions = default, CancellationToken cancellationToken = default) + { + using Stream destination = File.Create(destinationPath); + return await _contentDownloader.StagedDownloadAsync(sourceEndpoint, destination, transferOptions, + async: true, cancellationToken: cancellationToken).ConfigureAwait(false); + } } } diff --git a/sdk/communication/Azure.Communication.CallingServer/src/Downloader/DownloadExtentions.cs b/sdk/communication/Azure.Communication.CallingServer/src/Downloader/DownloadExtentions.cs deleted file mode 100644 index 555c03259abfd..0000000000000 --- a/sdk/communication/Azure.Communication.CallingServer/src/Downloader/DownloadExtentions.cs +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.IO; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core.Pipeline; - -namespace Azure.Communication.CallingServer -{ - /// - /// CallingServerClient _contentDownloader methods extentions class. - /// - public static class DownloadExtentions - { - /// - /// The - /// operation downloads the recording's content. - /// - /// - /// - /// The Azure Communication Services Calling Server client. - /// - /// - /// Recording's content's url location. - /// - /// - /// If provided, only download the bytes of the content in the specified range. - /// If not provided, download the entire content. - /// - /// - /// Optional to propagate - /// notifications that the operation should be cancelled. - /// - /// - /// A containing the - /// downloaded content. - /// - /// - /// A will be thrown if - /// a failure occurs. - /// - public static async Task> DownloadStreamingAsync( - this CallingServerClient callingServerClient, - Uri sourceEndpoint, - HttpRange range = default, - CancellationToken cancellationToken = default) => - await callingServerClient._contentDownloader.DownloadStreamingInternal( - sourceEndpoint, - range, - async: true, - cancellationToken) - .ConfigureAwait(false); - - /// - /// The - /// operation downloads the recording's content. - /// - /// - /// - /// The Azure Communication Services Calling Server client. - /// - /// - /// Recording's content's url location. - /// - /// - /// If provided, only download the bytes of the content in the specified range. - /// If not provided, download the entire content. - /// - /// - /// Optional to propagate - /// notifications that the operation should be cancelled. - /// - /// - /// A containing the - /// downloaded content. - /// - /// - /// A will be thrown if - /// a failure occurs. - /// - public static Response DownloadStreaming( - this CallingServerClient callingServerClient, - Uri sourceEndpoint, - HttpRange range = default, - CancellationToken cancellationToken = default) => - callingServerClient._contentDownloader.DownloadStreamingInternal( - sourceEndpoint, - range, - async: false, - cancellationToken) - .EnsureCompleted(); - - /// - /// The - /// operation downloads the specified content using parallel requests, - /// and writes the content to . - /// - /// - /// The Azure Communication Services Calling Server client. - /// - /// - /// A with the Recording's content's url location. - /// - /// - /// A to write the downloaded content to. - /// - /// - /// Optional to configure - /// parallel transfer behavior. - /// - /// - /// Optional to propagate - /// notifications that the operation should be cancelled. - /// - /// - /// A describing the operation. - /// - /// - /// A will be thrown if - /// a failure occurs. - /// - public static Response DownloadTo(this CallingServerClient callingServerClient, Uri sourceEndpoint, Stream destinationStream, - ContentTransferOptions transferOptions = default, CancellationToken cancellationToken = default) => - callingServerClient._contentDownloader.StagedDownloadAsync(sourceEndpoint, destinationStream, transferOptions, async: false, cancellationToken: cancellationToken).EnsureCompleted(); - - /// - /// The - /// operation downloads the specified content using parallel requests, - /// and writes the content to . - /// - /// - /// The Azure Communication Services Calling Server client. - /// - /// - /// A with the Recording's content's url location. - /// - /// - /// A to write the downloaded content to. - /// - /// - /// Optional to configure - /// parallel transfer behavior. - /// - /// - /// Optional to propagate - /// notifications that the operation should be cancelled. - /// - /// - /// A describing the operation. - /// - /// - /// A will be thrown if - /// a failure occurs. - /// - public static async Task DownloadToAsync(this CallingServerClient callingServerClient, Uri sourceEndpoint, Stream destinationStream, ContentTransferOptions transferOptions = default, CancellationToken cancellationToken = default) => - await callingServerClient._contentDownloader.StagedDownloadAsync(sourceEndpoint, destinationStream, transferOptions, async: true, cancellationToken: cancellationToken).ConfigureAwait(false); - - /// - /// The - /// operation downloads the specified content using parallel requests, - /// and writes the content to . - /// - /// - /// The Azure Communication Services Calling Server client. - /// - /// - /// A with the Recording's content's url location. - /// - /// - /// A file path to write the downloaded content to. - /// - /// - /// Optional to configure - /// parallel transfer behavior. - /// - /// - /// Optional to propagate - /// notifications that the operation should be cancelled. - /// - /// - /// A describing the operation. - /// - /// - /// A will be thrown if - /// a failure occurs. - /// - public static Response DownloadTo(this CallingServerClient callingServerClient, Uri sourceEndpoint, string destinationPath, - ContentTransferOptions transferOptions = default, CancellationToken cancellationToken = default) - { - using Stream destination = File.Create(destinationPath); - return callingServerClient._contentDownloader.StagedDownloadAsync(sourceEndpoint, destination, transferOptions, - async: false, cancellationToken: cancellationToken).EnsureCompleted(); - } - - /// - /// The - /// operation downloads the specified content using parallel requests, - /// and writes the content to . - /// - /// - /// The Azure Communication Services Calling Server client. - /// - /// - /// A with the Recording's content's url location. - /// - /// - /// A file path to write the downloaded content to. - /// - /// - /// Optional to configure - /// parallel transfer behavior. - /// - /// - /// Optional to propagate - /// notifications that the operation should be cancelled. - /// - /// - /// A describing the operation. - /// - /// - /// A will be thrown if - /// a failure occurs. - /// - public static async Task DownloadToAsync(this CallingServerClient callingServerClient, Uri sourceEndpoint, string destinationPath, - ContentTransferOptions transferOptions = default, CancellationToken cancellationToken = default) - { - using Stream destination = File.Create(destinationPath); - return await callingServerClient._contentDownloader.StagedDownloadAsync(sourceEndpoint, destination, transferOptions, - async: true, cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallConnection/CallConnectionLiveTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/CallConnection/CallConnectionLiveTests.cs new file mode 100644 index 0000000000000..a65f7d8fa7bf2 --- /dev/null +++ b/sdk/communication/Azure.Communication.CallingServer/tests/CallConnection/CallConnectionLiveTests.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#region Snippet:Azure_Communication_ServerCalling_Tests_UsingStatements +using System; +using System.Collections.Generic; +//@@ using Azure.Communication.CallingServer; +#endregion Snippet:Azure_Communication_ServerCalling_Tests_UsingStatements +using Azure.Communication.Identity; + +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.Communication.CallingServer.Tests +{ + /// + /// The suite of tests for the class. + /// + /// + /// These tests have a dependency on live Azure services and may incur costs for the associated + /// Azure subscription. + /// + public class CallConnectionLiveTests : CallingServerLiveTestBase + { + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public CallConnectionLiveTests(bool isAsync) : base(isAsync) + { + } + + [Test] + public async Task RunCreatePlayCancelHangupScenarioTests() + { + CallingServerClient client = CreateInstrumentedCallingServerClient(); + try + { + // Establish a Call + var callConnection = await CreateCallConnectionOperation(client).ConfigureAwait(false); + + // Play Prompt Audio + await SleepIfNotInPlaybackModeAsync().ConfigureAwait(false); + await PlayAudioOperation(callConnection).ConfigureAwait(false); + + // Cancel Prompt Audio + await SleepIfNotInPlaybackModeAsync().ConfigureAwait(false); + await CancelAllMediaOperationsOperation(callConnection).ConfigureAwait(false); + + // Hang up the Call, there is one call leg in this test case, hangup the call will also delete the call as the result. + await SleepIfNotInPlaybackModeAsync().ConfigureAwait(false); + await HangupOperation(callConnection).ConfigureAwait(false); + } + catch (RequestFailedException ex) + { + Console.WriteLine(ex.Message); + Assert.Fail($"Unexpected error: {ex}"); + } + catch (Exception ex) + { + Assert.Fail($"Unexpected error: {ex}"); + } + } + + [Test] + public async Task RunCreateAddRemoveHangupScenarioTests() + { + CallingServerClient client = CreateInstrumentedCallingServerClient(); + try + { + // Establish a call + var callConnection = await CreateCallConnectionOperation(client).ConfigureAwait(false); + + // Add Participant + await SleepIfNotInPlaybackModeAsync().ConfigureAwait(false); + var participantId = await AddParticipantOperation(callConnection).ConfigureAwait(false); + + // Remove Participant + await SleepIfNotInPlaybackModeAsync().ConfigureAwait(false); + await RemoveParticipantOperation(callConnection, participantId).ConfigureAwait(false); + + // Hang up the Call, there is one call leg in this test case, hangup the call will also delete the call as the result. + await SleepIfNotInPlaybackModeAsync().ConfigureAwait(false); + await HangupOperation(callConnection).ConfigureAwait(false); + } + catch (RequestFailedException ex) + { + Console.WriteLine(ex.Message); + Assert.Fail($"Unexpected error: {ex}"); + } + catch (Exception ex) + { + Assert.Fail($"Unexpected error: {ex}"); + } + } + } +} diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClients/CallConnectionTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/CallConnection/CallConnectionTests.cs similarity index 62% rename from sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClients/CallConnectionTests.cs rename to sdk/communication/Azure.Communication.CallingServer/tests/CallConnection/CallConnectionTests.cs index 17a56ca5ebd86..c4810d104ad48 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClients/CallConnectionTests.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/CallConnection/CallConnectionTests.cs @@ -43,7 +43,6 @@ public async Task HangupCallAsync_Passes(string callConnectionId) var callConnection = CreateMockCallConnection(202, callConnectionId: callConnectionId); var response = await callConnection.HangupAsync().ConfigureAwait(false); - Assert.AreEqual((int)HttpStatusCode.Accepted, response.Status); } @@ -53,17 +52,35 @@ public void HangupCall_Passes(string callConnectionId) var callConnection = CreateMockCallConnection(202, callConnectionId: callConnectionId); var response = callConnection.Hangup(); - Assert.AreEqual((int)HttpStatusCode.Accepted, response.Status); } + [TestCaseSource(nameof(TestData_CallConnectionId))] + public void HangupCallAsync_Failed(string callConnectionId) + { + var callConnection = CreateMockCallConnection(404); + + RequestFailedException? ex = Assert.ThrowsAsync(async () => await callConnection.HangupAsync().ConfigureAwait(false)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_CallConnectionId))] + public void HangupCall_Failed(string callConnectionId) + { + var callConnection = CreateMockCallConnection(404); + + RequestFailedException? ex = Assert.Throws(() => callConnection.Hangup()); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + [TestCaseSource(nameof(TestData_CallConnectionId))] public async Task CancelAllMediaOperationsAsync_Passes(string callConnectionId) { var callConnection = CreateMockCallConnection(200, CancelAllMediaOperaionsResponsePayload, callConnectionId: callConnectionId); var result = await callConnection.CancelAllMediaOperationsAsync().ConfigureAwait(false); - VerifyCancelAllMediaOperationsResult(result); } @@ -73,17 +90,35 @@ public void CancelAllMediaOperations_Passes(string callConnectionId) var callConnection = CreateMockCallConnection(200, CancelAllMediaOperaionsResponsePayload, callConnectionId: callConnectionId); var result = callConnection.CancelAllMediaOperations(); - VerifyCancelAllMediaOperationsResult(result); } + [TestCaseSource(nameof(TestData_CallConnectionId))] + public void CancelAllMediaOperationsAsync_Failed(string callConnectionId) + { + var callConnection = CreateMockCallConnection(404); + + RequestFailedException? ex = Assert.ThrowsAsync(async () => await callConnection.CancelAllMediaOperationsAsync().ConfigureAwait(false)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_CallConnectionId))] + public void CancelAllMediaOperations_Failed(string callConnectionId) + { + var callConnection = CreateMockCallConnection(404); + + RequestFailedException? ex = Assert.Throws(() => callConnection.CancelAllMediaOperations()); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + [TestCaseSource(nameof(TestData_PlayAudio))] public async Task PlayAudioAsync_Passes(Uri sampleAudioFileUri, string sampleAudioFileId, Uri sampleCallbackUri, string sampleOperationContext) { var callConnection = CreateMockCallConnection(202, PlayAudioResponsePayload); var result = await callConnection.PlayAudioAsync(sampleAudioFileUri, false, sampleAudioFileId, sampleCallbackUri, sampleOperationContext).ConfigureAwait(false); - VerifyPlayAudioResult(result); } @@ -93,10 +128,29 @@ public void PlayAudio_Passes(Uri sampleAudioFileUri, string sampleAudioFileId, U var callConnection = CreateMockCallConnection(202, PlayAudioResponsePayload); var result = callConnection.PlayAudio(sampleAudioFileUri, false, sampleAudioFileId, sampleCallbackUri, sampleOperationContext); - VerifyPlayAudioResult(result); } + [TestCaseSource(nameof(TestData_PlayAudio))] + public void PlayAudioAsync_Failed(Uri sampleAudioFileUri, string sampleAudioFileId, Uri sampleCallbackUri, string sampleOperationContext) + { + var callConnection = CreateMockCallConnection(404); + + RequestFailedException? ex = Assert.ThrowsAsync(async () => await callConnection.PlayAudioAsync(sampleAudioFileUri, false, sampleAudioFileId, sampleCallbackUri, sampleOperationContext).ConfigureAwait(false)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_PlayAudio))] + public void PlayAudio_Failed(Uri sampleAudioFileUri, string sampleAudioFileId, Uri sampleCallbackUri, string sampleOperationContext) + { + var callConnection = CreateMockCallConnection(404); + + RequestFailedException? ex = Assert.Throws(() => callConnection.PlayAudio(sampleAudioFileUri, false, sampleAudioFileId, sampleCallbackUri, sampleOperationContext)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + [TestCaseSource(nameof(TestData_PlayAudio))] public async Task PlayAudioAsyncOverload_Passes(Uri sampleAudioFileUri, string sampleAudioFileId, Uri sampleCallbackUri, string sampleOperationContext) { @@ -112,7 +166,6 @@ public async Task PlayAudioAsyncOverload_Passes(Uri sampleAudioFileUri, string s }; var result = await callConnection.PlayAudioAsync(playAudio).ConfigureAwait(false); - VerifyPlayAudioResult(result); } @@ -131,17 +184,53 @@ public void PlayAudioOverload_Passes(Uri sampleAudioFileUri, string sampleAudioF }; var result = callConnection.PlayAudio(playAudio); - VerifyPlayAudioResult(result); } + [TestCaseSource(nameof(TestData_PlayAudio))] + public void PlayAudioAsyncOverload_Failed(Uri sampleAudioFileUri, string sampleAudioFileId, Uri sampleCallbackUri, string sampleOperationContext) + { + var callConnection = CreateMockCallConnection(404); + + var playAudio = new PlayAudioOptions() + { + AudioFileUri = sampleAudioFileUri, + AudioFileId = sampleAudioFileId, + CallbackUri = sampleCallbackUri, + Loop = false, + OperationContext = sampleOperationContext + }; + + RequestFailedException? ex = Assert.ThrowsAsync(async () => await callConnection.PlayAudioAsync(playAudio).ConfigureAwait(false)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_PlayAudio))] + public void PlayAudioOverload_Failed(Uri sampleAudioFileUri, string sampleAudioFileId, Uri sampleCallbackUri, string sampleOperationContext) + { + var callConnection = CreateMockCallConnection(404); + + var playAudio = new PlayAudioOptions() + { + AudioFileUri = sampleAudioFileUri, + AudioFileId = sampleAudioFileId, + CallbackUri = sampleCallbackUri, + Loop = false, + OperationContext = sampleOperationContext + }; + + RequestFailedException? ex = Assert.Throws(() => callConnection.PlayAudio(playAudio)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + [TestCaseSource(nameof(TestData_AddParticipant))] public async Task AddParticipantsAsync_Passes(CommunicationIdentifier participant, string alternateCallerId, string operationContext) { var callConnection = CreateMockCallConnection(202, AddParticipantResultPayload); var response = await callConnection.AddParticipantAsync(participant, alternateCallerId, operationContext).ConfigureAwait(false); - Assert.AreEqual((int)HttpStatusCode.Accepted, response.GetRawResponse().Status); Assert.AreEqual("dummyparticipantid", response.Value.ParticipantId); } @@ -152,18 +241,36 @@ public void AddParticipants_Passes(CommunicationIdentifier participant, string a var callConnection = CreateMockCallConnection(202, AddParticipantResultPayload); var response = callConnection.AddParticipant(participant, alternateCallerId, operationContext); - Assert.AreEqual((int)HttpStatusCode.Accepted, response.GetRawResponse().Status); Assert.AreEqual("dummyparticipantid", response.Value.ParticipantId); } + [TestCaseSource(nameof(TestData_AddParticipant))] + public void AddParticipantsAsync_Failed(CommunicationIdentifier participant, string alternateCallerId, string operationContext) + { + var callConnection = CreateMockCallConnection(404); + + RequestFailedException? ex = Assert.ThrowsAsync(async () => await callConnection.AddParticipantAsync(participant, alternateCallerId, operationContext).ConfigureAwait(false)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_AddParticipant))] + public void AddParticipants_Failed(CommunicationIdentifier participant, string alternateCallerId, string operationContext) + { + var callConnection = CreateMockCallConnection(404); + + RequestFailedException? ex = Assert.Throws(() => callConnection.AddParticipant(participant, alternateCallerId, operationContext)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + [TestCaseSource(nameof(TestData_ParticipantId))] public async Task RemoveParticipantsAsync_Passes(string callConnectionId, string participantId) { var callConnection = CreateMockCallConnection(202, callConnectionId: callConnectionId); var response = await callConnection.RemoveParticipantAsync(participantId).ConfigureAwait(false); - Assert.AreEqual((int)HttpStatusCode.Accepted, response.Status); } @@ -173,10 +280,29 @@ public void RemoveParticipants_Passes(string callConnectionId, string participan var callConnection = CreateMockCallConnection(202, callConnectionId: callConnectionId); var response = callConnection.RemoveParticipant(participantId); - Assert.AreEqual((int)HttpStatusCode.Accepted, response.Status); } + [TestCaseSource(nameof(TestData_ParticipantId))] + public void RemoveParticipantsAsync_Failed(string callConnectionId, string participantId) + { + var callConnection = CreateMockCallConnection(404); + + RequestFailedException? ex = Assert.ThrowsAsync(async () => await callConnection.RemoveParticipantAsync(participantId).ConfigureAwait(false)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_ParticipantId))] + public void RemoveParticipants_Failed(string callConnectionId, string participantId) + { + var callConnection = CreateMockCallConnection(404); + + RequestFailedException? ex = Assert.Throws(() => callConnection.RemoveParticipant(participantId)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + private void VerifyCancelAllMediaOperationsResult(CancelAllMediaOperationsResult result) { Assert.AreEqual("dummyId", result.OperationId); diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClient/CallingServerClientLiveTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClient/CallingServerClientLiveTests.cs new file mode 100644 index 0000000000000..c8f63a6d782f9 --- /dev/null +++ b/sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClient/CallingServerClientLiveTests.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Communication.CallingServer.Tests +{ + /// + /// The suite of tests for the class. + /// + /// + /// These tests have a dependency on live Azure services and may incur costs for the associated + /// Azure subscription. + /// + public class CallingServerClientLiveTests : CallingServerLiveTestBase + { + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public CallingServerClientLiveTests(bool isAsync) : base(isAsync) + { + } + } +} diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClients/CallingServerClientsTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClient/CallingServerClientTests.cs similarity index 67% rename from sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClients/CallingServerClientsTests.cs rename to sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClient/CallingServerClientTests.cs index 953de0b1e32a5..44f7c476f9f5c 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClients/CallingServerClientsTests.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClient/CallingServerClientTests.cs @@ -9,7 +9,7 @@ namespace Azure.Communication.CallingServer.Tests { - public class CallingServerClientsTests : CallingServerTestBase + public class CallingServerClientTests : CallingServerTestBase { [TestCaseSource(nameof(TestData_CreateCall))] public async Task CreateCallAsync_Returns201Created(CommunicationIdentifier source, IEnumerable targets, CreateCallOptions createCallOptions) @@ -17,7 +17,6 @@ public async Task CreateCallAsync_Returns201Created(CommunicationIdentifier sour CallingServerClient callingServerClient = CreateMockCallingServerClient(201, CreateOrJoinCallPayload); var response = await callingServerClient.CreateCallConnectionAsync(source, targets, createCallOptions).ConfigureAwait(false); - Assert.AreEqual((int)HttpStatusCode.Created, response.GetRawResponse().Status); Assert.AreEqual("cad9df7b-f3ac-4c53-96f7-c76e7437b3c1", response.Value.CallConnectionId); } @@ -28,18 +27,36 @@ public void CreateCall_Returns201Created(CommunicationIdentifier source, IEnumer CallingServerClient callingServerClient = CreateMockCallingServerClient(201, CreateOrJoinCallPayload); var response = callingServerClient.CreateCallConnection(source, targets, createCallOptions); - Assert.AreEqual((int)HttpStatusCode.Created, response.GetRawResponse().Status); Assert.AreEqual("cad9df7b-f3ac-4c53-96f7-c76e7437b3c1", response.Value.CallConnectionId); } + [TestCaseSource(nameof(TestData_CreateCall))] + public void CreateCallAsync_Returns404NotFound(CommunicationIdentifier source, IEnumerable targets, CreateCallOptions createCallOptions) + { + CallingServerClient callingServerClient = CreateMockCallingServerClient(404); + + RequestFailedException? ex = Assert.ThrowsAsync(async () => await callingServerClient.CreateCallConnectionAsync(source, targets, createCallOptions).ConfigureAwait(false)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_CreateCall))] + public void CreateCall_Returns404NotFound(CommunicationIdentifier source, IEnumerable targets, CreateCallOptions createCallOptions) + { + CallingServerClient callingServerClient = CreateMockCallingServerClient(404); + + RequestFailedException? ex = Assert.Throws(() => callingServerClient.CreateCallConnection(source, targets, createCallOptions)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + [TestCaseSource(nameof(TestData_JoinCall))] public async Task JoinCallAsync_Returns202Accepted(string serverCallId, CommunicationIdentifier source, JoinCallOptions joinCallOptions) { CallingServerClient callingServerClient = CreateMockCallingServerClient(202, CreateOrJoinCallPayload); var response = await callingServerClient.JoinCallAsync(serverCallId, source, joinCallOptions).ConfigureAwait(false); - Assert.AreEqual((int)HttpStatusCode.Accepted, response.GetRawResponse().Status); Assert.AreEqual("cad9df7b-f3ac-4c53-96f7-c76e7437b3c1", response.Value.CallConnectionId); } @@ -50,11 +67,30 @@ public void JoinCall_Returns202Accepted(string serverCallId, CommunicationIdenti CallingServerClient callingServerClient = CreateMockCallingServerClient(202, CreateOrJoinCallPayload); var response = callingServerClient.JoinCall(serverCallId, source, joinCallOptions); - Assert.AreEqual((int)HttpStatusCode.Accepted, response.GetRawResponse().Status); Assert.AreEqual("cad9df7b-f3ac-4c53-96f7-c76e7437b3c1", response.Value.CallConnectionId); } + [TestCaseSource(nameof(TestData_JoinCall))] + public void JoinCallAsync_Returns404NotFound(string serverCallId, CommunicationIdentifier source, JoinCallOptions joinCallOptions) + { + CallingServerClient callingServerClient = CreateMockCallingServerClient(404); + + RequestFailedException? ex = Assert.ThrowsAsync(async () => await callingServerClient.JoinCallAsync(serverCallId, source, joinCallOptions).ConfigureAwait(false)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_JoinCall))] + public void JoinCall_Returns404NotFound(string serverCallId, CommunicationIdentifier source, JoinCallOptions joinCallOptions) + { + CallingServerClient callingServerClient = CreateMockCallingServerClient(404); + + RequestFailedException? ex = Assert.Throws(() => callingServerClient.JoinCall(serverCallId, source, joinCallOptions)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + private static IEnumerable TestData_CreateCall() { return new[] diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClients/ContentDownloadTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClient/ContentDownloadTests.cs similarity index 100% rename from sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClients/ContentDownloadTests.cs rename to sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClient/ContentDownloadTests.cs diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClients/CallingServerClientsLiveTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClients/CallingServerClientsLiveTests.cs deleted file mode 100644 index 6ffe4f64189af..0000000000000 --- a/sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClients/CallingServerClientsLiveTests.cs +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#region Snippet:Azure_Communication_ServerCalling_Tests_UsingStatements -using System; -using System.Collections.Generic; -//@@ using Azure.Communication.CallingServer; -#endregion Snippet:Azure_Communication_ServerCalling_Tests_UsingStatements -using Azure.Communication.Identity; - -using NUnit.Framework; -using System.Threading.Tasks; - -namespace Azure.Communication.CallingServer.Tests -{ - /// - /// The suite of tests for the class. - /// - /// - /// These tests have a dependency on live Azure services and may incur costs for the associated - /// Azure subscription. - /// - public class CallingServerClientsLiveTests : CallingServerLiveTestBase - { - /// - /// Initializes a new instance of the class. - /// - /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. - public CallingServerClientsLiveTests(bool isAsync) : base(isAsync) - { - } - - [Test] - [Ignore("fix later")] - public async Task CreateCallTest() - { - CallingServerClient client = CreateInstrumentedCallingServerClient(); - try - { - await CreateCallOperation(client).ConfigureAwait(false); - } - catch (RequestFailedException ex) - { - Console.WriteLine(ex.Message); - Assert.Fail($"Unexpected error: {ex}"); - } - catch (Exception ex) - { - Assert.Fail($"Unexpected error: {ex}"); - } - } - - [Test] - public async Task PlayAudioTest() - { - CallingServerClient client = CreateInstrumentedCallingServerClient(); - try - { - var callConnection = await CreateCallOperation(client).ConfigureAwait(false); - - await SleepIfNotInPlaybackModeAsync().ConfigureAwait(false); - await PlayAudioOperation(callConnection).ConfigureAwait(false); - - await HangupOperation(callConnection).ConfigureAwait(false); - } - catch (RequestFailedException ex) - { - Console.WriteLine(ex.Message); - Assert.Fail($"Unexpected error: {ex}"); - } - catch (Exception ex) - { - Assert.Fail($"Unexpected error: {ex}"); - } - } - - [Test] - public async Task HangupCallTest() - { - CallingServerClient client = CreateInstrumentedCallingServerClient(); - try - { - var callConnection = await CreateCallOperation(client).ConfigureAwait(false); - - // There is one call leg in this test case, hangup the call will also delete the call as the result. - await HangupOperation(callConnection).ConfigureAwait(false); - } - catch (RequestFailedException ex) - { - Console.WriteLine(ex.Message); - Assert.Fail($"Unexpected error: {ex}"); - } - catch (Exception ex) - { - Assert.Fail($"Unexpected error: {ex}"); - } - } - - [Test] - public async Task CancelAllMediaOperationsTest() - { - CallingServerClient client = CreateInstrumentedCallingServerClient(); - try - { - var callConnection = await CreateCallOperation(client).ConfigureAwait(false); - - await SleepIfNotInPlaybackModeAsync().ConfigureAwait(false); - await PlayAudioOperation(callConnection).ConfigureAwait(false); - - await SleepIfNotInPlaybackModeAsync().ConfigureAwait(false); - await CancelAllMediaOperationsOperation(callConnection).ConfigureAwait(false); - - await HangupOperation(callConnection).ConfigureAwait(false); - } - catch (RequestFailedException ex) - { - Console.WriteLine(ex.Message); - Assert.Fail($"Unexpected error: {ex}"); - } - catch (Exception ex) - { - Assert.Fail($"Unexpected error: {ex}"); - } - } - - #region Support functions - #region Snippet:Azure_Communication_ServerCalling_Tests_CreateCallOperation - private async Task> CreateCallOperation(CallingServerClient client) - { - CommunicationIdentityClient communicationIdentityClient = CreateInstrumentedCommunicationIdentityClient(); - var source = await CreateUserAsync(communicationIdentityClient).ConfigureAwait(false); - - var targets = new[] { new PhoneNumberIdentifier(TestEnvironment.TargetPhoneNumber) }; - var createCallOption = new CreateCallOptions( - new Uri(TestEnvironment.AppCallbackUrl), - new[] { MediaType.Audio }, - new[] { EventSubscriptionType.ParticipantsUpdated, EventSubscriptionType.DtmfReceived }); - createCallOption.AlternateCallerId = new PhoneNumberIdentifier(TestEnvironment.SourcePhoneNumber); - - Console.WriteLine("Performing CreateCall operation"); - - var callConnection = await client.CreateCallConnectionAsync(source: source, targets: targets, options: createCallOption).ConfigureAwait(false); - - Console.WriteLine("Call initiated with Call connection id: {0}", callConnection.Value.CallConnectionId); - - Assert.IsFalse(string.IsNullOrWhiteSpace(callConnection.Value.CallConnectionId)); - return callConnection; - } - #endregion Snippet:Azure_Communication_ServerCalling_Tests_CreateCallOperation - - #region Snippet:Azure_Communication_ServerCalling_Tests_PlayAudioOperation - private async Task PlayAudioOperation(CallConnection callConnection) - { - var playAudioOptions = new PlayAudioOptions() - { - AudioFileUri = new Uri(TestEnvironment.AudioFileUrl), - OperationContext = "de346f03-7f8d-41ab-a232-cc5e14990769", - Loop = true, - AudioFileId = "ebb1d98d-fd86-4204-800c-f7bdfc2e515c" - }; - - Console.WriteLine("Performing PlayAudio operation"); - - var response = await callConnection.PlayAudioAsync(playAudioOptions).ConfigureAwait(false); - - Assert.AreEqual(response.Value.Status, OperationStatus.Running); - } - #endregion Snippet:Azure_Communication_ServerCalling_Tests_PlayAudioOperation - - #region Snippet:Azure_Communication_ServerCalling_Tests_HangupCallOperation - private async Task HangupOperation(CallConnection callConnection) - { - Console.WriteLine("Performing Hangup operation"); - - var response = await callConnection.HangupAsync().ConfigureAwait(false); - - Assert.AreEqual(202, response.Status); - } - #endregion Snippet:Azure_Communication_ServerCalling_Tests_HangupCallOperation - - #region Snippet:Azure_Communication_ServerCalling_Tests_CancelMediaOperationsOperation - private async Task CancelAllMediaOperationsOperation(CallConnection callConnection) - { - Console.WriteLine("Performing cancel media processing operation to stop playing audio"); - - var response = await callConnection.CancelAllMediaOperationsAsync().ConfigureAwait(false); - - Assert.AreEqual(OperationStatus.Completed, response.Value.Status); - } - #endregion Snippet:Azure_Communication_ServerCalling_Tests_CancelMediaOperationsOperation - - #endregion - - #region Support functions - private CommunicationUserIdentifier CreateUser(CommunicationIdentityClient communicationIdentityClient) - { - // reserve for living test, expect adding more content in the future. - return communicationIdentityClient.CreateUser(); - } - - private async Task CreateUserAsync(CommunicationIdentityClient communicationIdentityClient) - { - // reserve for living test, expect adding more content in the future. - return await communicationIdentityClient.CreateUserAsync(); - } - #endregion Support functions - } -} diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/Infrastructure/CallingServerLiveTestBase.cs b/sdk/communication/Azure.Communication.CallingServer/tests/Infrastructure/CallingServerLiveTestBase.cs index 9406cde1bcb7c..12a31c90aeeac 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/Infrastructure/CallingServerLiveTestBase.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/Infrastructure/CallingServerLiveTestBase.cs @@ -1,15 +1,77 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Azure.Communication.Identity; using Azure.Core.TestFramework; +using NUnit.Framework; namespace Azure.Communication.CallingServer.Tests { public class CallingServerLiveTestBase : RecordedTestBase { + // Random Gen Guid + protected const string FROM_USER_IDENTIFIER = "e3560385-776f-41d1-bf04-07ef738f2f23"; + + // Random Gen Guid + protected const string TO_USER_IDENTIFIER = "e3560385-776f-41d1-bf04-07ef738f2fc1"; + + // From ACS Resource "immutableResourceId". + protected const string RESOURCE_IDENTIFIER = "016a7064-0581-40b9-be73-6dde64d69d72"; + + // Random Gen Guid + protected const string GROUP_IDENTIFIER = "3500789f-e11b-4ceb-85cb-bc8df2a01768"; + + protected string GetRandomUserId() + { + return "8:acs:" + RESOURCE_IDENTIFIER + "_" + Guid.NewGuid().ToString(); + } + + protected string GetFixedUserId(string userGuid) + { + return "8:acs:" + RESOURCE_IDENTIFIER + "_" + userGuid; + } + + protected string GetFromUserId() + { + if (Mode == RecordedTestMode.Live) + { + return GetRandomUserId(); + } + return GetFixedUserId(FROM_USER_IDENTIFIER); + } + + protected string GetToUserId() + { + if (Mode == RecordedTestMode.Live) + { + return GetRandomUserId(); + } + return GetFixedUserId(TO_USER_IDENTIFIER); + } + + protected string GetGroupId() + { + /** + * If tests are running in live mode, we want them to all + * have unique groupId's so they do not conflict with other + * recording tests running in live mode. + */ + if (Mode == RecordedTestMode.Live) + { + return Guid.NewGuid().ToString(); + } + + /** + * For recording tests we need to make sure the groupId + * matches the recorded groupId, or the call will fail. + */ + return GROUP_IDENTIFIER; + } + public CallingServerLiveTestBase(bool isAsync) : base(isAsync) => Sanitizer = new CallingServerRecordedTestSanitizer(); @@ -40,17 +102,289 @@ protected CallingServerClient CreateInstrumentedCallingServerClient() return InstrumentClient(callingServerClient); } - protected async Task SleepIfNotInPlaybackModeAsync() + + #region Api operation functions + #region Snippet:Azure_Communication_ServerCalling_Tests_CreateGroupCallOperation + internal async Task> CreateGroupCallOperation(CallingServerClient callingServerClient, string groupId, string from, string to, string callBackUri) + { + CallConnection? fromCallConnection = null; + CallConnection? toCallConnection = null; + + try + { + CommunicationIdentifier fromParticipant = new CommunicationUserIdentifier(from); + CommunicationIdentifier toParticipant = new CommunicationUserIdentifier(to); + + JoinCallOptions fromCallOptions = new JoinCallOptions( + new Uri(callBackUri), + new MediaType[] { MediaType.Audio }, + new EventSubscriptionType[] { EventSubscriptionType.ParticipantsUpdated }); + fromCallConnection = await callingServerClient.JoinCallAsync(groupId, fromParticipant, fromCallOptions).ConfigureAwait(false); + SleepInTest(1000); + Assert.IsFalse(string.IsNullOrWhiteSpace(fromCallConnection.CallConnectionId)); + + JoinCallOptions joinCallOptions = new JoinCallOptions( + new Uri(callBackUri), + new MediaType[] { MediaType.Audio }, + new EventSubscriptionType[] { EventSubscriptionType.ParticipantsUpdated}); + + toCallConnection = await callingServerClient.JoinCallAsync(groupId, toParticipant, joinCallOptions).ConfigureAwait(false); + SleepInTest(1000); + Assert.IsFalse(string.IsNullOrWhiteSpace(toCallConnection.CallConnectionId)); + + return new CallConnection[] { fromCallConnection, toCallConnection }; + } + catch (RequestFailedException ex) + { + Console.WriteLine(ex.Message); + Assert.Fail($"Unexpected error: {ex}"); + throw; + } + catch (Exception ex) + { + Assert.Fail($"Unexpected error: {ex}"); + + if (fromCallConnection != null) + { + await fromCallConnection.HangupAsync().ConfigureAwait(false); + } + + if (toCallConnection != null) + { + await toCallConnection.HangupAsync().ConfigureAwait(false); + } + throw; + } + } + #endregion Snippet:Azure_Communication_ServerCalling_Tests_CreateGroupCallOperation + + #region Snippet:Azure_Communication_ServerCalling_Tests_CreateCallConnectionOperation + internal async Task> CreateCallConnectionOperation(CallingServerClient client) + { + CommunicationIdentityClient communicationIdentityClient = CreateInstrumentedCommunicationIdentityClient(); + var source = await CreateUserAsync(communicationIdentityClient).ConfigureAwait(false); + + var targets = new[] { new PhoneNumberIdentifier(TestEnvironment.TargetPhoneNumber) }; + var createCallOption = new CreateCallOptions( + new Uri(TestEnvironment.AppCallbackUrl), + new[] { MediaType.Audio }, + new[] { EventSubscriptionType.ParticipantsUpdated, EventSubscriptionType.DtmfReceived }); + createCallOption.AlternateCallerId = new PhoneNumberIdentifier(TestEnvironment.SourcePhoneNumber); + + Console.WriteLine("Performing CreateCall operation"); + + var callConnection = await client.CreateCallConnectionAsync(source: source, targets: targets, options: createCallOption).ConfigureAwait(false); + + Console.WriteLine("Call initiated with Call connection id: {0}", callConnection.Value.CallConnectionId); + + Assert.IsFalse(string.IsNullOrWhiteSpace(callConnection.Value.CallConnectionId)); + return callConnection; + } + #endregion Snippet:Azure_Communication_ServerCalling_Tests_CreateCallConnectionOperation + + #region Snippet:Azure_Communication_ServerCalling_Tests_PlayAudioOperation + internal async Task PlayAudioOperation(CallConnection callConnection) + { + var playAudioOptions = new PlayAudioOptions() + { + AudioFileUri = new Uri(TestEnvironment.AudioFileUrl), + OperationContext = "de346f03-7f8d-41ab-a232-cc5e14990769", + Loop = false, + AudioFileId = "ebb1d98d-fd86-4204-800c-f7bdfc2e515c" + }; + + Console.WriteLine("Performing PlayAudio operation"); + + var response = await callConnection.PlayAudioAsync(playAudioOptions).ConfigureAwait(false); + + Assert.AreEqual(response.Value.Status, OperationStatus.Running); + } + + internal async Task PlayAudioOperation(ServerCall serverCall) + { + Console.WriteLine("Performing PlayAudio operation"); + + var response = await serverCall.PlayAudioAsync( + audioFileUri: new Uri(TestEnvironment.AudioFileUrl), + audioFileId: "ebb1d98d-fd86-4204-800c-f7bdfc2e515c", + callbackUri: new Uri(TestEnvironment.AppCallbackUrl), + operationContext: "de346f03-7f8d-41ab-a232-cc5e14990769" + ).ConfigureAwait(false); + + Assert.AreEqual(response.Value.Status, OperationStatus.Running); + } + #endregion Snippet:Azure_Communication_ServerCalling_Tests_PlayAudioOperation + + #region Snippet:Azure_Communication_ServerCalling_Tests_HangupCallOperation + internal async Task HangupOperation(CallConnection callConnection) + { + Console.WriteLine("Performing Hangup operation"); + + var response = await callConnection.HangupAsync().ConfigureAwait(false); + + Assert.AreEqual(202, response.Status); + } + #endregion Snippet:Azure_Communication_ServerCalling_Tests_HangupCallOperation + + #region Snippet:Azure_Communication_ServerCalling_Tests_CancelMediaOperationsOperation + internal async Task CancelAllMediaOperationsOperation(CallConnection callConnection) + { + Console.WriteLine("Performing cancel media processing operation to stop playing audio"); + + var response = await callConnection.CancelAllMediaOperationsAsync().ConfigureAwait(false); + + Assert.AreEqual(OperationStatus.Completed, response.Value.Status); + } + + internal async Task CancelAllMediaOperationsOperation(IEnumerable callConnections) + { + Console.WriteLine("Performing cancel media processing operation to stop playing audio"); + + if (callConnections == null) + { + return; + } + foreach (CallConnection callConnection in callConnections) + { + if (callConnection != null) + { + try + { + var response = await callConnection.CancelAllMediaOperationsAsync().ConfigureAwait(false); + Assert.AreEqual(OperationStatus.Completed, response.Value.Status); + } + catch (Exception ex) + { + Console.WriteLine("Error hanging up: " + ex.Message); + } + } + } + } + #endregion Snippet:Azure_Communication_ServerCalling_Tests_CancelMediaOperationsOperation + + #region Snippet:Azure_Communication_ServerCalling_Tests_AddParticipantOperation + internal async Task AddParticipantOperation(CallConnection callConnection) + { + Console.WriteLine("Performing add participant operation to add a participant"); + + string invitedUser = GetFixedUserId("0000000a-b200-7a0d-570c-113a0d00288d"); + + var response = await callConnection.AddParticipantAsync(new CommunicationUserIdentifier(invitedUser)).ConfigureAwait(false); + + Assert.AreEqual(false, string.IsNullOrEmpty(response.Value.ParticipantId)); + + return response.Value.ParticipantId; + } + + internal async Task AddParticipantOperation(ServerCall serverCall) + { + Console.WriteLine("Performing add participant operation to add a participant"); + + string invitedUser = GetFixedUserId("0000000a-b200-7a0d-570c-113a0d00288d"); + + var response = await serverCall.AddParticipantAsync( + new CommunicationUserIdentifier(invitedUser), + callbackUri: new Uri(TestEnvironment.AppCallbackUrl) + ).ConfigureAwait(false); + + Assert.AreEqual(false, string.IsNullOrEmpty(response.Value.ParticipantId)); + + return response.Value.ParticipantId; + } + #endregion Snippet:Azure_Communication_ServerCalling_Tests_AddParticipantOperation + + #region Snippet:Azure_Communication_ServerCalling_Tests_RemoveParticipantOperation + internal async Task RemoveParticipantOperation(CallConnection callConnection, string participantId) + { + Console.WriteLine("Performing remove participant operation to remove a participant"); + + var response = await callConnection.RemoveParticipantAsync(participantId).ConfigureAwait(false); + + Assert.AreEqual(202, response.Status); + } + + internal async Task RemoveParticipantOperation(ServerCall serverCall, string participantId) + { + Console.WriteLine("Performing remove participant operation to remove a participant"); + + var response = await serverCall.RemoveParticipantAsync(participantId).ConfigureAwait(false); + + Assert.AreEqual(202, response.Status); + } + #endregion Snippet:Azure_Communication_ServerCalling_Tests_RemoveParticipantOperation + #endregion Api operation functions + + #region Support functions + private CommunicationUserIdentifier CreateUser(CommunicationIdentityClient communicationIdentityClient) + { + // reserve for living test, expect adding more content in the future. + return communicationIdentityClient.CreateUser(); + } + + private async Task CreateUserAsync(CommunicationIdentityClient communicationIdentityClient) + { + // reserve for living test, expect adding more content in the future. + return await communicationIdentityClient.CreateUserAsync(); + } + + protected async Task CleanUpConnectionsAsync(IEnumerable connections) + { + if (connections == null) + { + return; + } + foreach (CallConnection connection in connections) + { + if (connection != null) + { + try + { + await connection.HangupAsync().ConfigureAwait(false); + } + catch (Exception ex) + { + Console.WriteLine("Error hanging up: " + ex.Message); + } + } + } + } + + protected async Task SleepIfNotInPlaybackModeAsync(int milliSeconds = 10000) { if (TestEnvironment.Mode != RecordedTestMode.Playback) await Task.Delay(10000); } + protected void SleepInTest(int milliSeconds) + { + if (Mode == RecordedTestMode.Playback) + return; + Thread.Sleep(milliSeconds); + } + + protected async Task ValidateCallRecordingStateAsync(ServerCall serverCall, + string recordingId, + CallRecordingState expectedCallRecordingState) + { + Assert.NotNull(serverCall); + Assert.NotNull(recordingId); + + // There is a delay between the action and when the state is available. + // Waiting to make sure we get the updated state, when we are running + // against a live service. + SleepInTest(6000); + + CallRecordingProperties callRecordingProperties = await serverCall.GetRecordingStateAsync(recordingId).ConfigureAwait(false); + Assert.NotNull(callRecordingProperties); + Assert.AreEqual(callRecordingProperties.RecordingState, expectedCallRecordingState); + } + private CallingServerClientOptions CreateServerCallingClientOptionsWithCorrelationVectorLogs() { CallingServerClientOptions callClientOptions = new CallingServerClientOptions(); callClientOptions.Diagnostics.LoggedHeaderNames.Add("MS-CV"); return InstrumentClientOptions(callClientOptions); } + #endregion Support functions } } diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClients/CallingServerTestBase.cs b/sdk/communication/Azure.Communication.CallingServer/tests/Infrastructure/CallingServerTestBase.cs similarity index 100% rename from sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClients/CallingServerTestBase.cs rename to sdk/communication/Azure.Communication.CallingServer/tests/Infrastructure/CallingServerTestBase.cs diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/Infrastructure/CallingServerTestEnvironment.cs b/sdk/communication/Azure.Communication.CallingServer/tests/Infrastructure/CallingServerTestEnvironment.cs index fe5f295689187..dc0e379bebb51 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/Infrastructure/CallingServerTestEnvironment.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/Infrastructure/CallingServerTestEnvironment.cs @@ -15,13 +15,18 @@ public class CallingServerTestEnvironment : CommunicationTestEnvironment /// /// The phone number associated with the source. /// - public string SourcePhoneNumber => GetRecordedVariable(AzurePhoneNumber, options => options.IsSecret()); + public string SourcePhoneNumber => GetRecordedVariable(AlternateCallerId, options => options.IsSecret()); /// /// The phone number associated with the source. /// public string TargetPhoneNumber => GetRecordedVariable(AzurePhoneNumber, options => options.IsSecret()); + /// + /// The audio file name of the play prompt. + /// + public string AlternateCallerId => "ALTERNATE_CALLERID"; + /// /// The audio file name of the play prompt. /// diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/ServerCall/ServerCallLiveTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/ServerCall/ServerCallLiveTests.cs new file mode 100644 index 0000000000000..e3ee0e858b0db --- /dev/null +++ b/sdk/communication/Azure.Communication.CallingServer/tests/ServerCall/ServerCallLiveTests.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Linq; +using System.Threading.Tasks; +using NUnit.Framework; + +namespace Azure.Communication.CallingServer.Tests +{ + /// + /// The suite of tests for the class. + /// + /// + /// These tests have a dependency on live Azure services and may incur costs for the associated + /// Azure subscription. + /// + public class ServerCallLiveTests : CallingServerLiveTestBase + { + protected string GroupId; + protected string FromUser; + protected string ToUser; + + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public ServerCallLiveTests(bool isAsync) : base(isAsync) + { + GroupId = GetGroupId(); + FromUser = GetFromUserId(); + ToUser = GetToUserId(); + } + + [Test] + public async Task RunAllRecordingFunctionsScenarioTests() + { + CallingServerClient callingServerClient = CreateInstrumentedCallingServerClient(); + try + { + // Establish a Call + var callConnections = await CreateGroupCallOperation(callingServerClient, GroupId, FromUser, ToUser, TestEnvironment.AppCallbackUrl).ConfigureAwait(false); + var serverCall = callingServerClient.InitializeServerCall(GroupId); + + // Start Recording + StartCallRecordingResult startCallRecordingResult = await serverCall.StartRecordingAsync(new Uri(TestEnvironment.AppCallbackUrl)).ConfigureAwait(false); + var recordingId = startCallRecordingResult.RecordingId; + await ValidateCallRecordingStateAsync(serverCall, recordingId, CallRecordingState.Active).ConfigureAwait(false); + + // Pause Recording + await serverCall.PauseRecordingAsync(recordingId).ConfigureAwait(false); + await ValidateCallRecordingStateAsync(serverCall, recordingId, CallRecordingState.Inactive).ConfigureAwait(false); + + // Resume Recording + await serverCall.ResumeRecordingAsync(recordingId).ConfigureAwait(false); + await ValidateCallRecordingStateAsync(serverCall, recordingId, CallRecordingState.Active).ConfigureAwait(false); + + // Stop Recording + await serverCall.StopRecordingAsync(recordingId).ConfigureAwait(false); + + // Get Recording StateAsync + Assert.ThrowsAsync(async () => await serverCall.GetRecordingStateAsync(recordingId).ConfigureAwait(false)); + + // Hang up the Call, there is one call leg in this test case, hangup the call will also delete the call as the result. + await SleepIfNotInPlaybackModeAsync().ConfigureAwait(false); + await CleanUpConnectionsAsync(callConnections).ConfigureAwait(false); + } + catch (RequestFailedException ex) + { + Console.WriteLine(ex.Message); + Assert.Fail($"Unexpected error: {ex}"); + } + catch (Exception ex) + { + Assert.Fail($"Unexpected error: {ex}"); + } + } + + [Test] + public async Task RunCreatePlayCancelHangupScenarioTests() + { + CallingServerClient callingServerClient = CreateInstrumentedCallingServerClient(); + try + { + // Establish a Call + var callConnections = await CreateGroupCallOperation(callingServerClient, GroupId, FromUser, ToUser, TestEnvironment.AppCallbackUrl).ConfigureAwait(false); + var serverCall = callingServerClient.InitializeServerCall(GroupId); + + // Play Prompt Audio + await SleepIfNotInPlaybackModeAsync().ConfigureAwait(false); + await PlayAudioOperation(serverCall).ConfigureAwait(false); + + // Cancel Prompt Audio + await SleepIfNotInPlaybackModeAsync().ConfigureAwait(false); + await CancelAllMediaOperationsOperation(callConnections).ConfigureAwait(false); + + // Hang up the Call, there is one call leg in this test case, hangup the call will also delete the call as the result. + await SleepIfNotInPlaybackModeAsync().ConfigureAwait(false); + await CleanUpConnectionsAsync(callConnections).ConfigureAwait(false); + } + catch (RequestFailedException ex) + { + Console.WriteLine(ex.Message); + Assert.Fail($"Unexpected error: {ex}"); + } + catch (Exception ex) + { + Assert.Fail($"Unexpected error: {ex}"); + } + } + + [Test] + public async Task RunCreateAddRemoveHangupScenarioTests() + { + CallingServerClient callingServerClient = CreateInstrumentedCallingServerClient(); + try + { + // Establish a Call + var callConnections = await CreateGroupCallOperation(callingServerClient, GroupId, FromUser, ToUser, TestEnvironment.AppCallbackUrl).ConfigureAwait(false); + var serverCall = callingServerClient.InitializeServerCall(GroupId); + + // Add Participant + await SleepIfNotInPlaybackModeAsync().ConfigureAwait(false); + var participantId = await AddParticipantOperation(serverCall).ConfigureAwait(false); + + // Remove Participant + await SleepIfNotInPlaybackModeAsync().ConfigureAwait(false); + await RemoveParticipantOperation(serverCall, participantId).ConfigureAwait(false); + + // Hang up the Call, there is one call leg in this test case, hangup the call will also delete the call as the result. + await SleepIfNotInPlaybackModeAsync().ConfigureAwait(false); + await CleanUpConnectionsAsync(callConnections).ConfigureAwait(false); + } + catch (RequestFailedException ex) + { + Console.WriteLine(ex.Message); + Assert.Fail($"Unexpected error: {ex}"); + } + catch (Exception ex) + { + Assert.Fail($"Unexpected error: {ex}"); + } + } + } +} diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClients/ServerCallTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/ServerCall/ServerCallTests.cs similarity index 60% rename from sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClients/ServerCallTests.cs rename to sdk/communication/Azure.Communication.CallingServer/tests/ServerCall/ServerCallTests.cs index de53559b2ea5e..090693c64f56a 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/CallingServerClients/ServerCallTests.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/ServerCall/ServerCallTests.cs @@ -33,35 +33,88 @@ public class ServerCallTests : CallingServerTestBase "\"participantId\": \"dummyparticipantid\"" + "}"; + [TestCaseSource(nameof(TestData_StartRecording))] + public async Task StartRecordingAsync_Returns200Ok(Uri sampleCallBackUri) + { + ServerCall serverCall = CreateMockServerCall(200, responseContent: DummyStartRecordingResponse); + + Response result = await serverCall.StartRecordingAsync(sampleCallBackUri); + Assert.AreEqual("dummyRecordingId", result.Value.RecordingId); + } + [TestCaseSource(nameof(TestData_StartRecording))] public void StartRecording_Returns200Ok(Uri sampleCallBackUri) { ServerCall serverCall = CreateMockServerCall(200, responseContent: DummyStartRecordingResponse); + StartCallRecordingResult result = serverCall.StartRecording(sampleCallBackUri); Assert.AreEqual("dummyRecordingId", result.RecordingId); } [TestCaseSource(nameof(TestData_StartRecording))] - public async Task StartRecordingAsync_Returns200Ok(Uri sampleCallBackUri) + public void StartRecordingAsync_Returns404NotFound(Uri sampleCallBackUri) { - ServerCall serverCall = CreateMockServerCall(200, responseContent: DummyStartRecordingResponse); - Response result = await serverCall.StartRecordingAsync(sampleCallBackUri); - Assert.AreEqual("dummyRecordingId", result.Value.RecordingId); + ServerCall serverCall = CreateMockServerCall(404); + + RequestFailedException? ex = Assert.ThrowsAsync(async () => await serverCall.StartRecordingAsync(sampleCallBackUri).ConfigureAwait(false)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_StartRecording))] + public void StartRecording_Returns404NotFound(Uri sampleCallBackUri) + { + ServerCall serverCall = CreateMockServerCall(404); + + RequestFailedException? ex = Assert.Throws(() => serverCall.StartRecording(sampleCallBackUri)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_StopRecording))] + public async Task StopRecordingAsync_Return200Ok(string sampleRecordingId) + { + ServerCall serverCall = CreateMockServerCall(200); + + Response response = await serverCall.StopRecordingAsync(sampleRecordingId); + Assert.AreEqual((int)HttpStatusCode.OK, response.Status); } [TestCaseSource(nameof(TestData_StopRecording))] public void StopRecording_Return200Ok(string sampleRecordingId) { ServerCall serverCall = CreateMockServerCall(200); + Response response = serverCall.StopRecording(sampleRecordingId); Assert.AreEqual((int)HttpStatusCode.OK, response.Status); } [TestCaseSource(nameof(TestData_StopRecording))] - public async Task StopRecordingAsync_Return200Ok(string sampleRecordingId) + public void StopRecordingAsync_Returns404NotFound(string sampleRecordingId) + { + ServerCall serverCall = CreateMockServerCall(404); + + RequestFailedException? ex = Assert.ThrowsAsync(async () => await serverCall.StopRecordingAsync(sampleRecordingId).ConfigureAwait(false)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_StopRecording))] + public void StopRecording_Returns404NotFound(string sampleRecordingId) + { + ServerCall serverCall = CreateMockServerCall(404); + + RequestFailedException? ex = Assert.Throws(() => serverCall.StopRecording(sampleRecordingId)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_PauseRecording))] + public async Task PauseRecordingAsync_Return200Ok(string sampleRecordingId) { ServerCall serverCall = CreateMockServerCall(200); - Response response = await serverCall.StopRecordingAsync(sampleRecordingId); + + Response response = await serverCall.PauseRecordingAsync(sampleRecordingId); Assert.AreEqual((int)HttpStatusCode.OK, response.Status); } @@ -69,15 +122,37 @@ public async Task StopRecordingAsync_Return200Ok(string sampleRecordingId) public void PauseRecording_Return200Ok(string sampleRecordingId) { ServerCall serverCall = CreateMockServerCall(200); + Response response = serverCall.PauseRecording(sampleRecordingId); Assert.AreEqual((int)HttpStatusCode.OK, response.Status); } [TestCaseSource(nameof(TestData_PauseRecording))] - public async Task PauseRecordingAsync_Return200Ok(string sampleRecordingId) + public void PauseRecordingAsync_Returns404NotFound(string sampleRecordingId) + { + ServerCall serverCall = CreateMockServerCall(404); + + RequestFailedException? ex = Assert.ThrowsAsync(async () => await serverCall.PauseRecordingAsync(sampleRecordingId).ConfigureAwait(false)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_PauseRecording))] + public void PauseRecording_Returns404NotFound(string sampleRecordingId) + { + ServerCall serverCall = CreateMockServerCall(404); + + RequestFailedException? ex = Assert.Throws(() => serverCall.PauseRecording(sampleRecordingId)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_ResumeRecording))] + public async Task ResumeRecordingAsync_Return200Ok(string sampleRecordingId) { ServerCall serverCall = CreateMockServerCall(200); - Response response = await serverCall.PauseRecordingAsync(sampleRecordingId); + + Response response = await serverCall.ResumeRecordingAsync(sampleRecordingId); Assert.AreEqual((int)HttpStatusCode.OK, response.Status); } @@ -85,57 +160,113 @@ public async Task PauseRecordingAsync_Return200Ok(string sampleRecordingId) public void ResumeRecording_Return200Ok(string sampleRecordingId) { ServerCall serverCall = CreateMockServerCall(200); + Response response = serverCall.ResumeRecording(sampleRecordingId); Assert.AreEqual((int)HttpStatusCode.OK, response.Status); } [TestCaseSource(nameof(TestData_ResumeRecording))] - public async Task ResumeRecordingAsync_Return200Ok(string sampleRecordingId) + public void ResumeRecordingAsync_Returns404NotFound(string sampleRecordingId) { - ServerCall serverCall = CreateMockServerCall(200); - Response response = await serverCall.ResumeRecordingAsync(sampleRecordingId); - Assert.AreEqual((int)HttpStatusCode.OK, response.Status); + ServerCall serverCall = CreateMockServerCall(404); + + RequestFailedException? ex = Assert.ThrowsAsync(async () => await serverCall.ResumeRecordingAsync(sampleRecordingId).ConfigureAwait(false)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_ResumeRecording))] + public void ResumeRecording_Returns404NotFound(string sampleRecordingId) + { + ServerCall serverCall = CreateMockServerCall(404); + + RequestFailedException? ex = Assert.Throws(() => serverCall.ResumeRecording(sampleRecordingId)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_GetRecordingState))] + public async Task GetRecordingStateAsync_Return200Ok(string sampleRecordingId) + { + ServerCall serverCall = CreateMockServerCall(200, responseContent: DummyRecordingStateResponse); + + Response result = await serverCall.GetRecordingStateAsync(sampleRecordingId); + Assert.AreEqual(CallRecordingState.Active, result.Value.RecordingState); } [TestCaseSource(nameof(TestData_GetRecordingState))] public void GetRecordingState_Return200Ok(string sampleRecordingId) { ServerCall serverCall = CreateMockServerCall(200, responseContent: DummyRecordingStateResponse); + CallRecordingProperties result = serverCall.GetRecordingState(sampleRecordingId); Assert.AreEqual(CallRecordingState.Active, result.RecordingState); } [TestCaseSource(nameof(TestData_GetRecordingState))] - public async Task GetRecordingStateAsync_Return200Ok(string sampleRecordingId) + public void GetRecordingStateAsync_Returns404NotFound(string sampleRecordingId) { - ServerCall serverCall = CreateMockServerCall(200, responseContent: DummyRecordingStateResponse); - Response result = await serverCall.GetRecordingStateAsync(sampleRecordingId); - Assert.AreEqual(CallRecordingState.Active, result.Value.RecordingState); + ServerCall serverCall = CreateMockServerCall(404); + + RequestFailedException? ex = Assert.ThrowsAsync(async () => await serverCall.GetRecordingStateAsync(sampleRecordingId).ConfigureAwait(false)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_GetRecordingState))] + public void GetRecordingState_Returns404NotFound(string sampleRecordingId) + { + ServerCall serverCall = CreateMockServerCall(404); + + RequestFailedException? ex = Assert.Throws(() => serverCall.GetRecordingState(sampleRecordingId)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); } [TestCaseSource(nameof(TestData_PlayAudio))] - public void PlayAudio_Return202Accepted(Uri sampleAudioFileUri, string sampleAudioFileId, Uri sampleCallbackUri, string sampleOperationContext) + public async Task PlayAudioAsync_Return202Accepted(Uri sampleAudioFileUri, string sampleAudioFileId, Uri sampleCallbackUri, string sampleOperationContext) { ServerCall serverCall = CreateMockServerCall(202, responseContent: DummyPlayAudioResponse); - PlayAudioResult result = serverCall.PlayAudio(sampleAudioFileUri, sampleAudioFileId, sampleCallbackUri, sampleOperationContext); + + Response result = await serverCall.PlayAudioAsync(sampleAudioFileUri, sampleAudioFileId, sampleCallbackUri, sampleOperationContext); VerifyPlayAudioResult(result); } [TestCaseSource(nameof(TestData_PlayAudio))] - public async Task PlayAudioAsync_Return202Accepted(Uri sampleAudioFileUri, string sampleAudioFileId, Uri sampleCallbackUri, string sampleOperationContext) + public void PlayAudio_Return202Accepted(Uri sampleAudioFileUri, string sampleAudioFileId, Uri sampleCallbackUri, string sampleOperationContext) { ServerCall serverCall = CreateMockServerCall(202, responseContent: DummyPlayAudioResponse); - Response result = await serverCall.PlayAudioAsync(sampleAudioFileUri, sampleAudioFileId, sampleCallbackUri, sampleOperationContext); + + PlayAudioResult result = serverCall.PlayAudio(sampleAudioFileUri, sampleAudioFileId, sampleCallbackUri, sampleOperationContext); VerifyPlayAudioResult(result); } + [TestCaseSource(nameof(TestData_PlayAudio))] + public void PlayAudioAsync_Returns404NotFound(Uri sampleAudioFileUri, string sampleAudioFileId, Uri sampleCallbackUri, string sampleOperationContext) + { + ServerCall serverCall = CreateMockServerCall(404); + + RequestFailedException? ex = Assert.ThrowsAsync(async () => await serverCall.PlayAudioAsync(sampleAudioFileUri, sampleAudioFileId, sampleCallbackUri, sampleOperationContext).ConfigureAwait(false)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_PlayAudio))] + public void PlayAudio_Returns404NotFound(Uri sampleAudioFileUri, string sampleAudioFileId, Uri sampleCallbackUri, string sampleOperationContext) + { + ServerCall serverCall = CreateMockServerCall(404); + + RequestFailedException? ex = Assert.Throws(() => serverCall.PlayAudio(sampleAudioFileUri, sampleAudioFileId, sampleCallbackUri, sampleOperationContext)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + [TestCaseSource(nameof(TestData_AddParticipant))] public async Task AddParticipantsAsync_Return202Accepted(CommunicationIdentifier participant, Uri callBack, string alternateCallerId, string operationContext) { var serverCall = CreateMockServerCall(202, AddParticipantResultPayload); var response = await serverCall.AddParticipantAsync(participant, callBack, alternateCallerId, operationContext).ConfigureAwait(false); - Assert.AreEqual((int)HttpStatusCode.Accepted, response.GetRawResponse().Status); Assert.AreEqual("dummyparticipantid", response.Value.ParticipantId); } @@ -146,18 +277,36 @@ public void AddParticipants_Return202Accepted(CommunicationIdentifier participan var serverCall = CreateMockServerCall(202, AddParticipantResultPayload); var response = serverCall.AddParticipant(participant, callBack, alternateCallerId, operationContext); - Assert.AreEqual((int)HttpStatusCode.Accepted, response.GetRawResponse().Status); Assert.AreEqual("dummyparticipantid", response.Value.ParticipantId); } + [TestCaseSource(nameof(TestData_AddParticipant))] + public void AddParticipantsAsync_Returns404NotFound(CommunicationIdentifier participant, Uri callBack, string alternateCallerId, string operationContext) + { + var serverCall = CreateMockServerCall(404); + + RequestFailedException? ex = Assert.ThrowsAsync(async () => await serverCall.AddParticipantAsync(participant, callBack, alternateCallerId, operationContext).ConfigureAwait(false)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_AddParticipant))] + public void AddParticipants_Returns404NotFound(CommunicationIdentifier participant, Uri callBack, string alternateCallerId, string operationContext) + { + var serverCall = CreateMockServerCall(404); + + RequestFailedException? ex = Assert.Throws(() => serverCall.AddParticipant(participant, callBack, alternateCallerId, operationContext)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + [TestCaseSource(nameof(TestData_ParticipantId))] public async Task RemoveParticipantsAsync_Return202Accepted(string participantId) { var serverCall = CreateMockServerCall(202); var response = await serverCall.RemoveParticipantAsync(participantId).ConfigureAwait(false); - Assert.AreEqual((int)HttpStatusCode.Accepted, response.Status); } @@ -167,10 +316,29 @@ public void RemoveParticipants_Return202Accepted(string participantId) var serverCall = CreateMockServerCall(202); var response = serverCall.RemoveParticipant(participantId); - Assert.AreEqual((int)HttpStatusCode.Accepted, response.Status); } + [TestCaseSource(nameof(TestData_ParticipantId))] + public void RemoveParticipantsAsync_Returns404NotFound(string participantId) + { + var serverCall = CreateMockServerCall(404); + + RequestFailedException? ex = Assert.ThrowsAsync(async () => await serverCall.RemoveParticipantAsync(participantId).ConfigureAwait(false)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + + [TestCaseSource(nameof(TestData_ParticipantId))] + public void RemoveParticipants_Returns404NotFound(string participantId) + { + var serverCall = CreateMockServerCall(404); + + RequestFailedException? ex = Assert.Throws(() => serverCall.RemoveParticipant(participantId)); + Assert.NotNull(ex); + Assert.AreEqual(ex?.Status, 404); + } + private void VerifyPlayAudioResult(PlayAudioResult response) { Assert.AreEqual("dummyId", response.OperationId); diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RunCreateAddRemoveHangupScenarioTests.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RunCreateAddRemoveHangupScenarioTests.json new file mode 100644 index 0000000000000..02c1462c57d3b --- /dev/null +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RunCreateAddRemoveHangupScenarioTests.json @@ -0,0 +1,185 @@ +{ + "Entries": [ + { + "RequestUri": "https://acstestbot1.communication.azure.com/identities?api-version=2021-03-07", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "2", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 00:52:24 GMT", + "traceparent": "00-ad453446efd144458f4030f69a85ca7b-f33ad15e795bbb4a-00", + "User-Agent": "azsdk-net-Communication.Identity/1.1.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "500420ef7b1dbfd0659302bbf1a9c676", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": {}, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 00:52:24 GMT", + "MS-CV": "162iTJ1JQUmpagjs6HDu9A.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0SEvJYAAAAABms56xYdZDS4KQbjqWKe9LV1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "500420ef7b1dbfd0659302bbf1a9c676", + "X-Processing-Time": "24ms" + }, + "ResponseBody": { + "identity": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000a-b22f-b8c5-99c6-593a0d001c83" + } + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "388", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 00:52:25 GMT", + "traceparent": "00-e252cf67ca16c94999031824c913497d-0226fb31e8f2a14a-00", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "0c5cd4cbca7f230b8038e86378222800", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "alternateCallerId": { + "value": "Sanitized" + }, + "targets": [ + { + "phoneNumber": { + "value": "Sanitized" + } + } + ], + "source": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000a-b22f-b8c5-99c6-593a0d001c83" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated", + "dtmfReceived" + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "110", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 00:52:27 GMT", + "X-Azure-Ref": "0SUvJYAAAAABvPeAqait7QpnfZXwtymYSV1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "14440d76-7512-4130-bacb-d558427658ab", + "x-ms-client-request-id": "0c5cd4cbca7f230b8038e86378222800" + }, + "ResponseBody": { + "callLegId": "b21f1300-058d-40e5-88e6-fb85f42be0c7", + "callConnectionId": "b21f1300-058d-40e5-88e6-fb85f42be0c7" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/b21f1300-058d-40e5-88e6-fb85f42be0c7/participants?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "126", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 00:52:43 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "37617bbd369c3124106ee1120009be04", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "participant": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000a-b200-7a0d-570c-113a0d00288d" + } + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "56", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 00:52:43 GMT", + "X-Azure-Ref": "0W0vJYAAAAADA2hxujqGcRpofblFZl1IyV1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "85234923-92c5-4e72-b593-880098baf571", + "x-ms-client-request-id": "37617bbd369c3124106ee1120009be04" + }, + "ResponseBody": { + "participantId": "ec6509bf-4263-4e92-ac07-7d08aaa2cb57" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/b21f1300-058d-40e5-88e6-fb85f42be0c7/participants/ec6509bf-4263-4e92-ac07-7d08aaa2cb57?api-version=2021-06-15-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 00:53:07 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "e1973e776e8a253114e1d0e5936c4642", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 00:53:07 GMT", + "X-Azure-Ref": "0c0vJYAAAAADqN7JST0F9RL5k\u002BHfjcV1yV1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "c5f65d20-c723-4f82-9fa3-226ac4183418", + "x-ms-client-request-id": "e1973e776e8a253114e1d0e5936c4642" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/b21f1300-058d-40e5-88e6-fb85f42be0c7/:hangup?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 00:53:19 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "75fe026a8e4894dab02bfb10e8f82276", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 00:53:19 GMT", + "X-Azure-Ref": "0f0vJYAAAAAAo6ey4cUg7RpiGNenwL8PcV1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "961ad1bd-531c-4316-9332-3b88b5252ab6", + "x-ms-client-request-id": "75fe026a8e4894dab02bfb10e8f82276" + }, + "ResponseBody": [] + } + ], + "Variables": { + "ALTERNATE_CALLERID": "Sanitized", + "AZURE_PHONE_NUMBER": "Sanitized", + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://acstestbot1.communication.azure.com/;accesskey=Kg==", + "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot1.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "423820033" + } +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RunCreateAddRemoveHangupScenarioTestsAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RunCreateAddRemoveHangupScenarioTestsAsync.json new file mode 100644 index 0000000000000..3ae795151b8ce --- /dev/null +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RunCreateAddRemoveHangupScenarioTestsAsync.json @@ -0,0 +1,185 @@ +{ + "Entries": [ + { + "RequestUri": "https://acstestbot1.communication.azure.com/identities?api-version=2021-03-07", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "2", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 02:47:03 GMT", + "traceparent": "00-292e0b1b32cc41429f3db26ae9429d80-ed5aa23c0bd10f4e-00", + "User-Agent": "azsdk-net-Communication.Identity/1.1.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "422c3910d41ce5e257913753e6baa3e8", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": {}, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 02:47:03 GMT", + "MS-CV": "MPQMjXEhKEejHY13Eo8/rw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0J2bJYAAAAABlu4TdTO22QZLXM7FyyTcWV1NURURHRTA4MTkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "422c3910d41ce5e257913753e6baa3e8", + "X-Processing-Time": "94ms" + }, + "ResponseBody": { + "identity": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000a-b298-aea0-51b9-a43a0d009a4f" + } + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "388", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 02:47:03 GMT", + "traceparent": "00-ba51f047e1f15e429b9be83dacc29835-0f2abd848170664a-00", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "fc233447fe1ab89e33898d8d73fc9858", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "alternateCallerId": { + "value": "Sanitized" + }, + "targets": [ + { + "phoneNumber": { + "value": "Sanitized" + } + } + ], + "source": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000a-b298-aea0-51b9-a43a0d009a4f" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated", + "dtmfReceived" + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "110", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 02:47:03 GMT", + "X-Azure-Ref": "0J2bJYAAAAAAcip9JfhFJR7bItClkkSSTV1NURURHRTA4MTkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "11c19dc6-753f-4e13-8448-6d594fae0ab9", + "x-ms-client-request-id": "fc233447fe1ab89e33898d8d73fc9858" + }, + "ResponseBody": { + "callLegId": "761f1300-7d9c-4f8b-9a12-89c8b8941063", + "callConnectionId": "761f1300-7d9c-4f8b-9a12-89c8b8941063" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/761f1300-7d9c-4f8b-9a12-89c8b8941063/participants?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "126", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 02:47:13 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "cb47f7341133b4af5a8fc2eb57796400", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "participant": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000a-b200-7a0d-570c-113a0d00288d" + } + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "56", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 02:47:13 GMT", + "X-Azure-Ref": "0MWbJYAAAAAD3SA2ix3FTRK1EAxOwMLpeV1NURURHRTA4MTkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "393391fb-6811-4b6b-bfbc-6c481760f8cc", + "x-ms-client-request-id": "cb47f7341133b4af5a8fc2eb57796400" + }, + "ResponseBody": { + "participantId": "905aac00-45df-4869-8da7-23c3d86db1c4" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/761f1300-7d9c-4f8b-9a12-89c8b8941063/participants/905aac00-45df-4869-8da7-23c3d86db1c4?api-version=2021-06-15-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 02:47:24 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "02eebb81a11712169b730f934755715b", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 02:47:23 GMT", + "X-Azure-Ref": "0PGbJYAAAAAB0vjmsevIhQ6rY3dTzcjJ\u002BV1NURURHRTA4MTkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "7a7b3abc-9c90-4c51-9df6-833ea213a53a", + "x-ms-client-request-id": "02eebb81a11712169b730f934755715b" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/761f1300-7d9c-4f8b-9a12-89c8b8941063/:hangup?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 02:47:34 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "ef1fdef8d77335b5856fa18b3cb360b9", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 02:47:33 GMT", + "X-Azure-Ref": "0RmbJYAAAAAClHElVugeoSprumTu1r80NV1NURURHRTA4MTkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "532007e9-5790-4c08-8442-fa39e73c85f7", + "x-ms-client-request-id": "ef1fdef8d77335b5856fa18b3cb360b9" + }, + "ResponseBody": [] + } + ], + "Variables": { + "ALTERNATE_CALLERID": "Sanitized", + "AZURE_PHONE_NUMBER": "Sanitized", + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://acstestbot1.communication.azure.com/;accesskey=Kg==", + "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot1.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "398231748" + } +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RunCreatePlayCancelHangupScenarioTests.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RunCreatePlayCancelHangupScenarioTests.json new file mode 100644 index 0000000000000..4794ffa516ccd --- /dev/null +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RunCreatePlayCancelHangupScenarioTests.json @@ -0,0 +1,192 @@ +{ + "Entries": [ + { + "RequestUri": "https://acstestbot1.communication.azure.com/identities?api-version=2021-03-07", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "2", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 02:50:24 GMT", + "traceparent": "00-a4935b7252145545817d1680c4827e3a-87bf3e667c68be4c-00", + "User-Agent": "azsdk-net-Communication.Identity/1.1.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "fbc68bc12c3dc3845fed5c7c01ffddd1", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": {}, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 02:50:23 GMT", + "MS-CV": "ekKTkoxIGUSgHaoVZHgOqQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "08GbJYAAAAABPf\u002BM1t1HRTIK54vGzT1XXV1NURURHRTA4MTYAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "fbc68bc12c3dc3845fed5c7c01ffddd1", + "X-Processing-Time": "79ms" + }, + "ResponseBody": { + "identity": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000a-b29b-bde8-71bf-a43a0d00aaf1" + } + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "388", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 02:50:24 GMT", + "traceparent": "00-7a3f51d045d5a34ab9d82eae94b639db-fc2e806a88a7f144-00", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "51e8db5f086fd2d835fbe7ff672bf037", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "alternateCallerId": { + "value": "Sanitized" + }, + "targets": [ + { + "phoneNumber": { + "value": "Sanitized" + } + } + ], + "source": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000a-b29b-bde8-71bf-a43a0d00aaf1" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated", + "dtmfReceived" + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "110", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 02:50:23 GMT", + "X-Azure-Ref": "08GbJYAAAAADtwZp4\u002BpgqQYHlj5z6/mJLV1NURURHRTA4MTYAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "09ee466e-f5c7-4654-aebc-f11bfcf30e2b", + "x-ms-client-request-id": "51e8db5f086fd2d835fbe7ff672bf037" + }, + "ResponseBody": { + "callLegId": "01201300-3da1-4b5a-a4a9-8a91311037b7", + "callConnectionId": "01201300-3da1-4b5a-a4a9-8a91311037b7" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/01201300-3da1-4b5a-a4a9-8a91311037b7/:playAudio?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "190", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 02:50:34 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "3f82b20ca43688f39cc5acb3d7942525", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "audioFileUri": "https://dummy.ngrok.io/audio/sample-message.wav", + "loop": false, + "operationContext": "de346f03-7f8d-41ab-a232-cc5e14990769", + "audioFileId": "ebb1d98d-fd86-4204-800c-f7bdfc2e515c" + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "131", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 02:50:35 GMT", + "X-Azure-Ref": "0\u002BmbJYAAAAABJVJ32wLyhTJFAasbbuTSoV1NURURHRTA4MTYAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "f4f5a7e9-4240-4a0c-b510-e30c27fbc358", + "x-ms-client-request-id": "3f82b20ca43688f39cc5acb3d7942525" + }, + "ResponseBody": { + "operationId": "c2123c45-5032-425a-9883-4742f8d74722", + "status": "running", + "operationContext": "de346f03-7f8d-41ab-a232-cc5e14990769" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/01201300-3da1-4b5a-a4a9-8a91311037b7/:cancelAllMediaOperations?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "2", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 02:50:46 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "bf654c2b80fbb95ab2f4c64144855b34", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": {}, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "75", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 02:50:46 GMT", + "X-Azure-Ref": "0BmfJYAAAAADT6QQ\u002BcnYoSb4vevUypgooV1NURURHRTA4MTYAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "323a1e39-8413-4e5b-9363-25f9e9add274", + "x-ms-client-request-id": "bf654c2b80fbb95ab2f4c64144855b34" + }, + "ResponseBody": { + "operationId": "819edd7b-e769-4f4f-a1de-084beb66d8fe", + "status": "completed" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/01201300-3da1-4b5a-a4a9-8a91311037b7/:hangup?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 02:50:56 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "4f7024fc9e7cbb9be85fb4a95c25faa0", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 02:50:56 GMT", + "X-Azure-Ref": "0EGfJYAAAAABIbhsKhzktR6b/JJVfRDuZV1NURURHRTA4MTYAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "a08d69d9-faf1-4e30-997e-7894ba55d133", + "x-ms-client-request-id": "4f7024fc9e7cbb9be85fb4a95c25faa0" + }, + "ResponseBody": [] + } + ], + "Variables": { + "ALTERNATE_CALLERID": "Sanitized", + "AZURE_PHONE_NUMBER": "Sanitized", + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://acstestbot1.communication.azure.com/;accesskey=Kg==", + "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot1.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1479243591" + } +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RunCreatePlayCancelHangupScenarioTestsAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RunCreatePlayCancelHangupScenarioTestsAsync.json new file mode 100644 index 0000000000000..4598bca33e4f3 --- /dev/null +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RunCreatePlayCancelHangupScenarioTestsAsync.json @@ -0,0 +1,192 @@ +{ + "Entries": [ + { + "RequestUri": "https://acstestbot1.communication.azure.com/identities?api-version=2021-03-07", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "2", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 00:48:45 GMT", + "traceparent": "00-082a9606c14f804386d10d505e1bbb6f-ff8156e41829e04d-00", + "User-Agent": "azsdk-net-Communication.Identity/1.1.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "d76df114f6a29e3f08e7928c322e3631", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": {}, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 00:48:45 GMT", + "MS-CV": "JrXBhw0XDkSH7sNgh1pzUQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0bUrJYAAAAACG7bx3iv/rS6uGrS2DaQt7V1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "d76df114f6a29e3f08e7928c322e3631", + "X-Processing-Time": "88ms" + }, + "ResponseBody": { + "identity": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000a-b22c-6155-290c-113a0d00f7de" + } + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "388", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 00:48:46 GMT", + "traceparent": "00-7570b7647491ec4c878a4ad91b88e96a-639e2d7a439d2847-00", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "568790ef80ccc0ab5f53da2e8862529c", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "alternateCallerId": { + "value": "Sanitized" + }, + "targets": [ + { + "phoneNumber": { + "value": "Sanitized" + } + } + ], + "source": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000a-b22c-6155-290c-113a0d00f7de" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated", + "dtmfReceived" + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "110", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 00:48:45 GMT", + "X-Azure-Ref": "0bkrJYAAAAAC6kVNv7ge0T5Io7lDRMarfV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "73cc08e4-cbd1-4f8f-950e-913e2aa0ad8a", + "x-ms-client-request-id": "568790ef80ccc0ab5f53da2e8862529c" + }, + "ResponseBody": { + "callLegId": "f11f1300-160b-444e-af99-af3e7bfcadf7", + "callConnectionId": "f11f1300-160b-444e-af99-af3e7bfcadf7" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/f11f1300-160b-444e-af99-af3e7bfcadf7/:playAudio?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "190", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 00:48:56 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "0afd87e15d5ca65dc5d31a3c3dc1e896", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "audioFileUri": "https://dummy.ngrok.io/audio/sample-message.wav", + "loop": false, + "operationContext": "de346f03-7f8d-41ab-a232-cc5e14990769", + "audioFileId": "ebb1d98d-fd86-4204-800c-f7bdfc2e515c" + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "131", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 00:48:55 GMT", + "X-Azure-Ref": "0eErJYAAAAABt8OZpB3puTbyofhiChNM0V1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "eb19972f-dccd-4197-9b44-1a1cd278bda3", + "x-ms-client-request-id": "0afd87e15d5ca65dc5d31a3c3dc1e896" + }, + "ResponseBody": { + "operationId": "5ea3c453-7706-4aee-95c7-1e2ea0af1d36", + "status": "running", + "operationContext": "de346f03-7f8d-41ab-a232-cc5e14990769" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/f11f1300-160b-444e-af99-af3e7bfcadf7/:cancelAllMediaOperations?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "2", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 00:49:06 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "2245966dbd2794b646ad774f1c1116a6", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": {}, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "75", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 00:49:05 GMT", + "X-Azure-Ref": "0gkrJYAAAAADunrHo2PRzSKFESx\u002BIqirkV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "fa85a42d-0f62-4a44-8383-6dd852591cce", + "x-ms-client-request-id": "2245966dbd2794b646ad774f1c1116a6" + }, + "ResponseBody": { + "operationId": "cc81a010-55da-4ecf-9fce-5cc417a43aec", + "status": "completed" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/f11f1300-160b-444e-af99-af3e7bfcadf7/:hangup?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 00:49:16 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "abaaf5952c3191d533e191f8666e829d", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 00:49:15 GMT", + "X-Azure-Ref": "0jErJYAAAAACoR7Y/VapuTKF5Zc/bW/v3V1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "8f74d0c6-ba85-4c79-8255-9c5c541d01a1", + "x-ms-client-request-id": "abaaf5952c3191d533e191f8666e829d" + }, + "ResponseBody": [] + } + ], + "Variables": { + "ALTERNATE_CALLERID": "Sanitized", + "AZURE_PHONE_NUMBER": "Sanitized", + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://acstestbot1.communication.azure.com/;accesskey=Kg==", + "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot1.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "34829153" + } +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/CancelAllMediaOperationsTest.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/CancelAllMediaOperationsTest.json deleted file mode 100644 index 84303b3fdbf06..0000000000000 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/CancelAllMediaOperationsTest.json +++ /dev/null @@ -1,193 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://acstestbot3.communication.azure.com/identities?api-version=2021-03-07", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "2", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 21:33:14 GMT", - "traceparent": "00-70ff82b91389e640b5cc378941aa7278-034203f41a895c40-00", - "User-Agent": "azsdk-net-Communication.Identity/1.1.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "3a91045fc3b28947c3bc6bb38d011636", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": {}, - "StatusCode": 201, - "ResponseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 21:33:14 GMT", - "MS-CV": "O6Rhb9vQlUaWuTXIuX9kPA.0", - "Request-Context": "appId=", - "Strict-Transport-Security": "max-age=2592000", - "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0m5C\u002BYAAAAACgUupLjIauQrtNt/7YYfruV1NURURHRTA4MjAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "3a91045fc3b28947c3bc6bb38d011636", - "X-Processing-Time": "89ms" - }, - "ResponseBody": { - "identity": { - "id": "8:acs:02665c56-277e-4c59-bab4-c475caa3ee80_0000000a-8846-8408-3ef0-8b3a0d002505" - } - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "388", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 21:33:16 GMT", - "traceparent": "00-25fd9d696df13644ae8cea5f2afda2f3-f58afde3f311ad4c-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "16f888f3262fb3425888af43511f9865", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "alternateCallerId": { - "value": "Sanitized" - }, - "targets": [ - { - "phoneNumber": { - "value": "Sanitized" - } - } - ], - "source": { - "communicationUser": { - "id": "8:acs:02665c56-277e-4c59-bab4-c475caa3ee80_0000000a-8846-8408-3ef0-8b3a0d002505" - } - }, - "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", - "requestedMediaTypes": [ - "audio" - ], - "requestedCallEvents": [ - "participantsUpdated", - "dtmfReceived" - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Client-Request-Id": "270077c7-7660-46ab-bc41-c2dc2e53d946", - "Content-Length": "52", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 21:33:15 GMT", - "X-Azure-Ref": "0nJC\u002BYAAAAABPo1lpCog6T7fwfYRzWtJGV1NURURHRTA4MjAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "72273267-4def-43fc-8c34-3586fc69e2f4" - }, - "ResponseBody": { - "callConnectionId": "00000b80-b462-4411-b32a-c704e059f1c7" - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections/00000b80-b462-4411-b32a-c704e059f1c7/:playAudio?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "189", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 21:33:26 GMT", - "traceparent": "00-c2efbd308de11b47a827b3326bf1b27d-5e29db60a7534e46-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "d7a070c88562db1df7a3fef86f0a778d", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "audioFileUri": "https://dummy.ngrok.io/audio/sample-message.wav", - "loop": true, - "operationContext": "de346f03-7f8d-41ab-a232-cc5e14990769", - "audioFileId": "ebb1d98d-fd86-4204-800c-f7bdfc2e515c" - }, - "StatusCode": 202, - "ResponseHeaders": { - "Client-Request-Id": "d6422823-e979-414c-b22d-a903821bd769", - "Content-Length": "122", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 21:33:26 GMT", - "X-Azure-Ref": "0ppC\u002BYAAAAACfwgh7MHw6Sqw\u002BRtn3pz6HV1NURURHRTA4MjAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "f79370ff-9595-420b-ac80-3d773f898579" - }, - "ResponseBody": { - "id": "d32ac4dd-800f-4703-ac9e-cb2eba999b24", - "status": "running", - "operationContext": "de346f03-7f8d-41ab-a232-cc5e14990769" - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections/00000b80-b462-4411-b32a-c704e059f1c7/:cancelAllMediaOperations?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "2", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 21:33:32 GMT", - "traceparent": "00-a11ec20337b7184f945d622a464e3456-914744677d3e7849-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "cd82999b133838b5c2dde129130437a3", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": {}, - "StatusCode": 200, - "ResponseHeaders": { - "Client-Request-Id": "34145f63-32be-406c-837d-08f45da19ee6", - "Content-Length": "66", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 21:33:31 GMT", - "X-Azure-Ref": "0rJC\u002BYAAAAAAb8GLZxK31RoIddYT9ETjnV1NURURHRTA4MjAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "d6794596-646c-4457-8265-f56185996d41" - }, - "ResponseBody": { - "id": "9caedaea-d129-4875-8b32-403754f9bfd8", - "status": "completed" - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections/00000b80-b462-4411-b32a-c704e059f1c7/:hangup?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Date": "Mon, 07 Jun 2021 21:33:40 GMT", - "traceparent": "00-06fd3b3b9a6965499644b273b94b3003-190d7b8c3ae5dd46-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "1deb06243e606ed36a1d1f8c2749434e", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "Client-Request-Id": "2be0c098-78a9-4b9c-aa40-83432b10c2ce", - "Content-Length": "0", - "Date": "Mon, 07 Jun 2021 21:33:39 GMT", - "X-Azure-Ref": "0tJC\u002BYAAAAADL\u002BNa0hATnQJK\u002BaaxYAoXAV1NURURHRTA4MjAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "d7647a97-8419-488b-b930-c858c7b20c78" - }, - "ResponseBody": [] - } - ], - "Variables": { - "AZURE_PHONE_NUMBER": "Sanitized", - "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", - "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", - "RandomSeed": "1959684932" - } -} diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/CancelAllMediaOperationsTestAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/CancelAllMediaOperationsTestAsync.json deleted file mode 100644 index 5cbf2f1d61b2e..0000000000000 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/CancelAllMediaOperationsTestAsync.json +++ /dev/null @@ -1,193 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://acstestbot3.communication.azure.com/identities?api-version=2021-03-07", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "2", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 21:32:06 GMT", - "traceparent": "00-c851b7e5ed46814f9f81e9412452280e-33b734496067e247-00", - "User-Agent": "azsdk-net-Communication.Identity/1.1.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "85386b3453516484d0b733876273b734", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": {}, - "StatusCode": 201, - "ResponseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 21:32:06 GMT", - "MS-CV": "JOokOoj9w0aGYpJgvb2m5w.0", - "Request-Context": "appId=", - "Strict-Transport-Security": "max-age=2592000", - "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0V5C\u002BYAAAAACamtRHYCRkRpfR9ZiEMchbV1NURURHRTA4MjEAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "85386b3453516484d0b733876273b734", - "X-Processing-Time": "30ms" - }, - "ResponseBody": { - "identity": { - "id": "8:acs:02665c56-277e-4c59-bab4-c475caa3ee80_0000000a-8845-793b-0e04-343a0d0050cf" - } - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "388", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 21:32:07 GMT", - "traceparent": "00-351cb0e323dcd743802a8088377ef236-c403d8318d4e244b-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "a7a015657f3a707ebeab76079b5db180", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "alternateCallerId": { - "value": "Sanitized" - }, - "targets": [ - { - "phoneNumber": { - "value": "Sanitized" - } - } - ], - "source": { - "communicationUser": { - "id": "8:acs:02665c56-277e-4c59-bab4-c475caa3ee80_0000000a-8845-793b-0e04-343a0d0050cf" - } - }, - "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", - "requestedMediaTypes": [ - "audio" - ], - "requestedCallEvents": [ - "participantsUpdated", - "dtmfReceived" - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Client-Request-Id": "41453c0c-905f-466c-80e7-d8b00aeca5f0", - "Content-Length": "52", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 21:32:07 GMT", - "X-Azure-Ref": "0V5C\u002BYAAAAABq4uRWokpsRo67nRS/bVVFV1NURURHRTA4MjEAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "c3b4f31a-b467-4cf7-b0ef-73360e149208" - }, - "ResponseBody": { - "callConnectionId": "04000b80-d37e-440a-b08a-5b0d3862bbfb" - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections/04000b80-d37e-440a-b08a-5b0d3862bbfb/:playAudio?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "189", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 21:32:18 GMT", - "traceparent": "00-f5d984ce0caa9548aa2c58f4262ae534-7f34d64a7dabf949-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "99014c3a65871596c72d30c2313cdd74", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "audioFileUri": "https://dummy.ngrok.io/audio/sample-message.wav", - "loop": true, - "operationContext": "de346f03-7f8d-41ab-a232-cc5e14990769", - "audioFileId": "ebb1d98d-fd86-4204-800c-f7bdfc2e515c" - }, - "StatusCode": 202, - "ResponseHeaders": { - "Client-Request-Id": "d86ba053-cc2b-4ba6-a721-933d28c14ba3", - "Content-Length": "122", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 21:32:17 GMT", - "X-Azure-Ref": "0YpC\u002BYAAAAAByhppb6Du0SpXmImkL6QujV1NURURHRTA4MjEAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "9bda2bd2-9465-47e3-8778-dd98f1997d29" - }, - "ResponseBody": { - "id": "6257383a-1966-42b0-9509-2f66164744e8", - "status": "running", - "operationContext": "de346f03-7f8d-41ab-a232-cc5e14990769" - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections/04000b80-d37e-440a-b08a-5b0d3862bbfb/:cancelAllMediaOperations?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "2", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 21:32:23 GMT", - "traceparent": "00-d71e866bb505f941808d1993c8af5b25-df76a380f902c647-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "83991d694137b407edc7c7a5dd7cc973", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": {}, - "StatusCode": 200, - "ResponseHeaders": { - "Client-Request-Id": "6ddcd3cf-7a3c-4291-8881-c3ba1f6739ce", - "Content-Length": "66", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 21:32:23 GMT", - "X-Azure-Ref": "0Z5C\u002BYAAAAAAnBjtZVIp9R5a4HGN3WHFLV1NURURHRTA4MjEAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "1a2e20c2-41c1-4a3f-bd94-8d5cc85fe1c7" - }, - "ResponseBody": { - "id": "bb2b8889-df0e-44ad-9513-4f3d1e698f37", - "status": "completed" - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections/04000b80-d37e-440a-b08a-5b0d3862bbfb/:hangup?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Date": "Mon, 07 Jun 2021 21:32:32 GMT", - "traceparent": "00-7a42cdf4ebc9fe488d25de98f25b382e-51f3d6facc1a2345-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "154cb2061e71ffad7e8bdf0c4ebb3e81", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "Client-Request-Id": "a33479a1-fce1-49fe-8819-80a6eb270aaf", - "Content-Length": "0", - "Date": "Mon, 07 Jun 2021 21:32:31 GMT", - "X-Azure-Ref": "0b5C\u002BYAAAAAByvzMkFgeXRLhuW637U54FV1NURURHRTA4MjEAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "8384df1a-783f-43c3-a393-1a725582cfdc" - }, - "ResponseBody": [] - } - ], - "Variables": { - "AZURE_PHONE_NUMBER": "Sanitized", - "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", - "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", - "RandomSeed": "1859146728" - } -} diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/CreateCallConnectionTest.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/CreateCallConnectionTest.json deleted file mode 100644 index ef8a95d49b5ff..0000000000000 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/CreateCallConnectionTest.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://acstestbot3.communication.azure.com/identities?api-version=2021-03-07", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "2", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 18:11:47 GMT", - "traceparent": "00-dce5ab2dd9f9294da83c23c04c4b93a0-e5dfeb27fff23546-00", - "User-Agent": "azsdk-net-Communication.Identity/1.1.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "e96333c2a95914ae53be009620a86591", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": {}, - "StatusCode": 201, - "ResponseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 18:11:47 GMT", - "MS-CV": "U/fWzwghYESANtfT9fKQsw.0", - "Request-Context": "appId=", - "Strict-Transport-Security": "max-age=2592000", - "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0ZGG\u002BYAAAAADBIiegi3spSa4qj6gzzMgsV1NURURHRTA4MTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "e96333c2a95914ae53be009620a86591", - "X-Processing-Time": "22ms" - }, - "ResponseBody": { - "identity": { - "id": "8:acs:02665c56-277e-4c59-bab4-c475caa3ee80_0000000a-878e-1315-ac00-343a0d006216" - } - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "388", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 18:11:48 GMT", - "traceparent": "00-1dd237a56fee6f46bd5451fd1b1615ea-9488b0af5c842e4c-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "a0a79d28c93a0d02342bb4975468973d", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "alternateCallerId": { - "value": "Sanitized" - }, - "targets": [ - { - "phoneNumber": { - "value": "Sanitized" - } - } - ], - "source": { - "communicationUser": { - "id": "8:acs:02665c56-277e-4c59-bab4-c475caa3ee80_0000000a-878e-1315-ac00-343a0d006216" - } - }, - "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", - "requestedMediaTypes": [ - "audio" - ], - "requestedCallEvents": [ - "participantsUpdated", - "dtmfReceived" - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Client-Request-Id": "c074b88e-804a-4ba7-85b8-197f25f415a5", - "Content-Length": "52", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 18:11:48 GMT", - "X-Azure-Ref": "0ZGG\u002BYAAAAAB5blUKyCDlRrbcwUnWy8ZUV1NURURHRTA4MTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "ba9797a5-a5a3-4c2d-aa4c-e9ba84a2b38b" - }, - "ResponseBody": { - "callConnectionId": "01000b80-2fb2-4fc3-b9dd-56bb53310817" - } - } - ], - "Variables": { - "AZURE_PHONE_NUMBER": "Sanitized", - "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", - "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", - "RandomSeed": "220983724" - } -} diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/CreateCallConnectionTestAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/CreateCallConnectionTestAsync.json deleted file mode 100644 index 4515c92cbd763..0000000000000 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/CreateCallConnectionTestAsync.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://acstestbot3.communication.azure.com/identities?api-version=2021-03-07", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "2", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 18:12:05 GMT", - "traceparent": "00-dea997ce4277504bb8921188c12b8362-ca29ca150e198744-00", - "User-Agent": "azsdk-net-Communication.Identity/1.1.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "3311b2a5c2466c95f5e2317eac00670f", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": {}, - "StatusCode": 201, - "ResponseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 18:12:05 GMT", - "MS-CV": "KXfDgPYZfEGDIqrYFtuKBQ.0", - "Request-Context": "appId=", - "Strict-Transport-Security": "max-age=2592000", - "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0dmG\u002BYAAAAAAnUzrkgC3ES4W1\u002BIL1rpoUV1NURURHRTA4MTkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "3311b2a5c2466c95f5e2317eac00670f", - "X-Processing-Time": "62ms" - }, - "ResponseBody": { - "identity": { - "id": "8:acs:02665c56-277e-4c59-bab4-c475caa3ee80_0000000a-878e-5b53-63b2-a43a0d00c523" - } - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "388", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 18:12:07 GMT", - "traceparent": "00-e71070e71c2e824da803aec64093f299-bcac09add5c57040-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "099ca2124bfb3a81e5296b26803322e5", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "alternateCallerId": { - "value": "Sanitized" - }, - "targets": [ - { - "phoneNumber": { - "value": "Sanitized" - } - } - ], - "source": { - "communicationUser": { - "id": "8:acs:02665c56-277e-4c59-bab4-c475caa3ee80_0000000a-878e-5b53-63b2-a43a0d00c523" - } - }, - "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", - "requestedMediaTypes": [ - "audio" - ], - "requestedCallEvents": [ - "participantsUpdated", - "dtmfReceived" - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Client-Request-Id": "e62c5ba7-847d-4131-be89-05077fa07cd4", - "Content-Length": "52", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 18:12:06 GMT", - "X-Azure-Ref": "0dmG\u002BYAAAAACzhkxnrUWCRYuhxrStGO6AV1NURURHRTA4MTkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "8fcef782-32fb-4bbe-aa88-1461e3c446e8" - }, - "ResponseBody": { - "callConnectionId": "421f0b00-18fe-42e3-bf56-c7b21b1e5ddb" - } - } - ], - "Variables": { - "AZURE_PHONE_NUMBER": "Sanitized", - "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", - "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", - "RandomSeed": "1211965556" - } -} diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/HangupCallTest.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/HangupCallTest.json deleted file mode 100644 index 9bf5bf43f6bfd..0000000000000 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/HangupCallTest.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://acstestbot3.communication.azure.com/identities?api-version=2021-03-07", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "2", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 18:25:24 GMT", - "traceparent": "00-efb5f7806f8b684f894c8da01b26dfa3-093bd83626c2344c-00", - "User-Agent": "azsdk-net-Communication.Identity/1.1.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "00d417104b077836f316ea503ab37c0f", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": {}, - "StatusCode": 201, - "ResponseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 18:25:24 GMT", - "MS-CV": "fQ7lpPp0EEGHBNVlZlsnrA.0", - "Request-Context": "appId=", - "Strict-Transport-Security": "max-age=2592000", - "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0lGS\u002BYAAAAACONkVsJj0pSYY7HWdN1enRV1NURURHRTA4MjAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00d417104b077836f316ea503ab37c0f", - "X-Processing-Time": "83ms" - }, - "ResponseBody": { - "identity": { - "id": "8:acs:02665c56-277e-4c59-bab4-c475caa3ee80_0000000a-879a-89bd-3ef0-8b3a0d001879" - } - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "388", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 18:25:25 GMT", - "traceparent": "00-b7df0110e3475844b218a44743e6481e-57e4393e4651184f-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "b8ab92948235e0681181d4d220589e19", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "alternateCallerId": { - "value": "Sanitized" - }, - "targets": [ - { - "phoneNumber": { - "value": "Sanitized" - } - } - ], - "source": { - "communicationUser": { - "id": "8:acs:02665c56-277e-4c59-bab4-c475caa3ee80_0000000a-879a-89bd-3ef0-8b3a0d001879" - } - }, - "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", - "requestedMediaTypes": [ - "audio" - ], - "requestedCallEvents": [ - "participantsUpdated", - "dtmfReceived" - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Client-Request-Id": "7ec2bbb0-e51d-4b33-be65-df5a0dd3c1a2", - "Content-Length": "52", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 18:25:24 GMT", - "X-Azure-Ref": "0lWS\u002BYAAAAAADAbHvimUHQbgmOU\u002BmEnB2V1NURURHRTA4MjAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "30cb00f4-fc86-43a3-83bc-3700cbf1850c" - }, - "ResponseBody": { - "callConnectionId": "02000480-0741-423e-b611-728726f70e45" - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections/02000480-0741-423e-b611-728726f70e45/:hangup?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Date": "Mon, 07 Jun 2021 18:25:36 GMT", - "traceparent": "00-d17f6b8469bd0449933f5f5e9ac01fc5-b5178bd693cd2e48-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "1b4e187359bb41c67119f1ec2e85daba", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "Client-Request-Id": "165a78fc-f7f9-4309-933e-5e937102041d", - "Content-Length": "0", - "Date": "Mon, 07 Jun 2021 18:25:35 GMT", - "X-Azure-Ref": "0n2S\u002BYAAAAACXJoKTCGy6TbSOogjNqAi7V1NURURHRTA4MjAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "184496e3-3e45-477e-9544-81ea8a95a0bc" - }, - "ResponseBody": [] - } - ], - "Variables": { - "AZURE_PHONE_NUMBER": "Sanitized", - "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", - "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", - "RandomSeed": "946057836" - } -} diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/HangupCallTestAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/HangupCallTestAsync.json deleted file mode 100644 index 64e820b7a88df..0000000000000 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/HangupCallTestAsync.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://acstestbot3.communication.azure.com/identities?api-version=2021-03-07", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "2", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 18:25:45 GMT", - "traceparent": "00-e8142d21ab79cb4e818ddee47a78b50b-f80ba5834d1bc348-00", - "User-Agent": "azsdk-net-Communication.Identity/1.1.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "c901f2c1893a2ba154a0abe21d9923da", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": {}, - "StatusCode": 201, - "ResponseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 18:25:46 GMT", - "MS-CV": "ncYMhZ/UXkyHP4ZbTR2iAg.0", - "Request-Context": "appId=", - "Strict-Transport-Security": "max-age=2592000", - "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0qmS\u002BYAAAAABZIZs/\u002BrVjTZlPviX/oWiWV1NURURHRTA4MjIAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "c901f2c1893a2ba154a0abe21d9923da", - "X-Processing-Time": "65ms" - }, - "ResponseBody": { - "identity": { - "id": "8:acs:02665c56-277e-4c59-bab4-c475caa3ee80_0000000a-879a-ded5-b5bb-a43a0d00ee34" - } - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "388", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 18:25:47 GMT", - "traceparent": "00-91755657f81023428779323a967fac39-7af0a30b443a6547-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "2f0181bcbf4773dc3fc0fa67f56a780e", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "alternateCallerId": { - "value": "Sanitized" - }, - "targets": [ - { - "phoneNumber": { - "value": "Sanitized" - } - } - ], - "source": { - "communicationUser": { - "id": "8:acs:02665c56-277e-4c59-bab4-c475caa3ee80_0000000a-879a-ded5-b5bb-a43a0d00ee34" - } - }, - "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", - "requestedMediaTypes": [ - "audio" - ], - "requestedCallEvents": [ - "participantsUpdated", - "dtmfReceived" - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Client-Request-Id": "d5b4bf81-068f-4b0a-a28e-a04f6edeccc3", - "Content-Length": "52", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 18:25:47 GMT", - "X-Azure-Ref": "0q2S\u002BYAAAAACCHl6t7MJKSrGcgEziWXICV1NURURHRTA4MjIAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "eadd1686-a8ed-4acb-a1e2-463b428a837a" - }, - "ResponseBody": { - "callConnectionId": "401f0b00-1883-4397-9ca4-5c507fae5279" - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections/401f0b00-1883-4397-9ca4-5c507fae5279/:hangup?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Date": "Mon, 07 Jun 2021 18:25:57 GMT", - "traceparent": "00-2a86ae4307629a40a96ccfa0a61230fb-39274939414a8143-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "a87fe16028512c0549819d8a68a767b5", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "Client-Request-Id": "ec7b6ae1-16c3-4cb3-99a5-bafd3a936a83", - "Content-Length": "0", - "Date": "Mon, 07 Jun 2021 18:25:57 GMT", - "X-Azure-Ref": "0tWS\u002BYAAAAAAoUJK23Xx9T7GPQiYcBC74V1NURURHRTA4MjIAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "069aaaaa-a019-4b3f-8dde-c4a57d698301" - }, - "ResponseBody": [] - } - ], - "Variables": { - "AZURE_PHONE_NUMBER": "Sanitized", - "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", - "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", - "RandomSeed": "869131480" - } -} diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/PlayAudioTest.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/PlayAudioTest.json deleted file mode 100644 index 0ffce61262bd1..0000000000000 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/PlayAudioTest.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://acstestbot3.communication.azure.com/identities?api-version=2021-03-07", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "2", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 18:07:27 GMT", - "traceparent": "00-d0c4340889bb28409d831df4ad26157d-1262187bb4470d41-00", - "User-Agent": "azsdk-net-Communication.Identity/1.1.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "2bbc01d1771169cf36aba82bb1d246ef", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": {}, - "StatusCode": 201, - "ResponseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 18:07:27 GMT", - "MS-CV": "MPf/pIw8D0KJTU6RVbgLNQ.0", - "Request-Context": "appId=", - "Strict-Transport-Security": "max-age=2592000", - "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0X2C\u002BYAAAAAC6ialYfNA0RalMhRsBpnaZV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "2bbc01d1771169cf36aba82bb1d246ef", - "X-Processing-Time": "87ms" - }, - "ResponseBody": { - "identity": { - "id": "8:acs:02665c56-277e-4c59-bab4-c475caa3ee80_0000000a-878a-1afb-3ef0-8b3a0d001739" - } - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "388", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 18:07:28 GMT", - "traceparent": "00-4b2f5f442efb554c97f31cf6e55ec015-20090c5c3e5d7b44-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "556453dcfb07a73417baf3903a64fb54", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "alternateCallerId": { - "value": "Sanitized" - }, - "targets": [ - { - "phoneNumber": { - "value": "Sanitized" - } - } - ], - "source": { - "communicationUser": { - "id": "8:acs:02665c56-277e-4c59-bab4-c475caa3ee80_0000000a-878a-1afb-3ef0-8b3a0d001739" - } - }, - "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", - "requestedMediaTypes": [ - "audio" - ], - "requestedCallEvents": [ - "participantsUpdated", - "dtmfReceived" - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Client-Request-Id": "3097a918-8f22-4496-acbe-fd586386b03e", - "Content-Length": "52", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 18:07:28 GMT", - "X-Azure-Ref": "0YGC\u002BYAAAAAAFupi4VMT5T5f3sdGD1iUqV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "0a9e4bab-395c-4802-a059-dd0d90c55b6a" - }, - "ResponseBody": { - "callConnectionId": "00000480-f956-4ec6-82ba-533e9f7ab081" - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections/00000480-f956-4ec6-82ba-533e9f7ab081/:playAudio?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "189", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 18:07:39 GMT", - "traceparent": "00-bbb6c2c9813edc4b984308ce84b38ec9-31fffe897fd2fd46-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "335a9909db763529a38b54443617a5af", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "audioFileUri": "https://dummy.ngrok.io/audio/sample-message.wav", - "loop": true, - "operationContext": "de346f03-7f8d-41ab-a232-cc5e14990769", - "audioFileId": "ebb1d98d-fd86-4204-800c-f7bdfc2e515c" - }, - "StatusCode": 202, - "ResponseHeaders": { - "Client-Request-Id": "ee84cc2f-0d52-437e-9916-fccea26ef7d7", - "Content-Length": "122", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 18:07:39 GMT", - "X-Azure-Ref": "0a2C\u002BYAAAAACJsSTaQ6ueSIP9gMeBHkI/V1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "fb2e87c7-947a-4132-a10f-c616817d91c4" - }, - "ResponseBody": { - "id": "1a087e35-0ec6-4ec1-aa94-4306068064b4", - "status": "running", - "operationContext": "de346f03-7f8d-41ab-a232-cc5e14990769" - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections/00000480-f956-4ec6-82ba-533e9f7ab081/:hangup?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Date": "Mon, 07 Jun 2021 18:07:39 GMT", - "traceparent": "00-71b08a92cc38524dae087fa0354cb814-f3b088c00d053f47-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "397f836fe4b1d699cc141357833f2ed2", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "Client-Request-Id": "a4985518-bf9b-4c29-a4ee-3f6b01267f16", - "Content-Length": "0", - "Date": "Mon, 07 Jun 2021 18:07:39 GMT", - "X-Azure-Ref": "0a2C\u002BYAAAAAD9SgKCaPuPTreLvl\u002BKggv3V1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "6a4738c0-5764-4a33-8e87-1c08cffb5be7" - }, - "ResponseBody": [] - } - ], - "Variables": { - "AZURE_PHONE_NUMBER": "Sanitized", - "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", - "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", - "RandomSeed": "511686218" - } -} diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/PlayAudioTestAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/PlayAudioTestAsync.json deleted file mode 100644 index e5c6ee5efcfb6..0000000000000 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallingServerClientsLiveTests/PlayAudioTestAsync.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://acstestbot3.communication.azure.com/identities?api-version=2021-03-07", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "2", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 18:01:29 GMT", - "traceparent": "00-b8a763b75d72cb44ac2b76809830c074-74eba8382728e648-00", - "User-Agent": "azsdk-net-Communication.Identity/1.1.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "d22b710d26a171f7c04b96af3edbf07e", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": {}, - "StatusCode": 201, - "ResponseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 18:01:29 GMT", - "MS-CV": "T6Y6KVpoEUe1PFhDo2iScg.0", - "Request-Context": "appId=", - "Strict-Transport-Security": "max-age=2592000", - "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0\u002BV6\u002BYAAAAADcVE8YvhosQp4eF4452UxJV1NURURHRTA4MTUAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "d22b710d26a171f7c04b96af3edbf07e", - "X-Processing-Time": "91ms" - }, - "ResponseBody": { - "identity": { - "id": "8:acs:02665c56-277e-4c59-bab4-c475caa3ee80_0000000a-8784-a461-80f5-8b3a0d000e3a" - } - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "388", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 18:01:30 GMT", - "traceparent": "00-f8a7affe044e6143963a72da820750a3-e6692c270e7cf549-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "073515ca26cec9412b2caed1f4212f2a", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "alternateCallerId": { - "value": "Sanitized" - }, - "targets": [ - { - "phoneNumber": { - "value": "Sanitized" - } - } - ], - "source": { - "communicationUser": { - "id": "8:acs:02665c56-277e-4c59-bab4-c475caa3ee80_0000000a-8784-a461-80f5-8b3a0d000e3a" - } - }, - "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", - "requestedMediaTypes": [ - "audio" - ], - "requestedCallEvents": [ - "participantsUpdated", - "dtmfReceived" - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Client-Request-Id": "592776d4-ce21-43f3-9c50-b6669350c28d", - "Content-Length": "52", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 18:01:30 GMT", - "X-Azure-Ref": "0\u002Bl6\u002BYAAAAAD/bXEJRTaORJhgNj9lxqVRV1NURURHRTA4MTUAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "82312fe5-c708-43c5-80af-a66c6e440616" - }, - "ResponseBody": { - "callConnectionId": "02000480-322f-4618-83fc-fa0e5e93a6e7" - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections/02000480-322f-4618-83fc-fa0e5e93a6e7/:playAudio?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "189", - "Content-Type": "application/json", - "Date": "Mon, 07 Jun 2021 18:01:41 GMT", - "traceparent": "00-400efe98020abd438b20b820c65ee619-905ab1ae6787c84e-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "a4cd296b50fe940052f979dc1372cf4a", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "audioFileUri": "https://dummy.ngrok.io/audio/sample-message.wav", - "loop": true, - "operationContext": "de346f03-7f8d-41ab-a232-cc5e14990769", - "audioFileId": "ebb1d98d-fd86-4204-800c-f7bdfc2e515c" - }, - "StatusCode": 202, - "ResponseHeaders": { - "Client-Request-Id": "5f917f9c-540e-40f7-acaf-9c3b4e127ca8", - "Content-Length": "122", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 07 Jun 2021 18:01:40 GMT", - "X-Azure-Ref": "0BV\u002B\u002BYAAAAABW4BXwfqAHRaWwPP3TJaKiV1NURURHRTA4MTUAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "bd64970b-2d62-44b5-b5c0-98a8834dcfcf" - }, - "ResponseBody": { - "id": "ad30227b-ce9f-4628-9fee-a68e1bfbc2b7", - "status": "running", - "operationContext": "de346f03-7f8d-41ab-a232-cc5e14990769" - } - }, - { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections/02000480-322f-4618-83fc-fa0e5e93a6e7/:hangup?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Date": "Mon, 07 Jun 2021 18:01:51 GMT", - "traceparent": "00-ea71121663e5844aa499bc2cfcd75786-6bcc24b643439e40-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210607.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "d975e0714e98e63e2f62a67577257d9f", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "Client-Request-Id": "6f886ffc-cb46-4baa-a18a-2440a8feb3c0", - "Content-Length": "0", - "Date": "Mon, 07 Jun 2021 18:01:51 GMT", - "X-Azure-Ref": "0D1\u002B\u002BYAAAAADGnmI6dkApR5sn\u002BTEs3A\u002BmV1NURURHRTA4MTUAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "f7bf70e7-fd1c-47cf-8f42-2794b4245edd" - }, - "ResponseBody": [] - } - ], - "Variables": { - "AZURE_PHONE_NUMBER": "Sanitized", - "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", - "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", - "RandomSeed": "1276655618" - } -} diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/Sample1_CallClient/CreateCall.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/Sample1_CallClient/CreateCall.json index 5c573b5fa8db0..387b4a6d2c81e 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/Sample1_CallClient/CreateCall.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/Sample1_CallClient/CreateCall.json @@ -1,60 +1,96 @@ { "Entries": [ { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "354", - "Content-Type": "application/json", - "Date": "Wed, 02 Jun 2021 21:28:27 GMT", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210602.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "f7c8910f9c6fa503ddd8b7582e6d4d17", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "targets": [ - { - "phoneNumber": { - "value": "\u002B15129104698" - } - } - ], - "source": { - "communicationUser": { - "id": "8:acs:02665c56-277e-4c59-bab4-c475caa3ee80_0000000a-6e82-5005-63b2-a43a0d00393c" - } - }, - "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", - "requestedMediaTypes": [ - "audio" - ], - "requestedCallEvents": [ - "participantsUpdated", - "dtmfReceived" - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Client-Request-Id": "c4d55e4e-e491-434b-a9f1-37a9234d4f51", - "Content-Length": "52", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 02 Jun 2021 21:28:27 GMT", - "X-Azure-Ref": "0\u002B/e3YAAAAAD7jnJZgiP4TKurZwfRajDbV1NURURHRTA4MTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "03025d96-60d3-4ff7-843b-3a4023911570" - }, - "ResponseBody": { - "callLegId": "6c1f6900-1fbd-4ee0-a4b9-2aa0b5f40ad1" + "RequestUri": "https://acstestbot1.communication.azure.com/identities?api-version=2021-03-07", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "2", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 17:01:53 GMT", + "User-Agent": "azsdk-net-Communication.Identity/1.1.0-alpha.20210616.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "f7c8910f9c6fa503ddd8b7582e6d4d17", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": {}, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 17:01:54 GMT", + "MS-CV": "Waia\u002BH\u002BoTkSaqGl671wvsQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0gy7KYAAAAADwMwiEWDQYRLKBnAnlHKJOV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "f7c8910f9c6fa503ddd8b7582e6d4d17", + "X-Processing-Time": "103ms" + }, + "ResponseBody": { + "identity": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000a-b5a7-54a0-e3c7-593a0d008912" } + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "346", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 17:01:55 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210616.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "a585200bb309794fd62f46729d5801ec", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "targets": [ + { + "phoneNumber": { + "value": "Sanitized" + } + } + ], + "source": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000a-b5a7-54a0-e3c7-593a0d008912" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated", + "dtmfReceived" + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "110", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 17:01:55 GMT", + "X-Azure-Ref": "0gy7KYAAAAAA\u002BA4K9iGDhTZnNyh0Y6O5ZV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "51e5fb62-e6b5-4656-9f21-95ab83fa83d1", + "x-ms-client-request-id": "a585200bb309794fd62f46729d5801ec" + }, + "ResponseBody": { + "callLegId": "4c201300-43e4-4471-9b5e-7988ff001cdd", + "callConnectionId": "4c201300-43e4-4471-9b5e-7988ff001cdd" + } } ], "Variables": { - "AZURE_PHONE_NUMBER": "\u002B15129104698", - "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", - "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", + "AZURE_PHONE_NUMBER": "Sanitized", + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://acstestbot1.communication.azure.com/;accesskey=Kg==", + "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot1.communication.azure.com/;accesskey=Kg==", "RandomSeed": "54266852" } -} +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/Sample1_CallClient/CreateCallAsyncAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/Sample1_CallClient/CreateCallAsyncAsync.json index 5393c8071237c..4e00c17a848b5 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/Sample1_CallClient/CreateCallAsyncAsync.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/Sample1_CallClient/CreateCallAsyncAsync.json @@ -1,61 +1,98 @@ { "Entries": [ { - "RequestUri": "https://acstestbot3.communication.azure.com/calling/callConnections?api-version=2021-06-15-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "354", - "Content-Type": "application/json", - "Date": "Wed, 02 Jun 2021 21:28:29 GMT", - "traceparent": "00-f03b3c0995adc24882d0cb3f6d4ef016-32e1ef3fa4d5b94d-00", - "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210602.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "750c6da09b80fc970cd7aa322fd6b1c9", - "x-ms-content-sha256": "Sanitized", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "targets": [ - { - "phoneNumber": { - "value": "\u002B15129104698" - } - } - ], - "source": { - "communicationUser": { - "id": "8:acs:02665c56-277e-4c59-bab4-c475caa3ee80_0000000a-6e82-5627-54b7-a43a0d00395f" - } - }, - "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", - "requestedMediaTypes": [ - "audio" - ], - "requestedCallEvents": [ - "participantsUpdated", - "dtmfReceived" - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Client-Request-Id": "77074750-189c-4615-843f-b357d68fa3b5", - "Content-Length": "52", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 02 Jun 2021 21:28:28 GMT", - "X-Azure-Ref": "0/Pe3YAAAAADZL\u002B\u002BDA03YQangI05vTMI1V1NURURHRTA4MTQAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", - "X-Cache": "CONFIG_NOCACHE", - "X-Microsoft-Skype-Chain-ID": "80b47d16-ed1f-4c8b-88b9-3f6d1de9b3f5" - }, - "ResponseBody": { - "callLegId": "6c1f6900-5681-4271-9cf6-f5c1a3a64bc3" + "RequestUri": "https://acstestbot1.communication.azure.com/identities?api-version=2021-03-07", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "2", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 17:01:57 GMT", + "traceparent": "00-563d4f660fb30b4ba0fdfc0025f17506-50f5c17400915e4e-00", + "User-Agent": "azsdk-net-Communication.Identity/1.1.0-alpha.20210616.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "750c6da09b80fc970cd7aa322fd6b1c9", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": {}, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 17:01:56 GMT", + "MS-CV": "fbWazVRcpkOcx5Y2NiwPMw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0hS7KYAAAAAB\u002B/YJWZ6O4RJSV\u002B9QJ2nt9V1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "750c6da09b80fc970cd7aa322fd6b1c9", + "X-Processing-Time": "22ms" + }, + "ResponseBody": { + "identity": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000a-b5a7-5d10-e3c7-593a0d008917" } + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "346", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 17:01:58 GMT", + "traceparent": "00-47ba21026d51af43b3b276bb9fb8fcb6-b915fd9d37c14f49-00", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210616.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "f65700430c203efc039afdad51d467bb", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "targets": [ + { + "phoneNumber": { + "value": "Sanitized" + } + } + ], + "source": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000a-b5a7-5d10-e3c7-593a0d008917" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated", + "dtmfReceived" + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "110", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 17:01:57 GMT", + "X-Azure-Ref": "0hS7KYAAAAAD0hiiC1T7aRJrZmS4CLBuoV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "8cbc8bfe-863e-476e-85c8-a77b67a93cc4", + "x-ms-client-request-id": "f65700430c203efc039afdad51d467bb" + }, + "ResponseBody": { + "callLegId": "4c201300-eb1e-4e9f-8a0a-6aaf623fc9f3", + "callConnectionId": "4c201300-eb1e-4e9f-8a0a-6aaf623fc9f3" + } } ], "Variables": { - "AZURE_PHONE_NUMBER": "\u002B15129104698", - "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", - "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot3.communication.azure.com/;accesskey=Kg==", + "AZURE_PHONE_NUMBER": "Sanitized", + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://acstestbot1.communication.azure.com/;accesskey=Kg==", + "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot1.communication.azure.com/;accesskey=Kg==", "RandomSeed": "303477573" } -} +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/ServerCallLiveTests/RunAllRecordingFunctionsScenarioTests.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/ServerCallLiveTests/RunAllRecordingFunctionsScenarioTests.json new file mode 100644 index 0000000000000..cd96543a8e84a --- /dev/null +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/ServerCallLiveTests/RunAllRecordingFunctionsScenarioTests.json @@ -0,0 +1,358 @@ +{ + "Entries": [ + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/:join?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "281", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:14:39 GMT", + "traceparent": "00-616dfbbf36772a46864bf7c08755624d-bcc64f263cee0042-00", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "f49f5f0bf1da113c53240a529cfffbef", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "source": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_e3560385-776f-41d1-bf04-07ef738f2f23" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated" + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "110", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:14:40 GMT", + "X-Azure-Ref": "00JbJYAAAAABoXEnj\u002B/jNT6h9T9oEgjZlV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "63fffae3-74c2-4c76-bd52-d7e03c99814c", + "x-ms-client-request-id": "f49f5f0bf1da113c53240a529cfffbef" + }, + "ResponseBody": { + "callLegId": "1f201300-bfb0-4767-9e79-78154c5f075d", + "callConnectionId": "1f201300-bfb0-4767-9e79-78154c5f075d" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/:join?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "281", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:14:41 GMT", + "traceparent": "00-97b6c6b7e5d89e41a1954f50a2583670-b9ea8c9ae34aa643-00", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "37b43a95a006dde1b43b017473e2d7de", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "source": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_e3560385-776f-41d1-bf04-07ef738f2fc1" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated" + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "110", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:14:41 GMT", + "X-Azure-Ref": "00ZbJYAAAAAAWWBFl\u002BUa4Q4pAQfn83SdiV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "afd18997-36d8-4ea5-aaca-6fe5534394e0", + "x-ms-client-request-id": "37b43a95a006dde1b43b017473e2d7de" + }, + "ResponseBody": { + "callLegId": "1f201300-c64b-4d56-8b13-d2d249d66e51", + "callConnectionId": "1f201300-c64b-4d56-8b13-d2d249d66e51" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/recordings?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "97", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:14:43 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "c9e4c88cc186738e15632a50b497a3fc", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "recordingStateCallbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld" + }, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "180", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:14:47 GMT", + "X-Azure-Ref": "005bJYAAAAAA1himOYEmwRKGBxioDEEsFV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "36fe1b85-d99c-4558-8f2e-82ce686480bb", + "x-ms-client-request-id": "c9e4c88cc186738e15632a50b497a3fc" + }, + "ResponseBody": { + "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiIxZjIwMTMwMC1kNDQ0LTRmODItOTNkNS1iMjFjMGI0N2Q0NGYiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiI3ODg1ZGNhYy0zOTU1LTRmNTEtODM1OC01MDNkZmYyZjZkZWIifQ" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/recordings/eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiIxZjIwMTMwMC1kNDQ0LTRmODItOTNkNS1iMjFjMGI0N2Q0NGYiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiI3ODg1ZGNhYy0zOTU1LTRmNTEtODM1OC01MDNkZmYyZjZkZWIifQ?api-version=2021-06-15-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:14:54 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "729d170df0726a9b7dc2409ff0c89e70", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "27", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:14:53 GMT", + "X-Azure-Ref": "03ZbJYAAAAAAgJG8VtzO1TrwwB9BOK5y1V1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "d10931d4-a019-450b-ba8c-7c12b69abfa5", + "x-ms-client-request-id": "729d170df0726a9b7dc2409ff0c89e70" + }, + "ResponseBody": { + "recordingState": "active" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/recordings/eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiIxZjIwMTMwMC1kNDQ0LTRmODItOTNkNS1iMjFjMGI0N2Q0NGYiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiI3ODg1ZGNhYy0zOTU1LTRmNTEtODM1OC01MDNkZmYyZjZkZWIifQ/:pause?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:14:54 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "d3c52c4d311ad369ab4121a37691281d", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:14:54 GMT", + "X-Azure-Ref": "03pbJYAAAAABp62/ClNLRSKXU67cpwhpTV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "4794c1cc-8455-40f9-9376-18b6fff4565e", + "x-ms-client-request-id": "d3c52c4d311ad369ab4121a37691281d" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/recordings/eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiIxZjIwMTMwMC1kNDQ0LTRmODItOTNkNS1iMjFjMGI0N2Q0NGYiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiI3ODg1ZGNhYy0zOTU1LTRmNTEtODM1OC01MDNkZmYyZjZkZWIifQ?api-version=2021-06-15-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:15:00 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "5b67059864459b6c2d794bc481ef834d", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "29", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:15:00 GMT", + "X-Azure-Ref": "05JbJYAAAAACM6rwId1HSQLYyd1v2JmBPV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "aa9d90af-19a5-4b68-b398-b4e1297babf6", + "x-ms-client-request-id": "5b67059864459b6c2d794bc481ef834d" + }, + "ResponseBody": { + "recordingState": "inactive" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/recordings/eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiIxZjIwMTMwMC1kNDQ0LTRmODItOTNkNS1iMjFjMGI0N2Q0NGYiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiI3ODg1ZGNhYy0zOTU1LTRmNTEtODM1OC01MDNkZmYyZjZkZWIifQ/:resume?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:15:00 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "8803bac5d0d2dbe1aec9c730cff8f4eb", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:15:00 GMT", + "X-Azure-Ref": "05JbJYAAAAABe2s0EGy9XRaajwOIaoIGIV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "70b8fd92-9762-4252-8113-5ab171bd0fa1", + "x-ms-client-request-id": "8803bac5d0d2dbe1aec9c730cff8f4eb" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/recordings/eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiIxZjIwMTMwMC1kNDQ0LTRmODItOTNkNS1iMjFjMGI0N2Q0NGYiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiI3ODg1ZGNhYy0zOTU1LTRmNTEtODM1OC01MDNkZmYyZjZkZWIifQ?api-version=2021-06-15-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:15:06 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "ea0623994260e82abf29a6a1e5a552bc", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "27", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:15:06 GMT", + "X-Azure-Ref": "06pbJYAAAAAAMilSk8NYKQI/3lphUmEdQV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "49208aef-1fdc-4dd2-aa6c-8673377f8e1d", + "x-ms-client-request-id": "ea0623994260e82abf29a6a1e5a552bc" + }, + "ResponseBody": { + "recordingState": "active" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/recordings/eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiIxZjIwMTMwMC1kNDQ0LTRmODItOTNkNS1iMjFjMGI0N2Q0NGYiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiI3ODg1ZGNhYy0zOTU1LTRmNTEtODM1OC01MDNkZmYyZjZkZWIifQ?api-version=2021-06-15-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:15:07 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "bbddd4be9f8ec84b238cad7c9d3bcc34", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:15:06 GMT", + "X-Azure-Ref": "06pbJYAAAAADt\u002Bvd3Ym54Tqz0ZriqLeKfV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "b07f60d0-be10-4c91-bd93-4a540be0d6a5", + "x-ms-client-request-id": "bbddd4be9f8ec84b238cad7c9d3bcc34" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/recordings/eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiIxZjIwMTMwMC1kNDQ0LTRmODItOTNkNS1iMjFjMGI0N2Q0NGYiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiI3ODg1ZGNhYy0zOTU1LTRmNTEtODM1OC01MDNkZmYyZjZkZWIifQ?api-version=2021-06-15-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:15:07 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "5e2a5f8598e882ec8f1ac9a82940f508", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 400, + "ResponseHeaders": { + "Content-Length": "93", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:15:06 GMT", + "X-Azure-Ref": "065bJYAAAAAC5fPwjZF8zQJTaqoIJiI\u002BbV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "b91d8469-13ed-4220-bd56-745e7b1d5e87", + "x-ms-client-request-id": "5e2a5f8598e882ec8f1ac9a82940f508" + }, + "ResponseBody": { + "error": { + "code": "8501", + "message": "Action is invalid when call is not in Established state" + } + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/1f201300-bfb0-4767-9e79-78154c5f075d/:hangup?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:15:17 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "fb720b77381af95dd83ec7d495ae4a83", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:15:17 GMT", + "X-Azure-Ref": "09ZbJYAAAAABvakfTfriAR41VW7CnhDyvV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "6d7fb8b8-f118-4157-b315-cb785079c3c2", + "x-ms-client-request-id": "fb720b77381af95dd83ec7d495ae4a83" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/1f201300-c64b-4d56-8b13-d2d249d66e51/:hangup?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:15:17 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "851b715df47a25d3e75b2c73d6a29ee3", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:15:17 GMT", + "X-Azure-Ref": "09ZbJYAAAAADMPDfgdmFDRpl/2PhlOTFNV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "98c8b906-d978-4b79-9ef4-ca0537cdc539", + "x-ms-client-request-id": "851b715df47a25d3e75b2c73d6a29ee3" + }, + "ResponseBody": [] + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot1.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "502582709" + } +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/ServerCallLiveTests/RunAllRecordingFunctionsScenarioTestsAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/ServerCallLiveTests/RunAllRecordingFunctionsScenarioTestsAsync.json new file mode 100644 index 0000000000000..ad6a2e786e705 --- /dev/null +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/ServerCallLiveTests/RunAllRecordingFunctionsScenarioTestsAsync.json @@ -0,0 +1,358 @@ +{ + "Entries": [ + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/:join?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "281", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:15:18 GMT", + "traceparent": "00-05e0689ca538f54aabe8df44bc74195c-0945e65618c20646-00", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "eab6f7d2b4d74866c924b58e71254a96", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "source": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_e3560385-776f-41d1-bf04-07ef738f2f23" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated" + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "110", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:15:17 GMT", + "X-Azure-Ref": "09ZbJYAAAAADV4rOtnoFoR6SfYJ8XtGrTV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "b1821f7c-71c7-4b8e-a9d3-08ac34365333", + "x-ms-client-request-id": "eab6f7d2b4d74866c924b58e71254a96" + }, + "ResponseBody": { + "callLegId": "1f201300-51c4-4357-927c-cb604c8985b5", + "callConnectionId": "1f201300-51c4-4357-927c-cb604c8985b5" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/:join?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "281", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:15:19 GMT", + "traceparent": "00-8eecf367bd8da6468924962b6ae4a351-d6e3015920f3c949-00", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "f4cc0316199005bdbc5465c62f7d4835", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "source": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_e3560385-776f-41d1-bf04-07ef738f2fc1" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated" + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "110", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:15:18 GMT", + "X-Azure-Ref": "095bJYAAAAADxIM9s4yx7RLaKboXrIwJEV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "1113524b-f31f-44a0-8270-69febc265098", + "x-ms-client-request-id": "f4cc0316199005bdbc5465c62f7d4835" + }, + "ResponseBody": { + "callLegId": "1f201300-9f74-415a-bc11-e8a94626e835", + "callConnectionId": "1f201300-9f74-415a-bc11-e8a94626e835" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/recordings?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "97", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:15:20 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "418e72ba16490bbf936b80402adeaea8", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "recordingStateCallbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld" + }, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "180", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:15:23 GMT", + "X-Azure-Ref": "0\u002BJbJYAAAAACtoMAE68pjSbJmuQvqz4reV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "a8242408-39ee-4500-8348-3e00bed80a0c", + "x-ms-client-request-id": "418e72ba16490bbf936b80402adeaea8" + }, + "ResponseBody": { + "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiIxZjIwMTMwMC05M2ZkLTRhYzctYTI3My03OGZlYWM1ZWE3NDkiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiI4OWVkYzEzNS04NjFiLTRkYTgtYTM0Mi0wY2FlNDU3YjNlYzUifQ" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/recordings/eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiIxZjIwMTMwMC05M2ZkLTRhYzctYTI3My03OGZlYWM1ZWE3NDkiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiI4OWVkYzEzNS04NjFiLTRkYTgtYTM0Mi0wY2FlNDU3YjNlYzUifQ?api-version=2021-06-15-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:15:30 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "498fca5e6afab8e539b12e824ea0184c", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "27", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:15:29 GMT", + "X-Azure-Ref": "0ApfJYAAAAABSXC46yruLQ7Q6A\u002BZrgkXtV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "1ff93f18-b521-4b06-834f-b050e15e5610", + "x-ms-client-request-id": "498fca5e6afab8e539b12e824ea0184c" + }, + "ResponseBody": { + "recordingState": "active" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/recordings/eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiIxZjIwMTMwMC05M2ZkLTRhYzctYTI3My03OGZlYWM1ZWE3NDkiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiI4OWVkYzEzNS04NjFiLTRkYTgtYTM0Mi0wY2FlNDU3YjNlYzUifQ/:pause?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:15:30 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "fed480dc0996ff4d43c16025997ddbde", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:15:29 GMT", + "X-Azure-Ref": "0ApfJYAAAAABn7KV1cS05S7sAWAqy7xBSV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "dd4a3742-c0c2-4989-9bb0-5c45312d2153", + "x-ms-client-request-id": "fed480dc0996ff4d43c16025997ddbde" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/recordings/eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiIxZjIwMTMwMC05M2ZkLTRhYzctYTI3My03OGZlYWM1ZWE3NDkiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiI4OWVkYzEzNS04NjFiLTRkYTgtYTM0Mi0wY2FlNDU3YjNlYzUifQ?api-version=2021-06-15-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:15:36 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "6568bda5feed503a8dd60797e83dbdf2", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "29", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:15:36 GMT", + "X-Azure-Ref": "0CJfJYAAAAAAC25Y6KtoiSo3fGzOedaITV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "452c9a68-6493-4ee9-853e-69130a19f944", + "x-ms-client-request-id": "6568bda5feed503a8dd60797e83dbdf2" + }, + "ResponseBody": { + "recordingState": "inactive" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/recordings/eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiIxZjIwMTMwMC05M2ZkLTRhYzctYTI3My03OGZlYWM1ZWE3NDkiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiI4OWVkYzEzNS04NjFiLTRkYTgtYTM0Mi0wY2FlNDU3YjNlYzUifQ/:resume?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:15:36 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "a9633353b00a54117d8f053909c01ebb", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:15:36 GMT", + "X-Azure-Ref": "0CJfJYAAAAAD5SbGU5GU5QIQBnt/xvsFfV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "5d8e71d6-3f59-469e-8ee4-2a6b7bc07e91", + "x-ms-client-request-id": "a9633353b00a54117d8f053909c01ebb" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/recordings/eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiIxZjIwMTMwMC05M2ZkLTRhYzctYTI3My03OGZlYWM1ZWE3NDkiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiI4OWVkYzEzNS04NjFiLTRkYTgtYTM0Mi0wY2FlNDU3YjNlYzUifQ?api-version=2021-06-15-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:15:42 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "90dd4fd5b338dd5e458371c002b51706", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "27", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:15:42 GMT", + "X-Azure-Ref": "0DpfJYAAAAABDIIeK/2H8QZ7xOy7uaoZXV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "23d8d19f-ea36-4434-a650-380593acc889", + "x-ms-client-request-id": "90dd4fd5b338dd5e458371c002b51706" + }, + "ResponseBody": { + "recordingState": "active" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/recordings/eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiIxZjIwMTMwMC05M2ZkLTRhYzctYTI3My03OGZlYWM1ZWE3NDkiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiI4OWVkYzEzNS04NjFiLTRkYTgtYTM0Mi0wY2FlNDU3YjNlYzUifQ?api-version=2021-06-15-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:15:42 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "65d26e033119f5d3ab13e75df80147cd", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:15:42 GMT", + "X-Azure-Ref": "0DpfJYAAAAADh4S8NVpChQJX36HHXl/F2V1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "ab2158e3-fe36-4501-9151-8028d57c07fd", + "x-ms-client-request-id": "65d26e033119f5d3ab13e75df80147cd" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/recordings/eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiIxZjIwMTMwMC05M2ZkLTRhYzctYTI3My03OGZlYWM1ZWE3NDkiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiI4OWVkYzEzNS04NjFiLTRkYTgtYTM0Mi0wY2FlNDU3YjNlYzUifQ?api-version=2021-06-15-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:15:43 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "99c14bb72c609fb9d58663873f5152c8", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 400, + "ResponseHeaders": { + "Content-Length": "93", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:15:42 GMT", + "X-Azure-Ref": "0D5fJYAAAAAB4Lp3WpzBsTpeS5QOD4h4BV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "4e60dce4-e904-48e3-a659-4353f82e2dc0", + "x-ms-client-request-id": "99c14bb72c609fb9d58663873f5152c8" + }, + "ResponseBody": { + "error": { + "code": "8501", + "message": "Action is invalid when call is not in Established state" + } + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/1f201300-51c4-4357-927c-cb604c8985b5/:hangup?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:15:53 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "9a35ff78b8eda4a17be7e524cb00e444", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:15:52 GMT", + "X-Azure-Ref": "0GZfJYAAAAACeW8WVkBQ4RbtUz\u002BeRJ35FV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "00f3c768-aff6-4c17-a1c0-b074e2912e05", + "x-ms-client-request-id": "9a35ff78b8eda4a17be7e524cb00e444" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/1f201300-9f74-415a-bc11-e8a94626e835/:hangup?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:15:53 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "b609a33b7ef3d7a6b4329093cd4cb55a", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:15:52 GMT", + "X-Azure-Ref": "0GZfJYAAAAACd/RFtgSyhTq28hizGHgTJV1NURURHRTA4MTMAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "61de7f9a-f402-4d36-99ec-f211d3d6b3db", + "x-ms-client-request-id": "b609a33b7ef3d7a6b4329093cd4cb55a" + }, + "ResponseBody": [] + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot1.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1054033129" + } +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/ServerCallLiveTests/RunCreateAddRemoveHangupScenarioTests.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/ServerCallLiveTests/RunCreateAddRemoveHangupScenarioTests.json new file mode 100644 index 0000000000000..6402941706e9f --- /dev/null +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/ServerCallLiveTests/RunCreateAddRemoveHangupScenarioTests.json @@ -0,0 +1,204 @@ +{ + "Entries": [ + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/:join?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "281", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:19:57 GMT", + "traceparent": "00-0cb5b4526f16344dabc81f983bdd33f8-c6457baa3ffaa342-00", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "5b1c21631872ba7c6eab805565cd5455", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "source": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_e3560385-776f-41d1-bf04-07ef738f2f23" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated" + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "110", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:19:57 GMT", + "X-Azure-Ref": "0DpjJYAAAAACsNdkW0upQTL\u002BwrOJMzDCHV1NURURHRTA4MDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "5a3dc9d6-3a58-4a91-a32b-aae81af84c36", + "x-ms-client-request-id": "5b1c21631872ba7c6eab805565cd5455" + }, + "ResponseBody": { + "callLegId": "86201300-42cd-440d-8c0c-9536b501ae43", + "callConnectionId": "86201300-42cd-440d-8c0c-9536b501ae43" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/:join?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "281", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:19:59 GMT", + "traceparent": "00-5220e669df7b314da391bac86927fdbe-1a9483565a5e7544-00", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "dc3c427de05f9908815bf920d2c33b02", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "source": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_e3560385-776f-41d1-bf04-07ef738f2fc1" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated" + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "110", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:19:59 GMT", + "X-Azure-Ref": "0D5jJYAAAAACAjX3iTmssRqXtdBC05sNSV1NURURHRTA4MDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "39a374e5-fd55-48a3-ad47-71290dfd6ee7", + "x-ms-client-request-id": "dc3c427de05f9908815bf920d2c33b02" + }, + "ResponseBody": { + "callLegId": "86201300-2cfb-4d0e-8db8-2e11a994b2ed", + "callConnectionId": "86201300-2cfb-4d0e-8db8-2e11a994b2ed" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/participants?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "208", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:20:11 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "903aec5eab806bc4938f9e74ab45934c", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "participant": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000a-b200-7a0d-570c-113a0d00288d" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld" + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "56", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:20:11 GMT", + "X-Azure-Ref": "0GpjJYAAAAADYA3qHM1aORan7rt3Q0JGTV1NURURHRTA4MDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "f2914421-4a9c-40c8-af49-c26181d7b1ec", + "x-ms-client-request-id": "903aec5eab806bc4938f9e74ab45934c" + }, + "ResponseBody": { + "participantId": "458cd853-3a2a-4cba-bb73-e86570c59f92" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/participants/458cd853-3a2a-4cba-bb73-e86570c59f92?api-version=2021-06-15-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:20:22 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "13e2df785e4883d71883da171f5ce8aa", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:20:23 GMT", + "X-Azure-Ref": "0JpjJYAAAAACZN8SExMrNQpJifKyXZ37TV1NURURHRTA4MDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "ac90b417-6b79-4f25-8082-187cef31bfc1", + "x-ms-client-request-id": "13e2df785e4883d71883da171f5ce8aa" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/86201300-42cd-440d-8c0c-9536b501ae43/:hangup?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:20:34 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "79f77e6fc393d1d57ed049cf4193ee3b", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:20:33 GMT", + "X-Azure-Ref": "0MpjJYAAAAAAjctD2KR8GQpby4gRy3IPBV1NURURHRTA4MDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "e0e90ba5-2f82-4e21-baf6-825be0611d19", + "x-ms-client-request-id": "79f77e6fc393d1d57ed049cf4193ee3b" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/86201300-2cfb-4d0e-8db8-2e11a994b2ed/:hangup?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:20:34 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "f2a7acc728e1ffb914b777fdd1ad4c36", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:20:33 GMT", + "X-Azure-Ref": "0MpjJYAAAAABunbzxQG1rSq7EN/GQmG3ZV1NURURHRTA4MDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "ec709066-aef6-41c1-9764-3bafa857452d", + "x-ms-client-request-id": "f2a7acc728e1ffb914b777fdd1ad4c36" + }, + "ResponseBody": [] + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot1.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1522827907" + } +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/ServerCallLiveTests/RunCreateAddRemoveHangupScenarioTestsAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/ServerCallLiveTests/RunCreateAddRemoveHangupScenarioTestsAsync.json new file mode 100644 index 0000000000000..79c13bd438270 --- /dev/null +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/ServerCallLiveTests/RunCreateAddRemoveHangupScenarioTestsAsync.json @@ -0,0 +1,204 @@ +{ + "Entries": [ + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/:join?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "281", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:20:35 GMT", + "traceparent": "00-f5557c794173be4a800f3f8e5e51f6f5-26cb1b99b9cb9348-00", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "1cdb28d9a82f6a18a79aa8ce818fde86", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "source": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_e3560385-776f-41d1-bf04-07ef738f2f23" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated" + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "110", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:20:34 GMT", + "X-Azure-Ref": "0MpjJYAAAAABhEubOs9Y9SqXxYwfuovZNV1NURURHRTA4MDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "d190e51d-23a8-4a17-a741-0a2c8ea30d12", + "x-ms-client-request-id": "1cdb28d9a82f6a18a79aa8ce818fde86" + }, + "ResponseBody": { + "callLegId": "86201300-2d08-48c7-bdcf-af606c040f6d", + "callConnectionId": "86201300-2d08-48c7-bdcf-af606c040f6d" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/:join?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "281", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:20:36 GMT", + "traceparent": "00-72e30145c827ee4e9cb04cd030f8399d-c93bc30c2786a44b-00", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "c578aad863a3538dd12a8af51b75ea12", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "source": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_e3560385-776f-41d1-bf04-07ef738f2fc1" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated" + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "110", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:20:35 GMT", + "X-Azure-Ref": "0NJjJYAAAAABvqdnHxPu3RJEF6dgjpsWhV1NURURHRTA4MDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "d4b4695d-26e1-487b-bd7a-f1b7d848176a", + "x-ms-client-request-id": "c578aad863a3538dd12a8af51b75ea12" + }, + "ResponseBody": { + "callLegId": "86201300-879b-4661-9077-38685652597f", + "callConnectionId": "86201300-879b-4661-9077-38685652597f" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/participants?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "208", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:20:47 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "a31a89405456b2bdaf8b092b273fd2c1", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "participant": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_0000000a-b200-7a0d-570c-113a0d00288d" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld" + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "56", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:20:48 GMT", + "X-Azure-Ref": "0P5jJYAAAAAB1/E0yb6yRSJ6c/Ui8e57IV1NURURHRTA4MDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "6a2130ee-3730-435e-beae-e0cdb9c61025", + "x-ms-client-request-id": "a31a89405456b2bdaf8b092b273fd2c1" + }, + "ResponseBody": { + "participantId": "15b87b6d-5e0b-421e-b5ad-9dd2e389eb8d" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/participants/15b87b6d-5e0b-421e-b5ad-9dd2e389eb8d?api-version=2021-06-15-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:20:59 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "5de5d95fe3a475459b874b041d234e31", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:21:00 GMT", + "X-Azure-Ref": "0S5jJYAAAAAAAB7iunIIuQJ\u002B7ddnx4nfvV1NURURHRTA4MDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "1fa79fa2-68ee-40ea-b2f7-a7a3a7f7f631", + "x-ms-client-request-id": "5de5d95fe3a475459b874b041d234e31" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/86201300-2d08-48c7-bdcf-af606c040f6d/:hangup?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:21:12 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "f88d96af3b748330ecc6161759612c91", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:21:12 GMT", + "X-Azure-Ref": "0WJjJYAAAAACpoBkeTocASY2zUGtq21ioV1NURURHRTA4MDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "626f001c-a86b-4a74-84f0-e8c4fc81774d", + "x-ms-client-request-id": "f88d96af3b748330ecc6161759612c91" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/86201300-879b-4661-9077-38685652597f/:hangup?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:21:12 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "4296c9588d8f5d6e43a508ce08b9948c", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:21:12 GMT", + "X-Azure-Ref": "0WJjJYAAAAAAgESxYLSQBQ6hXzOnXabtoV1NURURHRTA4MDkAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "b61c4230-eaa0-4b96-86e8-915c92bc6e3b", + "x-ms-client-request-id": "4296c9588d8f5d6e43a508ce08b9948c" + }, + "ResponseBody": [] + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot1.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "38775367" + } +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/ServerCallLiveTests/RunCreatePlayCancelHangupScenarioTests.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/ServerCallLiveTests/RunCreatePlayCancelHangupScenarioTests.json new file mode 100644 index 0000000000000..ecf8b39da5f1e --- /dev/null +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/ServerCallLiveTests/RunCreatePlayCancelHangupScenarioTests.json @@ -0,0 +1,241 @@ +{ + "Entries": [ + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/:join?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "281", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:16:10 GMT", + "traceparent": "00-f94946db64f0894ea378c340940b083e-c12a2b98fb1deb4b-00", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "8a8e5d877bb27901bc2bdca214ae0629", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "source": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_e3560385-776f-41d1-bf04-07ef738f2f23" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated" + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "110", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:16:11 GMT", + "X-Azure-Ref": "0K5fJYAAAAADRgN0XImb9QIrLZw43U08/V1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "14d96a79-3923-4df7-9633-5767f711d85d", + "x-ms-client-request-id": "8a8e5d877bb27901bc2bdca214ae0629" + }, + "ResponseBody": { + "callLegId": "cd1f1300-9d8c-4a7b-9092-33f2d5dc2199", + "callConnectionId": "cd1f1300-9d8c-4a7b-9092-33f2d5dc2199" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/:join?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "281", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:16:13 GMT", + "traceparent": "00-fc97a4aebe610e47be41d5190b256a27-3f0202bffbd94d41-00", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "c2e5f86bbc86609d09514cc7a4cbada1", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "source": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_e3560385-776f-41d1-bf04-07ef738f2fc1" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated" + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "110", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:16:12 GMT", + "X-Azure-Ref": "0LZfJYAAAAADhVfZhivBTQrQCctA0Se6yV1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "afb6fda6-9e37-4c7b-a55a-a9a3d83fcde5", + "x-ms-client-request-id": "c2e5f86bbc86609d09514cc7a4cbada1" + }, + "ResponseBody": { + "callLegId": "cd1f1300-0177-482d-bada-3a7597dc5f2d", + "callConnectionId": "cd1f1300-0177-482d-bada-3a7597dc5f2d" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/:playAudio?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "272", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:16:24 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "a3f72b34b2e5f1d684d47ba0aa19d838", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "audioFileUri": "https://dummy.ngrok.io/audio/sample-message.wav", + "loop": false, + "operationContext": "de346f03-7f8d-41ab-a232-cc5e14990769", + "audioFileId": "ebb1d98d-fd86-4204-800c-f7bdfc2e515c", + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld" + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "131", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:16:25 GMT", + "X-Azure-Ref": "0OJfJYAAAAACX/qFxFp6cQoKeogTr\u002BsXSV1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "82d6dad8-5a03-42ee-beda-3c1160d2cdc8", + "x-ms-client-request-id": "a3f72b34b2e5f1d684d47ba0aa19d838" + }, + "ResponseBody": { + "operationId": "cd1f1300-c4a8-4660-b3d4-54e4fb6c1a27", + "status": "running", + "operationContext": "de346f03-7f8d-41ab-a232-cc5e14990769" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/cd1f1300-9d8c-4a7b-9092-33f2d5dc2199/:cancelAllMediaOperations?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "2", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:16:36 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "2a3817726563ca10bf2e81602e39d5f0", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": {}, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "75", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:16:35 GMT", + "X-Azure-Ref": "0RJfJYAAAAABGPGsIuJNHTKXmnTkmF42ZV1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "c1159eb4-105a-4779-8ae9-39413a543496", + "x-ms-client-request-id": "2a3817726563ca10bf2e81602e39d5f0" + }, + "ResponseBody": { + "operationId": "76095bf5-437a-4bf8-83c8-785fe451e84b", + "status": "completed" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/cd1f1300-0177-482d-bada-3a7597dc5f2d/:cancelAllMediaOperations?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "2", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:16:36 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "e86e3a7d62b6b84322f43eb140fdb5f0", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": {}, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "75", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:16:36 GMT", + "X-Azure-Ref": "0RJfJYAAAAACm9CRAdKR5S4KjhWSkrEttV1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "d77fbd4a-878d-4f80-b434-dbe87ac4ed7c", + "x-ms-client-request-id": "e86e3a7d62b6b84322f43eb140fdb5f0" + }, + "ResponseBody": { + "operationId": "27a484ba-1b17-42c7-ab5a-34947edcf379", + "status": "completed" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/cd1f1300-9d8c-4a7b-9092-33f2d5dc2199/:hangup?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:16:47 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "8c5414788293ce3d1a2ce4b73175c24a", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:16:46 GMT", + "X-Azure-Ref": "0TpfJYAAAAABcTbHT1Z27SKa6OZv9SrZCV1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "4ea7dcad-8511-44f2-ba5f-7fde58b8db3f", + "x-ms-client-request-id": "8c5414788293ce3d1a2ce4b73175c24a" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/cd1f1300-0177-482d-bada-3a7597dc5f2d/:hangup?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:16:47 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "70228bffefab1081d47f086f275e8ac2", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:16:46 GMT", + "X-Azure-Ref": "0T5fJYAAAAADlq/GI2gElQJSqz5wsATznV1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "ef337b9d-24a1-4707-821a-71c83fe61690", + "x-ms-client-request-id": "70228bffefab1081d47f086f275e8ac2" + }, + "ResponseBody": [] + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot1.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1001601261" + } +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/ServerCallLiveTests/RunCreatePlayCancelHangupScenarioTestsAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/ServerCallLiveTests/RunCreatePlayCancelHangupScenarioTestsAsync.json new file mode 100644 index 0000000000000..3e61cb400514a --- /dev/null +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/ServerCallLiveTests/RunCreatePlayCancelHangupScenarioTestsAsync.json @@ -0,0 +1,241 @@ +{ + "Entries": [ + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/:join?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "281", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:16:47 GMT", + "traceparent": "00-8be82162454b314698037a2f1bffffef-5f4432689b885c4e-00", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "3eb76071115360cd27c4c26d83b4f8b4", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "source": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_e3560385-776f-41d1-bf04-07ef738f2f23" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated" + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "110", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:16:46 GMT", + "X-Azure-Ref": "0T5fJYAAAAAB3DWWnUVthQpm/9ECHREOJV1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "eee23c88-b4c7-427b-a442-339e4b0f90df", + "x-ms-client-request-id": "3eb76071115360cd27c4c26d83b4f8b4" + }, + "ResponseBody": { + "callLegId": "cd1f1300-00e2-4622-a7a4-7a12d92409fb", + "callConnectionId": "cd1f1300-00e2-4622-a7a4-7a12d92409fb" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/:join?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "281", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:16:48 GMT", + "traceparent": "00-5fd283bbed687e45b0f37243d26b191a-0d540710af6f9248-00", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "7f29f5ce3a7b2111dd86b053335b9b2b", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "source": { + "communicationUser": { + "id": "8:acs:016a7064-0581-40b9-be73-6dde64d69d72_e3560385-776f-41d1-bf04-07ef738f2fc1" + } + }, + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated" + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "110", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:16:48 GMT", + "X-Azure-Ref": "0UJfJYAAAAAD34t/8WEepT7hELT6lf6j5V1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "01f7653d-f6b3-43e4-9e99-3cd144b802b8", + "x-ms-client-request-id": "7f29f5ce3a7b2111dd86b053335b9b2b" + }, + "ResponseBody": { + "callLegId": "cd1f1300-6e70-47db-9150-db14bc073cd9", + "callConnectionId": "cd1f1300-6e70-47db-9150-db14bc073cd9" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/serverCalls/3500789f-e11b-4ceb-85cb-bc8df2a01768/:playAudio?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "272", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:16:59 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "eed6d7747d179189096d4eee34e9d72d", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "audioFileUri": "https://dummy.ngrok.io/audio/sample-message.wav", + "loop": false, + "operationContext": "de346f03-7f8d-41ab-a232-cc5e14990769", + "audioFileId": "ebb1d98d-fd86-4204-800c-f7bdfc2e515c", + "callbackUri": "https://dummy.ngrok.io/api/incident/callback?SecretKey=helloworld" + }, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "131", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:16:59 GMT", + "X-Azure-Ref": "0W5fJYAAAAACcNRW1MFJqRLstwg8m7FDRV1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "58361be6-6845-48bb-b935-c0d7bbbd8db1", + "x-ms-client-request-id": "eed6d7747d179189096d4eee34e9d72d" + }, + "ResponseBody": { + "operationId": "cd1f1300-590a-4aaf-a4ef-94e82a361403", + "status": "running", + "operationContext": "de346f03-7f8d-41ab-a232-cc5e14990769" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/cd1f1300-00e2-4622-a7a4-7a12d92409fb/:cancelAllMediaOperations?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "2", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:17:11 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "72afde20e9a137734f9561cc61792ccb", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": {}, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "75", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:17:10 GMT", + "X-Azure-Ref": "0ZpfJYAAAAAD4xZGe86puRomNI0C/dJghV1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "2da50efa-a0ea-47b5-af11-d5f19041c59a", + "x-ms-client-request-id": "72afde20e9a137734f9561cc61792ccb" + }, + "ResponseBody": { + "operationId": "27d17843-a7aa-48e3-9150-1cbb7161f95a", + "status": "completed" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/cd1f1300-6e70-47db-9150-db14bc073cd9/:cancelAllMediaOperations?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "2", + "Content-Type": "application/json", + "Date": "Wed, 16 Jun 2021 06:17:11 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "acf9972809de519c6c98760eeb23edf3", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": {}, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "75", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 06:17:10 GMT", + "X-Azure-Ref": "0Z5fJYAAAAACsLZ9zs/TOTbGMkqANyzYAV1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "fb45eace-0a3f-46e1-8325-6fd28d6e906c", + "x-ms-client-request-id": "acf9972809de519c6c98760eeb23edf3" + }, + "ResponseBody": { + "operationId": "19e87892-9e86-48e9-9fbe-7eec9cd87b08", + "status": "completed" + } + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/cd1f1300-00e2-4622-a7a4-7a12d92409fb/:hangup?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:17:21 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "553382af29ab8a89649e9f811bbc308f", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:17:20 GMT", + "X-Azure-Ref": "0cZfJYAAAAAB0roZUcRQ9Q4Dx\u002BxyJI/f2V1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "1a9b14d0-061a-4c60-9faa-74f4c18d31ac", + "x-ms-client-request-id": "553382af29ab8a89649e9f811bbc308f" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://acstestbot1.communication.azure.com/calling/callConnections/cd1f1300-6e70-47db-9150-db14bc073cd9/:hangup?api-version=2021-06-15-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Wed, 16 Jun 2021 06:17:21 GMT", + "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "9cc583412bef164f415e050973644c2b", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Wed, 16 Jun 2021 06:17:20 GMT", + "X-Azure-Ref": "0cZfJYAAAAABguzaZMdnPTZ77QW9PdIk3V1NURURHRTA4MDgAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "X-Microsoft-Skype-Chain-ID": "252dba3f-afd9-403c-9026-5f1b093a166d", + "x-ms-client-request-id": "9cc583412bef164f415e050973644c2b" + }, + "ResponseBody": [] + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING": "endpoint=https://acstestbot1.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1656122379" + } +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/samples/Sample1_CallClient.cs b/sdk/communication/Azure.Communication.CallingServer/tests/samples/Sample1_CallClient.cs index d9a8bfe30cb7e..900129d47850a 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/samples/Sample1_CallClient.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/samples/Sample1_CallClient.cs @@ -20,12 +20,11 @@ public Sample1_CallClient(bool isAsync) : base(isAsync) [Test] [AsyncOnly] - [Ignore("Ignore for now as we get build errors that block checking in.")] public async Task CreateCallAsync() { - CommunicationIdentityClient communicationIdentityClient = new CommunicationIdentityClient(TestEnvironment.LiveTestDynamicConnectionString); + CommunicationIdentityClient communicationIdentityClient = CreateInstrumentedCommunicationIdentityClient(); var source = await communicationIdentityClient.CreateUserAsync(); - var targets = new[] { new PhoneNumberIdentifier(TestEnvironment.SourcePhoneNumber) }; + var targets = new[] { new PhoneNumberIdentifier(TestEnvironment.TargetPhoneNumber) }; #region Snippet:Azure_Communication_Call_Tests_CreateCallOptions var createCallOption = new CreateCallOptions( new Uri(TestEnvironment.AppCallbackUrl), @@ -53,12 +52,11 @@ public async Task CreateCallAsync() [Test] [SyncOnly] - [Ignore("Ignore for now as we get build errors that block checking in.")] public void CreateCall() { - CommunicationIdentityClient communicationIdentityClient = new CommunicationIdentityClient(TestEnvironment.LiveTestDynamicConnectionString); + CommunicationIdentityClient communicationIdentityClient = CreateInstrumentedCommunicationIdentityClient(); var source = communicationIdentityClient.CreateUser(); - var targets = new[] { new PhoneNumberIdentifier(TestEnvironment.SourcePhoneNumber) }; + var targets = new[] { new PhoneNumberIdentifier(TestEnvironment.TargetPhoneNumber) }; var createCallOption = new CreateCallOptions( new Uri(TestEnvironment.AppCallbackUrl), new[] { MediaType.Audio },