Azure Communication CallingServer client library for .NET - version 1.0.0-beta.3

This package contains a C# SDK for Azure Communication Services for Calling.

Source code |Product documentation

Getting started

Install the package

Install the Azure Communication CallingServer client library for .NET with NuGet:

dotnet add package Azure.Communication.CallingServer --version 1.0.0-beta.3


You need an Azure subscription and a Communication Service Resource to use this package.

To create a new Communication Service, you can use the Azure Portal, the Azure PowerShell, or the .NET management client library.

Key concepts

CallingServerClient provides the functionality to make call connection, join call connection or initialize a server call.

Using statements

using System;
using System.Collections.Generic;
using Azure.Communication.CallingServer;

Authenticate the client

Calling server client can be authenticated using the connection string acquired from an Azure Communication Resource in the Azure Portal.

var connectionString = "<connection_string>"; // Find your Communication Services resource in the Azure portal
CallingServerClient callingServerClient = new CallingServerClient(connectionString);

Or alternatively using a valid Active Directory token.

var endpoint = new Uri("");
TokenCredential tokenCredential = new DefaultAzureCredential();
var client = new CallingServerClient(endpoint, tokenCredential);


Make a call to a phone number recipient

To make an outbound call, call the CreateCallConnection or CreateCallConnectionAsync function from the CallingServerClient.

var createCallOption = new CreateCallOptions(
       new Uri(TestEnvironment.AppCallbackUrl),
       new[] { MediaType.Audio },
var callConnection = await callingServerClient.CreateCallConnectionAsync(
    source: new CommunicationUserIdentifier("<source-identifier>"), // Your Azure Communication Resource Guid Id used to make a Call
    targets: new List<CommunicationIdentifier>() { new PhoneNumberIdentifier("<targets-phone-number>") }, // E.164 formatted recipient phone number
    options: createCallOption // The options for creating a call.
Console.WriteLine($"Call connection id: {callConnection.Value.CallConnectionId}");


A RequestFailedException is thrown as a service response for any unsuccessful requests. The exception contains information about what response code was returned from the service.

Next steps


This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact with any additional questions or comments.