Skip to content

Commit 412d06a

Browse files
v-dharmarajvv-saasomanicemateiaDominikMeannatisch
authored
GA6 Changes for callautomation (#41918)
* updating ga5 version * Addressing comments * fixing the media streaming error * updating the change * Recorded live tests + GA5 changes (#41253) * updating the locale and adding the operation callback uril in the unholdoptions * updating hold operationcallback url * updating version number * adding the dtmf * fixing the spelling error on the comment * Live/Recorded Tests (#41328) * Rerecorded live tests. * Pushed assets.json. * fixing the pipeline error * fixing lint error * fixing the recording issue * fixing doc error * Created feature branch off of callautomation/release/ga5. Updated to ga6 apispec and made necessary changes. * Made changes to start recording to effectively handle call_connection_id to locate call rather than using call locator. * Recorded live tests for ga6. * updating changelog * [OPS Common SDK] Update Communication Common SDK for Teams Phone Extensibility GA (#41219) * Update models.py * Update models.py * Update models.py * Update phone number identifier * add tests * small updates * Update test_identifier_raw_id.py * Update test_identifier_raw_id.py * Update test_identifier_raw_id.py * Create entra_user_credential_async.py * add entra token cred * add async exchange * Update models.py * Update test_identifier_raw_id.py * Update test_identifier_raw_id.py * update credential * Update entra_user_credential_async.py * Update entra_user_credential_async.py * Update entra_user_credential_async.py * Update entra_user_credential_async.py * Create pipeline_utils.py * Create entra_token_guard_policy.py * Create entra_token_credential_options.py * Create token_exchange.py * Update token_exchange.py * updates * Update token_exchange.py * Update token_exchange.py * cleanup old files * Update token_exchange.py * Update entra_token_guard_policy.py * updated credential classes * updates * Delete manual_test.py * Update user_credential.py * Copy to all _shared in all sdks * Update sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_shared/entra_token_guard_policy.py Co-authored-by: Dominik <[email protected]> * Update token_exchange.py * update version * Fix imports * Fix imports in all folders * Fix test * Update test_identifier_raw_id.py * Update dev_requirements.txt * try to fix conflict in pipeline * try to fix conflict in pipeline 2 * Update setup.py * try to fix call automation * remove references * expose the identifiers * Update documentation for credential to include the optional params * Delete manual_test.py * Update _version.py * fix comment to default the cloud * fix comments for phone number properties * fix path * Update CHANGELOG.md * fix cloud param * fix comment * Create test_entra_token_guard_policy.py * fix for cloud param * Add tests for token exchange * add tests for credential * update test * Update test_user_credential_async.py * add check in async cred * fix cloud * update not required * Update test_identifier_raw_id.py * fix passing scopes * copy paste from identity * fix space * fix sending scopes * Update test_token_exchange.py * fix spaces for doc * fix pylint errors * fix pylint error in model * fix props in phone number * fix dateutil import * update init of asserted_id * replace none with "" * update models phone number * fix some pylint errors: format * split files * pylint fixes * pylint call automation * pylint for all * fix some pylint warnings * fix last warnings in identity * update all * update token exchange * update credential for all sdks * fix comments * add some tests * fix tests * fix some comments * fix comments * copy in all sdks * fix include * fix import * fix tests * fix comments * fix analysis warnings * fix mypy * fix pylint * fix mypy * fix optional scopes --------- Co-authored-by: Dominik <[email protected]> * updating api version * ga6 vesrion update * updating the python version * updating the live test * pushing resolve issue * changelog update * Update serialization.py * updating ordering * changing to dev version number as the pipeline is not letting to create the PR succeeded * version number update * Adding the classifier for the ga release * making the teams extension users constructers to have the keyword only param * copy issue fixing * spell check fix * updating communication shared code to use the isodate instead of the … (#42085) * udpating communication shared code to use the isodate instead of the date util * fixing the tests * fix the test failure * Updated communications dependencies * Local transport import statements * Use fixed offsets instead of ZoneInfo to fix tests in all environments * addressing the comments * changing to zoneinfo as per the comments * Revert "changing to zoneinfo as per the comments" This reverts commit 3e2610d. --------- Co-authored-by: antisch <[email protected]> Co-authored-by: Cezara Mateiasi <[email protected]> * release date update * update changelog * Add asynchronous tests to align with existing synchronous tests in Call Automation SDK (#41990) * Creating async live tests for call automation * Removing the unavailable tests for GA6 * Updating the async tests for call automation * updating the changes * Pushing the recorded tests and assests.json * updating the async tests * Adding the async tests for callautomation * updating asset file --------- Co-authored-by: Vinothini Dharmaraj <[email protected]> * fixing the long path issue fixed for the build failure * removing older files * removing the release * reverting the version beta to check in changes to main as the release date is not confirmed * reverting classifier --------- Co-authored-by: v-saasomani <[email protected]> Co-authored-by: Cezara Zamfir <[email protected]> Co-authored-by: Dominik <[email protected]> Co-authored-by: antisch <[email protected]> Co-authored-by: Cezara Mateiasi <[email protected]> Co-authored-by: Srinivasa Kaluri <[email protected]>
1 parent bbb1394 commit 412d06a

File tree

83 files changed

+3118
-108
lines changed

Some content is hidden

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

83 files changed

+3118
-108
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
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.
1210

1311
## 1.4.0 (2025-06-06)
1412

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": "python",
44
"TagPrefix": "python/communication/azure-communication-callautomation",
5-
"Tag": "python/communication/azure-communication-callautomation_7fb5483cb0"
5+
"Tag": "python/communication/azure-communication-callautomation_6d7be2f83f"
66
}

sdk/communication/azure-communication-callautomation/azure/communication/callautomation/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
CommunicationIdentifierKind,
3838
CommunicationCloudEnvironment,
3939
UnknownIdentifier,
40+
TeamsExtensionUserProperties,
41+
TeamsExtensionUserIdentifier,
4042
)
4143
from ._generated.models._enums import (
4244
CallRejectReason,
@@ -91,6 +93,8 @@
9193
"CommunicationIdentifierKind",
9294
"CommunicationCloudEnvironment",
9395
"UnknownIdentifier",
96+
"TeamsExtensionUserProperties",
97+
"TeamsExtensionUserIdentifier",
9498

9599
# enums
96100
"CallRejectReason",

sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_api_versions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ class ApiVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta):
1313
V2024_04_15 = "2024-04-15"
1414
V2024_09_15 = "2024-09-15"
1515
V2025_05_15 = "2025-05-15"
16+
V2025_06_15 = "2025-06-15"
1617

