Skip to content

Commit a403079

Browse files
Merge pull request #292413 from vac0224/vc-byos-call-rec-2025-01-03
Add BYOS to call recording
2 parents 8d0e017 + 2139b4c commit a403079

File tree

5 files changed

+139
-112
lines changed

5 files changed

+139
-112
lines changed

articles/communication-services/quickstarts/voice-video-calling/get-started-call-recording.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ ms.subservice: calling
1212
zone_pivot_groups: acs-js-csharp-java-python
1313
ms.custom: mode-api, devx-track-extended-java, devx-track-js, devx-track-python
1414
---
15-
# Call Recording Quickstart
15+
# Call recording quickstart
1616

17-
This quickstart gets you started with Call Recording for voice and video calls. To start using the Call Recording APIs, you must have a call in place. Make sure you're familiar with [Calling client SDK](get-started-with-video-calling.md) and/or [Call Automation](../call-automation/callflows-for-customer-interactions.md#build-a-customer-interaction-workflow-using-call-automation) to build the end-user calling experience.
17+
This article describes call recording for voice and video calls. To start using the Call Recording APIs, you must have a call in place. To build the end-user calling experience, make sure you're familiar with [Calling client SDK](get-started-with-video-calling.md) and [Call Automation](../call-automation/callflows-for-customer-interactions.md#build-a-customer-interaction-workflow-using-call-automation).
1818

