2323 RedirectCallRequest ,
2424 RejectCallRequest ,
2525 StartCallRecordingRequest ,
26- CallIntelligenceOptions
26+ CallIntelligenceOptions ,
27+ ConnectRequest
2728)
2829from ._models import (
2930 CallConnectionProperties ,
4647 from ._models import (
4748 ServerCallLocator ,
4849 GroupCallLocator ,
50+ RoomCallLocator ,
4951 MediaStreamingOptions ,
5052 TranscriptionOptions
5153 )
@@ -168,6 +170,118 @@ def get_call_connection( # pylint: disable=client-method-missing-tracing-decorat
168170 ** kwargs
169171 )
170172
173+ @overload
174+ def connect_call (
175+ self ,
176+ * ,
177+ server_call_id : str ,
178+ callback_url : str ,
179+ cognitive_services_endpoint : Optional [str ] = None ,
180+ operation_context : Optional [str ] = None ,
181+ ** kwargs
182+ ) -> CallConnectionProperties :
183+ """The request payload for creating a connection to a room CallLocator.
184+ All required parameters must be populated in order to send to server.
185+ :keyword server_call_id: The server call ID to locate ongoing call.
186+ :paramtype server_call_id: str
187+ :keyword callback_url: The call back url where callback events are sent. Required
188+ :paramtype callback_url: str
189+ :keyword cognitive_services_endpoint:
190+ The identifier of the Cognitive Service resource assigned to this call.
191+ :paramtype cognitive_services_endpoint: str or None
192+ :keyword operation_context: Value that can be used to track the call and its associated events.
193+ :paramtype operation_context: str or None
194+ :return: CallConnectionProperties
195+ :rtype: ~azure.communication.callautomation.CallConnectionProperties
196+ :raises ~azure.core.exceptions.HttpResponseError:
197+ """
198+
199+ @overload
200+ def connect_call (
201+ self ,
202+ * ,
203+ group_call_id : str ,
204+ callback_url : str ,
205+ cognitive_services_endpoint : Optional [str ] = None ,
206+ operation_context : Optional [str ] = None ,
207+ ** kwargs
208+ ) -> CallConnectionProperties :
209+ """The request payload for creating a connection to a room CallLocator.
210+ All required parameters must be populated in order to send to server.
211+ :keyword group_call_id: The group call ID to locate ongoing call.
212+ :paramtype group_call_id: str
213+ :keyword callback_url: The call back url where callback events are sent. Required
214+ :paramtype callback_url: str
215+ :keyword cognitive_services_endpoint:
216+ The identifier of the Cognitive Service resource assigned to this call.
217+ :paramtype cognitive_services_endpoint: str or None
218+ :keyword operation_context: Value that can be used to track the call and its associated events.
219+ :paramtype operation_context: str or None
220+ :return: CallConnectionProperties
221+ :rtype: ~azure.communication.callautomation.CallConnectionProperties
222+ :raises ~azure.core.exceptions.HttpResponseError:
223+ """
224+
225+ @overload
226+ def connect_call (
227+ self ,
228+ * ,
229+ room_id : str ,
230+ callback_url : str ,
231+ cognitive_services_endpoint : Optional [str ] = None ,
232+ operation_context : Optional [str ] = None ,
233+ ** kwargs
234+ ) -> CallConnectionProperties :
235+ """The request payload for creating a connection to a room CallLocator.
236+ All required parameters must be populated in order to send to server.
237+ :keyword room_id: Acs room id. Required
238+ :paramtype room_id: str
239+ :keyword callback_url: The call back url where callback events are sent. Required
240+ :paramtype callback_url: str
241+ :keyword cognitive_services_endpoint:
242+ The identifier of the Cognitive Service resource assigned to this call.
243+ :paramtype cognitive_services_endpoint: str or None
244+ :keyword operation_context: Value that can be used to track the call and its associated events.
245+ :paramtype operation_context: str or None
246+ :return: CallConnectionProperties
247+ :rtype: ~azure.communication.callautomation.CallConnectionProperties
248+ :raises ~azure.core.exceptions.HttpResponseError:
249+ """
250+
251+ @distributed_trace
252+ def connect_call (
253+ self ,
254+ * args : Union ['ServerCallLocator' , 'GroupCallLocator' , 'RoomCallLocator' ],
255+ ** kwargs
256+ ) -> CallConnectionProperties :
257+
258+ cognitive_services_endpoint = kwargs .pop ("cognitive_services_endpoint" , None )
259+ call_intelligence_options = CallIntelligenceOptions (
260+ cognitive_services_endpoint = cognitive_services_endpoint
261+ ) if cognitive_services_endpoint else None
262+
263+ call_locator = build_call_locator (
264+ args ,
265+ kwargs .pop ("call_locator" , None ),
266+ kwargs .pop ("server_call_id" , None ),
267+ kwargs .pop ("group_call_id" , None ),
268+ kwargs .pop ("room_id" , None )
269+ )
270+ connect_call_request = ConnectRequest (
271+ call_locator = call_locator ,
272+ callback_uri = kwargs .pop ("callback_url" , None ),
273+ operation_context = kwargs .pop ("operation_context" , None ),
274+ call_intelligence_options = call_intelligence_options
275+ )
276+
277+ process_repeatability_first_sent (kwargs )
278+ result = self ._client .connect (
279+ connect_request = connect_call_request ,
280+ ** kwargs
281+ )
282+
283+ return CallConnectionProperties ._from_generated (result ) # pylint:disable=protected-access
284+
171285 @distributed_trace
172286 def create_call (
173287 self ,
@@ -516,10 +630,60 @@ def start_recording(
516630 :raises ~azure.core.exceptions.HttpResponseError:
517631 """
518632
633+ @overload
634+ def start_recording (
635+ self ,
636+ * ,
637+ room_id : str ,
638+ recording_state_callback_url : Optional [str ] = None ,
639+ recording_content_type : Optional [Union [str , 'RecordingContent' ]] = None ,
640+ recording_channel_type : Optional [Union [str , 'RecordingChannel' ]] = None ,
641+ recording_format_type : Optional [Union [str , 'RecordingFormat' ]] = None ,
642+ audio_channel_participant_ordering : Optional [List ['CommunicationIdentifier' ]] = None ,
643+ channel_affinity : Optional [List ['ChannelAffinity' ]] = None ,
644+ recording_storage : Optional [Union ['AzureCommunicationsRecordingStorage' ,
645+ 'AzureBlobContainerRecordingStorage' ]] = None ,
646+ pause_on_start : Optional [bool ] = None ,
647+ ** kwargs
648+ ) -> RecordingProperties :
649+ """Start recording for a ongoing call. Locate the call with call locator.
650+ :keyword str room_id: The acs room id to locate ongoing call.
651+ :keyword recording_state_callback_url: The url to send notifications to.
652+ :paramtype recording_state_callback_url: str or None
653+ :keyword recording_content_type: The content type of call recording.
654+ :paramtype recording_content_type: str or ~azure.communication.callautomation.RecordingContent or None
655+ :keyword recording_channel_type: The channel type of call recording.
656+ :paramtype recording_channel_type: str or ~azure.communication.callautomation.RecordingChannel or None
657+ :keyword recording_format_type: The format type of call recording.
658+ :paramtype recording_format_type: str or ~azure.communication.callautomation.RecordingFormat or None
659+ :keyword audio_channel_participant_ordering:
660+ The sequential order in which audio channels are assigned to participants in the unmixed recording.
661+ When 'recordingChannelType' is set to 'unmixed' and `audioChannelParticipantOrdering is not specified,
662+ the audio channel to participant mapping will be automatically assigned based on the order in
663+ which participant first audio was detected.
664+ Channel to participant mapping details can be found in the metadata of the recording.
665+ :paramtype audio_channel_participant_ordering:
666+ list[~azure.communication.callautomation.CommunicationIdentifier] or None
667+ :keyword channel_affinity: The channel affinity of call recording
668+ When 'recordingChannelType' is set to 'unmixed', if channelAffinity is not specified,
669+ 'channel' will be automatically assigned.
670+ Channel-Participant mapping details can be found in the metadata of the recording.
671+ :paramtype channel_affinity: list[~azure.communication.callautomation.ChannelAffinity] or None
672+ :keyword recording_storage: Defines the kind of external storage. Known values are:
673+ ``AzureCommunicationsRecordingStorage`` and ``AzureBlobContainerRecordingStorage``.
674+ If no storage option is provided, the default is Azure Communications recording storage.
675+ :paramtype recording_storage: AzureCommunicationsRecordingStorage or AzureBlobContainerRecordingStorage or None
676+ :keyword pause_on_start: The state of the pause on start option.
677+ :paramtype pause_on_start: bool or None
678+ :return: RecordingProperties
679+ :rtype: ~azure.communication.callautomation.RecordingProperties
680+ :raises ~azure.core.exceptions.HttpResponseError:
681+ """
682+
519683 @distributed_trace
520684 def start_recording (
521685 self ,
522- * args : Union ['ServerCallLocator' , 'GroupCallLocator' ],
686+ * args : Union ['ServerCallLocator' , 'GroupCallLocator' , 'RoomCallLocator' ],
523687 ** kwargs
524688 ) -> RecordingProperties :
525689 # pylint:disable=protected-access
@@ -529,7 +693,8 @@ def start_recording(
529693 args ,
530694 kwargs .pop ("call_locator" , None ),
531695 kwargs .pop ("server_call_id" , None ),
532- kwargs .pop ("group_call_id" , None )
696+ kwargs .pop ("group_call_id" , None ),
697+ kwargs .pop ("room_id" , None )
533698 )
534699 external_storage = build_external_storage (kwargs .pop ("recording_storage" , None ))
535700
0 commit comments