17-
DEFAULT_VERSION = ApiVersion.V2025_05_15.value
18+
DEFAULT_VERSION = ApiVersion.V2025_06_15.value

sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_call_automation_client.py

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
serialize_phone_identifier,
3939
serialize_identifier,
4040
serialize_communication_user_identifier,
41+
serialize_msft_teams_app_identifier,
4142
build_call_locator,
4243
process_repeatability_first_sent,
4344
)
@@ -58,6 +59,7 @@
5859
CommunicationIdentifier,
5960
CommunicationUserIdentifier,
6061
PhoneNumberIdentifier,
62+
MicrosoftTeamsAppIdentifier
6163
)
6264
from ._generated.models._enums import (
6365
CallRejectReason,
@@ -303,6 +305,7 @@ def create_call(
303305
cognitive_services_endpoint: Optional[str] = None,
304306
media_streaming: Optional['MediaStreamingOptions'] = None,
305307
transcription: Optional['TranscriptionOptions'] = None,
308+
teams_app_source: Optional["MicrosoftTeamsAppIdentifier"] = None,
306309
**kwargs
307310
) -> CallConnectionProperties:
308311
"""Create a call connection request to a target identity.
@@ -329,6 +332,8 @@ def create_call(
329332
:keyword transcription: Configuration of live transcription.
330333
:paramtype transcription: ~azure.communication.callautomation.TranscriptionOptions
331334
or None
335+
:keyword teams_app_source: The Microsoft Teams App Identifier.
336+
:paramtype teams_app_source: ~azure.communication.callautomation.MicrosoftTeamsAppIdentifier
332337
:return: CallConnectionProperties
333338
:rtype: ~azure.communication.callautomation.CallConnectionProperties
334339
:raises ~azure.core.exceptions.HttpResponseError:
@@ -362,7 +367,8 @@ def create_call(
362367
operation_context=operation_context,
363368
call_intelligence_options=call_intelligence_options,
364369
media_streaming_options=media_config,
365-
transcription_options=transcription_config
370+
transcription_options=transcription_config,
371+
teams_app_source=serialize_msft_teams_app_identifier(teams_app_source),
366372
)
367373
process_repeatability_first_sent(kwargs)
368374
result = self._client.create_call(create_call_request=create_call_request, **kwargs)
@@ -378,6 +384,7 @@ def create_group_call(
378384
source_display_name: Optional[str] = None,
379385
operation_context: Optional[str] = None,
380386
cognitive_services_endpoint: Optional[str] = None,
387+
teams_app_source: Optional["MicrosoftTeamsAppIdentifier"] = None,
381388
**kwargs,
382389
) -> CallConnectionProperties:
383390
"""Create a call connection request to a list of multiple target identities.
@@ -398,6 +405,8 @@ def create_group_call(
398405
:keyword cognitive_services_endpoint:
399406
The identifier of the Cognitive Service resource assigned to this call.
400407
:paramtype cognitive_services_endpoint: str
408+
:keyword teams_app_source: The Microsoft Teams App Identifier.
409+
:paramtype teams_app_source: ~azure.communication.callautomation.MicrosoftTeamsAppIdentifier
401410
:return: CallConnectionProperties
402411
:rtype: ~azure.communication.callautomation.CallConnectionProperties
403412
:raises ~azure.core.exceptions.HttpResponseError:
@@ -413,6 +422,7 @@ def create_group_call(
413422
source_display_name=source_display_name,
414423
operation_context=operation_context,
415424
cognitive_services_endpoint=cognitive_services_endpoint,
425+
teams_app_source=teams_app_source,
416426
**kwargs,
417427
)
418428

@@ -680,6 +690,57 @@ def start_recording(
680690
:raises ~azure.core.exceptions.HttpResponseError:
681691
"""
682692

693+
@overload
694+
def start_recording(
695+
self,
696+
*,
697+
call_connection_id: str,
698+
recording_state_callback_url: Optional[str] = None,
699+
recording_content_type: Optional[Union[str, 'RecordingContent']] = None,
700+
recording_channel_type: Optional[Union[str, 'RecordingChannel']] = None,
701+
recording_format_type: Optional[Union[str, 'RecordingFormat']] = None,
702+
audio_channel_participant_ordering: Optional[List['CommunicationIdentifier']] = None,
703+
channel_affinity: Optional[List['ChannelAffinity']] = None,
704+
recording_storage: Optional[Union['AzureCommunicationsRecordingStorage',
705+
'AzureBlobContainerRecordingStorage']] = None,
706+
pause_on_start: Optional[bool] = None,
707+
**kwargs,
708+
) -> RecordingProperties:
709+
"""Start recording for a ongoing call. Locate the call with call connection id.
710+
711+
:keyword str call_connection_id: The call connection ID to locate ongoing call.
712+
:keyword recording_state_callback_url: The url to send notifications to.
713+
:paramtype recording_state_callback_url: str or None
714+
:keyword recording_content_type: The content type of call recording.
715+
:paramtype recording_content_type: str or ~azure.communication.callautomation.RecordingContent or None
716+
:keyword recording_channel_type: The channel type of call recording.
717+
:paramtype recording_channel_type: str or ~azure.communication.callautomation.RecordingChannel or None
718+
:keyword recording_format_type: The format type of call recording.
719+
:paramtype recording_format_type: str or ~azure.communication.callautomation.RecordingFormat or None
720+
:keyword audio_channel_participant_ordering:
721+
The sequential order in which audio channels are assigned to participants in the unmixed recording.
722+
When 'recordingChannelType' is set to 'unmixed' and `audioChannelParticipantOrdering is not specified,
723+
the audio channel to participant mapping will be automatically assigned based on the order in
724+
which participant first audio was detected.
725+
Channel to participant mapping details can be found in the metadata of the recording.
726+
:paramtype audio_channel_participant_ordering:
727+
list[~azure.communication.callautomation.CommunicationIdentifier] or None
728+
:keyword channel_affinity: The channel affinity of call recording
729+
When 'recordingChannelType' is set to 'unmixed', if channelAffinity is not specified,
730+
'channel' will be automatically assigned.
731+
Channel-Participant mapping details can be found in the metadata of the recording.
732+
:paramtype channel_affinity: list[~azure.communication.callautomation.ChannelAffinity] or None
733+
:keyword recording_storage: Defines the kind of external storage. Known values are:
734+
``AzureCommunicationsRecordingStorage`` and ``AzureBlobContainerRecordingStorage``.
735+
If no storage option is provided, the default is Azure Communications recording storage.
736+
:paramtype recording_storage: AzureCommunicationsRecordingStorage or AzureBlobContainerRecordingStorage or None
737+
:keyword pause_on_start: The state of the pause on start option.
738+
:paramtype pause_on_start: bool or None
739+
:return: RecordingProperties
740+
:rtype: ~azure.communication.callautomation.RecordingProperties
741+
:raises ~azure.core.exceptions.HttpResponseError:
742+
"""
743+
683744
@distributed_trace
684745
def start_recording(
685746
self,
@@ -696,9 +757,14 @@ def start_recording(
696757
kwargs.pop("room_id", None),
697758
args
698759
)
760+
call_connection_id = kwargs.pop("call_connection_id", None)
761+
if not call_locator and not call_connection_id:
762+
raise ValueError("Either a call locator or a call_connection_id must be provided to start recording.")
763+
699764
external_storage = build_external_storage(kwargs.pop("recording_storage", None))
700765
start_recording_request = StartCallRecordingRequest(
701766
call_locator=call_locator if call_locator else None,
767+
call_connection_id=call_connection_id if call_connection_id else None,
702768
recording_state_callback_uri=kwargs.pop("recording_state_callback_url", None),
703769
recording_content_type=kwargs.pop("recording_content_type", None),
704770
recording_channel_type=kwargs.pop("recording_channel_type", None),

sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/_client.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@
1818
from . import models as _models
1919
from ._configuration import AzureCommunicationCallAutomationServiceConfiguration
2020
from ._utils.serialization import Deserializer, Serializer
21-
from .operations import CallConnectionOperations, CallMediaOperations, CallRecordingOperations
22-
from .operations._operations import _AzureCommunicationCallAutomationServiceOperationsMixin
21+
from .operations import (
22+
CallConnectionOperations,
23+
CallMediaOperations,
24+
CallRecordingOperations,
25+
_AzureCommunicationCallAutomationServiceOperationsMixin,
26+
)
2327

2428

2529
class AzureCommunicationCallAutomationService(_AzureCommunicationCallAutomationServiceOperationsMixin):
@@ -36,7 +40,7 @@ class AzureCommunicationCallAutomationService(_AzureCommunicationCallAutomationS
3640
:type endpoint: str
3741
:param credential: Credential needed for the client to connect to Azure. Required.
3842
:type credential: ~azure.core.credentials.AzureKeyCredential
39-
:keyword api_version: Api Version. Default value is "2025-05-15". Note that overriding this
43+
:keyword api_version: Api Version. Default value is "2025-06-15". Note that overriding this
4044
default value may result in unsupported behavior.
4145
:paramtype api_version: str
4246
"""

sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ class AzureCommunicationCallAutomationServiceConfiguration: # pylint: disable=t
2525
:type endpoint: str
2626
:param credential: Credential needed for the client to connect to Azure. Required.
2727
:type credential: ~azure.core.credentials.AzureKeyCredential
28-
:keyword api_version: Api Version. Default value is "2025-05-15". Note that overriding this
28+
:keyword api_version: Api Version. Default value is "2025-06-15". Note that overriding this
2929
default value may result in unsupported behavior.
3030
:paramtype api_version: str
3131
"""
3232

3333
def __init__(self, endpoint: str, credential: AzureKeyCredential, **kwargs: Any) -> None:
34-
api_version: str = kwargs.pop("api_version", "2025-05-15")
34+
api_version: str = kwargs.pop("api_version", "2025-06-15")
3535

3636
if endpoint is None:
3737
raise ValueError("Parameter 'endpoint' must not be None.")

sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/aio/_client.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@
1818
from .. import models as _models
1919
from .._utils.serialization import Deserializer, Serializer
2020
from ._configuration import AzureCommunicationCallAutomationServiceConfiguration
21-
from .operations import CallConnectionOperations, CallMediaOperations, CallRecordingOperations
22-
from .operations._operations import _AzureCommunicationCallAutomationServiceOperationsMixin
21+
from .operations import (
22+
CallConnectionOperations,
23+
CallMediaOperations,
24+
CallRecordingOperations,
25+
_AzureCommunicationCallAutomationServiceOperationsMixin,
26+
)
2327

2428

2529
class AzureCommunicationCallAutomationService(_AzureCommunicationCallAutomationServiceOperationsMixin):
@@ -37,7 +41,7 @@ class AzureCommunicationCallAutomationService(_AzureCommunicationCallAutomationS
3741
:type endpoint: str
3842
:param credential: Credential needed for the client to connect to Azure. Required.
3943
:type credential: ~azure.core.credentials.AzureKeyCredential
40-
:keyword api_version: Api Version. Default value is "2025-05-15". Note that overriding this
44+
:keyword api_version: Api Version. Default value is "2025-06-15". Note that overriding this
4145
default value may result in unsupported behavior.
4246
:paramtype api_version: str
4347
"""

sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/aio/_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ class AzureCommunicationCallAutomationServiceConfiguration: # pylint: disable=t
2525
:type endpoint: str
2626
:param credential: Credential needed for the client to connect to Azure. Required.
2727
:type credential: ~azure.core.credentials.AzureKeyCredential
28-
:keyword api_version: Api Version. Default value is "2025-05-15". Note that overriding this
28+
:keyword api_version: Api Version. Default value is "2025-06-15". Note that overriding this
2929
default value may result in unsupported behavior.
3030
:paramtype api_version: str
3131
"""
3232

3333
def __init__(self, endpoint: str, credential: AzureKeyCredential, **kwargs: Any) -> None:
34-
api_version: str = kwargs.pop("api_version", "2025-05-15")
34+
api_version: str = kwargs.pop("api_version", "2025-06-15")
3535

3636
if endpoint is None:
3737
raise ValueError("Parameter 'endpoint' must not be None.")

sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/aio/operations/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# pylint: disable=line-too-long,useless-suppression
12
# coding=utf-8
23
# --------------------------------------------------------------------------
34
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -12,6 +13,7 @@
1213
if TYPE_CHECKING:
1314
from ._patch import * # pylint: disable=unused-wildcard-import
1415

16+
from ._operations import _AzureCommunicationCallAutomationServiceOperationsMixin # type: ignore # pylint: disable=unused-import
1517
from ._operations import CallConnectionOperations # type: ignore
1618
from ._operations import CallMediaOperations # type: ignore
1719
from ._operations import CallRecordingOperations # type: ignore

0 commit comments

Comments
 (0)