Skip to content

Commit 5ba64eb

Browse files
Merge pull request #231610 from valindrae/main
Add mute docs for call automation
2 parents a3b05a5 + 26f2cd0 commit 5ba64eb

File tree

4 files changed

+281
-1
lines changed

4 files changed

+281
-1
lines changed
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
title: include file
3+
description: C# mute participant
4+
services: azure-communication-services
5+
author: Kunaal Punjabi
6+
ms.service: azure-communication-services
7+
ms.subservice: azure-communication-services
8+
ms.date: 03/19/2023
9+
ms.topic: include
10+
ms.topic: include file
11+
ms.author: kpunjabi
12+
---
13+
14+
## Prerequisites
15+
16+
- Azure account with an active subscription, for details see [Create an account for free.](https://azure.microsoft.com/free/)
17+
- Azure Communication Services resource. See [Create an Azure Communication Services resource](../../../quickstarts/create-communication-resource.md?tabs=windows&pivots=platform-azp). Save the connection string for this resource.
18+
- Create a new web service application using the [Call Automation SDK](../../../quickstarts/call-automation/callflows-for-customer-interactions.md).
19+
- The latest [.NET library](https://dotnet.microsoft.com/download/dotnet-core) for your operating system.
20+
- Obtain the NuGet package from the [Azure SDK Dev Feed](https://github.com/Azure/azure-sdk-for-net/blob/main/CONTRIBUTING.md#nuget-package-dev-feed)
21+
22+
## Create a new C# application
23+
24+
In the console window of your operating system, use the `dotnet` command to create a new web application.
25+
26+
```console
27+
dotnet new web -n MyApplication
28+
```
29+
30+
## Install the NuGet package
31+
32+
During the preview phase, the NuGet package can be obtained by configuring your package manager to use the Azure SDK Dev Feed from [here](https://github.com/Azure/azure-sdk-for-net/blob/main/CONTRIBUTING.md#nuget-package-dev-feed)
33+
34+
## Establish a call
35+
36+
By this point you should be familiar with starting calls, if you need to learn more about making a call, follow our [quickstart](../../../quickstarts/call-automation/callflows-for-customer-interactions.md). In this quickstart, we'll answer an incoming call.
37+
38+
## Mute participant during a call
39+
40+
``` csharp
41+
var target = new CommunicationUserIdentifier(ACS_USER_ID);
42+
var callConnection = callAutomationClient.GetCallConnection(CALL_CONNECTION_ID);
43+
await callConnection.MuteParticipantsAsync(target, "OperationContext").ConfigureAwait(false);
44+
```
45+
46+
## Participant muted event
47+
48+
``` json
49+
{
50+
"id": "9dff6ffa-a496-4279-979d-f6455cb88b22",
51+
"source": "calling/callConnections/401f3500-08a0-4e9e-b844-61a65c845a0b",
52+
"type": "Microsoft.Communication.ParticipantsUpdated",
53+
"data": {
54+
"participants": [
55+
{
56+
"identifier": {
57+
"rawId": "<ACS_USER_ID>",
58+
"kind": "communicationUser",
59+
"communicationUser": {
60+
"id": "<ACS_USER_ID>"
61+
}
62+
},
63+
"isMuted": true
64+
},
65+
{
66+
"identifier": {
67+
"rawId": "<ACS_USER_ID>",
68+
"kind": "communicationUser",
69+
"communicationUser": {
70+
"id": "<ACS_USER_ID>"
71+
}
72+
},
73+
"isMuted": false
74+
},
75+
{
76+
"identifier": {
77+
"rawId": "<ACS_USER_ID>",
78+
"kind": "communicationUser",
79+
"communicationUser": {
80+
"id": "<ACS_USER_ID>"
81+
}
82+
},
83+
"isMuted": false
84+
}
85+
],
86+
"sequenceNumber": 4,
87+
"callConnectionId": "401f3500-08a0-4e9e-b844-61a65c845a0b",
88+
"serverCallId": "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzZWEyLTAxLmNvbnYuc2t5cGUuY29tL2NvbnYvRkhjV1lURXFZMENUY0VKUlJ3VHc1UT9pPTQmZT02MzgxNDkzMTEwNDk0NTM2ODQ=",
89+
"correlationId": "e47198fb-1798-4f3e-b245-4fd06569ad5c"
90+
},
91+
"time": "2023-03-21T17:22:35.4300007+00:00",
92+
"specversion": "1.0",
93+
"datacontenttype": "application/json",
94+
"subject": "calling/callConnections/401f3500-08a0-4e9e-b844-61a65c845a0b"
95+
}
96+
```
97+
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
title: include file
3+
description: Java mute participant
4+
services: azure-communication-services
5+
author: Kunaal Punjabi
6+
ms.service: azure-communication-services
7+
ms.subservice: azure-communication-services
8+
ms.date: 03/19/2023
9+
ms.topic: include
10+
ms.topic: include file
11+
ms.author: kpunjabi
12+
---
13+
14+
## Prerequisites
15+
16+
- Azure account with an active subscription, for details see [Create an account for free.](https://azure.microsoft.com/free/)
17+
- Azure Communication Services resource. See [Create an Azure Communication Services resource](../../../quickstarts/create-communication-resource.md?tabs=windows&pivots=platform-azp)
18+
- Create a new web service application using the [Call Automation SDK](../../../quickstarts/call-automation/callflows-for-customer-interactions.md).
19+
- [Java Development Kit](/java/azure/jdk/?preserve-view=true&view=azure-java-stable) version 8 or above.
20+
- [Apache Maven](https://maven.apache.org/download.cgi).
21+
22+
## Create a new Java application
23+
24+
In your terminal or command window, navigate to the directory where you would like to create your Java application. Run the command below to generate the Java project from the maven-archetype-quickstart template.
25+
26+
```console
27+
mvn archetype:generate -DgroupId=com.communication.quickstart -DartifactId=communication-quickstart -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false
28+
```
29+
30+
The command above creates a directory with the same name as `artifactId` argument. Under this directory, `src/main/java` directory contains the project source code, `src/test/java` directory contains the test source.
31+
32+
You'll notice that the 'generate' step created a directory with the same name as the artifactId. Under this directory, `src/main/java` directory contains source code, `src/test/java` directory contains tests, and `pom.xml` file is the project's Project Object Model, or POM.
33+
34+
Update your applications POM file to use Java 8 or higher.
35+
36+
```xml
37+
<properties>
38+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
39+
<maven.compiler.source>1.8</maven.compiler.source>
40+
<maven.compiler.target>1.8</maven.compiler.target>
41+
</properties>
42+
```
43+
44+
## Configure Azure SDK dev feed
45+
46+
Since the Call Automation SDK version used in this quickstart isn't yet available in Maven Central Repository, we need to add an Azure Artifacts development feed, which contains the latest version of Call Automation SDK.
47+
48+
Add the [azure-sdk-for-java feed](https://dev.azure.com/azure-sdk/public/_artifacts/feed/azure-sdk-for-java) to your `pom.xml`. Follow the instructions after clicking the "Connect to Feed" button.
49+
50+
## Add package references
51+
52+
In your POM file, add the following reference for the project.
53+
54+
**azure-communication-callingserver**
55+
56+
Azure Communication Services Call Automation SDK package is retrieved from the Azure SDK Dev Feed configured above.
57+
58+
``` xml
59+
<dependency>
60+
<groupId>com.azure</groupId>
61+
<artifactId>azure-communication-callautomation</artifactId>
62+
<version>1.0.0-alpha.20230317.1</version>
63+
</dependency>
64+
```
65+
66+
## Update App.java with code
67+
68+
In your editor of choice, open App.java file and update it with the code provided in [Update app.java with code](../../../quickstarts/call-automation/callflows-for-customer-interactions.md) section.
69+
70+
## Establish a call
71+
72+
By this point you should be familiar with starting calls, if you need to learn more about making a call, follow our [quickstart](../../../quickstarts/call-automation/callflows-for-customer-interactions.md). In this quickstart, we'll answer an incoming call.
73+
74+
75+
## Mute participant during a call
76+
77+
``` java
78+
var target = new CommunicationUserIdentifier(ACS_USER_ID);
79+
var callConnectionAsync = callAutomationClientAsync.getCallConnectionAsync(CALL_CONNECTION_ID);
80+
callConnectionAsync.muteParticipantsAsync(target).block();
81+
```
82+
83+
## Participant muted event
84+
85+
``` json
86+
{
87+
"id": "9dff6ffa-a496-4279-979d-f6455cb88b22",
88+
"source": "calling/callConnections/401f3500-08a0-4e9e-b844-61a65c845a0b",
89+
"type": "Microsoft.Communication.ParticipantsUpdated",
90+
"data": {
91+
"participants": [
92+
{
93+
"identifier": {
94+
"rawId": "<ACS_USER_ID>",
95+
"kind": "communicationUser",
96+
"communicationUser": {
97+
"id": "<ACS_USER_ID>"
98+
}
99+
},
100+
"isMuted": true
101+
},
102+
{
103+
"identifier": {
104+
"rawId": "<ACS_USER_ID>",
105+
"kind": "communicationUser",
106+
"communicationUser": {
107+
"id": "<ACS_USER_ID>"
108+
}
109+
},
110+
"isMuted": false
111+
},
112+
{
113+
"identifier": {
114+
"rawId": "<ACS_USER_ID>",
115+
"kind": "communicationUser",
116+
"communicationUser": {
117+
"id": "<ACS_USER_ID>"
118+
}
119+
},
120+
"isMuted": false
121+
}
122+
],
123+
"sequenceNumber": 4,
124+
"callConnectionId": "401f3500-08a0-4e9e-b844-61a65c845a0b",
125+
"serverCallId": "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzZWEyLTAxLmNvbnYuc2t5cGUuY29tL2NvbnYvRkhjV1lURXFZMENUY0VKUlJ3VHc1UT9pPTQmZT02MzgxNDkzMTEwNDk0NTM2ODQ=",
126+
"correlationId": "e47198fb-1798-4f3e-b245-4fd06569ad5c"
127+
},
128+
"time": "2023-03-21T17:22:35.4300007+00:00",
129+
"specversion": "1.0",
130+
"datacontenttype": "application/json",
131+
"subject": "calling/callConnections/401f3500-08a0-4e9e-b844-61a65c845a0b"
132+
}
133+
```
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: Mute participants during a call
3+
titleSuffix: An Azure Communication Services how-to document
4+
description: Provides a how-to guide for muting participants during a call.
5+
author: kunaal
6+
ms.service: azure-communication-services
7+
ms.subservice: call-automation
8+
ms.topic: include
9+
ms.date: 03/19/2023
10+
ms.author: kpunjabi
11+
ms.custom: private_preview
12+
services: azure-communication-services
13+
zone_pivot_groups: acs-csharp-java
14+
---
15+
16+
# Mute participants during a call
17+
18+
>[!IMPORTANT]
19+
>Functionality described on this document is currently in private preview. Private preview includes access to SDKs and documentation for testing purposes that are not yet available publicly.
20+
>Apply to become an early adopter by filling out the form for [preview access to Azure Communication Services](https://aka.ms/acs-tap-invite).
21+
22+
With Azure Communication Services Call Automation SDK, developers can now mute participants through server based API requests. This feature can be useful when you want your application to mute participants after they've joined the meeting to avoid any interruptions or distractions to ongoing meetings.
23+
24+
If you’re interested in abilities to allow participants to mute/unmute themselves on the call when they’ve joined with ACS Client Libraries, you can use our [mute/unmute function](../../../communication-services/how-tos/calling-sdk/manage-calls.md) provided through our Calling Library.
25+
26+
## Common use cases
27+
28+
### Contact center supervisor call monitoring
29+
30+
In a typical contact center, there may be times when a supervisor needs to join an on-going call to monitor the call to provide guidance to agents after the call on how they could improve their assistance. The supervisor would join muted as to not disturb the on-going call with any extra side noise.
31+
32+
*This guide helps you learn how to mute participants by using the mute action provided through Azure Communication Services Call Automation SDK.*
33+
34+
35+
::: zone pivot="programming-language-csharp"
36+
[!INCLUDE [Mute participants with .NET](./includes/mute-participants-how-to-csharp.md)]
37+
::: zone-end
38+
39+
::: zone pivot="programming-language-java"
40+
[!INCLUDE [Mute participants with Java](./includes/mute-participants-how-to-java.md)]
41+
::: zone-end
42+
43+
44+
## Clean up resources
45+
46+
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).
47+
48+
## Next steps
49+
50+
Learn more about [Call Automation](../../concepts/call-automation/call-automation.md).

articles/communication-services/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ items:
400400
href: samples/trusted-auth-sample.md
401401
- name: Phone calling
402402
items:
403-
- name: Appointment remainder sample
403+
- name: Appointment reminder sample
404404
href: samples/call-automation-appointment-reminder.md
405405
- name: Concepts
406406
items:

0 commit comments

Comments
 (0)