Skip to content

Commit 25568f3

Browse files
authored
Merge pull request #230977 from sarkar-rajarshi/rsarkar/call-recording-byos
Call Recording BYOS private preview docs initial commit
2 parents 7d7079c + 1ac615b commit 25568f3

File tree

4 files changed

+141
-9
lines changed

4 files changed

+141
-9
lines changed

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@ ms.subservice: calling
2222
Call Recording enables you to record multiple calling scenarios available in Azure Communication Services by providing you with a set of APIs to start, stop, pause and resume recording. Whether it's a PSTN, WebRTC, or SIP call, these APIs can be accessed from your server-side business logic. Also, recordings can be triggered by a user action that tells the server application to start recording.
2323

2424
Depending on your business needs, you can use Call Recording for different Azure Communication Services calling implementations.
25-
For example, you can record 1:1 or 1:N scenarios for audio and video calls enabled by [Calling Client SDK](https://learn.microsoft.com/azure/communication-services/concepts/voice-video-calling/calling-sdk-features).
25+
For example, you can record 1:1 or 1:N scenarios for audio and video calls enabled by [Calling Client SDK](./calling-sdk-features.md).
2626

2727
![Diagram showing a call that it's being recorded.](../media/call-recording-client.png)
2828

29-
But also, you can use Call Recording to record complex PSTN or VoIP inbound and outbound calling workflows managed by [Call Automation](https://learn.microsoft.com/azure/communication-services/concepts/voice-video-calling/call-automation).
30-
Regardless of how you establish the call, Call Recording allows you to produce mixed or unmixed media files that are stored for 48 hours on a built-in temporary storage. You can retrieve the files and take them to the long-term storage solution of your choice. Call Recording supports all Azure Communication Services data regions.
29+
But also, you can use Call Recording to record complex PSTN or VoIP inbound and outbound calling workflows managed by [Call Automation](../call-automation/call-automation.md).
30+
Regardless of how you established the call, Call Recording allows you to produce mixed or unmixed media files that are stored for 48 hours on a built-in temporary storage. You can retrieve the files and take them to the long-term storage solution of your choice. Call Recording supports all Azure Communication Services data regions.
31+
3132

3233
![Diagram showing call recording architecture using calling client sdk.](../media/call-recording-with-call-automation.png)
3334

@@ -64,7 +65,9 @@ A `recordingId` is returned when recording is started, which is then used for fo
6465

6566

6667
## Event Grid notifications
67-
Call Recording uses [Azure Event Grid](https://learn.microsoft.com/azure/event-grid/event-schema-communication-services) to provide you with notifications related to media and metadata.
68+
69+
Call Recording use [Azure Event Grid](../../../event-grid/event-schema-communication-services.md) to provide you with notifications related to media and metadata.
70+
6871

6972
> [!NOTE]
7073
> Azure Communication Services provides short term media storage for recordings. **Recordings will be available to download for 48 hours.** After 48 hours, recordings will no longer be available.
@@ -143,11 +146,11 @@ Regulations around the maintenance of personal data require the ability to expor
143146

144147
## Known Issues
145148

146-
It's possible that when a call is created using Call Automation, you don't get a value in the `serverCallId`. If that's the case, get the `serverCallId` from the `CallConnected` event method described in [Get serverCallId](https://learn.microsoft.com/azure/communication-services/quickstarts/voice-video-calling/callflows-for-customer-interactions?pivots=programming-language-csharp#configure-programcs-to-answer-the-call).
149+
It's possible that when a call is created using Call Automation, you won't get a value in the `serverCallId`. If that's the case, get the `serverCallId` from the `CallConnected` event method described in [Get serverCallId](../../quickstarts/call-automation/callflows-for-customer-interactions.md).
147150

148151
## Next steps
149152
For more information, see the following articles:
150153

151154
- Learn more about Call recording, check out the [Call Recording Quickstart](../../quickstarts/voice-video-calling/get-started-call-recording.md).
152-
- Learn more about [Call Automation](https://learn.microsoft.com/azure/communication-services/quickstarts/voice-video-calling/callflows-for-customer-interactions?pivots=programming-language-csharp).
153-
- Learn more about [Video Calling](https://learn.microsoft.com/azure/communication-services/quickstarts/voice-video-calling/get-started-with-video-calling?pivots=platform-web).
155+
- Learn more about [Call Automation](../../quickstarts/call-automation/callflows-for-customer-interactions.md).
156+
- Learn more about [Video Calling](../../quickstarts/voice-video-calling/get-started-with-video-calling.md).

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.custom: mode-api
1616

1717
[!INCLUDE [Public Preview](../../includes/public-preview-include-document.md)]
1818

19-
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](https://learn.microsoft.com/azure/communication-services/quickstarts/voice-video-calling/callflows-for-customer-interactions?pivots=programming-language-csharp#configure-programcs-to-answer-the-call) to build the end-user calling experience.
19+
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.
2020

2121
::: zone pivot="programming-language-csharp"
2222
[!INCLUDE [Test Call Recording with C#](./includes/call-recording-samples/call-recording-csharp.md)]
@@ -26,6 +26,7 @@ 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+
2930
## Clean up resources
3031

3132
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).
@@ -36,5 +37,5 @@ For more information, see the following articles:
3637

3738
- Download our [Java](https://github.com/Azure-Samples/communication-services-java-quickstarts/tree/main/ServerRecording) and [.NET](https://github.com/Azure-Samples/communication-services-dotnet-quickstarts/tree/main/ServerRecording) call recording sample apps
3839
- Learn more about [Call Recording](../../concepts/voice-video-calling/call-recording.md)
39-
- Learn more about [Call Automation](https://learn.microsoft.com/azure/communication-services/concepts/voice-video-calling/call-automation)
40+
- Learn more about [Call Automation](../../concepts/call-automation/call-automation.md)
4041

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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+
13+
## Start recording session with external storage specified
14+
15+
Use the server call ID received during initiation of the call.
16+
17+
### Using Azure Blob Storage for External Storage
18+
19+
20+
```csharp
21+
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<ServerCallId>"))
22+
{
23+
// ...
24+
ExternalStorage = new BlobStorage(new Uri("<Insert Container / Blob Uri>"))
25+
};
26+
27+
Response<RecordingStateResult> startRecordingWithResponse = await callAutomationClient.GetCallRecording()
28+
.StartRecordingAsync(options: recordingOptions);
29+
```
30+
31+
## Notification on successful export
32+
33+
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.
34+
35+
Below is an example of the event schema.
36+
37+
``` json
38+
{
39+
"id": "string", // Unique guid for event
40+
"topic": "string", // /subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}
41+
"subject": "string", // /recording/call/{call-id}/serverCallId/{serverCallId}
42+
"data": {
43+
"storageType": "string", // acsstorage, blobstorage etc.
44+
"recordingId": "string", // unique id for recording
45+
"recordingStorageInfo": {
46+
"recordingChunks": [
47+
{
48+
"documentId": "string", // Document id for for the recording chunk
49+
"contentLocation": "string", //Azure Communication Services URL where the content is located
50+
"metadataLocation": "string", // Azure Communication Services URL where the metadata for this chunk is located
51+
"deleteLocation": "string", // Azure Communication Services URL to use to delete all content, including recording and metadata.
52+
"index": "int", // Index providing ordering for this chunk in the entire recording
53+
"endReason": "string", // Reason for chunk ending: "SessionEnded", "ChunkMaximumSizeExceeded”, etc.
54+
}
55+
]
56+
},
57+
"recordingStartTime": "string", // ISO 8601 date time for the start of the recording
58+
"recordingDurationMs": "int", // Duration of recording in milliseconds
59+
"sessionEndReason": "string" // Reason for call ending: "CallEnded", "InitiatorLeft”, etc.
60+
},
61+
"eventType": "string", // "Microsoft.Communication.RecordingFileStatusUpdated"
62+
"dataVersion": "string", // "1.0"
63+
"metadataVersion": "string", // "1"
64+
"eventTime": "string" // ISO 8601 date time for when the event was created
65+
}
66+
```
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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+
## Start recording session with external storage specified
13+
14+
Use the server call ID received during initiation of the call.
15+
16+
### Using Azure Blob Storage for External Storage
17+
18+
19+
```java
20+
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<serverCallId>"))
21+
.setExternalStorage(new BlobStorage("<Insert Container / Blob Uri>"));
22+
23+
Response<StartCallRecordingResult> response = callAutomationClient.getCallRecording()
24+
.startRecordingWithResponse(recordingOptions, null);
25+
```
26+
27+
## Notification on successful export
28+
29+
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.
30+
31+
Below is an example of the event schema.
32+
33+
``` json
34+
{
35+
"id": "string", // Unique guid for event
36+
"topic": "string", // /subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}
37+
"subject": "string", // /recording/call/{call-id}/serverCallId/{serverCallId}
38+
"data": {
39+
"storageType": "string", // acsstorage, blobstorage etc.
40+
"recordingId": "string", // unique id for recording
41+
"recordingStorageInfo": {
42+
"recordingChunks": [
43+
{
44+
"documentId": "string", // Document id for for the recording chunk
45+
"contentLocation": "string", //Azure Communication Services URL where the content is located
46+
"metadataLocation": "string", // Azure Communication Services URL where the metadata for this chunk is located
47+
"deleteLocation": "string", // Azure Communication Services URL to use to delete all content, including recording and metadata.
48+
"index": "int", // Index providing ordering for this chunk in the entire recording
49+
"endReason": "string", // Reason for chunk ending: "SessionEnded", "ChunkMaximumSizeExceeded”, etc.
50+
}
51+
]
52+
},
53+
"recordingStartTime": "string", // ISO 8601 date time for the start of the recording
54+
"recordingDurationMs": "int", // Duration of recording in milliseconds
55+
"sessionEndReason": "string" // Reason for call ending: "CallEnded", "InitiatorLeft”, etc.
56+
},
57+
"eventType": "string", // "Microsoft.Communication.RecordingFileStatusUpdated"
58+
"dataVersion": "string", // "1.0"
59+
"metadataVersion": "string", // "1"
60+
"eventTime": "string" // ISO 8601 date time for when the event was created
61+
}
62+
```

0 commit comments

Comments
 (0)