Skip to content

Commit e84fc42

Browse files
authored
Feature/communication calling server preview (#21724)
* Small fix. * Rename audio_file_uri to audio_url * Remove validation. * rename get_participants() to list_participants() * change get_audio_routing_groups to list_audio_routing_groups * change transfer_call to transfer * Use latest swagger. * change loop to is_looped * Use kwarg for optional parameters. * Flatten options object and fix tests. * Fix left over warning in the api view. * Update description for certains apis that cause ambiguity. * Fix pylint build and remove REST model.
1 parent 684c7f0 commit e84fc42

38 files changed

+2578
-2811
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ from azure.communication.callingserver import (
122122
)
123123

124124
play_audio_result = await call_connection_async.play_audio(
125-
audio_file_uri="<audio-file-uri>",
125+
audio_url="<audio_url>",
126126
play_audio_options=PlayAudioOptions"<...>"))
127127
)
128128
```
129129

130-
- `audio_file_uri`: The uri of the audio file.
130+
- `audio_url`: The uri of the audio file.
131131
- `play_audio_options`: The playAudio options.
132132

133133
### Cancel all media operations in the call connection
@@ -164,7 +164,7 @@ call_connection = await callingserver_client.join_call(
164164

165165
- `call_locator`: The callLocator contains the call id.
166166
- `source`: The source identity which join the call.
167-
- `play_audio_options`: The joinCall options.
167+
- `join_call_options`: The joinCall options.
168168

169169
### Add participant with calllocator to the server call
170170
Once the call is establised, the `add_participant` method can be invoked:
@@ -217,13 +217,13 @@ from azure.communication.callingserver import (
217217
call_locator = ServerCallLocator("<server-call-id>")
218218
play_audio_result = await callingserver_client.play_audio(
219219
call_locator=call_locator,
220-
audio_file_uri="<audio-file-uri>",
220+
audio_url="<audio_url>",
221221
play_audio_options=PlayAudioOptions"<...>"))
222222
)
223223
```
224224

225225
- `call_locator`: The callLocator contains the call id.
226-
- `audio_file_uri`: The uri of the audio file.
226+
- `audio_url`: The uri of the audio file.
227227
- `play_audio_options`: The playAudio options.
228228

229229
### Cancel media operations with calllocator in the server call
@@ -241,7 +241,7 @@ cancel_all_media_operations_result = await call_connection_async.cancel_media_op
241241
)
242242
```
243243

244-
- `audio_file_uri`: The callLocator contains the call id.
244+
- `call_locator`: The callLocator contains the call id.
245245
- `media_operation_id`: The operationId of the media operation to cancel.
246246

247247

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

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,14 @@
99
from ._call_connection import CallConnection
1010
from ._callingserver_client import CallingServerClient
1111
from ._generated.models import (AudioRoutingMode, AddParticipantResult, CallConnectionProperties,
12-
CallRejectReason, CreateCallRequest, PhoneNumberIdentifierModel,
13-
PlayAudioRequest, PlayAudioResult, CallParticipant,
12+
CallRejectReason, PlayAudioResult, CallParticipant,
1413
CallMediaType, CallingEventSubscriptionType,
1514
CallingOperationStatus, CallConnectionStateChangedEvent,
1615
ToneReceivedEvent, ToneInfo,
17-
PlayAudioResultEvent, CommunicationIdentifierModel,
18-
CommunicationUserIdentifierModel, AddParticipantResultEvent,
16+
PlayAudioResultEvent, AddParticipantResultEvent,
1917
CallConnectionState, ToneValue, AnswerCallResult, AudioRoutingGroupResult,
20-
CreateAudioRoutingGroupResult)
18+
CreateAudioRoutingGroupResult, TransferCallResult)
2119
from ._models import (
22-
CreateCallOptions,
23-
JoinCallOptions,
24-
PlayAudioOptions,
2520
CallLocator,
2621
GroupCallLocator,
2722
ServerCallLocator,
@@ -39,16 +34,10 @@
3934
'CallingServerClient',
4035
'CommunicationIdentifier',
4136
'CommunicationUserIdentifier',
42-
'CreateCallOptions',
43-
'CreateCallRequest',
4437
'CallingEventSubscriptionType',
45-
'JoinCallOptions',
4638
'CallMediaType',
4739
'CallingOperationStatus',
4840
'PhoneNumberIdentifier',
49-
'PhoneNumberIdentifierModel',
50-
'PlayAudioOptions',
51-
'PlayAudioRequest',
5241
'PlayAudioResult',
5342
'CallLocator',
5443
'GroupCallLocator',
@@ -57,14 +46,13 @@
5746
'ToneReceivedEvent',
5847
'ToneInfo',
5948
'PlayAudioResultEvent',
60-
'CommunicationIdentifierModel',
61-
'CommunicationUserIdentifierModel',
6249
'AddParticipantResultEvent',
6350
'CallConnectionState',
6451
'ToneValue',
6552
'CallingServerEventType',
6653
'AnswerCallResult',
6754
'AudioRoutingGroupResult',
68-
'CreateAudioRoutingGroupResult'
55+
'CreateAudioRoutingGroupResult',
56+
'TransferCallResult'
6957
]
7058
__version__ = VERSION

0 commit comments

Comments
 (0)