Skip to content

Commit dbf9d2d

Browse files
committed
updating the locale and adding the operation callback uril in the unholdoptions
1 parent 4489128 commit dbf9d2d

File tree

3 files changed

+31
-4
lines changed

3 files changed

+31
-4
lines changed

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,14 +1038,24 @@ def hold(
10381038

10391039
@distributed_trace
10401040
def unhold(
1041-
self, target_participant: "CommunicationIdentifier", *, operation_context: Optional[str] = None, **kwargs
1041+
self,
1042+
target_participant: "CommunicationIdentifier",
1043+
*,
1044+
operation_context: Optional[str] = None,
1045+
operation_callback_url: Optional[str] = None,
1046+
**kwargs
10421047
) -> None:
10431048
"""Play media to specific participant(s) in this call.
10441049
10451050
:param target_participant: The participant being added.
10461051
:type target_participant: ~azure.communication.callautomation.CommunicationIdentifier
10471052
:keyword operation_context: Value that can be used to track this call and its associated events.
10481053
:paramtype operation_context: str or None
1054+
:keyword operation_callback_url: Set a callback URL that overrides the default callback URL set
1055+
by CreateCall/AnswerCall for this operation.
1056+
This setup is per-action. If this is not set, the default callback URL set by
1057+
CreateCall/AnswerCall will be used.
1058+
:paramtype operation_callback_url: str or None
10491059
:return: None
10501060
:rtype: None
10511061
:raises ~azure.core.exceptions.HttpResponseError:
@@ -1054,6 +1064,7 @@ def unhold(
10541064
unhold_request = UnholdRequest(
10551065
target_participant=serialize_identifier(target_participant),
10561066
operation_context=operation_context,
1067+
operation_callback_url=operation_callback_url,
10571068
kwargs=kwargs,
10581069
)
10591070

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,23 +549,28 @@ class TranscriptionSubscription:
549549
"""transcription subscription state."""
550550
subscribed_result_types: Optional[List[Union[str, 'TranscriptionResultType']]]
551551
"""subscribed transcription result types."""
552+
"""Specifies the locale used for transcription, e.g., en-CA or en-AU."""
553+
locale: Optional[str]
552554

553555
def __init__(
554556
self,
555557
*,
556558
id: Optional[str] = None, # pylint: disable=redefined-builtin
557559
state: Optional[Union[str, "TranscriptionSubscriptionState"]] = None,
558-
subscribed_result_types: Optional[List[Union[str, "TranscriptionResultType"]]] = None
560+
subscribed_result_types: Optional[List[Union[str, "TranscriptionResultType"]]] = None,
561+
locale: Optional[str] = None,
559562
) -> None:
560563
self.id = id
561564
self.state = state
562565
self.subscribed_result_types = subscribed_result_types
566+
self.locale = locale
563567

564568
def _to_generated(self):
565569
return TranscriptionSubscriptionInternal(
566570
id=self.id,
567571
state=self.state ,
568-
subscribed_result_types=self.subscribed_result_types
572+
subscribed_result_types=self.subscribed_result_types,
573+
locale=self.locale
569574
)
570575

571576

sdk/communication/azure-communication-callautomation/azure/communication/callautomation/aio/_call_connection_client_async.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,14 +1062,24 @@ async def hold(
10621062

10631063
@distributed_trace_async
10641064
async def unhold(
1065-
self, target_participant: "CommunicationIdentifier", *, operation_context: Optional[str] = None, **kwargs
1065+
self,
1066+
target_participant: "CommunicationIdentifier",
1067+
*,
1068+
operation_context: Optional[str] = None,
1069+
operation_callback_url: Optional[str] = None,
1070+
**kwargs
10661071
) -> None:
10671072
"""Play media to specific participant(s) in this call.
10681073
10691074
:param target_participant: The participant being added.
10701075
:type target_participant: ~azure.communication.callautomation.CommunicationIdentifier
10711076
:keyword operation_context: Value that can be used to track this call and its associated events.
10721077
:paramtype operation_context: str or None
1078+
:keyword operation_callback_url: Set a callback URL that overrides the default callback URL set
1079+
by CreateCall/AnswerCall for this operation.
1080+
This setup is per-action. If this is not set, the default callback URL set by
1081+
CreateCall/AnswerCall will be used.
1082+
:paramtype operation_callback_url: str or None
10731083
:return: None
10741084
:rtype: None
10751085
:raises ~azure.core.exceptions.HttpResponseError:
@@ -1078,6 +1088,7 @@ async def unhold(
10781088
unhold_request = UnholdRequest(
10791089
target_participant=serialize_identifier(target_participant),
10801090
operation_context=operation_context,
1091+
operation_callback_uri=operation_callback_url,
10811092
kwargs=kwargs,
10821093
)
10831094

0 commit comments

Comments
 (0)