Skip to content

Commit bea0bbf

Browse files
authored
Update call recording documentation for ID usage
1 parent 5a1ab4d commit bea0bbf

1 file changed

Lines changed: 18 additions & 14 deletions

File tree

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

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,25 @@ You can download the sample app from [GitHub](https://github.com/Azure-Samples/c
2020

2121
## Before you start
2222

23-
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:
23+
Call Recording APIs use the `callConnectionId` or `serverCallId`to initiate recording. There are a couple of methods you can use to fetch the these IDs depending on your scenario:
2424

25-
### Call Automation scenarios
25+
### How to fetch callConnectionId
2626

27-
- When using [Call Automation](../../../call-automation/callflows-for-customer-interactions.md), you have two options to get the `serverCallId`:
28-
1) Once a call is created, a `serverCallId` is returned as a property of the `CallConnected` event after a call is established. Learn how to [Get a CallConnected event](../../../call-automation/callflows-for-customer-interactions.md?pivots=programming-language-javascript#update-programcs) from the Call Automation SDK.
29-
2) Once you answer the call or a call is created, it returns the `serverCallId` as a property of the `AnswerCallResult` or `CreateCallResult` API responses respectively.
27+
When using [Call Automation](../../../call-automation/callflows-for-customer-interactions.md), you will receive the `callConnectionId` from the response event from a `createCall`, `answer`, or `connect` requests when initiating the call.
3028

31-
### Calling SDK scenarios
29+
### How to fetch serverCallId
3230

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.
31+
When using [Call Automation](../../../call-automation/callflows-for-customer-interactions.md), you have two options to get the `serverCallId`:
3432

35-
Use this example to learn how to [Get a serverCallId](../../get-server-call-id.md) from the Calling Client SDK.
33+
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.
3634

37-
Let's get started with a few simple steps!
35+
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.
36+
37+
38+
When using [Calling Client SDK](../../get-started-with-video-calling.md), you can retrieve the `serverCallId` by using the `getServerCallId` method on the call.
39+
Use this example to learn how to [Get serverCallId](../../get-server-call-id.md) from the Calling Client SDK.
40+
41+
Let's get started with a few simple steps.
3842

3943
## 1. Create a Call Automation client
4044

@@ -48,13 +52,13 @@ const callAutomationClient = new CallAutomationClient.CallAutomationClient("<ACS
4852

4953
## 2. Start recording session with StartRecordingOptions using 'StartAsync' API
5054

51-
Use the `serverCallId` received during initiation of the call.
55+
Use the `callConnectionId` or `serverCallId` received during initiation of the call.
5256
- Use `RecordingContent` to pass the recording content type. Use `AUDIO`.
5357
- Use `RecordingChannel` to pass the recording channel type. Use `MIXED` or `UNMIXED`.
5458
- Use `RecordingFormat` to pass the format of the recording. Use `WAV`.
5559

5660
```javascript
57-
var locator: CallLocator = { id: "<ServerCallId>", kind: "serverCallLocator" };
61+
var locator: CallLocator = { id: "<callConnectionId> or <ServerCallId>", kind: "serverCallLocator" };
5862

5963
var options: StartRecordingOptions =
6064
{
@@ -91,7 +95,7 @@ var response = await callAutomationClient.getCallRecording().start(options);
9195
> [!NOTE]
9296
> **Recordings will need to be resumed for recording file to be generated.**
9397
```javascript
94-
var locator: CallLocator = { id: "<ServerCallId>", kind: "serverCallLocator" };
98+
var locator: CallLocator = { id: "<callConnectionId> or <ServerCallId>", kind: "serverCallLocator" };
9599

96100
var options: StartRecordingOptions =
97101
{
@@ -110,7 +114,7 @@ var response = await callAutomationClient.getCallRecording().start(options);
110114
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.
111115

112116
```javascript
113-
var locator: CallLocator = { id: "<ServerCallId>", kind: "serverCallLocator" };
117+
var locator: CallLocator = { id: "<callConnectionId> or <ServerCallId>", kind: "serverCallLocator" };
114118

115119
var options: StartRecordingOptions =
116120
{
@@ -182,7 +186,7 @@ The following code is an example of the event schema.
182186
{
183187
"id": string, // Unique guid for event
184188
"topic": string, // /subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}
185-
"subject": string, // /recording/call/{call-id}/serverCallId/{serverCallId}
189+
"subject": string, // /recording/call/{call-id}/callConnectionId/{callConnectionId}
186190
"data": {
187191
"recordingStorageInfo": {
188192
"recordingChunks": [

0 commit comments

Comments
 (0)