Skip to content

Commit 1cb80d4

Browse files
authored
Merge pull request #249425 from ashwinder/Teams-interop
Update capabilities for SME consult
2 parents 99dd822 + 76eb1b2 commit 1cb80d4

File tree

2 files changed

+145
-33
lines changed

2 files changed

+145
-33
lines changed

articles/communication-services/concepts/call-automation/call-automation-teams-interop.md

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,39 +43,41 @@ The dataflow diagram depicts a canonical scenario where a Teams user is added to
4343

4444
The following list presents the set of features that are currently available in the Azure Communication Services Call Automation SDKs for calls with Microsoft Teams users.
4545

46-
| Feature Area | Capability | .NET | Java |
47-
| ----------------------| ----------------------------------------------- | ------ | ----- |
48-
| Pre-call scenarios | Place new outbound call to a Microsoft Teams user | ✔️ | ✔️ |
49-
| | Redirect (forward) a call to a Microsoft Teams user | ✔️ | ✔️ |
50-
| | Set custom display name for the callee when making a call offer to a Microsoft Teams user | Only on Microsoft Teams desktop client | Only on Microsoft Teams desktop client |
51-
| Mid-call scenarios | Add one or more endpoints to an existing call with a Microsoft Teams user | ✔️ | ✔️ |
52-
| | Play Audio from an audio file | ✔️ | ✔️ |
53-
| | Recognize user input through DTMF | ✔️ | ✔️ |
54-
| | Remove one or more endpoints from an existing call| ✔️ | ✔️ |
55-
| | Blind Transfer a 1:1 call to another endpoint | ✔️ | ✔️ |
56-
| | Hang up a call (remove the call leg) | ✔️ | ✔️ |
57-
| | Terminate a call (remove all participants and end call)| ✔️ | ✔️ |
58-
| Query scenarios | Get the call state | ✔️ | ✔️ |
59-
| | Get a participant in a call | ✔️ | ✔️ |
60-
| | List all participants in a call | ✔️ | ✔️ |
61-
| Call Recording* | Start/pause/resume/stop recording | ✔️ | ✔️ |
46+
| Feature Area | Capability | .NET | Java | Python | JavaScript |
47+
| ----------------------| ----------------------------------------------- | ------ | ----- | ------ | ----- |
48+
| Pre-call scenarios | Place new outbound call to a Microsoft Teams user | ✔️ | ✔️ | ✔️ | ✔️ |
49+
| | Redirect (forward) a call to a Microsoft Teams user | ✔️ | ✔️ | ✔️ | ✔️ |
50+
| | Set custom display name for the callee when making a call offer to a Microsoft Teams user | Only on Microsoft Teams desktop and web client | Only on Microsoft Teams desktop
51+
and web client |
52+
| Mid-call scenarios | Add one or more endpoints to an existing call with a Microsoft Teams user | ✔️ | ✔️ | ✔️ | ✔️ |
53+
| | Play Audio from an audio file | ✔️ | ✔️ | ✔️ | ✔️ |
54+
| | Recognize user input through DTMF |||||
55+
| | Remove one or more endpoints from an existing call| ✔️ | ✔️ | ✔️ | ✔️ |
56+
| | Blind Transfer a 1:1 call to another endpoint | ✔️ | ✔️ | ✔️ | ✔️ |
57+
| | Hang up a call (remove the call leg) | ✔️ | ✔️ | ✔️ | ✔️ |
58+
| | Terminate a call (remove all participants and end call)| ✔️ | ✔️ | ✔️ | ✔️ |
59+
| Query scenarios | Get the call state | ✔️ | ✔️ | ✔️ | ✔️ |
60+
| | Get a participant in a call | ✔️ | ✔️ | ✔️ | ✔️ |
61+
| | List all participants in a call | ✔️ | ✔️ | ✔️ | ✔️ |
62+
| Call Recording* | Start/pause/resume/stop recording (call recording notifications in Teams clients are supported for Teams desktop, web, iOS and Android) | ✔️ | ✔️ | ✔️ | ✔️ |
6263

