Skip to content

Commit 658dbd4

Browse files
navali-msftzihzhan-msftchrwhit
authored
Added enhancements on top of Calling Server preview 1 (Azure#21686)
* 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 (Azure#21727) * Clean up clients comments. * Update Snippet and Export-API. * Zihzhan/fix (Azure#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 (Azure#21790) * Zihzhan/fix (Azure#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: (Azure#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 (Azure#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 (Azure#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 (Azure#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 (Azure#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 (Azure#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 (Azure#21983) * Disable AddParticipant test in Live mode. * Moved modelfactory to .models namespace (Azure#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>
1 parent 09cc00a commit 658dbd4

File tree

132 files changed

+7513
-4754
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+7513
-4754
lines changed

.vscode/cspell.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"contoso",
3838
"deserializes",
3939
"diagnoser",
40+
"dtmf",
4041
"epsg",
4142
"expando",
4243
"finalizer",
@@ -50,13 +51,15 @@
5051
"overridden",
5152
"parallelization",
5253
"pkcs",
54+
"pstn",
5355
"pwsh",
5456
"referer",
5557
"renormalize",
5658
"retriable",
5759
"structs",
5860
"uints",
5961
"unformattable",
62+
"unhold",
6063
"uninstrumented",
6164
"westus",
6265
"xunit"

sdk/communication/Azure.Communication.CallingServer/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Azure Communication Server Calling client library for .NET
1+
# Azure Communication CallingServer client library for .NET
22

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

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

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

1111
```PowerShell
1212
dotnet add package Azure.Communication.CallingServer --version 1.0.0-beta.1
@@ -18,7 +18,7 @@ You need an [Azure subscription][azure_sub] and a [Communication Service Resourc
1818
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].
1919

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

2323
### Using statements
2424
```C# Snippet:Azure_Communication_ServerCalling_Tests_UsingStatements
@@ -28,33 +28,33 @@ using Azure.Communication.CallingServer;
2828
```
2929

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

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

3838
## Examples
3939
### Make a call to a phone number recipient
40-
To make a call, call the `CreateCall` or `CreateCallAsync` function from the `CallClient`.
40+
To make an outbound call, call the `CreateCallConnection` or `CreateCallConnectionAsync` function from the `CallingServerClient`.
4141
```C# Snippet:Azure_Communication_Call_Tests_CreateCallOptions
4242
var createCallOption = new CreateCallOptions(
4343
new Uri(TestEnvironment.AppCallbackUrl),
44-
new List<CallModality> { CallModality.Audio },
45-
new List<EventSubscriptionType>
44+
new[] { MediaType.Audio },
45+
new[]
4646
{
4747
EventSubscriptionType.ParticipantsUpdated,
4848
EventSubscriptionType.DtmfReceived
4949
});
5050
```
5151
```C# Snippet:Azure_Communication_Call_Tests_CreateCallAsync
52-
CreateCallResponse createCallResponse = await callClient.CreateCallAsync(
52+
var callConnection = await callingServerClient.CreateCallConnectionAsync(
5353
source: new CommunicationUserIdentifier("<source-identifier>"), // Your Azure Communication Resource Guid Id used to make a Call
5454
targets: new List<CommunicationIdentifier>() { new PhoneNumberIdentifier("<targets-phone-number>") }, // E.164 formatted recipient phone number
5555
options: createCallOption // The options for creating a call.
5656
);
57-
Console.WriteLine($"Call Leg id: {createCallResponse.CallLegId}");
57+
Console.WriteLine($"Call connection id: {callConnection.Value.CallConnectionId}");
5858
```
5959

6060
## Troubleshooting

sdk/communication/Azure.Communication.CallingServer/api/Azure.Communication.CallingServer.netstandard2.0.cs

Lines changed: 174 additions & 182 deletions
Large diffs are not rendered by default.

sdk/communication/Azure.Communication.CallingServer/samples/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ languages:
55
products:
66
- azure
77
- azure-communication-services
8-
name: Azure Communication Server Calling samples for .NET
8+
name: Azure Communication CallingServer samples for .NET
99
description: Samples for the Azure.Communication.CallingServer client library
1010
---
1111

12-
# Azure Communication Server Calling SDK samples
12+
# Azure Communication CallingServer SDK samples
1313

14-
Azure Communication Server Calling is a client library that provides the functionality to make call between user identities.
14+
Azure Communication CallingServer is a client library that provides the functionality to make call between user identities.
1515
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.
1616

1717
This client library allows to do following operations:

sdk/communication/Azure.Communication.CallingServer/samples/Sample1_CreateCall.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ This sample demonstrates how to make a call to a phone number recipient.
44

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

7-
## Creating an `ServerCallingClient`
7+
## Creating a `CallingServerClient`
88

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

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

1616
## Make a call to a phone number recipient
@@ -19,20 +19,20 @@ To make a call, call the `CreateCall` or `CreateCallAsync` function from the `Ca
1919
```C# Snippet:Azure_Communication_Call_Tests_CreateCallOptions
2020
var createCallOption = new CreateCallOptions(
2121
new Uri(TestEnvironment.AppCallbackUrl),
22-
new List<CallModality> { CallModality.Audio },
23-
new List<EventSubscriptionType>
22+
new[] { MediaType.Audio },
23+
new[]
2424
{
2525
EventSubscriptionType.ParticipantsUpdated,
2626
EventSubscriptionType.DtmfReceived
2727
});
2828
```
2929
```C# Snippet:Azure_Communication_Call_Tests_CreateCall
30-
CreateCallResponse createCallResponse = callClient.CreateCall(
30+
var callConnection = callingServerClient.CreateCallConnection(
3131
source: new CommunicationUserIdentifier("<source-identifier>"), // Your Azure Communication Resource Guid Id used to make a Call
3232
targets: new List<CommunicationIdentifier>() { new PhoneNumberIdentifier("<targets-phone-number>") }, // E.164 formatted recipient phone number
3333
options: createCallOption // The options for creating a call.
3434
);
35-
Console.WriteLine($"Call Leg id: {createCallResponse.CallLegId}");
35+
Console.WriteLine($"Call connection id: {callConnection.Value.CallConnectionId}");
3636
```
3737

3838
To see the full example source files, see:

sdk/communication/Azure.Communication.CallingServer/samples/Sample1_CreateCallAsync.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ This sample demonstrates how to make a call to a recipient phone number.
44

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

7-
## Creating an `ServerCallingClient`
7+
## Creating a `CallingServerClient`
88

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

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

1616
## Make a call to a phone number recipient
@@ -19,20 +19,20 @@ To make a Call, call the `CreateCall` or `CreateCallAsync` function from the `Ca
1919
```C# Snippet:Azure_Communication_Call_Tests_CreateCallOptions
2020
var createCallOption = new CreateCallOptions(
2121
new Uri(TestEnvironment.AppCallbackUrl),
22-
new List<CallModality> { CallModality.Audio },
23-
new List<EventSubscriptionType>
22+
new[] { MediaType.Audio },
23+
new[]
2424
{
2525
EventSubscriptionType.ParticipantsUpdated,
2626
EventSubscriptionType.DtmfReceived
2727
});
2828
```
2929
```C# Snippet:Azure_Communication_Call_Tests_CreateCallAsync
30-
CreateCallResponse createCallResponse = await callClient.CreateCallAsync(
30+
var callConnection = await callingServerClient.CreateCallConnectionAsync(
3131
source: new CommunicationUserIdentifier("<source-identifier>"), // Your Azure Communication Resource Guid Id used to make a Call
3232
targets: new List<CommunicationIdentifier>() { new PhoneNumberIdentifier("<targets-phone-number>") }, // E.164 formatted recipient phone number
3333
options: createCallOption // The options for creating a call.
3434
);
35-
Console.WriteLine($"Call Leg id: {createCallResponse.CallLegId}");
35+
Console.WriteLine($"Call connection id: {callConnection.Value.CallConnectionId}");
3636
```
3737

3838
To see the full example source files, see:

sdk/communication/Azure.Communication.CallingServer/src/Azure.Communication.CallingServer.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Description>
4-
This client library enables working with the Microsoft Azure Communication Service Calling Server APIs.
4+
This client library enables working with the Microsoft Azure Communication CallingServer service.
55
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.
66
</Description>
7-
<AssemblyTitle>Azure Communication Service Calling Server APIs</AssemblyTitle>
7+
<AssemblyTitle>Azure Communication CallingServer Service</AssemblyTitle>
88
<Version>1.0.0-beta.1</Version>
99
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
10-
<PackageTags>Microsoft Azure Communication Calling Server APIs;Microsoft;Azure;Azure Communication Service;Azure Communication Calling Server APIs;Calling;Communication;$(PackageCommonTags)</PackageTags>
10+
<PackageTags>Microsoft Azure Communication CallingServer Service;Microsoft;Azure;Azure Communication Service;Azure Communication CallingServer Service;Calling;Communication;$(PackageCommonTags)</PackageTags>
1111
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks>
1212
</PropertyGroup>
1313

0 commit comments

Comments
 (0)