Skip to content

Commit a6e1d3b

Browse files
authored
Merge pull request #306704 from dmceachernmsft/dmceachernmsft/active-call-transfer-docs
[ACS Calling SDK] active call transfer docs
2 parents 369e27f + 0115223 commit a6e1d3b

3 files changed

Lines changed: 109 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: Active Call Transfer
3+
titleSuffix: An Azure Communication Services how-to guide
4+
description: Use Azure Communication Services SDKs to transfer active calls between clients.
5+
author: probableprime
6+
ms.author: dmceachern
7+
ms.service: azure-communication-services
8+
ms.subservice: calling
9+
ms.topic: how-to
10+
ms.date: 10/03/2025
11+
ms.custom: template-how-to
12+
13+
#Customer intent: As a developer, I want to learn how to transfer calls between devices so that users have the option to transfer calls to their other devices while in a call.
14+
---
15+
16+
# Active Call Transfer
17+
18+
[!INCLUDE [Public Preview Notice](../../includes/public-preview-include.md)]
19+
20+
During an active call, you may want to transfer the call to device that you are signed in on. Let's learn how.
21+
22+
23+
24+
## Prerequisites
25+
26+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
27+
- A deployed Communication Services resource. [Create a Communication Services resource](../../quickstarts/create-communication-resource.md).
28+
- A user access token to enable the calling client. For more information, see [Create and manage access tokens](../../quickstarts/identity/access-tokens.md).
29+
- Complete the quickstart to [add voice calling to your application](../../quickstarts/voice-video-calling/getting-started-with-calling.md)
30+
31+
[!INCLUDE [Transfer active calls Client-side JavaScript](./includes/active-call-transfer/active-call-transfer.md)]
32+
33+
## Next steps
34+
- [Learn how to manage calls](./manage-calls.md)
35+
- [Learn how to manage video](./manage-video.md)
36+
- [Learn how to record calls](./record-calls.md)
37+
- [Learn how to transcribe calls](./call-transcription.md)
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
author: probableprime
3+
ms.service: azure-communication-services
4+
ms.topic: include
5+
ms.date: 10/03/2025
6+
ms.author: dmceachern
7+
---
8+
9+
[!INCLUDE [Install SDK](../install-sdk/install-sdk-web.md)]
10+
11+
## Active Call Management
12+
Active Call Transfer is a feature of the core `CallAgent` API. This guide talks about how you can manage and track any ongoing calls for your users and how to transfer their client to that active call.
13+
14+
**Note:** This feature is also enabled for the `TeamsCallAgent` as this feature is supported for Teams users as well.
15+
16+
This guide assumes you went through the QuickStart or that you implemented an application that is able to make and receive calls. If you didn't complete the getting starting guide, refer to our [Quickstart](../../../../quickstarts/voice-video-calling/getting-started-with-calling.md).
17+
18+
### Fetch your Active Call
19+
20+
When your user signs to the `CallAgent` there is a new method that you can use to fetch the ongoing calls `getActiveCallDetails` the response will return to you the active call, or active meeting that your users are in.
21+
22+
```js
23+
const activeCallDetails = await callAgent.getActiveCallDetails();
24+
```
25+
26+
The function `getActiveCallDetails` a way that you can manually query for this data. Once you have the active call details, you can use it to switch the client to the call that was found. This function returns `undefined` if there is no active call ongoing for your user. You can use `getActiveCallDetails` to fetch any ongoing calls when you first sign into the `CallAgent` to pick up on any calls that are already ongoing.
27+
28+
### Switch your Active Call
29+
30+
Once you have your active call data, you can switch the client over to the new call. This call switching behavior can be done with the `activeCallTransfer` function.
31+
32+
```js
33+
const activeCallDetails = await callAgent.getActiveCallDetails();
34+
const call = await callAgent.activeCallTransfer(activeCallDetails, {isTransfer: true});
35+
```
36+
37+
This function returns the call object for your applications state.
38+
39+
### Companion mode
40+
41+
When transferring the active call to your client, you can just bring the client into the call without hanging up on the device that initiated the call the user is in.
42+
43+
```js
44+
const activeCallDetails = await callAgent.getActiveCallDetails();
45+
const call = await callAgent.activeCallTransfer(activeCallDetails, {isTransfer: false}); // <-- isTransfer: false - does not remove the original client.
46+
```
47+
48+
### Subscribe to Active Call Notification events
49+
50+
There are two new events that you can subscribe to so you can receive events notifying you of your user joining a call on another client. The first event notifies the application that the user is in a call on another device. This event is also emitted when the user logs into the `CallAgent` if they are on a call already elsewhere.
51+
52+
```js
53+
callAgent.on("activeCallsUpdated", (args) => {
54+
// show UI indicating that the user is in another call on another device
55+
await callAgent.activeCallTransfer(args.activeCallDetails, {isTransfer: true});
56+
});
57+
```
58+
The second event notifies the application that the user is no longer in an active call anywhere else. This event is to be used to hide any UI indicating that they are in a call elsewhere, and any controls to manually transfer the call over.
59+
60+
```js
61+
callAgent.on("NoActiveCalls", () => {
62+
// hide UI indicating that the user is in a call elsewhere
63+
});
64+
```
65+
66+
67+
68+
69+
70+

articles/communication-services/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,8 @@ items:
499499
href: how-tos/calling-sdk/dominant-speaker.md
500500
- name: Transfer calls
501501
href: how-tos/calling-sdk/transfer-calls.md
502+
- name: Active Call Transfer
503+
href: how-tos/calling-sdk/active-call-transfer.md
502504
- name: Get local capabilities
503505
href: how-tos/calling-sdk/capabilities.md
504506
- name: View PowerPoint Live

0 commit comments

Comments
 (0)