Skip to content

Commit b744ca2

Browse files
Merge pull request #277761 from jamescadd/teams-interop-transfer-voicemail
Adds transfer to voicemail
2 parents 9eafdd4 + e68d76d commit b744ca2

File tree

3 files changed

+51
-2
lines changed

3 files changed

+51
-2
lines changed

articles/communication-services/concepts/interop/teams-user-calling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ The following list presents the set of features that are currently available in
123123
| | Transfer a call to a user | ✔️ | ✔️ | ✔️ | ✔️ |
124124
| | Be transferred to a user or call | ✔️ | ✔️ | ✔️ | ✔️ |
125125
| | Transfer a call to a call | ✔️ | ✔️ | ✔️ | ✔️ |
126-
| | Transfer a call to Voicemail | | | | |
126+
| | Transfer a call to Voicemail | ✔️ | ✔️ | ✔️ | ✔️ |
127127
| | Be transferred to voicemail | ✔️ | ✔️ | ✔️ | ✔️ |
128128
| | Merge ongoing calls |||||
129129
| | Does start a call and add user operations honor shared line configuration | ✔️ | ✔️ | ✔️ | ✔️ |

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

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,52 @@ transfer.on('stateChanged', () => {
9797
});
9898
```
9999

100+
### Transfer to voicemail:
101+
102+
1. There's already a connected call between the *transferor* and the *transferee*.
103+
2. The Teams User Identifier of the *target participant voicemail* is known.
104+
3. The *transferor* decides to transfer the call with the *transferee* to the voicemail with *voicemail id*.
105+
4. The *transferor* calls the `transfer` API.
106+
6. The *transferee* receives the transfer request.
107+
108+
To transfer a current call, you can use the `transfer` API.
109+
110+
```js
111+
// transfer to the target call specifying the call id
112+
const id = { targetParticipantVoicemail: <TEAMS_USER_ID> };
113+
```
114+
115+
```js
116+
// call transfer API
117+
const transfer = callTransferApi.transfer({ target: id });
118+
```
119+
120+
The `transfer` API allows you to subscribe to `stateChanged`. It also comes with a transfer `state` and `error` properties
121+
122+
```js
123+
// transfer state
124+
const transferState = transfer.state; // None | Transferring | Transferred | Failed
125+
126+
// to check the transfer failure reason
127+
const transferError = transfer.error; // transfer error code that describes the failure if a transfer request failed
128+
```
129+
130+
The *transferee* can listen to a `transferAccepted` event. The listener for this event has a `TransferEventArgs` which contains the call object of the new transfer call
131+
between the *transferee* and the *target participant voicemail*.
132+
133+
```js
134+
// Transferee can subscribe to the transferAccepted event
135+
callTransferApi.on('transferAccepted', args => {
136+
const newTransferCall = args.targetCall;
137+
});
138+
```
139+
140+
The *transferor* can subscribe to events for change of the state of the transfer. If the call to the *transferee* was successfully connected with *target participant voicemail*, *transferor* can hang up the original call with *transferee*.
141+
142+
```js
143+
transfer.on('stateChanged', () => {
144+
if (transfer.state === 'Transferred') {
145+
call.hangUp();
146+
}
147+
});
148+
```

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.custom: template-how-to
1515

1616
# Transfer calls
1717

18-
During an active call, you may want to transfer the call to another person or number. Let's learn how.
18+
During an active call, you may want to transfer the call to another person, number, or to voicemail. Let's learn how.
1919

2020
## Prerequisites
2121

0 commit comments

Comments
 (0)