Skip to content

Commit 084acc4

Browse files
authored
Create csharp mute guide
Create csharp mute guide
1 parent 55ed840 commit 084acc4

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
## Subscribing to events
47+

0 commit comments

Comments
 (0)