Graph Calling SDK
The Graph Calling SDK simplifies the creation of calling and meetings bots that use the Microsoft Graph Calling APIs. The SDK provides the functionality to manage states of resources in memory and simplify tasks like call setup and media session establishment. It provides interfaces for bot's service-to-service interactions with calls and meetings, including an optional Media Extension SDK that enables a bot developer to host media on their machines and gain access to low level Audio/Video sockets and media streams.
The Graph Calling SDK is built on top of the Microsoft Graph API and distributed as NuGet packages. The Core Concepts article is designed to better explain all the constructs used by the SDKs. To dive right in and deploy a Calling Bot refer to the documentation in each sample for further instructions.
The SDK is divided into multiple nuget packages each described as below.
- Microsoft.Graph.Communications.Core (nuget): This library contains the calling contracts and is a duplicate of Microsoft.Graph SDK but only with Communication APIs.
- Microsoft.Graph.Communications.Common (nuget): This is the nuget containing all the utilities used throughout the Stateful SDK. It contains telemetry, http, obfuscation support along with helper methods.
- Microsoft.Graph.Communications.Client (nuget): This is the base client for the Stateful SDK. This implements all the common SDK features used within different verticals like calling, etc.
- Microsoft.Graph.Communications.Calls (nuget): This is the SDK that implements calling APIs. This supports making, receiving, and joining calls with Microsoft Teams users, and creating voice and video enabled bots.
- Microsoft.Graph.Communications.Calls.Media (nuget): This library allows developers to use the
Microsoft.Graph.Communications.CallsSDK and gain direct access to the audio, video, screen sharing, and data streams. This is an optional library on top of
- Microsoft.Skype.Bots.Media (nuget): The Real-Time Media Platform for Bots adds a new dimension to how bots can interact with users: by enabling real-time voice, video and screen sharing modalities.
Concepts and Examples
For more details on concepts used by the SDK and examples on joining calls and receiving calls please refer to the concepts and examples page.
You can find samples using the following service:
- Stateful bot using Application Hosted Media on Azure Cloud Service
- Stateful bot using Application Hosted Media on Azure Service Fabric
- Stateful bot using Service Hosted Media running on Azure App Service.
ICommunicationsClient and Extension Methods
The Stateful SDK is exposed using a single class ICommunicationsClient. This class is defined in the
Microsoft.Graph.Communications.Client nuget and has no dependency on the
Microsoft.Graph.Communications.Calls calling vertical nuget package. The different verticals therefore make heavy usage of extension methods on
ICommunicationsClient rather than standalone functions or properties. The intention here is to add new verticals into the
ICommunicationsClient using the same pattern without the
ICommunicationsClient itself taking a dependency on the new vertical's nuget, which provides greater decoupling between future verticals we will support. For a usage example please see the ICommunicationsClient.Calls() extension method.