Skip to content

Commit 3651fcc

Browse files
committed
concept and quickstart for ACS CA teams interop
1 parent 821eeb5 commit 3651fcc

File tree

6 files changed

+196
-0
lines changed

6 files changed

+196
-0
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
title: Call Automation Teams Interop overview
3+
titleSuffix: An Azure Communication Services concept document
4+
description: Learn about Teams interoperability with Azure Communication Services Call Automation.
5+
author: Vishesh Oberoi
6+
7+
ms.service: azure-communication-services
8+
ms.topic: include
9+
ms.date: 02/22/2023
10+
ms.author: visho
11+
ms.custom: private_preview
12+
---
13+
14+
# Deliver expedient customer service by leveraging Microsoft Teams users in Call Automation workflows
15+
16+
[!INCLUDE [Private Preview Notice](../../includes/private-preview-include.md)]
17+
18+
Businesses are looking for innovative ways to increase the efficiency of their customer service operations. Azure Communication Services Call Automation provides developers the ability to build programmable customer interactions using real-time event triggers to perform actions based on custom business logic. For example, with supp\ort for interoperability with Microsoft Teams, developers can use Call Automation to add subject matter experts, who use Microsoft Teams, into existing customer service calls to provide their expertise to resolve a customer issue.
19+
20+
This interoperability with Microsoft Teams over VoIP makes it easy for developers to implement per-region multi-tenant trunks that maximize value and reduce telephony infrastructure overhead. Each new tenant will be able to leverage this setup in a few minutes after Microsoft Teams admin has granted necessary permissions to the Azure Communication Services resource.
21+
22+
## Use-cases
23+
24+
1. Expert Consultation: Businesses can invite subject expert experts into their customer service workflows for expedient issue resolution, and to improve their first call resolution rate.
25+
1. Extend customer service workforce with knowledge workers: Businesses can extend their customer service operation with additional capacity during peak influx of customer service calls.
26+
27+
## Scenario Showcase – Expert Consultation
28+
A customer service agent, who is using a Contact Center Agent experience, wants to now add a subject matter expert, who is knowledge worker (regular employee) at Contoso and uses Microsoft Teams, into a support call with a customer to provide some expert advice to a resolve a customer issue.
29+
30+
The dataflow diagram below depicts a canonical scenario where a Teams user is added to an ongoing ACS call for expert consultation.
31+
32+
![Diagram of calling flow for a customer service with Microsoft Teams and Call Automation.](./media/call-automation-teams-interop.png)
33+
34+
1. Customer is on an ongoing call with a Contact Center customer service agent.
35+
1. the call, the customer service agent needs expert help from one of the domain experts part of an engineering team. The agent is able to identify a knowledge worker who is available on Teams (presence via Graph APIs) and tries to add them to the call.
36+
1. Contoso Contact Center’s SBC is already configured with ACS Direct Routing where this add participant request is processed.
37+
1. Contoso Contact Center provider has implemented a web service, using ACS Call Automation, that receives the “add Participant” request.
38+
1. With Teams interop built into ACS Call Automation, ACS then uses the Teams user’s ObjectId to add them to the call. The Teams user receives the incoming call notification. They accept and join the call.
39+
1. Once the Teams has provided their expertise, they leave the call. The customer service agent and customer continue wrap up their conversation.
40+
41+
## Capabilities
42+
43+
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.
44+
45+
| Feature Area | Capability | .NET | Java |
46+
| ----------------------| ----------------------------------------------- | ------ | ----- |
47+
| Pre-call scenarios | Place new outbound call to a Microsoft Teams user | ✔️ | ✔️ |
48+
| | Redirect (forward) a call to a Microsoft Teams user | ✔️ | ✔️ |
49+
| | 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 |
50+
| Mid-call scenarios | Add one or more endpoints to an existing call with a Microsoft Teams user | ✔️ | ✔️ |
51+
| | Play Audio from an audio file | ✔️ | ✔️ |
52+
| | Recognize user input through DTMF | ✔️ | ✔️ |
53+
| | Remove one or more endpoints from an existing call| ✔️ | ✔️ |
54+
| | Blind Transfer a 1:1 call to another endpoint | ✔️ | ✔️ |
55+
| | Hang up a call (remove the call leg) | ✔️ | ✔️ |
56+
| | Terminate a call (remove all participants and end call)| ✔️ | ✔️ |
57+
| Query scenarios | Get the call state | ✔️ | ✔️ |
58+
| | Get a participant in a call | ✔️ | ✔️ |
59+
| | List all participants in a call | ✔️ | ✔️ |
60+
| Call Recording | Start/pause/resume/stop recording | ✔️ | ✔️ |
61+
62+
## Supported clients
63+
| Clients | Support |
64+
| -----------------| ----------- |
65+
| Microsoft Teams Desktop | ✔️ |
66+
| Microsoft Teams Web ||
67+
| Microsoft Teams iOS ||
68+
| Microsoft Teams Android ||
69+
| Azure Communications Services signed in with with M365 Identity ||
70+
71+
## Roadmap
72+
73+
1. Support for Microsoft Teams Web coming soon.
74+
1. Support for Azure Communications Services signed in with with M365 Identity coming soon.
75+
76+
## Next steps
77+
78+
> [!div class="nextstepaction"]
79+
> [Get started with Adding a Microsoft Teams user to an ongoing call using Call Automation](./../../quickstarts/call-automation/Callflows-for-customer-interactions.md)
80+
81+
Here are some articles of interest to you:
82+
- Understand how your resource will be [charged for various calling use cases](../pricing.md) with examples.
103 KB
Loading
39.5 KB
Loading
33.9 KB
Loading
1.12 KB
Loading
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
title: Azure Communication Services Call Automation how-to for adding Microsoft Teams User into an existing call
3+
titleSuffix: An Azure Communication Services how-to document
4+
description: Provides a how-to for adding a Microsoft Teams user to a call with Call Automation.
5+
author: visho
6+
7+
ms.service: azure-communication-services
8+
ms.topic: include
9+
ms.date: 03/28/2023
10+
ms.author: visho
11+
ms.custom: private_preview
12+
services: azure-communication-services
13+
zone_pivot_groups: acs-csharp-java
14+
---
15+
16+
# Add a Microsoft Teams user to an existing call using Call Automation
17+
18+
[!INCLUDE [Private Preview Notice](../../includes/private-preview-include.md)]
19+
20+
In this quickstart, we’ll use the Azure Communication Services Call Automation APIs to add, remove and transfer to a Teams user.
21+
22+
You will need to be part of Azure Communication Services TAP program. It is likely that you’re already part of this program, and if you are not, please sign-up using https://aka.ms/acs-tap-invite. To access to the specific Teams Interop functionality for Call Automation, please submit your Teams Tenant Ids and Azure Communication Services Resource Ids by filling this form – https://aka.ms/acs-ca-teams-tap. You will need to fill the form every time you need a new tenant Id and new resource Id allow-listed.
23+
24+
## Prerequisites
25+
26+
- An Azure account with an active subscription.
27+
- A Microsoft Teams tenant with administrative privileges.
28+
- A deployed [Communication Service resource](../../create-communication-resource.md) and valid connection string found by selecting Keys in left side menu on Azure portal.
29+
- [Acquire a PSTN phone number from the Communication Service resource](../../telephony/get-phone-number.md). Note the phone number you acquired to use in this quickstart.
30+
- An Azure Event Grid subscription to receive the `IncomingCall` event.
31+
- The latest [Azure Communication Service Call Automation API library](./callflows-for-customer-interactions.md#install-the-nuget-package) for your operating system.
32+
- A web service that implements the Call Automation API library, follow [this tutorial](./callflows-for-customer-interactions.md).
33+
34+
## Step 1: Authorization for your Azure Communication Services Resource to enable calling to Microsoft Teams users
35+
36+
To enable ad hoc 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 ad hoc calling. They can further restrict ad hoc calling at the user level, so that only designated users in the tenant can communicate with ACS users.
37+
38+
[Set-CsTeamsAcsFederationConfiguration (MicrosoftTeamsPowerShell)](~/powershell/module/teams/set-csteamsacsfederationconfiguration?view=teams-ps)
39+
This is the tenant level setting that enables/disables federation between their tenant and specific ACS resources.
40+
41+
[Set-CsExternalAccessPolicy (SkypeForBusiness)](~/powershell/module/skype/set-csexternalaccesspolicy?view=skype-ps)
42+
This is a user policy that allows the admin to further control which users in their organization can participate in federated communications with ACS users.
43+
44+
## Step 2: Use the Graph API to get AAD object ID for Teams users and optionally check their presence
45+
A Teams user’s AAD object ID (OID) is required to add them to or transfer to them from an ACS call. This 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.
46+
47+
Consent must be granted by an AAD 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:
48+
49+
[List users using Microsoft Graph v1.0](~/graph/api/user-list?view=graph-rest-1.0&tabs=http):
50+
```rest
51+
Request:
52+
https://graph.microsoft.com/v1.0/users?$search="displayName:Art Anderson"
53+
Permissions:
54+
Application and delegated. Refer to documentation.
55+
Response:
56+
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users",
57+
"value": [
58+
{
59+
"displayName": "Art Anderson",
60+
"mail": "[email protected]",
61+
"id": "fc4ccb5f-8046-4812-803f-6c344a5d1560"
62+
}
63+
```
64+
Optionally, Presence for a user can be retrieved using the get presence API and the user ObjectId. Learn more on the [Microsoft Graph v1.0 documentation](~/graph/api/presence-get?view=graph-rest-1.0&tabs=http).
65+
```rest
66+
Request:
67+
https://graph.microsoft.com/v1.0/users/fc4ccb5f-8046-4812-803f-6c344a5d1560/presence
68+
Permissions:
69+
Delegated only. Application not supported. Refer to documentation.
70+
Response:
71+
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('fc4ccb5f-8046-4812-803f-6c344a5d1560')/presence/$entity",
72+
"id": "fc4ccb5f-8046-4812-803f-6c344a5d1560",
73+
"availability": "Offline",
74+
"activity": "Offline"
75+
76+
```
77+
78+
## Step 3: Add a Teams user to an existing ACS call controlled by Call Automation APIs
79+
You will need to complete the pre-requisite step and have a web service app to control an ACS call. Using the callConnection object, add a participant to the call.
80+
81+
```csharp
82+
CallAutomationClient client = new CallAutomationClient('<Connection_String>');
83+
AnswerCallResult answer = await client.AnswerCallAsync(incomingCallContext, new Uri('<Callback_URI>'));
84+
await answer.Value.CallConnection.AddParticipantAsync(
85+
new CallInvite(new MicrosoftTeamsUserIdentifier('<Teams_User_Guid>'))
86+
{
87+
SourceDisplayName = "Jack (Contoso Tech Support)"
88+
});
89+
```
90+
![On the Microsoft Teams desktop client, Jack's call will be sent to the Microsoft Teams user through an incoming call toast notification, such as this sample screenshot below.](./media/incoming-call-toast-notification-teams-user.png)
91+
92+
![After the Microsoft Teams user accepts the call, this diagram shows the in-call experience for the Microsoft Teams user](./media/active-call-teams-user.png)
93+
94+
## Step 4: Remove a Teams user from an existing ACS call controlled by Call Automation APIs
95+
```csharp
96+
await answer.Value.CallConnection.RemoveParticipantAsync(new MicrosoftTeamsUserIdentifier('<Teams_User_Guid>'));
97+
```
98+
99+
### Additional optional feature: Transfer to a Teams user from an existing ACS call controlled by Call Automation APIs
100+
```csharp
101+
await answer.Value.CallConnection.TransferCallToParticipantAsync(new CallInvite(new MicrosoftTeamsUserIdentifier('<Teams_User_Guid>')));
102+
```
103+
### How to tell if your Tenant is not enabled for this preview?
104+
![You will receive this error during Step 1.](./media/teams-federation-error.png)
105+
106+
## Clean up resources
107+
108+
If you want to clean up and remove a Communication Services subscription, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it. Learn more about [cleaning up resources](../../quickstarts/create-communication-resource.md#clean-up-resources).
109+
110+
## Next steps
111+
112+
- Learn more about [Call Automation](../../concepts/call-automation/call-automation.md) and its features.
113+
- Learn about [Play action](../../concepts/call-automation/play-Action.md) to play audio in a call.
114+
- 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)