Azure.Communication.CallingServer 1.0.0-beta.3

Prefix Reserved
This is a prerelease version of Azure.Communication.CallingServer.
dotnet add package Azure.Communication.CallingServer --version 1.0.0-beta.3                
NuGet\Install-Package Azure.Communication.CallingServer -Version 1.0.0-beta.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Azure.Communication.CallingServer" Version="1.0.0-beta.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Azure.Communication.CallingServer --version 1.0.0-beta.3                
#r "nuget: Azure.Communication.CallingServer, 1.0.0-beta.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Azure.Communication.CallingServer as a Cake Addin
#addin nuget:?package=Azure.Communication.CallingServer&version=1.0.0-beta.3&prerelease

// Install Azure.Communication.CallingServer as a Cake Tool
#tool nuget:?package=Azure.Communication.CallingServer&version=1.0.0-beta.3&prerelease                

Azure Communication CallingServer client library for .NET

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

Prerequisites

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("https://my-resource.communication.azure.com");
TokenCredential tokenCredential = new DefaultAzureCredential();
var client = new CallingServerClient(endpoint, tokenCredential);

Examples

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 },
       new[]
       {
           EventSubscriptionType.ParticipantsUpdated,
           EventSubscriptionType.DtmfReceived
       });
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}");

Troubleshooting

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

Contributing

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 cla.microsoft.com.

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

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0-beta.3 31,259 10/5/2021
1.0.0-beta.2 1,533 7/23/2021
1.0.0-beta.1 18,138 6/24/2021