Skip to content

Commit

Permalink
Added enhancements on top of Calling Server preview 1 (#21686)
Browse files Browse the repository at this point in the history
* Clean up clients comments.

* Models updates to introduce CallConnection and Server.

* callState updated to callConnectionState, replace sourceAlternateIdentity with alternateCallerId, other fixes

* Update to the test sample.

* Updated the swagger path, removed delete operation, updated unit tests and live tests

* Updates based on comments

* Zihzhan/fix (#21727)

* Clean up clients comments.

* Update Snippet and Export-API.

* Zihzhan/fix (#21764)

* Update Snippet and Export-API.

* remove calloption override in servercall client.

* Nit for params and arguments handling.

* Merge Downloader updates.

* Merge Downloader updates test cases.

* Update AutoGen Content.

* Model name updates (Suffix for responses models now has Result instead of Response), fixes based on comments (#21790)

* Zihzhan/fix (#21805)

* Update Snippet and Export-API.

* remove calloption override in servercall client.

* Nit for params and arguments handling.

* Merge Downloader updates.

* Merge Downloader updates test cases.

* Update AutoGen Content.

* Nit clean on Unit Tests.

* Updating and renaming.

* The changes which are done: (#21863)

InviteParticipants --> AddParticipant
InviteParticipantResultEvent --> AddParticipantResultEvent
CallModality --> MediaType
CommunicationParticipant --> CallParticipant
Id in PlayAudioResult & CancelAllMediaOperations is now called OperationId
CallConnectionState now has {incoming, connecting, connected, disconnecting, disconnected}
CallRecordingStateResult ---> CallRecording... by Naveed Ali
CallRecordingStateResult ---> CallRecordingProperties

* Fix build Anaylse.

* fix(tests): improve code coverage

* Added AddParticipantResult, Re-added communication error, updated swagger path (#21870)

* Added AddParticipantResult, Re-added communication error, updated swagger path

* Fixed unit tests

* Updated netstandard

* Analysis fix

* Updated event type for add participant

* Fix build issue.

* Zihzhan/fix (#21905)

* Update Snippet and Export-API.

* remove calloption override in servercall client.

* Nit for params and arguments handling.

* Merge Downloader updates.

* Merge Downloader updates test cases.

* Update AutoGen Content.

* Nit clean on Unit Tests.

* Updating and renaming.

* Test update.

* Add Call Connection Live Tests.

* Add ServerCall Live Tests

* Increase Test Coverage.

* Reenable sample tests.

* Zihzhan/fix (#21931)

* Update Snippet and Export-API.

* remove calloption override in servercall client.

* Nit for params and arguments handling.

* Merge Downloader updates.

* Merge Downloader updates test cases.

* Update AutoGen Content.

* Nit clean on Unit Tests.

* Updating and renaming.

* Test update.

* Add Call Connection Live Tests.

* Add ServerCall Live Tests

* Increase Test Coverage.

* Reenable sample tests.

* Address comments.

* Point to swagger file in master branch.

* Zihzhan/fix (#21950)

* Update Snippet and Export-API.

* remove calloption override in servercall client.

* Nit for params and arguments handling.

* Merge Downloader updates.

* Merge Downloader updates test cases.

* Update AutoGen Content.

* Nit clean on Unit Tests.

* Updating and renaming.

* Test update.

* Add Call Connection Live Tests.

* Add ServerCall Live Tests

* Increase Test Coverage.

* Reenable sample tests.

* Address comments.

* Point to swagger file in master branch.

* Nit fix.

* Nit changes based on Azure boarder review feedback.

* Address comments.

* Naming changes.

* Change to static connection string.

* Add methods that support Live Test.

* Moved Recorded value inside the test method.

* Updated models definition based on new swagger plus updated events properties to readonly (#21980)

* Updated models definition based on new swagger, also fixed events to make properties readonly

* Update accessibility of internal models

* Update the file path in autorest

* Update auto gen apis.

* Rewrite the event tests and fixed json for other tests (#21983)

* Disable AddParticipant test in Live mode.

* Moved modelfactory to .models namespace (#22021)

Co-authored-by: zihzhan <zihzhan@microsoft.com>
Co-authored-by: Zihan Zhang <43592314+zihzhan-msft@users.noreply.github.com>
Co-authored-by: Christian Whitehead <chrwhit@microsoft.com>
  • Loading branch information
4 people authored Jun 21, 2021
1 parent 09cc00a commit 658dbd4
Show file tree
Hide file tree
Showing 132 changed files with 7,513 additions and 4,754 deletions.
3 changes: 3 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"contoso",
"deserializes",
"diagnoser",
"dtmf",
"epsg",
"expando",
"finalizer",
Expand All @@ -50,13 +51,15 @@
"overridden",
"parallelization",
"pkcs",
"pstn",
"pwsh",
"referer",
"renormalize",
"retriable",
"structs",
"uints",
"unformattable",
"unhold",
"uninstrumented",
"westus",
"xunit"
Expand Down
20 changes: 10 additions & 10 deletions sdk/communication/Azure.Communication.CallingServer/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Azure Communication Server Calling client library for .NET
# Azure Communication CallingServer client library for .NET

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

[Source code][source] |[Product documentation][product_docs]
## Getting started

### Install the package
Install the Azure Communication Server Calling client library for .NET with [NuGet][nuget]:
Install the Azure Communication CallingServer client library for .NET with [NuGet][nuget]:

```PowerShell
dotnet add package Azure.Communication.CallingServer --version 1.0.0-beta.1
Expand All @@ -18,7 +18,7 @@ You need an [Azure subscription][azure_sub] and a [Communication Service Resourc
To create a new Communication Service, you can use the [Azure Portal][communication_resource_create_portal], the [Azure PowerShell][communication_resource_create_power_shell], or the [.NET management client library][communication_resource_create_net].

### Key concepts
`CallClient` provides the functionality to make call related operations.
`CallingServerClient` provides the functionality to make call connection, join call connection or initialize a server call.

### Using statements
```C# Snippet:Azure_Communication_ServerCalling_Tests_UsingStatements
Expand All @@ -28,33 +28,33 @@ using Azure.Communication.CallingServer;
```

### Authenticate the client
Server Calling clients can be authenticated using the connection string acquired from an Azure Communication Resource in the [Azure Portal][azure_portal].
Calling server client can be authenticated using the connection string acquired from an Azure Communication Resource in the [Azure Portal][azure_portal].

```C# Snippet:Azure_Communication_ServerCalling_Tests_Samples_CreateServerCallingClient
var connectionString = "<connection_string>"; // Find your Communication Services resource in the Azure portal
CallClient client = new CallClient(connectionString);
CallingServerClient callingServerClient = new CallingServerClient(connectionString);
```

## Examples
### Make a call to a phone number recipient
To make a call, call the `CreateCall` or `CreateCallAsync` function from the `CallClient`.
To make an outbound call, call the `CreateCallConnection` or `CreateCallConnectionAsync` function from the `CallingServerClient`.
```C# Snippet:Azure_Communication_Call_Tests_CreateCallOptions
var createCallOption = new CreateCallOptions(
new Uri(TestEnvironment.AppCallbackUrl),
new List<CallModality> { CallModality.Audio },
new List<EventSubscriptionType>
new[] { MediaType.Audio },
new[]
{
EventSubscriptionType.ParticipantsUpdated,
EventSubscriptionType.DtmfReceived
});
```
```C# Snippet:Azure_Communication_Call_Tests_CreateCallAsync
CreateCallResponse createCallResponse = await callClient.CreateCallAsync(
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 Leg id: {createCallResponse.CallLegId}");
Console.WriteLine($"Call connection id: {callConnection.Value.CallConnectionId}");
```

## Troubleshooting
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ languages:
products:
- azure
- azure-communication-services
name: Azure Communication Server Calling samples for .NET
name: Azure Communication CallingServer samples for .NET
description: Samples for the Azure.Communication.CallingServer client library
---

# Azure Communication Server Calling SDK samples
# Azure Communication CallingServer SDK samples

Azure Communication Server Calling is a client library that provides the functionality to make call between user identities.
Azure Communication CallingServer is a client library that provides the functionality to make call between user identities.
To get started you will need to have an Azure Subscription. Once you have this you can go into the Azure portal and create Azure Communication Services resource. The page will give you necessary information to be able to use the sample codes here such as connections string, shared access key, etc.

This client library allows to do following operations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ This sample demonstrates how to make a call to a phone number recipient.

To get started you'll need a Communication Service Resource. See [README][README] for prerequisites and instructions.

## Creating an `ServerCallingClient`
## Creating a `CallingServerClient`

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

```C# Snippet:Azure_Communication_ServerCalling_Tests_Samples_CreateServerCallingClient
var connectionString = "<connection_string>"; // Find your Communication Services resource in the Azure portal
CallClient client = new CallClient(connectionString);
CallingServerClient callingServerClient = new CallingServerClient(connectionString);
```

## Make a call to a phone number recipient
Expand All @@ -19,20 +19,20 @@ To make a call, call the `CreateCall` or `CreateCallAsync` function from the `Ca
```C# Snippet:Azure_Communication_Call_Tests_CreateCallOptions
var createCallOption = new CreateCallOptions(
new Uri(TestEnvironment.AppCallbackUrl),
new List<CallModality> { CallModality.Audio },
new List<EventSubscriptionType>
new[] { MediaType.Audio },
new[]
{
EventSubscriptionType.ParticipantsUpdated,
EventSubscriptionType.DtmfReceived
});
```
```C# Snippet:Azure_Communication_Call_Tests_CreateCall
CreateCallResponse createCallResponse = callClient.CreateCall(
var callConnection = callingServerClient.CreateCallConnection(
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 Leg id: {createCallResponse.CallLegId}");
Console.WriteLine($"Call connection id: {callConnection.Value.CallConnectionId}");
```

To see the full example source files, see:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ This sample demonstrates how to make a call to a recipient phone number.

To get started you'll need a Communication Service Resource. See [README][README] for prerequisites and instructions.

## Creating an `ServerCallingClient`
## Creating a `CallingServerClient`

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

```C# Snippet:Azure_Communication_ServerCalling_Tests_Samples_CreateServerCallingClient
var connectionString = "<connection_string>"; // Find your Communication Services resource in the Azure portal
CallClient client = new CallClient(connectionString);
CallingServerClient callingServerClient = new CallingServerClient(connectionString);
```

## Make a call to a phone number recipient
Expand All @@ -19,20 +19,20 @@ To make a Call, call the `CreateCall` or `CreateCallAsync` function from the `Ca
```C# Snippet:Azure_Communication_Call_Tests_CreateCallOptions
var createCallOption = new CreateCallOptions(
new Uri(TestEnvironment.AppCallbackUrl),
new List<CallModality> { CallModality.Audio },
new List<EventSubscriptionType>
new[] { MediaType.Audio },
new[]
{
EventSubscriptionType.ParticipantsUpdated,
EventSubscriptionType.DtmfReceived
});
```
```C# Snippet:Azure_Communication_Call_Tests_CreateCallAsync
CreateCallResponse createCallResponse = await callClient.CreateCallAsync(
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 Leg id: {createCallResponse.CallLegId}");
Console.WriteLine($"Call connection id: {callConnection.Value.CallConnectionId}");
```

To see the full example source files, see:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>
This client library enables working with the Microsoft Azure Communication Service Calling Server APIs.
This client library enables working with the Microsoft Azure Communication CallingServer service.
For this release, see notes - https://github.com/Azure/azure-sdk-for-net-pr/blob/master/sdk/communication/Azure.Communication.ServerCalling/README.md and https://github.com/Azure/azure-sdk-for-net-pr/blob/master/sdk/communication/Azure.Communication.ServerCalling/CHANGELOG.md.
</Description>
<AssemblyTitle>Azure Communication Service Calling Server APIs</AssemblyTitle>
<AssemblyTitle>Azure Communication CallingServer Service</AssemblyTitle>
<Version>1.0.0-beta.1</Version>
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
<PackageTags>Microsoft Azure Communication Calling Server APIs;Microsoft;Azure;Azure Communication Service;Azure Communication Calling Server APIs;Calling;Communication;$(PackageCommonTags)</PackageTags>
<PackageTags>Microsoft Azure Communication CallingServer Service;Microsoft;Azure;Azure Communication Service;Azure Communication CallingServer Service;Calling;Communication;$(PackageCommonTags)</PackageTags>
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks>
</PropertyGroup>

Expand Down
Loading

0 comments on commit 658dbd4

Please sign in to comment.