Skip to content

Commit 1d3882e

Browse files
Merge pull request #205351 from tomaschladek/cte-6
Update How-to after calling SDK redesign
2 parents b4c80da + e939786 commit 1d3882e

File tree

2 files changed

+159
-169
lines changed

2 files changed

+159
-169
lines changed

articles/communication-services/how-tos/cte-calling-sdk/includes/install-sdk/install-sdk-web.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,9 @@ npm install @azure/communication-calling --save
1616

1717
## Initialize required objects
1818

19-
A CallClient, instance is required for most call operations. Let's create a new `CallClient` instance. You can configure it with custom options like a Logger instance.
19+
Create a `CallClient` instance to initiate the calling stack. You can configure logging of calling SDK with the `AzureLogger` instance and `setLogLevel` method. You can get access to `deviceManager` for the operating system with the method `getDeviceManager`.
2020

21-
When you have a `CallClient` instance, you can create a `CallAgent` instance by calling the `createCallAgent` method on the `CallClient` instance. This method asynchronously returns a `CallAgent` instance object.
22-
23-
The `createCallAgent` method uses `CommunicationTokenCredential` as an argument. It accepts a [user access token](../../../../quickstarts/manage-teams-identity.md).
24-
25-
You can use the `getDeviceManager` method on the `CallClient` instance to access `deviceManager`.
21+
Then use the method `createTeamsCallAgent` to create asynchronously a `TeamsCallAgent` instance that will manage incoming and outgoing calls for a Teams user. The method takes `CommunicationTokenCredential` as an argument representing [access token for Teams user](../../../../quickstarts/manage-teams-identity.md).
2622

2723
```js
2824
const { CallClient } = require('@azure/communication-calling');
@@ -38,8 +34,8 @@ AzureLogger.log = (...args) => {
3834
};
3935

4036
const userToken = '<USER_TOKEN>';
41-
callClient = new CallClient(options);
37+
callClient = new CallClient();
4238
const tokenCredential = new AzureCommunicationTokenCredential(userToken);
43-
const callAgent = await callClient.createCallAgent(tokenCredential);
44-
const deviceManager = await callClient.getDeviceManager()
39+
const teamsCallAgent = await callClient.createTeamsCallAgent(tokenCredential);
40+
const deviceManager = await callClient.getDeviceManager();
4541
```

0 commit comments

Comments
 (0)