@@ -85,7 +85,7 @@ CreateCallResult response = await client.GetCallConnection(callConnectionId).Add
85
85
86
86
``` java
87
87
PhoneNumberIdentifier callerIdNumber = new PhoneNumberIdentifier (" +16044561234" ); // This is the ACS-provisioned phone number for the caller
88
- CallInvite callInvite = new CallInvite (new PhoneNumberIdentifier (" +16041234567" ), callerIdNumber);
88
+ CallInvite callInvite = new CallInvite (new PhoneNumberIdentifier (" +16041234567" ), callerIdNumber); // The phone number participant to dial out to
89
89
AddParticipantOptions addParticipantOptions = new AddParticipantOptions (callInvite);
90
90
Response<AddParticipantResult > addParticipantResultResponse = client. getCallConnectionAsync(callConnectionId)
91
91
.addParticipantWithResponse(addParticipantOptions). block();
@@ -95,7 +95,7 @@ Response<AddParticipantResult> addParticipantResultResponse = client.getCallConn
95
95
96
96
``` javascript
97
97
const callInvite = {
98
- targetParticipant: { phoneNumber: " +18008008800" }, // The target phone number to dial out to
98
+ targetParticipant: { phoneNumber: " +18008008800" }, // The phone number participant to dial out to
99
99
sourceCallIdNumber: { phoneNumber: " +18888888888" } // This is the ACS-provisioned phone number for the caller
100
100
};
101
101
const response = await client .getCallConnection (callConnectionId).addParticipant (callInvite);
@@ -107,7 +107,7 @@ const response = await client.getCallConnection(callConnectionId).addParticipant
107
107
caller_id_number = PhoneNumberIdentifier(
108
108
" +18888888888"
109
109
) # TThis is the ACS-provisioned phone number for the caller
110
- target = PhoneNumberIdentifier(" +18008008800" ),
110
+ target = PhoneNumberIdentifier(" +18008008800" ), # The phone number participant to dial out to
111
111
112
112
call_connection_client = call_automation_client.get_call_connection(
113
113
" call_connection_id"
@@ -132,7 +132,7 @@ var removeThisUser = new PhoneNumberIdentifier("+16044561234");
132
132
var removeParticipantOptions = new RemoveParticipantOptions (removeThisUser )
133
133
{
134
134
OperationContext = " operationContext" ,
135
- OperationCallbackUri = new Uri (" uri_endpoint" ); // Sending event to a non-default endpoint.
135
+ OperationCallbackUri = new Uri (" uri_endpoint" ); // Sending event to a non-default endpoint
136
136
}
137
137
138
138
RemoveParticipantsResult result = await client .GetCallConnection (callConnectionId ).RemoveParticipantAsync (removeParticipantOptions );
@@ -235,15 +235,15 @@ StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCal
235
235
Response < RecordingStateResult > response = await callAutomationClient .GetCallRecording ()
236
236
.StartAsync (recordingOptions );
237
237
238
- // Stop recording using recordingId received in response of start recording.
239
- var stopRecording = await callAutomationClient .GetCallRecording ().StopAsync (recordingId );
240
-
241
238
// Pause recording using recordingId received in response of start recording.
242
239
var pauseRecording = await callAutomationClient .GetCallRecording ().PauseAsync (recordingId );
243
240
244
241
// Resume recording using recordingId received in response of start recording.
245
242
var resumeRecording = await callAutomationClient .GetCallRecording ().ResumeAsync (recordingId );
246
243
244
+ // Stop recording using recordingId received in response of start recording.
245
+ var stopRecording = await callAutomationClient .GetCallRecording ().StopAsync (recordingId );
246
+
247
247
```
248
248
### [ Java] ( #tab/java )
249
249
``` java
@@ -257,10 +257,6 @@ StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCal
257
257
Response<RecordingStateResult > response = callAutomationClient. getCallRecording()
258
258
.startWithResponse(recordingOptions, null );
259
259
260
- // Stop recording using recordingId received in response of start recording
261
- Response<Void > response = callAutomationClient. getCallRecording()
262
- .stopWithResponse(recordingId, null );
263
-
264
260
// Pause recording using recordingId received in response of start recording
265
261
Response<Void > response = callAutomationClient. getCallRecording()
266
262
.pauseWithResponse(recordingId, null );
@@ -269,6 +265,10 @@ Response<Void> response = callAutomationClient.getCallRecording()
269
265
Response<Void > response = callAutomationClient. getCallRecording()
270
266
.resumeWithResponse(recordingId, null );
271
267
268
+ // Stop recording using recordingId received in response of start recording
269
+ Response<Void > response = callAutomationClient. getCallRecording()
270
+ .stopWithResponse(recordingId, null );
271
+
272
272
```
273
273
### [ JavaScript] ( #tab/javascript )
274
274
``` javascript
@@ -285,15 +285,15 @@ var options: StartRecordingOptions =
285
285
};
286
286
var response = await callAutomationClient .getCallRecording ().start (options);
287
287
288
- // Stop recording using recordingId received in response of start recording
289
- var stopRecording = await callAutomationClient .getCallRecording ().stop (recordingId);
290
-
291
288
// Pause recording using recordingId received in response of start recording
292
289
var pauseRecording = await callAutomationClient .getCallRecording ().pause (recordingId);
293
290
294
291
// Resume recording using recordingId received in response of start recording.
295
292
var resumeRecording = await callAutomationClient .getCallRecording ().resume (recordingId);
296
293
294
+ // Stop recording using recordingId received in response of start recording
295
+ var stopRecording = await callAutomationClient .getCallRecording ().stop (recordingId);
296
+
297
297
```
298
298
### [ Python] ( #tab/python )
299
299
``` python
@@ -304,19 +304,17 @@ response = call_automation_client.start_recording(call_locator=ServerCallLocator
304
304
recording_format_type = RecordingFormat.Wav,
305
305
recording_state_callback_url = " <CallbackUri>" )
306
306
307
- # Stop recording using recording_id received in response of start recording
308
- stop_recording = call_automation_client.stop_recording(recording_id = recording_id)
309
-
310
307
# Pause recording using recording_id received in response of start recording
311
308
pause_recording = call_automation_client.pause_recording(recording_id = recording_id)
312
309
313
310
# Resume recording using recording_id received in response of start recording
314
311
resume_recording = call_automation_client.resume_recording(recording_id = recording_id)
312
+
313
+ # Stop recording using recording_id received in response of start recording
314
+ stop_recording = call_automation_client.stop_recording(recording_id = recording_id)
315
315
```
316
316
-----
317
317
318
-
319
-
320
318
### Terminate a Call
321
319
You can use the Call Automation SDK Hang Up action to terminate a call. When the Hang Up action completes, the SDK publishes a ` CallDisconnected ` event.
322
320
0 commit comments