6364
> [!IMPORTANT]
64-
> Azure Communication Services call recording notifications in Teams clients are not supported. You must obtain consent from and notify the parties of recorded communications in a manner that complies with the laws applicable to each participant. i.e., using the Play API available in Call Automation.
65+
> During Public preview, you won't be able to stop the call recording if it started after adding the Teams participant.
6566
6667
## Supported clients
6768
| Clients | Support |
6869
| -----------------| ----------- |
6970
| Microsoft Teams Desktop | ✔️ |
70-
| Microsoft Teams Web | |
71+
| Microsoft Teams Web | ✔️ |
7172
| Microsoft Teams iOS ||
7273
| Microsoft Teams Android ||
7374
| Azure Communications Services signed in with Microsoft 365 Identity ||
7475

75-
## Roadmap
76+
Teams phone license is a must to use this feature.
7677

77-
1. Support for Microsoft Teams Web coming soon.
78+
## Roadmap
7879
1. Support for Azure Communications Services signed in with Microsoft 365 Identity coming soon.
80+
2. Support for Microsoft Teams iOS and Android clients coming soon.
7981

8082
## Next steps
8183

articles/communication-services/how-tos/call-automation/teams-interop-call-automation.md

Lines changed: 123 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ ms.subservice: call-automation
99
ms.topic: include
1010
ms.date: 03/28/2023
1111
ms.author: visho
12-
ms.custom: public_preview
12+
ms.custom: public_preview, devx-track-extended-java, devx-track-js, devx-track-python
13+
zone_pivot_groups: acs-js-csharp-java-python
1314
services: azure-communication-services
1415
---
1516

@@ -22,7 +23,7 @@ In this quickstart, we use the Azure Communication Services Call Automation APIs
2223
## Prerequisites
2324

2425
- An Azure account with an active subscription.
25-
- A Microsoft Teams tenant with administrative privileges.
26+
- A Microsoft Teams phone license and a Teams tenant with administrative privileges. Teams phone license is a must in order to use this feature, learn more about Teams licenses [here](https://www.microsoft.com/en-us/microsoft-teams/compare-microsoft-teams-bundle-options). Administrative privileges are required to authorize Communication Services resource to call Teams users, explained later in Step 1.
2627
- A deployed [Communication Service resource](../../quickstarts/create-communication-resource.md) and valid connection string found by selecting Keys in left side menu on Azure portal.
2728
- [Acquire a PSTN phone number from the Communication Service resource](../../quickstarts/telephony/get-phone-number.md). Note the phone number you acquired to use in this quickstart.
2829
- An Azure Event Grid subscription to receive the `IncomingCall` event.
@@ -31,16 +32,16 @@ In this quickstart, we use the Azure Communication Services Call Automation APIs
3132

3233
## Step 1: Authorization for your Azure Communication Services Resource to enable calling to Microsoft Teams users
3334

34-
To enable calling through Call Automation APIs, a [Microsoft Teams Administrator](/azure/active-directory/roles/permissions-reference#teams-administrator) or [Global Administrator](/en-us/azure/active-directory/roles/permissions-reference#global-administrator) must explicitly enable the ACS resource(s) access to their tenant to allow calling.
35+
To enable calling through Call Automation APIs, a [Microsoft Teams Administrator](/azure/active-directory/roles/permissions-reference#teams-administrator) or [Global Administrator](/en-us/azure/active-directory/roles/permissions-reference#global-administrator) must explicitly enable the Communication Services resource(s) access to their tenant to allow calling.
3536

3637
[Set-CsTeamsAcsFederationConfiguration (MicrosoftTeamsPowerShell)](/powershell/module/teams/set-csteamsacsfederationconfiguration)
37-
Tenant level setting that enables/disables federation between their tenant and specific ACS resources.
38+
Tenant level setting that enables/disables federation between their tenant and specific Communication Services resources.
3839

3940
[Set-CsExternalAccessPolicy (SkypeForBusiness)](/powershell/module/skype/set-csexternalaccesspolicy)
40-
User policy that allows the admin to further control which users in their organization can participate in federated communications with ACS users.
41+
User policy that allows the admin to further control which users in their organization can participate in federated communications with Communication Services users.
4142

4243
## Step 2: Use the Graph API to get Azure AD object ID for Teams users and optionally check their presence
43-
A Teams user’s Azure Active Directory (Azure AD) object ID (OID) is required to add them to or transfer to them from an ACS call. The OID can be retrieved through 1) Office portal, 2) Azure AD portal, 3) Azure AD Connect; or 4) Graph API. The example below uses Graph API.
44+
A Teams user’s Azure Active Directory (Azure AD) object ID (OID) is required to add them to or transfer to them from a Communication Services call. The OID can be retrieved through 1) Office portal, 2) Azure AD portal, 3) Azure AD Connect; or 4) Graph API. The example below uses Graph API.
4445

