Skip to content

Commit 9378c2a

Browse files
v-dharmarajvv-pivamshiv-saasomaniazure-sdkjairmyree
authored
Call Automation GA changes (#45982)
* ga5 changes * ga5 api changes * Made GA5 changes and recorded the live tests. (#45409) * Addressing arb comments * Added the parser for the dtmf data. (#45347) * Added the parser for the dtmf data. * Removed dtmf meta data. --------- Co-authored-by: Vinothini Dharmaraj <v-dharmarajv@microsoft.com> * updating the white space difference * addressing the arb comments * GA5 Javadoc Issues (#45432) * Fixed Javadoc issues in StreamingData.java & TranscriptionOptions.java * Renamed MediaStreamingContent class to MediaStreamingContentType. Renamed getChannels() to getChannelType() in AudioMetaData.java * Re-recorded tests and fixed linting issues (unused imports). (#45448) * updating java missing fields * lint errors * moving transport url * Addressing the ARB Comments * addressing the arb comments * addressing all arb comments * updating the transcription and media streaming options * Fixed Javadoc issues + updated ga5 version. (#45496) * Fixing the lint errors * fixing the lint error * updating the changelog * Updating the changelog and release date * Created feature branch off of callautomation/release/ga5. Updated to ga6 apispec. Added custom x header support, MicrosoftTeamsAppIdentifier compatability, recording with call connection id, and StartRecordingFailed event. * Ran recorded tests. Fixed timeout issue with waiting for incomingCallContext. * adding teams extension user id * ga6 version * changelog update * moving the sipheaderprefix to extendable enum * setting callconnection id to recording request * updating the ga version * Increment package versions for core releases (#45876) * Increment package versions for patch releases (#45841) * Increment package versions for patch releases * Increment package versions for patch releases * Update sdk/remoterendering/azure-mixedreality-remoterendering/CHANGELOG.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update sdk/remoterendering/azure-mixedreality-remoterendering/CHANGELOG.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update sdk/remoterendering/azure-mixedreality-remoterendering/CHANGELOG.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Run python script to fix versions and remove duplicate tag * Fixing azure-communication-jobrouter version in version_client.tct --------- Co-authored-by: azure-sdk <azuresdk@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> * latest from main autorest version * apispec endpoint from the main * Fixing the build issues * adding recorded test * pushing latest record file * removing the public contructor as per the comments * removing tests which are added mistaken * updating the release date for the ga6 * changelog update * removing the release date * reverting version beta until finalize the release date --------- Co-authored-by: v-pivamshi <155710746+v-pivamshi@users.noreply.github.com> Co-authored-by: v-saasomani <v-saasomani@microsoft.com> Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Co-authored-by: Jair Myree <jairmyree@microsoft.com> Co-authored-by: azure-sdk <azuresdk@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com>
1 parent df65e76 commit 9378c2a

File tree

58 files changed

+1161
-135
lines changed

Some content is hidden

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

58 files changed

+1161
-135
lines changed

sdk/communication/azure-communication-callautomation/CHANGELOG.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
### Features Added
66

7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
7+
- Added support for Teams multipersona users in create call, add participant, transfer, and redirect scenarios in OPS calls
8+
- Added TeamsAppSource for use when creating outbound OPS calls
9+
- Recording with the call connection ID is now supported. OPS calls can be recorded using the call connection ID.
10+
- Added StartRecordingFailed event to indicate when the start recording API is unable to initiate the recording.
11+
- Adds support for SIP headers prefixed with 'X-' and 'X-MS-Custom-' within the CustomCallingContext.
1212

1313
## 1.4.1 (2025-06-19)
1414

sdk/communication/azure-communication-callautomation/README.md

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This package contains a Java SDK for Azure Communication Call Automation Service
2222
<dependency>
2323
<groupId>com.azure</groupId>
2424
<artifactId>azure-communication-callautomation</artifactId>
25-
<version>1.4.1</version>
25+
<version>1.5.0</version>
2626
</dependency>
2727
```
2828

@@ -41,61 +41,6 @@ This is the restart of Call Automation Service. It is renamed to Call Automation
4141

4242
`CallAutomationEventParser` provides the functionality to handle events from the ACS resource.
4343

44-
## Examples
45-
46-
### Handle Mid-Connection events with CallAutomation's EventProcessor
47-
48-
To easily handle mid-connection events, Call Automation's SDK provides easier way to handle these events.
49-
Take a look at `CallAutomationEventProcessor`. This will ensure correlation between call and events more easily.
50-
51-
```Java
52-
@RestController
53-
public class ActionController {
54-
// Controller implementation...
55-
56-
@RequestMapping(value = "/api/events", method = POST)
57-
public ResponseEntity<?> handleCallEvents(@RequestBody String requestBody) {
58-
try {
59-
CallAutomationAsyncClient client = getCallAutomationAsyncClient();
60-
client.getEventProcessor().processEvents(requestBody);
61-
62-
return new ResponseEntity<>(HttpStatus.OK);
63-
} catch (Exception e) {
64-
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
65-
}
66-
}
67-
}
68-
```
69-
70-
`processEvents` is required for EventProcessor to work.
71-
After event is being consumed by EventProcessor, you can start using its feature.
72-
73-
See below for example: where you are making a call with `CreateCall`, and wait for `CallConnected` event of the call.
74-
75-
```Java
76-
public class commandClass {
77-
// Class implementation...
78-
79-
public void createCallCommand() {
80-
CallAutomationAsyncClient client = getCallAutomationAsyncClient(); // Should be the same instance as the one used in the example above.
81-
String callbackUrl = "<YOUR_CALL_BACK_URL>";
82-
CallInvite callInvite = new CallInvite(new CommunicationUserIdentifier("<TARGET_USER_ID>"));
83-
CreateCallResult result = client.createCall(callInvite, callbackUrl).block();
84-
85-
try {
86-
// This will wait until CallConnected event is arrived or Timesout!
87-
CreateCallEventResult eventResult = result.waitForEventProcessorAsync(Duration.ofSeconds(30)).block();
88-
CallConnected returnedEvent = eventResult.successResult();
89-
} catch (Exception e) {
90-
// Timeout exception happend!
91-
// Call likely was never answered.
92-
}
93-
}
94-
}
95-
```
96-
97-
If timeout was not set when calling "waitForEventProcessorAsync", the default timeout is 4 minutes.
98-
9944
## Troubleshooting
10045

10146
If you receive a CommunicationErrorException with the message: "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

sdk/communication/azure-communication-callautomation/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "java",
44
"TagPrefix": "java/communication/azure-communication-callautomation",
5-
"Tag": "java/communication/azure-communication-callautomation_33108318f9"
5+
"Tag": "java/communication/azure-communication-callautomation_89c8cc481e"
66
}

sdk/communication/azure-communication-callautomation/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@
9696
<dependency>
9797
<groupId>org.hamcrest</groupId>
9898
<artifactId>hamcrest-all</artifactId>
99-
<version>1.3</version> <!-- {x-version-update;org.hamcrest:hamcrest-all;external_dependency} -->
99+
<version>1.3</version>
100+
<!-- {x-version-update;org.hamcrest:hamcrest-all;external_dependency} -->
100101
<scope>test</scope>
101102
</dependency>
102103
<dependency>

sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationAsyncClient.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.azure.communication.callautomation.implementation.converters.CommunicationIdentifierConverter;
1212
import com.azure.communication.callautomation.implementation.converters.CommunicationUserIdentifierConverter;
1313
import com.azure.communication.callautomation.implementation.converters.PhoneNumberIdentifierConverter;
14+
import com.azure.communication.callautomation.implementation.converters.MicrosoftTeamsAppIdentifierConverter;
1415
import com.azure.communication.callautomation.implementation.models.AnswerCallRequestInternal;
1516
import com.azure.communication.callautomation.implementation.models.AudioFormatInternal;
1617
import com.azure.communication.callautomation.implementation.models.CallIntelligenceOptionsInternal;
@@ -239,6 +240,11 @@ private CreateCallRequestInternal getCreateCallRequestInternal(CreateCallOptions
239240
request.setTranscriptionOptions(transcriptionOptionsInternal);
240241
}
241242

243+
if (createCallOptions.getTeamsAppSource() != null) {
244+
request
245+
.setTeamsAppSource(MicrosoftTeamsAppIdentifierConverter.convert(createCallOptions.getTeamsAppSource()));
246+
}
247+
242248
return request;
243249
}
244250

@@ -278,6 +284,11 @@ private CreateCallRequestInternal getCreateCallRequestInternal(CreateGroupCallOp
278284
request.setTranscriptionOptions(transcriptionOptionsInternal);
279285
}
280286

287+
if (createCallGroupOptions.getTeamsAppSource() != null) {
288+
request.setTeamsAppSource(
289+
MicrosoftTeamsAppIdentifierConverter.convert(createCallGroupOptions.getTeamsAppSource()));
290+
}
291+
281292
return request;
282293
}
283294

sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationServiceVersion.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ public enum CallAutomationServiceVersion implements ServiceVersion {
3333
/**
3434
* Service version {@code 2025-05-15}.
3535
*/
36-
V2025_05_15("2025-05-15");
36+
V2025_05_15("2025-05-15"),
37+
/**
38+
* Service version {@code 2025-06-15}.
39+
*/
40+
V2025_06_15("2025-06-15");
3741

3842
private final String version;
3943

@@ -55,6 +59,6 @@ public String getVersion() {
5559
* @return The latest {@link CallAutomationServiceVersion} object.
5660
*/
5761
public static CallAutomationServiceVersion getLatest() {
58-
return V2025_05_15;
62+
return V2025_06_15;
5963
}
6064
}

sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnectionAsync.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import com.azure.communication.common.MicrosoftTeamsAppIdentifier;
3939
import com.azure.communication.common.MicrosoftTeamsUserIdentifier;
4040
import com.azure.communication.common.PhoneNumberIdentifier;
41+
import com.azure.communication.common.TeamsExtensionUserIdentifier;
4142
import com.azure.core.annotation.ReturnType;
4243
import com.azure.core.annotation.ServiceMethod;
4344
import com.azure.core.exception.HttpResponseException;
@@ -259,6 +260,10 @@ public Mono<TransferCallResult> transferCallToParticipant(CommunicationIdentifie
259260
return transferCallToParticipantWithResponse(
260261
new TransferCallToParticipantOptions((MicrosoftTeamsAppIdentifier) targetParticipant))
261262
.flatMap(FluxUtil::toMono);
263+
} else if (targetParticipant instanceof TeamsExtensionUserIdentifier) {
264+
return transferCallToParticipantWithResponse(
265+
new TransferCallToParticipantOptions((TeamsExtensionUserIdentifier) targetParticipant))
266+
.flatMap(FluxUtil::toMono);
262267
} else {
263268
throw logger.logExceptionAsError(new IllegalArgumentException("targetParticipant type is invalid."));
264269
}

sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallRecordingAsync.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ private StartCallRecordingRequestInternal getStartCallRecordingRequest(StartReco
186186
if (options.isPauseOnStart() != null) {
187187
request.setPauseOnStart(options.isPauseOnStart());
188188
}
189+
if (options.getCallConnectionId() != null) {
190+
request.setCallConnectionId(options.getCallConnectionId());
191+
}
189192
return request;
190193
}
191194

sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/AzureCommunicationCallAutomationServiceImplBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public AzureCommunicationCallAutomationServiceImplBuilder retryPolicy(RetryPolic
275275
public AzureCommunicationCallAutomationServiceImpl buildClient() {
276276
this.validateClient();
277277
HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
278-
String localApiVersion = (apiVersion != null) ? apiVersion : "2025-05-15";
278+
String localApiVersion = (apiVersion != null) ? apiVersion : "2025-06-15";
279279
SerializerAdapter localSerializerAdapter
280280
= (serializerAdapter != null) ? serializerAdapter : JacksonAdapter.createDefaultSerializerAdapter();
281281
AzureCommunicationCallAutomationServiceImpl client = new AzureCommunicationCallAutomationServiceImpl(

sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallRecordingsImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public final class CallRecordingsImpl {
6363
@ServiceInterface(name = "AzureCommunicationCallAutomationServiceCallRecordings")
6464
public interface CallRecordingsService {
6565
@Post("/calling/recordings")
66-
@ExpectedResponses({ 200 })
66+
@ExpectedResponses({ 200, 202 })
6767
@UnexpectedResponseExceptionType(CommunicationErrorResponseException.class)
6868
Mono<Response<RecordingStateResponseInternal>> startRecording(@HostParam("endpoint") String endpoint,
6969
@QueryParam("api-version") String apiVersion,

0 commit comments

Comments
 (0)