Skip to content

Commit b227152

Browse files
zihzhan-msftnavali-msftParesh-Arvind-PatilParesh Arvind Patil
authored
Feature/communication server calling preview1 (Azure#21017)
* Onboard ServerCalling feature project. * Onboard Server Calling Test project. * Onboard Server Calling Test project. * New apis and models for different operations. * Update Recorded Test files. * Naming changes and fix build. * Resolve comments. * Removed operationContext from Recording apis (Azure#21309) Co-authored-by: Paresh Arvind Patil <papati@microsoft.com> * Onboard ServerCalling feature project. * Onboard Server Calling Test project. * New apis and models for different operations. * Onboard Server Calling Test project. * Update Recorded Test files. * Naming changes and fix build. * Resolve comments. * Address comments. * Fix build * Fixed the typo CallRecordingStateChangeEvent EventType (Azure#21434) Co-authored-by: Paresh Arvind Patil <papati@microsoft.com> * remove remaining context & request (Azure#21437) * Update swagger. * Update swagger link to a perm url. * Added PlayAudio Api on ConversationClient (Out-Call Scenario) (Azure#21430) * Added playAudio and cancelMedia api for out-call * Added PlayAudio api on ConversationClient * Updated the PlayAudio url description * Updated as per PR feedback * Re-build the swagger updating the auto-genrated files Co-authored-by: Paresh Arvind Patil <papati@microsoft.com> * Udpate Sdk based on new Swagger. * Update API version. * Address comments. * Update apis with new swagger, address CallState enum. * Update Live test to use Instrumented Client. * Fix broken link * Fix broken link * Fix broken link * Adding AudioFileId and CallbackUri parameter in PlayAudio Api (Out-Call) (Azure#21503) * Adding AudioFileId and callbackuri for PlayAudio Api out-call * minor fixes * Made Param optional Co-authored-by: Paresh Arvind Patil <papati@microsoft.com> * Mark failed live test as Ignore to unblock build. * Added events in the swagger, added model for creating serializer, com… (Azure#21535) * Added events in the swagger, added model for creating serializer, comments updated, invite participant change to add participant * comments fix. * fixes based on comments * Set operation context as optional and last parameter * NIT fix * NIT fix (Azure#21540) * Fix build Analyze. * Fix build Analyze. * Minor fix for ConvClient joinCall api. * Minor fix for ConvClient joinCall api. (Azure#21558) * Address comments. * Added unit test for recording apis (Azure#21578) Co-authored-by: Paresh Arvind Patil <papati@microsoft.com> * Address comments. * Specify parameters in RestApiCall. * Update Namespace to CallingServer. * Update links in md files. * Update links in md files. * Update CallClient.cs * Update ConversationClient.cs * Feature/zihzhan livetesting (Azure#21677) * Enable living testing. * Test Playback. * Add playaudio test record. * Add createcall test record. * Add delete call record. * Add hangup call test record. * Add cancelAllMediaOperations call test record. * Enable living tests. * Address comments. Co-authored-by: Naveed Ali <navali@microsoft.com> Co-authored-by: Paresh Arvind Patil <patilaparesh@gmail.com> Co-authored-by: Paresh Arvind Patil <papati@microsoft.com> Co-authored-by: navali-msft <66667092+navali-msft@users.noreply.github.com>
1 parent 091e8ef commit b227152

File tree

123 files changed

+9414
-0
lines changed

Some content is hidden

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

123 files changed

+9414
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Release History
2+
3+
## 1.0.0-beta.1 (Unreleased)
4+
This is the first release of Azure Communication Service Calling Server. For more information, please see the [README][read_me].
5+
6+
This is a Public Preview version, so breaking changes are possible in subsequent releases as we improve the product. To provide feedback, please submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues).
7+
8+
### Features Added
9+
- Create outbound call to an Azure Communication Service User or a phone number.
10+
- Hangup and delete the existing call.
11+
- Play audio in the call.
12+
- Outbound apis for Call Recording including start, pause, resume and stop.
13+
- Subscribe to and receive [DTMF][DTMF] tones via events.
14+
- Invite and remove participants from the call.
15+
16+
<!-- LINKS -->
17+
[read_me]: https://github.com/Azure/azure-sdk-for-net/blob/a20e269162fa88a43e5ba0e5bb28f2e76c74a484/sdk/communication/Azure.Communication.CallingServer/README.md
18+
[DTMF]: https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling
19+
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Azure Communication Server Calling client library for .NET
2+
3+
This package contains a C# SDK for Azure Communication Services for Calling.
4+
5+
[Source code][source] |[Product documentation][product_docs]
6+
## Getting started
7+
8+
### Install the package
9+
Install the Azure Communication Server Calling client library for .NET with [NuGet][nuget]:
10+
11+
```PowerShell
12+
dotnet add package Azure.Communication.CallingServer --version 1.0.0-beta.1
13+
```
14+
15+
### Prerequisites
16+
You need an [Azure subscription][azure_sub] and a [Communication Service Resource][communication_resource_docs] to use this package.
17+
18+
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].
19+
20+
### Key concepts
21+
`CallClient` provides the functionality to make call related operations.
22+
23+
### Using statements
24+
```C# Snippet:Azure_Communication_ServerCalling_Tests_UsingStatements
25+
using System;
26+
using System.Collections.Generic;
27+
using Azure.Communication.CallingServer;
28+
```
29+
30+
### 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].
32+
33+
```C# Snippet:Azure_Communication_ServerCalling_Tests_Samples_CreateServerCallingClient
34+
var connectionString = "<connection_string>"; // Find your Communication Services resource in the Azure portal
35+
CallClient client = new CallClient(connectionString);
36+
```
37+
38+
## Examples
39+
### Make a call to a phone number recipient
40+
To make a call, call the `CreateCall` or `CreateCallAsync` function from the `CallClient`.
41+
```C# Snippet:Azure_Communication_Call_Tests_CreateCallOptions
42+
var createCallOption = new CreateCallOptions(
43+
new Uri(TestEnvironment.AppCallbackUrl),
44+
new List<CallModality> { CallModality.Audio },
45+
new List<EventSubscriptionType>
46+
{
47+
EventSubscriptionType.ParticipantsUpdated,
48+
EventSubscriptionType.DtmfReceived
49+
});
50+
```
51+
```C# Snippet:Azure_Communication_Call_Tests_CreateCallAsync
52+
CreateCallResponse createCallResponse = await callClient.CreateCallAsync(
53+
source: new CommunicationUserIdentifier("<source-identifier>"), // Your Azure Communication Resource Guid Id used to make a Call
54+
targets: new List<CommunicationIdentifier>() { new PhoneNumberIdentifier("<targets-phone-number>") }, // E.164 formatted recipient phone number
55+
options: createCallOption // The options for creating a call.
56+
);
57+
Console.WriteLine($"Call Leg id: {createCallResponse.CallLegId}");
58+
```
59+
60+
## Troubleshooting
61+
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.
62+
63+
## Next steps
64+
65+
## Contributing
66+
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][cla].
67+
68+
This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments.
69+
70+
<!-- LINKS -->
71+
[azure_sub]: https://azure.microsoft.com/free/
72+
[azure_portal]: https://portal.azure.com
73+
[cla]: https://cla.microsoft.com
74+
[coc]: https://opensource.microsoft.com/codeofconduct/
75+
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
76+
[coc_contact]: mailto:opencode@microsoft.com
77+
[communication_resource_docs]: https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp
78+
[communication_resource_create_portal]: https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp
79+
[communication_resource_create_power_shell]: https://docs.microsoft.com/powershell/module/az.communication/new-azcommunicationservice
80+
[communication_resource_create_net]: https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-net
81+
[product_docs]: https://docs.microsoft.com/azure/communication-services/overview
82+
[nuget]: https://www.nuget.org/
83+
[source]: https://github.com/Azure/azure-sdk-for-net/tree/a20e269162fa88a43e5ba0e5bb28f2e76c74a484/sdk/communication/Azure.Communication.CallingServer/src

0 commit comments

Comments
 (0)