Skip to content

Commit 03db8e7

Browse files
authored
Update call recording documentation for Java SDK
callconnectionid
1 parent 633d846 commit 03db8e7

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

  • articles/communication-services/quickstarts/voice-video-calling/includes/call-recording-samples

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

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,28 @@ You can download the sample app from [GitHub](https://github.com/Azure-Samples/c
2121

2222
## Before you start
2323

24-
Call Recording APIs exclusively use the `serverCallId` to initiate recording. There are a couple of methods you can use to fetch the `serverCallId` depending on your scenario:
24+
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:
2525

26-
### Call Automation scenarios
26+
### How to fetch callConnectionId
2727

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

30-
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 CallConnected event](../../../call-automation/callflows-for-customer-interactions.md?pivots=programming-language-java#update-programcs) from Call Automation SDK.
32+
When using [Call Automation](../../../call-automation/callflows-for-customer-interactions.md), you have two options to get the `serverCallId`:
3133

32-
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.
34+
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.
3335

34-
### Calling SDK scenarios
36+
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.
3537

36-
When using [Calling Client SDK](../../get-started-with-video-calling.md), you can retrieve the `serverCallId` by using the `getServerCallId` method on the call.
3738

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

4042
Let's get started with a few simple steps.
4143

44+
Let's get started with a few simple steps.
45+
4246
## 1. Create a Call Automation client
4347

4448
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.
@@ -53,13 +57,13 @@ CallAutomationClient callAutomationClient = new CallAutomationClientBuilder()
5357

5458
## 2. Start recording session with StartRecordingOptions using `startWithResponse` API
5559

56-
Use the `serverCallId` received during initiation of the call.
60+
Use the `callConnectionId` or `serverCallId` received during initiation of the call.
5761
- Use `RecordingContent` to pass the recording content type. Use `AUDIO`.
5862
- Use `RecordingChannel` to pass the recording channel type. Use `MIXED` or `UNMIXED`.
5963
- Use `RecordingFormat` to pass the format of the recording. Use `WAV`.
6064

6165
```java
62-
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<serverCallId>"))
66+
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<callConnectionId> or <serverCallId>"))
6367
.setRecordingChannel(RecordingChannel.UNMIXED)
6468
.setRecordingFormat(RecordingFormat.WAV)
6569
.setRecordingContent(RecordingContent.AUDIO)
@@ -91,7 +95,7 @@ Start recording using your designated Azure Blob Storage to store the recorded f
9195
> **Recordings must be resumed for recording file to be generated.**
9296
9397
```java
94-
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<serverCallId>"))
98+
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<<callConnectionId> or serverCallId>"))
9599
.setRecordingChannel(RecordingChannel.UNMIXED)
96100
.setRecordingFormat(RecordingFormat.WAV)
97101
.setRecordingContent(RecordingContent.AUDIO)
@@ -109,7 +113,7 @@ Response<RecordingStateResult> response = callAutomationClient.getCallRecording(
109113
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.
110114

111115
```java
112-
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<serverCallId>"))
116+
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<<callConnectionId> or serverCallId>"))
113117
.setRecordingChannel(RecordingChannel.UNMIXED)
114118
.setRecordingFormat(RecordingFormat.WAV)
115119
.setRecordingContent(RecordingContent.AUDIO)
@@ -179,7 +183,7 @@ The following code is an example of the event schema.
179183
{
180184
"id": string, // Unique guid for event
181185
"topic": string, // /subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}
182-
"subject": string, // /recording/call/{call-id}/serverCallId/{serverCallId}
186+
"subject": string, // /recording/call/{call-id}/callConnectionId/{callConnectionId}
183187
"data": {
184188
"recordingStorageInfo": {
185189
"recordingChunks": [

0 commit comments

Comments
 (0)