Skip to content

Commit 41bea04

Browse files
Call Recording BYOS private preview docs initial commit
1 parent 260a1a3 commit 41bea04

10 files changed

+277
-0
lines changed

articles/communication-services/concepts/voice-video-calling/call-recording.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ A `recordingId` is returned when recording is started, which is then used for fo
6363
| Stop Recording | `recordingId` | Stops recording, and initiates final media processing for file download. |
6464

6565

66+
## Bring your own storage
67+
68+
[!INCLUDE [Private Preview](../../includes/private-preview-include-section.md)]
69+
70+
Call Recording APIs can be used to export recordings to your Azure Blob Storage Container as well. While starting recording for a call, simply specify the container path where the recording needs to be exported. Upon recording completion, Azure Communication Services will automatically fetch and upload your recording to your storage.
71+
72+
73+
![Diagram showing a call recording being automatically exported to storage container](./media/call-recording-byos-flow-zoomed.png)
74+
6675
## Event Grid notifications
6776
Call Recording use [Azure Event Grid](https://learn.microsoft.com/azure/event-grid/event-schema-communication-services) to provide you with notifications related to media and metadata.
6877

30.1 KB
Loading
95.9 KB
Loading
99 KB
Loading
39.9 KB
Loading
35.2 KB
Loading
42.2 KB
Loading

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

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,48 @@ This quickstart gets you started with Call Recording for voice and video calls.
2626
[!INCLUDE [Test Call Recording with Java](./includes/call-recording-samples/call-recording-java.md)]
2727
::: zone-end
2828

29+
## Call Recording: Bring your own storage
30+
31+
[!INCLUDE [Public Preview](../../includes/private-preview-include-section.md)]
32+
33+
### Pre-requisite: Setting up Managed Identity and RBAC Role Assignments
34+
35+
#### 1.1 Enable System Assigned Managed Identity for Azure Communication Services
36+
37+
![Diagram showing a communication service resource with managed identity disabled](../media/call-recording-byos-pre-requisite-1.png)
38+
39+
1. Open your Azure Communication Services resource. Navigate to *Identity* on the left.
40+
2. System Assigned Managed Identity is disabled by default. Enable it and click of *Save*
41+
3. Once completed, you'll be able to see the Object principal ID of the newly created identity (shown below)
42+
![Diagram showing a communication service resource with managed identity enabled](../media/call-recording-byos-pre-requisite-2.png)
43+
4. Now that identity has been successfully created, click on *Azure role assignments* to start adding role assignments.
44+
45+
#### 1.2 Add Role Assignment
46+
47+
1. Click on *"Add role assignment"*
48+
![Diagram showing a communication service resource managed identity adding role assignment](../media/call-recording-byos-pre-requisite-3.png)
49+
50+
2. On the *"Add role assignment"* panel, select the following values
51+
1. Scope: **Storage**
52+
2. Subscription: **Choose your subscription**
53+
3. Resource: **Choose your storage account**
54+
4. Role: **Azure Communication Services needs *"Storage Blob Data Contributor"* to be able to write to your storage account.**
55+
![Diagram showing a communication service resource managed identity adding role assignment details](../media/call-recording-byos-pre-requisite-4.png)
56+
57+
3. Click on *"Save"*.
58+
4. Once completed, you will see the newly added role assignment in the *"Azure role assignment"* window (shown below).
59+
![Diagram showing a communication service resource managed identity role assignment success](../media/call-recording-byos-pre-requisite-5.png)
60+
61+
62+
::: zone pivot="programming-language-csharp"
63+
[!INCLUDE [Test Call Recording BYOS with C#](./includes/call-recording-samples/private-preview-call-recording-byos-csharp.md)]
64+
::: zone-end
65+
66+
::: zone pivot="programming-language-java"
67+
[!INCLUDE [Test Call Recording BYOS with Java](./includes/call-recording-samples/private-preview-call-recording-byos-java.md)]
68+
::: zone-end
69+
70+
2971
## Clean up resources
3072

3173
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).
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
author: rsarkar
3+
ms.service: azure-communication-services
4+
ms.date: 03/15/2023
5+
ms.topic: include
6+
ms.custom: private_preview
7+
ms.author: rsarkar
8+
---
9+
10+
[!INCLUDE [Private Preview](../../../../includes/private-preview-include-section.md)]
11+
12+
## Prerequisites
13+
14+
Before you start testing bring your own storage with call recording, make sure you complete the following steps:
15+
16+
- You need a Call in place whether is using Calling Client SDK or Call Automation before you start recording. Review their quickstarts and make sure you follow all their pre-requisites.
17+
- Create an Azure account with an active subscription. For details, see [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
18+
- Create an Azure Communication Services resource. For details, see [Create an Azure Communication Services resource](../../../create-communication-resource.md). You'll need to record your resource **connection string** for this quickstart.
19+
- Subscribe to events via [Azure Event Grid](https://learn.microsoft.com/azure/event-grid/event-schema-communication-services).
20+
- Download the [.NET SDK](https://dev.azure.com/azure-sdk/public/_artifacts/feed/azure-sdk-for-net/NuGet/Azure.Communication.CallAutomation/overview/1.0.0-alpha.20230315.1)
21+
- This quickstart assumes you have some experience using the [Calling Client SDK](../../get-started-with-video-calling.md). **Important**: To fetch `serverCallId` from Calling SDK, refer to the [JavaScript](../../get-server-call-id.md) example.
22+
- Make sure to provide the Azure Communication Services Call Recording team with your [immutable Azure resource ID](../../get-resource-id.md) to be allowlisted during the **private preview** tests.
23+
24+
25+
## 1. Create a Call Automation client
26+
27+
To create a call automation client, you'll use your Communication Services connection string and pass it to `CallAutomationClient` object.
28+
29+
```csharp
30+
CallAutomationClient callAutomationClient = new CallAutomationClient("<ACSConnectionString>");
31+
```
32+
33+
## 2. Start recording session with StartRecordingOptions using 'StartRecordingAsync' server API
34+
35+
Use the server call ID received during initiation of the call.
36+
37+
### 2.1 Using Azure Blob Storage for External Storage
38+
39+
40+
```csharp
41+
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<ServerCallId>"))
42+
{
43+
// ...
44+
ExternalStorage = new BlobStorage(new Uri("<Insert Container / Blob Uri>"))
45+
};
46+
47+
Response<RecordingStateResult> startRecordingWithResponse = await callAutomationClient.GetCallRecording()
48+
.StartRecordingAsync(options: recordingOptions);
49+
```
50+
51+
The `StartRecordingAsync` API response contains the recording ID of the recording session.
52+
53+
## 3. Stop recording session using 'StopRecordingAsync' server API
54+
55+
Use the recording ID received in response of `StartRecordingAsync`.
56+
57+
```csharp
58+
var stopRecording = await callAutomationClient.GetCallRecording().StopRecordingAsync(startRecordingWithResponse.Value.RecordingId);
59+
```
60+
61+
## 4. Pause recording session using 'PauseRecordingAsync' server API
62+
63+
Use the recording ID received in response of `StartRecordingAsync`.
64+
65+
```csharp
66+
var pauseRecording = await callAutomationClient.GetCallRecording().PauseRecordingAsync(startRecordingWithResponse.Value.RecordingId);
67+
```
68+
69+
## 5. Resume recording session using 'ResumeRecordingAsync' server API
70+
71+
Use the recording ID received in response of `StartRecordingAsync`.
72+
73+
```csharp
74+
var resumeRecording = await callAutomationClient.GetCallRecording().ResumeRecordingAsync(startRecordingWithResponse.Value.RecordingId);
75+
```
76+
77+
## 6. Notification on successful export
78+
79+
Use an [Azure Event Grid](../../../../../event-grid/overview.md) web hook or other triggered action should be used to notify your services when the recorded media is ready and have been exported to the external storage location.
80+
81+
Below is an example of the event schema.
82+
83+
``` json
84+
{
85+
"id": "string", // Unique guid for event
86+
"topic": "string", // /subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}
87+
"subject": "string", // /recording/call/{call-id}/serverCallId/{serverCallId}
88+
"data": {
89+
"storageType": "string", // acsstorage, blobstorage etc.
90+
"recordingId": "string", // unique id for recording
91+
"recordingStorageInfo": {
92+
"recordingChunks": [
93+
{
94+
"documentId": "string", // Document id for for the recording chunk
95+
"contentLocation": "string", //Azure Communication Services URL where the content is located
96+
"metadataLocation": "string", // Azure Communication Services URL where the metadata for this chunk is located
97+
"deleteLocation": "string", // Azure Communication Services URL to use to delete all content, including recording and metadata.
98+
"index": "int", // Index providing ordering for this chunk in the entire recording
99+
"endReason": "string", // Reason for chunk ending: "SessionEnded", "ChunkMaximumSizeExceeded”, etc.
100+
}
101+
]
102+
},
103+
"recordingStartTime": "string", // ISO 8601 date time for the start of the recording
104+
"recordingDurationMs": "int", // Duration of recording in milliseconds
105+
"sessionEndReason": "string" // Reason for call ending: "CallEnded", "InitiatorLeft”, etc.
106+
},
107+
"eventType": "string", // "Microsoft.Communication.RecordingFileStatusUpdated"
108+
"dataVersion": "string", // "1.0"
109+
"metadataVersion": "string", // "1"
110+
"eventTime": "string" // ISO 8601 date time for when the event was created
111+
}
112+
```
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
author: rsarkar
3+
ms.service: azure-communication-services
4+
ms.date: 03/15/2023
5+
ms.topic: include
6+
ms.custom: private_preview
7+
ms.author: rsarkar
8+
---
9+
10+
[!INCLUDE [Private Preview](../../../../includes/private-preview-include-section.md)]
11+
12+
## Prerequisites
13+
14+
Before you start testing Unmixed Audio recording, make sure you complete the following steps:
15+
16+
- You need a Call in place whether is using Calling Client SDK or Call Automation before you start recording. Review their quickstarts and make sure you follow all their pre-requisites.
17+
- Create an Azure account with an active subscription. For details, see [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
18+
- Create an Azure Communication Services resource. For details, see [Create an Azure Communication Services resource](../../../create-communication-resource.md). You'll need to record your resource **connection string** for this quickstart.
19+
- Subscribe to events via [Azure Event Grid](https://learn.microsoft.com/azure/event-grid/event-schema-communication-services).
20+
- Download the [Java SDK](https://dev.azure.com/azure-sdk/public/_artifacts/feed/azure-sdk-for-java/maven/com.azure%2Fazure-communication-callautomation/overview/1.0.0-alpha.20230314.1 )
21+
- This quickstart assumes you have some experience using the [Calling Client SDK](../../get-started-with-video-calling.md). **Important**: To fetch `serverCallId` from Calling SDK, refer to the [JavaScript](../../get-server-call-id.md) example.
22+
- Make sure to provide the Azure Communication Services Call Recording team with your [immutable Azure resource ID](../../get-resource-id.md) to be allowlisted during the **private preview** tests.
23+
24+
25+
## 1. Create a Call Automation client
26+
27+
To create a call automation client, you'll use your Communication Services connection string and pass it to `CallAutomationClient` object.
28+
29+
```java
30+
CallAutomationClient callAutomationClient = new CallAutomationClientBuilder()
31+
.connectionString("<acsConnectionString>")
32+
.buildClient();
33+
```
34+
35+
## 2. Start recording session with StartRecordingOptions using 'startRecordingWithResponse' server API
36+
37+
Use the server call ID received during initiation of the call.
38+
39+
### 2.1 Using Azure Blob Storage for External Storage
40+
41+
42+
```java
43+
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<serverCallId>"))
44+
.setExternalStorage(new BlobStorage("<Insert Container / Blob Uri>"));
45+
46+
Response<StartCallRecordingResult> response = callAutomationClient.getCallRecording()
47+
.startRecordingWithResponse(recordingOptions, null);
48+
```
49+
50+
The `startRecordingWithResponse` API response contains the recording ID of the recording session.
51+
52+
## 3. Stop recording session using 'stopRecordingWithResponse' server API
53+
54+
Use the recording ID received in response of `startRecordingWithResponse`.
55+
56+
```java
57+
Response<Void> response = callAutomationClient.getCallRecording()
58+
.stopRecordingWithResponse(response.getValue().getRecordingId(), null);
59+
```
60+
61+
## 4. Pause recording session using 'pauseRecordingWithResponse' server API
62+
63+
Use the recording ID received in response of `startRecordingWithResponse`.
64+
65+
```java
66+
Response<Void> response = callAutomationClient.getCallRecording()
67+
.pauseRecordingWithResponse(response.getValue().getRecordingId(), null);
68+
```
69+
70+
## 5. Resume recording session using 'resumeRecordingWithResponse' server API
71+
72+
Use the recording ID received in response of `startRecordingWithResponse`.
73+
74+
```csharp
75+
Response<Void> response = callAutomationClient.getCallRecording()
76+
.resumeRecordingWithResponse(response.getValue().getRecordingId(), null);
77+
```
78+
79+
## 6. Notification on successful export
80+
81+
Use an [Azure Event Grid](../../../../../event-grid/overview.md) web hook or other triggered action should be used to notify your services when the recorded media is ready and have been exported to the external storage location.
82+
83+
Below is an example of the event schema.
84+
85+
``` json
86+
{
87+
"id": "string", // Unique guid for event
88+
"topic": "string", // /subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}
89+
"subject": "string", // /recording/call/{call-id}/serverCallId/{serverCallId}
90+
"data": {
91+
"storageType": "string", // acsstorage, blobstorage etc.
92+
"recordingId": "string", // unique id for recording
93+
"recordingStorageInfo": {
94+
"recordingChunks": [
95+
{
96+
"documentId": "string", // Document id for for the recording chunk
97+
"contentLocation": "string", //Azure Communication Services URL where the content is located
98+
"metadataLocation": "string", // Azure Communication Services URL where the metadata for this chunk is located
99+
"deleteLocation": "string", // Azure Communication Services URL to use to delete all content, including recording and metadata.
100+
"index": "int", // Index providing ordering for this chunk in the entire recording
101+
"endReason": "string", // Reason for chunk ending: "SessionEnded", "ChunkMaximumSizeExceeded”, etc.
102+
}
103+
]
104+
},
105+
"recordingStartTime": "string", // ISO 8601 date time for the start of the recording
106+
"recordingDurationMs": "int", // Duration of recording in milliseconds
107+
"sessionEndReason": "string" // Reason for call ending: "CallEnded", "InitiatorLeft”, etc.
108+
},
109+
"eventType": "string", // "Microsoft.Communication.RecordingFileStatusUpdated"
110+
"dataVersion": "string", // "1.0"
111+
"metadataVersion": "string", // "1"
112+
"eventTime": "string" // ISO 8601 date time for when the event was created
113+
}
114+
```

0 commit comments

Comments
 (0)