Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added enhancements on top of Calling Server preview 1 #21686

Merged
merged 36 commits into from
Jun 21, 2021
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
3a31cac
Clean up clients comments.
zihzhan-msft Jun 8, 2021
2aac1b8
Models updates to introduce CallConnection and Server.
navali-msft Jun 8, 2021
89e1158
callState updated to callConnectionState, replace sourceAlternateIden…
navali-msft Jun 8, 2021
2cdc4b8
Update to the test sample.
navali-msft Jun 8, 2021
8c07b7b
Updated the swagger path, removed delete operation, updated unit test…
navali-msft Jun 8, 2021
e6322ed
Updates based on comments
navali-msft Jun 8, 2021
09a1452
Merge branch 'feature/CallingServer-changes' into feature/callingServ…
zihzhan-msft Jun 9, 2021
bf54682
Zihzhan/fix (#21727)
zihzhan-msft Jun 9, 2021
f1efa58
Merge branch 'feature/callingServer-preview1-enhancement' of https://…
zihzhan-msft Jun 10, 2021
f3aebeb
pull master without Downloader merge.
zihzhan-msft Jun 10, 2021
720d59c
Zihzhan/fix (#21764)
zihzhan-msft Jun 10, 2021
0161219
Model name updates (Suffix for responses models now has Result instea…
navali-msft Jun 10, 2021
c310ffe
Zihzhan/fix (#21805)
zihzhan-msft Jun 10, 2021
37c4531
The changes which are done: (#21863)
navali-msft Jun 15, 2021
37c39d4
Fix build Anaylse.
zihzhan-msft Jun 15, 2021
29ce1ed
fix(tests): improve code coverage
chrwhit Jun 15, 2021
1717a69
Merge branch 'feature/callingServer-preview1-enhancement' of https://…
chrwhit Jun 15, 2021
20e4121
Added AddParticipantResult, Re-added communication error, updated swa…
navali-msft Jun 15, 2021
e829b98
Analysis fix
navali-msft Jun 15, 2021
162c75e
Updated event type for add participant
navali-msft Jun 15, 2021
1a9464f
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-net i…
zihzhan-msft Jun 16, 2021
58ffcc3
Fix build issue.
zihzhan-msft Jun 16, 2021
2e163e6
Zihzhan/fix (#21905)
zihzhan-msft Jun 16, 2021
f93d076
Zihzhan/fix (#21931)
zihzhan-msft Jun 17, 2021
1657f3e
Zihzhan/fix (#21950)
zihzhan-msft Jun 18, 2021
0a76c1a
Address comments.
zihzhan-msft Jun 18, 2021
e264d03
Naming changes.
zihzhan-msft Jun 18, 2021
fbc6d87
Change to static connection string.
zihzhan-msft Jun 18, 2021
b5d2464
Add methods that support Live Test.
zihzhan-msft Jun 18, 2021
beaae94
Moved Recorded value inside the test method.
zihzhan-msft Jun 19, 2021
c5670ab
Updated models definition based on new swagger plus updated events pr…
navali-msft Jun 19, 2021
6d505c9
Update auto gen apis.
zihzhan-msft Jun 19, 2021
072566e
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
zihzhan-msft Jun 19, 2021
4d49521
Rewrite the event tests and fixed json for other tests (#21983)
navali-msft Jun 19, 2021
5b86515
Disable AddParticipant test in Live mode.
zihzhan-msft Jun 19, 2021
1efe0fd
Moved modelfactory to .models namespace (#22021)
navali-msft Jun 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.Value

why do we need .Value?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apis are returning Response object which kind of wrapped http response object. The Value property contain the return value.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then variable should be named differently - something like callConnectionResponse

```

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename to Calling Server, two separate words?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We prefer using "CallingServer" which was "Calling Server" to keep it consistent within SDK library and API

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