4546
Consent must be granted by an Azure AD admin before Graph can be used to search for users, learn more by following on the [Microsoft Graph Security API overview](/graph/security-concept-overview) document. The OID can be retrieved using the list users API to search for users. The following shows a search by display name, but other properties can be searched as well:
4647

@@ -73,8 +74,10 @@ Response:
7374
7475
```
7576

76-
## Step 3: Add a Teams user to an existing ACS call controlled by Call Automation APIs
77-
You need to complete the prerequisite step and have a web service app to control an ACS call. Using the callConnection object, add a participant to the call.
77+
## Step 3: Add a Teams user to an existing Communication Services call controlled by Call Automation APIs
78+
You need to complete the prerequisite step and have a web service app to control a Communication Services call. Using the callConnection object, add a participant to the call.
79+
80+
::: zone pivot="programming-language-csharp"
7881

7982
```csharp
8083
CallAutomationClient client = new CallAutomationClient('<Connection_String>');
@@ -85,22 +88,128 @@ await answer.Value.CallConnection.AddParticipantAsync(
8588
SourceDisplayName = "Jack (Contoso Tech Support)"
8689
});
8790
```
91+
92+
::: zone-end
93+
94+
::: zone pivot="programming-language-java"
95+
96+
```java
97+
CallAutomationClient client = new CallAutomationClientBuilder().connectionString("<resource_connection_string>").buildClient();
98+
AnswerCallResult answer = client.answerCall(incomingCallContext, "<Callback_URI>"));
99+
answer.getCallConnection().addParticipant(
100+
new CallInvite(new MicrosoftTeamsUserIdentifier("<Teams_User_Guid>"))
101+
.setSourceDisplayName("Jack (Contoso Tech Support)"));
102+
```
103+
104+
::: zone-end
105+
106+
::: zone pivot="programming-language-javascript"
107+
108+
```typescript
109+
const client = new CallAutomationClient("<resource_connection_string>");
110+
const answer = await client.answerCall(incomingCallContext, "<Callback_URI>"));
111+
answer.callConnection.addParticipant({
112+
targetParticipant: { microsoftTeamsUserId: "<Teams_User_Guid>" },
113+
sourceDisplayName: "Jack (Contoso Tech Support)"
114+
});
115+
```
116+
117+
::: zone-end
118+
119+
::: zone pivot="programming-language-python"
120+
121+
```python
122+
call_automation_client = CallAutomationClient.from_connection_string("<resource_connection_string>")
123+
answer = call_automation_client.answer_call(incoming_call_context = incoming_call_context, callback_url = "<Callback_URI>")
124+
call_connection_client = call_automation_client.get_call_connection(answer.call_connection_id)
125+
call_connection_client.add_participant(target_participant = CallInvite(
126+
target = MicrosoftTeamsUserIdentifier(user_id="<USER_ID>"),
127+
source_display_name = "Jack (Contoso Tech Support)"))
128+
```
129+
130+
::: zone-end
131+
132+
-----
133+
88134
On the Microsoft Teams desktop client, Jack's call will be sent to the Microsoft Teams user through an incoming call toast notification.
89135

90136
![Screenshot of Microsoft Teams desktop client, Jack's call is sent to the Microsoft Teams user through an incoming call toast notification.](./media/incoming-call-toast-notification-teams-user.png)
91137

92-
After the Microsoft Teams user accepts the call, the in-call experience for the Microsoft Teams user will have all the participants displayed on the Microsoft Teams roster.
138+
After the Microsoft Teams user accepts the call, the in-call experience for the Microsoft Teams user will have all the participants displayed on the Microsoft Teams roster. Note that your application that is managing the call using Call Automation API will remain hidden to Teams user on the call screen.
93139
![Screenshot of Microsoft Teams user accepting the call and entering the in-call experience for the Microsoft Teams user.](./media/active-call-teams-user.png)
94140

95-
## Step 4: Remove a Teams user from an existing ACS call controlled by Call Automation APIs
141+
## Step 4: Remove a Teams user from an existing Communication Services call controlled by Call Automation APIs
142+
143+
::: zone pivot="programming-language-csharp"
144+
96145
```csharp
97146
await answer.Value.CallConnection.RemoveParticipantAsync(new MicrosoftTeamsUserIdentifier('<Teams_User_Guid>'));
98147
```
99148

100-
### Optional feature: Transfer to a Teams user from an existing ACS call controlled by Call Automation APIs
149+
::: zone-end
150+
151+
::: zone pivot="programming-language-java"
152+
153+
```java
154+
answer.getCallConnection().removeParticipant(new MicrosoftTeamsUserIdentifier("<Teams_User_Guid>"));
155+
```
156+
157+
::: zone-end
158+
159+
::: zone pivot="programming-language-javascript"
160+
161+
```typescript
162+
answer.callConnection.removeParticipant({ microsoftTeamsUserId: "<Teams_User_Guid>" });
163+
```
164+
165+
::: zone-end
166+
167+
::: zone pivot="programming-language-python"
168+
169+
```python
170+
call_connection_client.remove_participant(target_participant = MicrosoftTeamsUserIdentifier(user_id="<USER_ID>"))
171+
```
172+
173+
::: zone-end
174+
175+
-----
176+
177+
### Optional feature: Transfer to a Teams user from an existing Communication Services call controlled by Call Automation APIs
178+
179+
::: zone pivot="programming-language-csharp"
180+
101181
```csharp
102-
await answer.Value.CallConnection.TransferCallToParticipantAsync(new CallInvite(new MicrosoftTeamsUserIdentifier('<Teams_User_Guid>')));
182+
await answer.Value.CallConnection.TransferCallToParticipantAsync(new MicrosoftTeamsUserIdentifier('<Teams_User_Guid>'));
183+
```
184+
185+
::: zone-end
186+
187+
::: zone pivot="programming-language-java"
188+
189+
```java
190+
answer.getCallConnection().transferCallToParticipant(new MicrosoftTeamsUserIdentifier("<Teams_User_Guid>"));
191+
```
192+
193+
::: zone-end
194+
195+
::: zone pivot="programming-language-javascript"
196+
197+
```typescript
198+
answer.callConnection.transferCallToParticipant({ microsoftTeamsUserId: "<Teams_User_Guid>" });
199+
```
200+
201+
::: zone-end
202+
203+
::: zone pivot="programming-language-python"
204+
205+
```python
206+
call_connection_client.transfer_call_to_participant(target_participant = MicrosoftTeamsUserIdentifier(user_id = "<USER_ID>"))
103207
```
208+
209+
::: zone-end
210+
211+
-----
212+
104213
### How to tell if your Tenant isn't enabled for this preview?
105214
![Screenshot showing the error during Step 1.](./media/teams-federation-error.png)
106215

@@ -110,7 +219,8 @@ If you want to clean up and remove a Communication Services subscription, you ca
110219

111220
## Next steps
112221

222+
- Learn how to [record your calls](../../quickstarts/voice-video-calling/get-started-call-recording.md).
113223
- Learn more about [Call Automation](../../concepts/call-automation/call-automation.md) and its features.
114-
- Learn more about capabilities of [Teams Interoperability support with ACS Call Automation](../../concepts/call-automation/call-automation-teams-interop.md)
224+
- Learn more about capabilities of [Teams Interoperability support with Azure Communication Services Call Automation](../../concepts/call-automation/call-automation-teams-interop.md)
115225
- Learn about [Play action](../../concepts/call-automation/play-Action.md) to play audio in a call.
116226
- Learn how to build a [call workflow](../../quickstarts/call-automation/callflows-for-customer-interactions.md) for a customer support scenario.

0 commit comments

Comments
 (0)