You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/voice-video-calling/includes/call-recording-samples/call-recording-javascript.md
+18-14Lines changed: 18 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,21 +20,25 @@ You can download the sample app from [GitHub](https://github.com/Azure-Samples/c
20
20
21
21
## Before you start
22
22
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:
24
24
25
-
### Call Automation scenarios
25
+
### How to fetch callConnectionId
26
26
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.
30
28
31
-
### Calling SDK scenarios
29
+
### How to fetch serverCallId
32
30
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`:
34
32
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.
36
34
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.
38
42
39
43
## 1. Create a Call Automation client
40
44
@@ -48,13 +52,13 @@ const callAutomationClient = new CallAutomationClient.CallAutomationClient("<ACS
48
52
49
53
## 2. Start recording session with StartRecordingOptions using 'StartAsync' API
50
54
51
-
Use the `serverCallId` received during initiation of the call.
55
+
Use the `callConnectionId` or `serverCallId` received during initiation of the call.
52
56
- Use `RecordingContent` to pass the recording content type. Use `AUDIO`.
53
57
- Use `RecordingChannel` to pass the recording channel type. Use `MIXED` or `UNMIXED`.
54
58
- Use `RecordingFormat` to pass the format of the recording. Use `WAV`.
55
59
56
60
```javascript
57
-
var locator: CallLocator = { id:"<ServerCallId>", kind:"serverCallLocator" };
61
+
var locator: CallLocator = { id:"<callConnectionId> or <ServerCallId>", kind:"serverCallLocator" };
58
62
59
63
var options: StartRecordingOptions =
60
64
{
@@ -91,7 +95,7 @@ var response = await callAutomationClient.getCallRecording().start(options);
91
95
> [!NOTE]
92
96
> **Recordings will need to be resumed for recording file to be generated.**
93
97
```javascript
94
-
var locator: CallLocator = { id:"<ServerCallId>", kind:"serverCallLocator" };
98
+
var locator: CallLocator = { id:"<callConnectionId> or <ServerCallId>", kind:"serverCallLocator" };
95
99
96
100
var options: StartRecordingOptions =
97
101
{
@@ -110,7 +114,7 @@ var response = await callAutomationClient.getCallRecording().start(options);
110
114
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.
111
115
112
116
```javascript
113
-
var locator: CallLocator = { id:"<ServerCallId>", kind:"serverCallLocator" };
117
+
var locator: CallLocator = { id:"<callConnectionId> or <ServerCallId>", kind:"serverCallLocator" };
114
118
115
119
var options: StartRecordingOptions =
116
120
{
@@ -182,7 +186,7 @@ The following code is an example of the event schema.
0 commit comments