1919
::: zone pivot="programming-language-csharp"
2020
[!INCLUDE [Test Call Recording with C#](./includes/call-recording-samples/call-recording-csharp.md)]
@@ -32,7 +32,6 @@ This quickstart gets you started with Call Recording for voice and video calls.
3232
[!INCLUDE [Test Call Recording with JavaScript](./includes/call-recording-samples/call-recording-javascript.md)]
3333
::: zone-end
3434

35-
3635
## Clean up resources
3736

3837
If you want to clean up and remove a Communication Services subscription, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it. Learn more about [cleaning up resources](../create-communication-resource.md#clean-up-resources).
@@ -41,6 +40,6 @@ If you want to clean up and remove a Communication Services subscription, you ca
4140

4241
For more information, see the following articles:
4342

44-
- Download our [Java](https://github.com/Azure-Samples/communication-services-java-quickstarts/tree/main/ServerRecording), [Python](https://github.com/Azure-Samples/communication-services-python-quickstarts/tree/main/call-recording), and [JavaScript](https://github.com/Azure-Samples/communication-services-javascript-quickstarts/tree/main/call-recording) call recording sample apps
45-
- Learn more about [Call Recording](../../concepts/voice-video-calling/call-recording.md)
46-
- Learn more about [Call Automation](../../concepts/call-automation/call-automation.md)
43+
- Download our [Java](https://github.com/Azure-Samples/communication-services-java-quickstarts/tree/main/ServerRecording), [Python](https://github.com/Azure-Samples/communication-services-python-quickstarts/tree/main/call-recording), and [JavaScript](https://github.com/Azure-Samples/communication-services-javascript-quickstarts/tree/main/call-recording) call recording sample apps.
44+
- Learn more about [Call Recording](../../concepts/voice-video-calling/call-recording.md).
45+
- Learn more about [Call Automation](../../concepts/call-automation/call-automation.md).

articles/communication-services/quickstarts/voice-video-calling/includes/call-recording-samples/call-recording-csharp.md

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,25 @@ You can download the sample app from [GitHub](https://github.com/Azure-Samples/c
2121
Call Recording APIs use exclusively the `serverCallId`to initiate recording. There are a couple of methods you can use to fetch the `serverCallId` depending on your scenario:
2222

2323
### Call Automation scenarios
24-
- When using [Call Automation](../../../call-automation/callflows-for-customer-interactions.md), you have two options to get the `serverCallId`:
25-
1) Once a call is created, a `serverCallId` is returned as a property of the `CallConnected` event after a call has been established. Learn how to [Get CallConnected event](../../../call-automation/callflows-for-customer-interactions.md?pivots=programming-language-csharp#update-programcs) from Call Automation SDK.
26-
2) Once you answer the call or a call is created the `serverCallId` is returned as a property of the `AnswerCallResult` or `CreateCallResult` API responses respectively.
2724

28-
### Calling SDK scenarios
29-
- When using [Calling Client SDK](../../get-started-with-video-calling.md), you can retrieve the `serverCallId` by using the `getServerCallId` method on the call.
30-
Use this example to learn how to [Get serverCallId](../../get-server-call-id.md) from the Calling Client SDK.
25+
When using [Call Automation](../../../call-automation/callflows-for-customer-interactions.md), you have two options to get the `serverCallId`:
3126

27+
1. When you establish a call, it returns a `serverCallId` as a property of the `CallConnected` event after a call is established. Learn how to [Get CallConnected event](../../../call-automation/callflows-for-customer-interactions.md?pivots=programming-language-csharp#update-programcs) from Call Automation SDK.
3228

29+
2. When you answer the call or a call is created, it returns the `serverCallId` as a property of the `AnswerCallResult` or `CreateCallResult` API responses respectively.
3330

34-
Let's get started with a few simple steps!
31+
### Calling SDK scenarios
3532

33+
When using [Calling Client SDK](../../get-started-with-video-calling.md), you can retrieve the `serverCallId` by using the `getServerCallId` method on the call.
34+
Use this example to learn how to [Get serverCallId](../../get-server-call-id.md) from the Calling Client SDK.
3635

36+
Let's get started with a few simple steps.
3737

3838
## 1. Create a Call Automation client
3939

40-
Call Recording APIs are part of the Azure Communication Services [Call Automation](../../../../concepts/call-automation/call-automation.md) libraries. Thus, it's necessary to create a Call Automation client.
41-
To create a call automation client, you use your Communication Services connection string and pass it to `CallAutomationClient` object.
40+
Call Recording APIs are part of the Azure Communication Services [Call Automation](../../../../concepts/call-automation/call-automation.md) libraries. So you need to create a Call Automation client.
41+
42+
To create a call automation client, use your Communication Services connection string and pass it to `CallAutomationClient` object.
4243

4344
```csharp
4445
CallAutomationClient callAutomationClient = new CallAutomationClient("<ACSConnectionString>");
@@ -47,9 +48,9 @@ CallAutomationClient callAutomationClient = new CallAutomationClient("<ACSConnec
4748
## 2. Start recording session with StartRecordingOptions using 'StartAsync' API
4849

4950
Use the `serverCallId` received during initiation of the call.
50-
- RecordingContent is used to pass the recording content type. Use audio
51-
- RecordingChannel is used to pass the recording channel type. Use mixed or unmixed.
52-
- RecordingFormat is used to pass the format of the recording. Use wav.
51+
- Use `RecordingContent` to pass the recording content type. Use `AUDIO`.
52+
- Use `RecordingChannel` to pass the recording channel type. Use `MIXED` or `UNMIXED`.
53+
- Use `RecordingFormat` to pass the format of the recording. Use `WAV`.
5354

5455
```csharp
5556
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<ServerCallId>"))
@@ -62,24 +63,29 @@ StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCal
6263
Response<RecordingStateResult> response = await callAutomationClient.GetCallRecording()
6364
.StartAsync(recordingOptions);
6465
```
65-
### 2.1. Start Recording - Bring Your Own Azure Blob Store
66-
Start Recording with your own Azure Blob Storage defined to store the recording file once recording is complete.
66+
### 2.1. Start Recording - Bring Your Own Azure Blob Store
67+
68+
Start recording using your designated Azure Blob Storage to store the recorded file once recording is complete.
6769

6870
```csharp
6971
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<ServerCallId>"))
7072
{
71-
RecordingContent = RecordingContent.Audio,
72-
RecordingChannel = RecordingChannel.Unmixed,
73-
RecordingFormat = RecordingFormat.Wav,
74-
RecordingStateCallbackUri = new Uri("<CallbackUri>"),
75-
RecordingStorage = RecordingStorage.CreateAzureBlobContainerRecordingStorage(new Uri("<YOUR_STORAGE_CONTAINER_URL>"))
73+
RecordingContent = RecordingContent.Audio,
74+
RecordingChannel = RecordingChannel.Unmixed,
75+
RecordingFormat = RecordingFormat.Wav,
76+
RecordingStateCallbackUri = new Uri("<CallbackUri>"),
77+
RecordingStorage = RecordingStorage.CreateAzureBlobContainerRecordingStorage(new Uri("<YOUR_STORAGE_CONTAINER_URL>"))
78+
ExternalStorage = new BlobStorage(new Uri("<Insert Container / Blob Uri>"))
7679
};
7780
Response<RecordingStateResult> response = await callAutomationClient.GetCallRecording()
7881
.StartAsync(recordingOptions);
7982
```
83+
8084
## 2.2. Start recording session with Pause mode enabled using 'StartAsync' API
85+
8186
> [!NOTE]
8287
> **Recordings will need to be resumed for recording file to be generated.**
88+
8389
```csharp
8490
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<ServerCallId>"))
8591
{
@@ -94,6 +100,7 @@ Response<RecordingStateResult> response = await callAutomationClient.GetCallReco
94100
```
95101

96102
### 2.3. Only for Unmixed - Specify a user on channel 0
103+
97104
To produce unmixed audio recording files, you can use the `AudioChannelParticipantOrdering` functionality to specify which user you want to record on channel 0. The rest of the participants are assigned to a channel as they speak. If you use `RecordingChannel.Unmixed` but don't use `AudioChannelParticipantOrdering`, Call Recording assigns channel 0 to the first participant speaking.
98105

99106
```csharp
@@ -123,37 +130,38 @@ StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCal
123130
};
124131
Response<RecordingStateResult> response = await callAutomationClient.GetCallRecording().StartAsync(recordingOptions);
125132
```
133+
126134
The `StartAsync` API response contains the `recordingId` of the recording session.
127135

128-
## 3. Stop recording session using 'StopAsync' API
136+
## 3. Stop recording session using `StopAsync` API
129137

130-
Use the `recordingId` received in response of `StartAsync`.
138+
Use the `recordingId` received in response to `StartAsync`.
131139

132140
```csharp
133141
var stopRecording = await callAutomationClient.GetCallRecording().StopAsync(recordingId);
134142
```
135143

136-
## 4. Pause recording session using 'PauseAsync' API
144+
## 4. Pause recording session using `PauseAsync` API
137145

138-
Use the `recordingId` received in response of `StartAsync`.
146+
Use the `recordingId` received in response to `StartAsync`.
139147

140148
```csharp
141149
var pauseRecording = await callAutomationClient.GetCallRecording ().PauseAsync(recordingId);
142150
```
143151

144-
## 5. Resume recording session using 'ResumeAsync' API
152+
## 5. Resume recording session using `ResumeAsync` API
145153

146-
Use the `recordingId` received in response of `StartAsync`.
154+
Use the `recordingId` received in response to `StartAsync`.
147155

148156
```csharp
149157
var resumeRecording = await callAutomationClient.GetCallRecording().ResumeAsync(recordingId);
150158
```
151159

152-
## 6. Download recording File using 'DownloadToAsync' API
160+
## 6. Download recording File using `DownloadToAsync` API
153161

154-
Use an [Azure Event Grid](../../../../../event-grid/event-schema-communication-services.md) web hook or other triggered action should be used to notify your services when the recorded media is ready for download.
162+
Use an [Azure Event Grid](../../../../../event-grid/event-schema-communication-services.md) web hook or other triggered action to notify your services when the recorded media is ready for download.
155163

156-
An Event Grid notification `Microsoft.Communication.RecordingFileStatusUpdated` is published when a recording is ready for retrieval, typically a few minutes after the recording process has completed (for example, meeting ended, recording stopped). Recording event notifications include `contentLocation` and `metadataLocation`, which are used to retrieve both recorded media and a recording metadata file.
164+
An Event Grid notification `Microsoft.Communication.RecordingFileStatusUpdated` is published when a recording is ready for retrieval, typically a few minutes after the recording finishes processing (such as when meeting ends or a recording stops). Recording event notifications include `contentLocation` and `metadataLocation`, which you can use to retrieve both recorded media and a recording metadata file.
157165

158166
Example of the event schema:
159167

@@ -186,17 +194,18 @@ Example of the event schema:
186194
}
187195
```
188196

189-
Use `DownloadToAsync` API for downloading the recorded media.
197+
Use `DownloadToAsync` API to download the recorded media.
190198

191199
```csharp
192200
var recordingDownloadUri = new Uri(contentLocation);
193201
var response = await callAutomationClient.GetCallRecording().DownloadToAsync(recordingDownloadUri, fileName);
194202
```
195-
The `downloadLocation` for the recording can be fetched from the `contentLocation` attribute of the `recordingChunk`. `DownloadToAsync` method downloads the content into provided filename.
196203

197-
## 7. Delete recording content using 'DeleteAsync' API
204+
Fetch the `downloadLocation` for the recording from the `contentLocation` attribute of the `recordingChunk`. Use the `DownloadToAsync` method to download the content into a provided filename.
205+
206+
## 7. Delete recording content using `DeleteAsync` API
198207

199-
Use `DeleteAsync` API for deleting the recording content (for example, recorded media, metadata)
208+
Use `DeleteAsync` API to delete the recording content (such as recorded media and metadata).
200209

201210
```csharp
202211
var recordingDeleteUri = new Uri(deleteLocation);

0 commit comments

Comments
 (0)