Skip to content

Commit 35c2ec6

Browse files
authored
Update transfer-calls-web.md
Updating the documentation for transfer call and consultative transfer
1 parent 66aad74 commit 35c2ec6

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

articles/communication-services/how-tos/calling-sdk/includes/transfer-calls/transfer-calls-web.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: probableprime
33
ms.service: azure-communication-services
44
ms.topic: include
5-
ms.date: 09/08/2021
5+
ms.date: 11/04/2021
66
ms.author: rifox
77
---
88
[!INCLUDE [Install SDK](../install-sdk/install-sdk-web.md)]
@@ -13,7 +13,7 @@ ms.author: rifox
1313
Call transfer is an extended feature of the core `Call` API. You first need to get the transfer feature API object:
1414

1515
```js
16-
const callTransferApi = call.api(Features.Transfer);
16+
const callTransferApi = call.feature(Features.Transfer);
1717
```
1818

1919
Call transfers involve three parties:
@@ -22,7 +22,7 @@ Call transfers involve three parties:
2222
- *Transferee*: The person who is being transferred.
2323
- *Transfer target*: The person who is being transferred to.
2424

25-
Transfers follow these steps:
25+
### Transfer to participant:
2626

2727
1. There's already a connected call between the *transferor* and the *transferee*. The *transferor* decides to transfer the call from the *transferee* to the *transfer target*.
2828
1. The *transferor* calls the `transfer` API.
@@ -44,6 +44,27 @@ const id = { communicationUserId: <ACS_USER_ID> };
4444
const transfer = callTransferApi.transfer({targetParticipant: id});
4545
```
4646

47+
### Transfer to call:
48+
49+
1. There's already a connected call between the *transferor* and the *transferee*.
50+
2. There's already a connected call between the *transferor* and the *transfer target*.
51+
3. The *transferor* decides to transfer the call with the *transferee* to the call with *transfer target*.
52+
4. The *transferor* calls the `transfer` API.
53+
5. The *transferee* decides whether to `accept` or `reject` the transfer request to the *transfer target* by using a `transferRequested` event.
54+
6. The *transfer target* receives an incoming call only if the *transferee* accepts the transfer request.
55+
56+
To transfer a current call, you can use the `transfer` API.
57+
58+
```js
59+
// transfer to the target call specifying the call id
60+
const id = { targetCallId: <CALL_ID> };
61+
```
62+
63+
```js
64+
// call transfer API
65+
const transfer = callTransferApi.transfer({ targetCallId: <CALL_ID> });
66+
```
67+
4768
The `transfer` API allows you to subscribe to `transferStateChanged` and `transferRequested` events. A `transferRequested` event comes from a `call` instance; a `transferStateChanged` event and transfer `state` and `error` come from a `transfer` instance.
4869

4970
```js
@@ -66,4 +87,4 @@ callTransferApi.on('transferRequested', args => {
6687
callTransferApi.on('transferRequested', args => {
6788
args.reject();
6889
});
69-
```
90+
```

0 commit comments

Comments
 (0)