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

Feature/communication server calling #22055

Merged
merged 166 commits into from
Jun 14, 2021
Merged
Show file tree
Hide file tree
Changes from 163 commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
f793679
Onboard Communication CallingServer Client SDK.
zihzhan-msft May 27, 2021
d19fdef
fix(callingServer): correct most style issues (#21915)
chrwhit May 28, 2021
f8f9c21
Update FarmBeats SDK (#21836)
jianghaolu May 27, 2021
5d70c4a
Regenerate computer vision SDK (#21788)
jianghaolu May 27, 2021
7ffe2f0
Unify README embedme Usage into a Wrapper Script (#21859)
alzimmermsft May 27, 2021
a68ee5b
Enable caching of local maven repository (#21797)
weshaggard May 27, 2021
83cdca2
Increment package version after release of com.azure azure-verticals-…
azure-sdk May 27, 2021
f8877e5
Skip non-existant files during version update for hardcoded exception…
benbp May 27, 2021
2955fa9
Fix build.
zihzhan-msft May 28, 2021
49f5e0c
fix(*): finish style check, add test base (#21941)
chrwhit May 28, 2021
cfa051e
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-java …
zihzhan-msft May 28, 2021
bcd39c6
Update swagger location and obj models.
zihzhan-msft May 29, 2021
96e606b
Zihzhan/communication server calling (#21943)
zihzhan-msft May 29, 2021
6f09ed7
Merge branch 'feature/communication-ServerCalling' of https://github.…
zihzhan-msft May 29, 2021
8aed96f
Style check fix.
zihzhan-msft May 29, 2021
abcbfab
Update API version.
zihzhan-msft May 29, 2021
c91c573
unit test for CallClientBuilder and other samll fixes (#21964)
arifsaikat-microsoft May 31, 2021
bd645db
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-java …
zihzhan-msft May 31, 2021
a6e2f62
fix(*): add unit tests
chrwhit Jun 1, 2021
c8892ae
fix(*): add sync conversation client tests
chrwhit Jun 1, 2021
de5eea5
Fix AddParticipant issues (#21967)
arifsaikat-microsoft Jun 1, 2021
11bf2c5
Playback unit test for CallClient and CallAsyncClient (#22014)
arifsaikat-microsoft Jun 2, 2021
fe9fe5d
Add-remove participant unit tests (#22025)
arifsaikat-microsoft Jun 2, 2021
7ae1d59
fix(*): remove test url
chrwhit Jun 2, 2021
af659d9
fix(*): style issues
chrwhit Jun 2, 2021
0dd4f0d
Using the latest swagger file (#22038)
arifsaikat-microsoft Jun 3, 2021
65092df
Added join call, add-remove participant for out-call (#22040)
arifsaikat-microsoft Jun 3, 2021
07b7590
sync with dot net sdk (#22044)
arifsaikat-microsoft Jun 3, 2021
32dd081
Adding PlayAudio Api to Conversation Client (Out-Call) (#22021)
Paresh-Arvind-Patil Jun 3, 2021
dace1b7
Refactor code (#22053)
arifsaikat-microsoft Jun 3, 2021
a438f76
Deserialize events (#22064)
arifsaikat-microsoft Jun 3, 2021
f7940a8
Fix review suggestions (#22068)
arifsaikat-microsoft Jun 4, 2021
db98172
fix(*): fix issue with tests failing in maven (#22067)
chrwhit Jun 4, 2021
bda7725
fix review feedbacks (#22071)
arifsaikat-microsoft Jun 4, 2021
3bf9843
unit tests for out-call add/remove (#22074)
arifsaikat-microsoft Jun 4, 2021
8395104
unit tests for delete call (#22075)
arifsaikat-microsoft Jun 4, 2021
942c5e9
remove unused generated events (#22076)
arifsaikat-microsoft Jun 4, 2021
4c5a364
fix(*): fix package version issues
chrwhit Jun 4, 2021
8a8cb4e
fix(*): add callingserver to version.txt
chrwhit Jun 4, 2021
d9150f8
fix(*): update readme.md (not complete)
chrwhit Jun 4, 2021
3f64c96
fix(*): fix package version issues
chrwhit Jun 4, 2021
824ecf2
fix(*): update readme.md
chrwhit Jun 4, 2021
6bb6631
fix(*): update readme.md
chrwhit Jun 4, 2021
f7cd734
fix(*): remove instances of 'var' and adding correct type. 'var' fail…
chrwhit Jun 4, 2021
dd1a5e9
fix(*): update readme.md
chrwhit Jun 4, 2021
8f4fefd
fix(*): update readme.md
chrwhit Jun 4, 2021
aca0963
fix event de-serialization issue by adding deafult constructors (#22090)
arifsaikat-microsoft Jun 4, 2021
e5f8604
fix(*): fix pom issue
chrwhit Jun 4, 2021
b49a2b4
Merge branch 'feature/communication-ServerCalling' of https://github.…
chrwhit Jun 4, 2021
4579f90
PR review fixes (#22099)
arifsaikat-microsoft Jun 5, 2021
b4d4640
Use JSON annotated event definition (#22101)
arifsaikat-microsoft Jun 6, 2021
81773d1
pr review fix (#22108)
arifsaikat-microsoft Jun 7, 2021
836c381
Merge latest master (#22113)
chrwhit Jun 7, 2021
b15af1a
Merge branch 'master' into feature/communication-ServerCalling
chrwhit Jun 7, 2021
05e309c
pr review fix (#22125)
arifsaikat-microsoft Jun 7, 2021
85472c8
Chrwhit/master update two (#22123)
chrwhit Jun 7, 2021
4459456
pr review fix (#22131)
arifsaikat-microsoft Jun 8, 2021
15b62ae
PR review fix (#22138)
arifsaikat-microsoft Jun 8, 2021
8ab231c
Chrwhit/merge master three (#22146)
chrwhit Jun 8, 2021
8899a43
Chrwhit/merge master four (#22151)
chrwhit Jun 8, 2021
e20322c
fix(*): add tests, 70% coverage
chrwhit Jun 8, 2021
98c66f6
fix(*): remove var
chrwhit Jun 9, 2021
76ef201
new schema fix + new class model (#22164)
arifsaikat-microsoft Jun 9, 2021
ff5f248
roll back azure common lib (#22165)
arifsaikat-microsoft Jun 9, 2021
5771051
Chrwhit/merge master five (#22177)
chrwhit Jun 9, 2021
91dd5ce
fix(calling-server): update common version
chrwhit Jun 9, 2021
5b7c0e7
Adding ACS Recording Download SDK (#22026)
cochi2 Jun 9, 2021
911c90e
new schema minor fix (#22183)
arifsaikat-microsoft Jun 9, 2021
d740eb5
Making ProgressReporter.reportProgress to release the lock everytime.…
cochi2 Jun 9, 2021
c5bc2f8
Rebasing master into feature/communication-ServerCalling (#22185)
cochi2 Jun 9, 2021
215e946
fix(serverCalling): update some test recordings
chrwhit Jun 9, 2021
c86923a
merge(*): FI
chrwhit Jun 9, 2021
7a646d0
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-java …
cochi2 Jun 9, 2021
3aca17a
Merge branch 'feature/communication-ServerCalling' of https://github.…
cochi2 Jun 9, 2021
0f5b6a9
Onboard Communication CallingServer Client SDK.
zihzhan-msft May 27, 2021
3ef0fba
fix(callingServer): correct most style issues (#21915)
chrwhit May 28, 2021
f3dd517
Update FarmBeats SDK (#21836)
jianghaolu May 27, 2021
a77b20d
Fix build.
zihzhan-msft May 28, 2021
814520d
fix(*): finish style check, add test base (#21941)
chrwhit May 28, 2021
fa0241e
Update swagger location and obj models.
zihzhan-msft May 29, 2021
e5b7970
Zihzhan/communication server calling (#21943)
zihzhan-msft May 29, 2021
8814c18
Style check fix.
zihzhan-msft May 29, 2021
26b082b
Update API version.
zihzhan-msft May 29, 2021
8821175
unit test for CallClientBuilder and other samll fixes (#21964)
arifsaikat-microsoft May 31, 2021
6973169
fix(*): add unit tests
chrwhit Jun 1, 2021
b1fe3f2
fix(*): add sync conversation client tests
chrwhit Jun 1, 2021
c433cc1
Fix AddParticipant issues (#21967)
arifsaikat-microsoft Jun 1, 2021
fd2a76f
Playback unit test for CallClient and CallAsyncClient (#22014)
arifsaikat-microsoft Jun 2, 2021
4c09e67
Add-remove participant unit tests (#22025)
arifsaikat-microsoft Jun 2, 2021
f45c92c
fix(*): remove test url
chrwhit Jun 2, 2021
99dfa26
fix(*): style issues
chrwhit Jun 2, 2021
8006138
Using the latest swagger file (#22038)
arifsaikat-microsoft Jun 3, 2021
f52e74c
Added join call, add-remove participant for out-call (#22040)
arifsaikat-microsoft Jun 3, 2021
ffbb23c
sync with dot net sdk (#22044)
arifsaikat-microsoft Jun 3, 2021
90423b9
Adding PlayAudio Api to Conversation Client (Out-Call) (#22021)
Paresh-Arvind-Patil Jun 3, 2021
8837986
Refactor code (#22053)
arifsaikat-microsoft Jun 3, 2021
87034ac
Deserialize events (#22064)
arifsaikat-microsoft Jun 3, 2021
1b07736
Fix review suggestions (#22068)
arifsaikat-microsoft Jun 4, 2021
94ae841
fix(*): fix issue with tests failing in maven (#22067)
chrwhit Jun 4, 2021
5326293
fix review feedbacks (#22071)
arifsaikat-microsoft Jun 4, 2021
435e6f9
unit tests for out-call add/remove (#22074)
arifsaikat-microsoft Jun 4, 2021
d08dc44
unit tests for delete call (#22075)
arifsaikat-microsoft Jun 4, 2021
ec1729d
remove unused generated events (#22076)
arifsaikat-microsoft Jun 4, 2021
f54656b
fix(*): fix package version issues
chrwhit Jun 4, 2021
dda78eb
fix(*): add callingserver to version.txt
chrwhit Jun 4, 2021
e879c8b
fix(*): update readme.md (not complete)
chrwhit Jun 4, 2021
186f419
fix(*): fix package version issues
chrwhit Jun 4, 2021
e07d2f4
fix(*): update readme.md
chrwhit Jun 4, 2021
e33f9a2
fix(*): update readme.md
chrwhit Jun 4, 2021
14e765c
fix(*): remove instances of 'var' and adding correct type. 'var' fail…
chrwhit Jun 4, 2021
19a65c0
fix(*): update readme.md
chrwhit Jun 4, 2021
91b4dfb
fix(*): update readme.md
chrwhit Jun 4, 2021
dc12860
fix(*): fix pom issue
chrwhit Jun 4, 2021
fa53ac9
fix event de-serialization issue by adding deafult constructors (#22090)
arifsaikat-microsoft Jun 4, 2021
b69b82d
PR review fixes (#22099)
arifsaikat-microsoft Jun 5, 2021
4b58902
Use JSON annotated event definition (#22101)
arifsaikat-microsoft Jun 6, 2021
b977eee
pr review fix (#22108)
arifsaikat-microsoft Jun 7, 2021
03d062e
Merge latest master (#22113)
chrwhit Jun 7, 2021
a0f7ad0
pr review fix (#22125)
arifsaikat-microsoft Jun 7, 2021
bf616b4
Chrwhit/master update two (#22123)
chrwhit Jun 7, 2021
ff5950f
pr review fix (#22131)
arifsaikat-microsoft Jun 8, 2021
079f528
PR review fix (#22138)
arifsaikat-microsoft Jun 8, 2021
0f5a29b
Chrwhit/merge master three (#22146)
chrwhit Jun 8, 2021
8352419
Chrwhit/merge master four (#22151)
chrwhit Jun 8, 2021
54d08a3
fix(*): add tests, 70% coverage
chrwhit Jun 8, 2021
b606f90
fix(*): remove var
chrwhit Jun 9, 2021
2f47b2e
new schema fix + new class model (#22164)
arifsaikat-microsoft Jun 9, 2021
01e8aa3
roll back azure common lib (#22165)
arifsaikat-microsoft Jun 9, 2021
3ffab99
Chrwhit/merge master five (#22177)
chrwhit Jun 9, 2021
8c0d06c
fix(calling-server): update common version
chrwhit Jun 9, 2021
0d515cc
Adding ACS Recording Download SDK (#22026)
cochi2 Jun 9, 2021
31a5b67
new schema minor fix (#22183)
arifsaikat-microsoft Jun 9, 2021
880f186
Making ProgressReporter.reportProgress to release the lock everytime.…
cochi2 Jun 9, 2021
694ba9f
Rebasing master into feature/communication-ServerCalling (#22185)
cochi2 Jun 9, 2021
86b79ce
fix(serverCalling): update some test recordings
chrwhit Jun 9, 2021
26f0900
fix(*): remove eventgrid
chrwhit Jun 10, 2021
252c890
fix(*): fix test recordings
chrwhit Jun 10, 2021
05d8d45
fix(*): changelogs
chrwhit Jun 10, 2021
20ca862
fix(*): versioning
chrwhit Jun 10, 2021
ab466b6
fix(*): disable some tests till we get new recordings
chrwhit Jun 10, 2021
fa79385
fix(*): remove accidental changes
chrwhit Jun 10, 2021
e85e918
Renamed Response to result (#22191)
arifsaikat-microsoft Jun 10, 2021
10074df
fix unit tests with new schema (#22201)
arifsaikat-microsoft Jun 10, 2021
7cedc8f
fix(testing): improve coverage
chrwhit Jun 10, 2021
85ed562
fix javadoc (#22221)
arifsaikat-microsoft Jun 10, 2021
9abdce7
fix(*): add first live tests
chrwhit Jun 10, 2021
4205294
fix(*): add first live tests
chrwhit Jun 10, 2021
d411c4e
FI
chrwhit Jun 10, 2021
dc0f590
Multiple changes (#22226)
cochi2 Jun 11, 2021
7faf915
PR review feedbacks (#22228)
arifsaikat-microsoft Jun 11, 2021
0ad719f
make event immutable (#22240)
arifsaikat-microsoft Jun 11, 2021
2839338
pr review fixes (#22241)
arifsaikat-microsoft Jun 11, 2021
1d098ad
Multiple Changes. (#22250)
cochi2 Jun 11, 2021
e563820
Update azure-communication-common version.
zihzhan-msft Jun 11, 2021
c1f84fc
Merge branch 'feature/communication-ServerCalling' of https://github.…
zihzhan-msft Jun 11, 2021
c83f4bb
Add dependency version update tag for org.mockito
zihzhan-msft Jun 11, 2021
6d91fe7
fix(*): update tests
chrwhit Jun 11, 2021
9d3b90d
Merge branch 'feature/communication-ServerCalling' of https://github.…
chrwhit Jun 11, 2021
ec55a83
pr review test fixes (#22263)
arifsaikat-microsoft Jun 13, 2021
860531c
pr review fixes (#22264)
arifsaikat-microsoft Jun 13, 2021
49a0b17
PR review fixes (#22265)
arifsaikat-microsoft Jun 13, 2021
b624840
pr review fixes (#22267)
arifsaikat-microsoft Jun 14, 2021
7307a2b
pr review fixes (#22274)
arifsaikat-microsoft Jun 14, 2021
4e6052c
PR Fixes (#22276)
cochi2 Jun 14, 2021
87dcbfc
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-java …
arifsaikat-microsoft Jun 14, 2021
b438c63
pr review fix (#22280)
arifsaikat-microsoft Jun 14, 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
1 change: 1 addition & 0 deletions eng/.docsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ known_content_issues:
- ['sdk/core/README.md', '#3113']
- ['sdk/core/azure-core-experimental/README.md', '#3113']
- ['sdk/cognitiveservices/ms-azure-cs-textanalytics/README.md', '#3113']
- ['sdk/communication/azure-communication-callingserver/swagger/README.md', '#3113']
- ['sdk/communication/azure-communication-chat/swagger/README.md', '#3113']
- ['sdk/communication/azure-communication-sms/swagger/README.md', '#3113']
- ['sdk/communication/azure-communication-identity/swagger/README.md', '#3113']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -594,4 +594,8 @@ the main ServiceBusClientBuilder. -->
<!-- Fields are set via reflection using JCommander. Setting them to final fields will break it. -->
<suppress checks="com.azure.tools.checkstyle.checks.EnforceFinalFieldsCheck"
files="com.azure.messaging.eventhubs.perf[/\\].*Options\.java"/>

<!-- Avoiding PagedFlux check if already using RetriableDownloadFlux. -->
<!-- Issue: https://github.com/Azure/azure-sdk-for-java/issues/22117 -->
<suppress checks="com.azure.tools.checkstyle.checks.ServiceClientCheck" files="com.azure.communication.callingserver.CallingServerAsyncClient"/>
</suppressions>
5 changes: 5 additions & 0 deletions eng/jacoco-test-coverage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@
<artifactId>azure-communication-phonenumbers</artifactId>
<version>1.1.0-beta.1</version> <!-- {x-version-update;com.azure:azure-communication-phonenumbers;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-callingserver</artifactId>
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-communication-callingserver;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-containers-containerregistry</artifactId>
Expand Down
1 change: 1 addition & 0 deletions eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ com.azure:azure-analytics-synapse-spark;1.0.0-beta.3;1.0.0-beta.4
com.azure:azure-analytics-synapse-managedprivateendpoints;1.0.0-beta.3;1.0.0-beta.4
com.azure:azure-analytics-synapse-monitoring;1.0.0-beta.3;1.0.0-beta.4
com.azure:azure-communication-chat;1.0.0;1.1.0-beta.1
com.azure:azure-communication-callingserver;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-communication-common;1.0.2;1.1.0-beta.1
com.azure:azure-communication-sms;1.0.3;1.1.0-beta.1
com.azure:azure-communication-identity;1.1.1;1.2.0-beta.1
Expand Down
19 changes: 19 additions & 0 deletions sdk/communication/azure-communication-callingserver/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Release History

## 1.0.0-beta.1 (Unreleased)
This is the first release of Azure Communication Calling Server SDK. For more information, please see the [README][read_me].

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).

### Features Added
- Create outbound call to an Azure Communication Service user or a phone number.
- Hangup the existing call.
- Play audio in the call.
- Outbound APIs for call recording including start, pause, resume and stop.
- Subscribe to tone and receive tone selections via events.
- Invite and remove participants from the call.

<!-- LINKS -->
[read_me]: https://github.com/Azure/azure-sdk-for-java/blob/feature/communication-ServerCalling/sdk/communication/azure-communication-callingserver/README.md


176 changes: 176 additions & 0 deletions sdk/communication/azure-communication-callingserver/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
# Azure Communication CallingServer Service client library for Java

This package contains a Java SDK for Azure Communication CallingServer Service.

[Source code][source] | [Package (Maven)][package] | [API reference documentation][api_documentation]
| [Product documentation][product_docs]

## Getting started

### Prerequisites

- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
- [Java Development Kit (JDK)](https://docs.microsoft.com/java/azure/jdk/?view=azure-java-stable) version 8 or above.
- [Apache Maven](https://maven.apache.org/download.cgi).
- A deployed Communication Services resource. You can use the [Azure Portal](https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp) or the [Azure PowerShell](https://docs.microsoft.com/powershell/module/az.communication/new-azcommunicationservice) to set it up.

### Include the package

[//]: # ({x-version-update-start;com.azure:azure-communication-callingserver;current})
```xml
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-callingserver</artifactId>
<version>1.0.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})

## Key concepts

At a high level the Azure Communication CallingServer API will support two kinds of scenarios:

- In-call app: Contoso server app is a participant in the call.

- Out-call app: Contoso server app is not a participant in the call - Server app can subscribe to events for calls between specific users or even all users belonging to the ACS azure resource.

Based on if the Contoso app join a call or not, APIs can be divided into two categories:

- In-call APIs: Contoso app is one of the participant in a call. It can be applicable for app to person (A2P) or person to app (P2A) case, or multi-party/group calls that server apps joined as a participant to provide audio/prompt.

- Out-of-call APIs: Contoso app can invoke these set of APIs without joining a call. It is applicable for actions on P2P calls, A2P calls, P2A calls and group calls.

## Examples

### Authenticate the client


You can provide the connection string using the connectionString() function of `CallingServerClientBuilder`. Once you initialized a `CallingServerClient` class, you can do the different server calling operations.
<!-- embedme src/samples/java/com/azure/communication/callingserver/ReadmeSamples.java#L28-L34 -->
```java
// Your connectionString retrieved from your Azure Communication Service
String connectionString = "endpoint=https://<resource-name>.communication.azure.com/;accesskey=<access-key>";

// Initialize the calling server client
final CallingServerClientBuilder builder = new CallingServerClientBuilder();
builder.connectionString(connectionString);
CallingServerClient callingServerClient = builder.buildClient();
```

### Create call, Add participant and Hangup a call

#### Create a Call:
<!-- embedme src/samples/java/com/azure/communication/callingserver/ReadmeSamples.java#L46-L66 -->
```java
CommunicationIdentifier source = new CommunicationUserIdentifier("<acs-user-identity>");
CommunicationIdentifier firstCallee = new CommunicationUserIdentifier("<acs-user-identity-1>");
CommunicationIdentifier secondCallee = new CommunicationUserIdentifier("<acs-user-identity-2>");

CommunicationIdentifier[] targets = new CommunicationIdentifier[] { firstCallee, secondCallee };

String callbackUri = "<callback-uri-for-notification>";

CallModality[] requestedMediaTypes = new CallModality[] { CallModality.AUDIO, CallModality.VIDEO };

EventSubscriptionType[] requestedCallEvents = new EventSubscriptionType[] {
EventSubscriptionType.DTMF_RECEIVED,
EventSubscriptionType.PARTICIPANTS_UPDATED };

CreateCallOptions createCallOptions = new CreateCallOptions(
callbackUri,
requestedMediaTypes,
requestedCallEvents);

CallConnection callConnection = callingServerClient.createCallConnection(source, targets, createCallOptions);
```

#### Add a participant to a Call:
<!-- embedme src/samples/java/com/azure/communication/callingserver/ReadmeSamples.java#L86-L87 -->
```java
CommunicationIdentifier thirdCallee = new CommunicationUserIdentifier("<acs-user-identity-3>");
callConnection.addParticipant(thirdCallee, "ACS User 3", "<string-for-tracing-responses>");
```

#### Hangup a Call:
<!-- embedme src/samples/java/com/azure/communication/callingserver/ReadmeSamples.java#L76-L76 -->
```java
callConnection.hangup();
```

### Start, Pause, Resume, Stop and Get a recording

#### Start a Recording:
<!-- embedme src/samples/java/com/azure/communication/callingserver/ConversationClientReadmeSamples.java#L47-L51 -->
```java
String serverCallId = "<serverCallId received from starting call>";
String recordingStateCallbackUri = "<webhook endpoint to which calling service can report status>";
ServerCall serverCall = callingServerClient.initializeServerCall(serverCallId);
StartCallRecordingResponse response = serverCall.startRecording(recordingStateCallbackUri);
String recordingId = response.getRecordingId();
```

#### Pause a Recording:
<!-- embedme src/samples/java/com/azure/communication/callingserver/ConversationClientReadmeSamples.java#L65-L65 -->
```java
serverCall.pauseRecording(recordingId);
```

#### Resume a Recording:
<!-- embedme src/samples/java/com/azure/communication/callingserver/ConversationClientReadmeSamples.java#L78-L78 -->
```java
serverCall.resumeRecording(recordingId);
```

#### Stop a Recording:
<!-- embedme src/samples/java/com/azure/communication/callingserver/ConversationClientReadmeSamples.java#L91-L91 -->
```java
serverCall.stopRecording(recordingId);
```

#### Get the Recording State:
<!-- embedme src/samples/java/com/azure/communication/callingserver/ConversationClientReadmeSamples.java#L105-L105 -->
```java
CallRecordingStateResult callRecordingStateResult = serverCall.getRecordingState(recordingId);
```

### Play Audio in Call

#### Play Audio:
<!-- embedme src/samples/java/com/azure/communication/callingserver/ConversationClientReadmeSamples.java#L122-L127 -->
```java
String audioFileUri = "<uri of the file to play>";
String audioFileId = "<a name to use for caching the audio file>";
String callbackUri = "<webhook endpoint to which calling service can report status>";
String context = "<Identifier for correlating responses>";
PlayAudioResponse playAudioResponse = serverCall.playAudio(audioFileUri, audioFileId, callbackUri, context);
```

## Troubleshooting

If you recieve a CommunicationErrorException with the messagae: "Action is invalid when call is not in Established state." This usually means the call has ended. This can occur if the participants all leave
the call, or participants did not accept the call before the call timed out.

If you fail to start a call because of an HMAC validation error, be sure your access key is correct, and
that you are passing in a valid conversation id.

## Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a [Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights to use your contribution.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

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 [[email protected]][coc_contact] with any additional questions or comments.

## Next steps

Check out other client libraries for Azure Communication Services

<!-- LINKS -->
[cla]: https://cla.microsoft.com
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
[coc_contact]: mailto:[email protected]
[product_docs]: https://docs.microsoft.com/azure/communication-services/
[package]: https://search.maven.org/artifact/com.azure/azure-communication-callingserver
[api_documentation]: https://aka.ms/java-docs
[source]: https://github.com/Azure/azure-sdk-for-java/tree/feature/communication-ServerCalling/sdk/communication/azure-communication-callingserver/src
154 changes: 154 additions & 0 deletions sdk/communication/azure-communication-callingserver/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
<!-- Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. -->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.azure</groupId>
<artifactId>azure-client-sdk-parent</artifactId>
<version>1.7.0</version> <!-- {x-version-update;com.azure:azure-client-sdk-parent;current} -->
<relativePath>../../parents/azure-client-sdk-parent</relativePath>
</parent>

<groupId>com.azure</groupId>
<artifactId>azure-communication-callingserver</artifactId>
<packaging>jar</packaging>
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-communication-callingserver;current} -->

<name>Microsoft Azure client library for CallingServer service</name>
<description>
This package contains clients and data structures used to make call with Azure Communication CallingServer Service.
For this release, see notes - https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/communication/azure-communication-callingserver/README.md and https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/communication/azure-communication-callingserver/CHANGELOG.md.
</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<distributionManagement>
<site>
<id>azure-java-build-docs</id>
<url>${site.url}/site/${project.artifactId}</url>
</site>
</distributionManagement>

<scm>
<url>https://github.com/Azure/azure-sdk-for-java</url>
<connection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</connection>
<tag>HEAD</tag>
</scm>

<properties>
<src.dir>src/main</src.dir>
<test.dir>src/test</test.dir>
<jacoco.min.linecoverage>0.70</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0.70</jacoco.min.branchcoverage>
<jacoco.skip.coverage.check>false</jacoco.skip.coverage.check>
</properties>

<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.17.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-common</artifactId>
<version>1.1.0-beta.1</version> <!-- {x-version-update;com.azure:azure-communication-common;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-identity</artifactId>
<version>1.1.1</version> <!-- {x-version-update;com.azure:azure-communication-identity;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-test</artifactId>
<version>1.6.3</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>9.8.1</version> <!-- {x-version-update;com.nimbusds:nimbus-jose-jwt;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.7.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-api;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.7.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-engine;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.7.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-params;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version> <!-- {x-version-update;org.hamcrest:hamcrest-all;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.9.0</version> <!-- {x-version-update;org.mockito:mockito-core;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<version>3.4.6</version> <!-- {x-version-update;io.projectreactor:reactor-test;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-okhttp</artifactId>
<version>1.7.0</version> <!-- {x-version-update;com.azure:azure-core-http-okhttp;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.3.1</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version> <!-- {x-version-update;org.jacoco:jacoco-maven-plugin;external_dependency} -->
<configuration>
<includes>
<include>com/azure/communication/callingserver/*.class</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} -->
<configuration>
<rules>
<bannedDependencies>
<includes>
<include>com.azure:*</include>
</includes>
</bannedDependencies>
</rules>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading