You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Call Automation uses a REST API interface to receive requests for actions and provide responses to notify whether the request was successfully submitted or not. Because of the asynchronous nature of calling, most actions have corresponding events that are triggered when the action completes successfully or fails. This article covers the actions that are available for steering calls, like `CreateCall`, `Transfer`, and `Redirect`, and managing participants. Sample code shows how to invoke the particular action. Sequence diagrams describe the events that are expected after you invoke an action. The diagrams help you visualize how to program your service application with Call Automation.
17
+
Call Automation uses a REST API interface to receive requests for actions and provide responses to notify whether the request was successfully submitted or not. Because of the asynchronous nature of calling, most actions have corresponding events that are triggered when the action finishes successfully or fails. This article covers the actions that are available for steering calls, like `CreateCall`, `Transfer`, and `Redirect`, and managing participants. Sample code shows how to invoke the particular action. Sequence diagrams describe the events that are expected after you invoke an action. The diagrams help you visualize how to program your service application with Call Automation.
18
18
19
19
Call Automation supports other actions to manage call media and recording that have separate articles.
20
20
@@ -23,9 +23,9 @@ Call Automation supports other actions to manage call media and recording that h
23
23
- Read the Call Automation [concepts article](../../concepts/call-automation/call-automation.md#call-actions) that describes the action-event programming model and event callbacks.
24
24
- Learn about the [user identifiers](../../concepts/identifiers.md#the-communicationidentifier-type) like `CommunicationUserIdentifier` and `PhoneNumberIdentifier` that are used in this article.
25
25
26
-
For all the code samples, `client` is the `CallAutomationClient` object that you can create, as shown, and`callConnection` is the `CallConnection` object that you obtain from the `Answer` or `CreateCall` response. You can also obtain it from callback events that your application receives.
26
+
For all the code samples, `client` is the `CallAutomationClient` object that you can create, as shown. Also,`callConnection` is the `CallConnection` object that you obtain from the `Answer` or `CreateCall` response. You can also obtain it from callback events that your application receives.
@@ -58,7 +58,7 @@ When you call a public-switched telephone network (PSTN) endpoint, you also need
58
58
59
59
To place a call to an Azure Communication Services user, you need to provide a `CommunicationUserIdentifier` object instead of `PhoneNumberIdentifier`.
60
60
61
-
### [csharp](#tab/csharp)
61
+
### [C#](#tab/csharp)
62
62
63
63
```csharp
64
64
UricallbackUri=newUri("https://<myendpoint>/Events"); //the callback endpoint where you want to receive subsequent events
When you make a group call that includes a phone number, you must provide a phone number to use as a caller ID number for the PSTN endpoint.
106
106
107
-
### [csharp](#tab/csharp)
107
+
### [C#](#tab/csharp)
108
108
109
109
```csharp
110
110
UricallbackUri=newUri("https://<myendpoint>/Events"); //the callback endpoint where you want to receive subsequent events
@@ -175,7 +175,7 @@ If the call fails, you receive a `CallDisconnected` event and a `CreateCallFaile
175
175
The connect action enables your service to establish a connection with an ongoing call and take actions on it. This capability is useful to manage a Rooms call or when client applications start a 1:1 or group call in which Call Automation isn't a part. Use the `CallLocator` property to establish the connection. The type options are `ServerCallLocator`, `GroupCallLocator`, and `RoomCallLocator`. You can find these IDs when the call is originally established or a Room is created, and can also be published as part of [CallStarted](./../../../event-grid/communication-services-voice-video-events.md#microsoftcommunicationcallstarted) event.
176
176
177
177
To connect to any 1:1 or group call, use `ServerCallLocator`. If you used `GroupCallId` to start a call, you can also use `GroupCallLocator`.
178
-
### [csharp](#tab/csharp)
178
+
### [C#](#tab/csharp)
179
179
180
180
```csharp
181
181
UricallbackUri=newUri("https://<myendpoint>/Events"); //the callback endpoint where you want to receive subsequent events
To connect to a Rooms call, use `RoomCallLocator`, which takes `RoomId`. Learn more about [Rooms](./../../concepts/rooms/room-concept.md) and how you can use the Call Automation API to [manage an ongoing Rooms call](./../../quickstarts/rooms/manage-rooms-call.md).
213
213
214
-
### [csharp](#tab/csharp)
214
+
### [C#](#tab/csharp)
215
215
216
216
```csharp
217
217
UricallbackUri=newUri("https://<myendpoint>/Events"); //the callback endpoint where you want to receive subsequent events
@@ -258,7 +258,7 @@ At any point after a successful connection, if your service disconnects from thi
258
258
259
259
After you subscribe to receive [incoming call notifications](../../concepts/call-automation/incoming-call-notification.md) to your resource, you can answer an incoming call. When you answer a call, you need to provide a callback URL. Azure Communication Services posts all subsequent events about this call to that URL.
@@ -357,7 +357,7 @@ No events are published for the reject action.
357
357
358
358
You can redirect an incoming call to another endpoint without answering it. Redirecting a call removes your application's ability to control the call by using Call Automation.
To redirect the call to a phone number, construct the target and caller ID with `PhoneNumberIdentifier`.
399
399
400
-
# [csharp](#tab/csharp)
400
+
# [C#](#tab/csharp)
401
401
402
402
```csharp
403
403
varcallerIdNumber=newPhoneNumberIdentifier("+16044561234"); // This is the Azure Communication Services provisioned phone number for the caller
@@ -440,7 +440,7 @@ No events are published for redirect. If the target is an Azure Communication Se
440
440
441
441
When your application answers a call or places an outbound call to an endpoint, your app can transfer the endpoint to another destination endpoint. Transferring a 1:1 call removes your application from the call and removes its ability to control the call by using Call Automation. The call invite to the target shows the caller ID of the endpoint being transferred. Providing a custom caller ID isn't supported.
@@ -499,7 +499,7 @@ result = call_connection_client.transfer_call_to_participant(
499
499
-----
500
500
When your application answers a group call, places an outbound group call to an endpoint, or adds a participant to a 1:1 call, the app can transfer the endpoint from the call to another destination endpoint, except for the Call Automation endpoint. Transferring a participant in a group call removes the endpoint being transferred from the call. The call invite to the target shows the caller ID of the endpoint being transferred. Providing a custom caller ID isn't supported.
501
501
502
-
# [csharp](#tab/csharp)
502
+
# [C#](#tab/csharp)
503
503
504
504
```csharp
505
505
// Transfer User
@@ -640,7 +640,7 @@ The sequence diagram shows the expected flow when your application places an out
640
640
641
641
You can add a participant such as an Azure Communication Services user or a phone number to an existing call. When you add a phone number, it's mandatory to provide a caller ID. This caller ID is shown on call notification to the added participant.
642
642
643
-
# [csharp](#tab/csharp)
643
+
# [C#](#tab/csharp)
644
644
645
645
```csharp
646
646
// Add user
@@ -772,7 +772,7 @@ Next, `AddParticipant` publishes an `AddParticipantSucceeded` or `AddParticipant
772
772
773
773
## Cancel an add participant request
774
774
775
-
# [csharp](#tab/csharp)
775
+
# [C#](#tab/csharp)
776
776
777
777
```csharp
778
778
// add a participant
@@ -840,7 +840,7 @@ call_connection_client.cancel_add_participant_operation(result.invitation_id, op
@@ -894,7 +894,7 @@ result = call_connection_client.remove_participant(remove_this_user, operation_c
894
894
895
895
You can use the `hangUp` action to remove your application from the call or to terminate a group call by setting the `forEveryone` parameter to `true`. For a 1:1 call, `hangUp` terminates the call with the other participant by default.
# Control mid-call media actions with Call Automation
16
16
17
-
Call Automation uses a REST API interface to receive requests for actions and provide responses to notify whether the request was successfully submitted or not. Because of the asynchronous nature of calling, most actions have corresponding events that are triggered when the action completes successfully or fails. This article covers the actions that are available to developers during calls, like `SendDTMF` and `ContinuousDtmfRecognition`. Actions are accompanied with sample code on how to invoke the particular action.
17
+
Call Automation uses a REST API interface to receive requests for actions and provide responses to notify whether the request was successfully submitted or not. Because of the asynchronous nature of calling, most actions have corresponding events that are triggered when the action finishes successfully or fails. This article covers the actions that are available to developers during calls, like `SendDTMF` and `ContinuousDtmfRecognition`. Actions are accompanied with sample code on how to invoke the particular action.
18
18
19
19
Call Automation supports other actions to manage calls and recordings that aren't included in this article.
20
20
@@ -29,7 +29,7 @@ Call Automation supports other actions to manage calls and recordings that aren'
29
29
30
30
For all the code samples, `client` is the `CallAutomationClient` object that you can create, as shown, and `callConnection` is the `CallConnection` object that you obtain from the `Answer` or `CreateCall` response. You can also obtain it from callback events that your application receives.
31
31
32
-
### [csharp](#tab/csharp)
32
+
### [C#](#tab/csharp)
33
33
34
34
```csharp
35
35
varcallAutomationClient=newCallAutomationClient("<Azure Communication Services connection string>");
@@ -67,7 +67,7 @@ You can send dual-tone multifrequency (DTMF) tones to an external participant. T
67
67
68
68
Send a list of DTMF tones to an external participant.
69
69
70
-
### [csharp](#tab/csharp)
70
+
### [C#](#tab/csharp)
71
71
72
72
```csharp
73
73
var tones =new DtmfTone[] { DtmfTone.One, DtmfTone.Two, DtmfTone.Three, DtmfTone.Pound };
@@ -124,7 +124,7 @@ When your application sends these DTMF tones, you receive event updates. You can
124
124
125
125
An example of a `SendDtmfTonesCompleted` event:
126
126
127
-
### [csharp](#tab/csharp)
127
+
### [C#](#tab/csharp)
128
128
129
129
``` csharp
130
130
if (acsEvent is SendDtmfTonesCompleted sendDtmfCompleted)
@@ -160,7 +160,7 @@ if event.type == "Microsoft.Communication.SendDtmfTonesCompleted":
160
160
161
161
An example of a `SendDtmfTonesFailed` event:
162
162
163
-
### [csharp](#tab/csharp)
163
+
### [C#](#tab/csharp)
164
164
165
165
```csharp
166
166
if (acsEvent is SendDtmfTonesFailed sendDtmfFailed)
@@ -206,7 +206,7 @@ You can subscribe to receive continuous DTMF tones throughout the call. Your app
@@ -258,7 +258,7 @@ When your application no longer wants to receive DTMF tones from the participant
258
258
259
259
Stop detecting DTMF tones sent by a participant.
260
260
261
-
### [csharp](#tab/csharp)
261
+
### [C#](#tab/csharp)
262
262
263
263
```csharp
264
264
var continuousDtmfRecognitionOptions =newContinuousDtmfRecognitionOptions(newPhoneNumberIdentifier(callerPhonenumber))
@@ -312,7 +312,7 @@ Your application receives event updates when these actions either succeed or fai
312
312
313
313
An example of how you can handle a DTMF tone that was successfully detected.
314
314
315
-
### [csharp](#tab/csharp)
315
+
### [C#](#tab/csharp)
316
316
317
317
``` csharp
318
318
if (acsEvent is ContinuousDtmfRecognitionToneReceived continuousDtmfRecognitionToneReceived)
@@ -362,7 +362,7 @@ Azure Communication Services provides you with `SequenceId` as part of the `Cont
362
362
363
363
An example of what to do when DTMF tone detection fails.
364
364
365
-
### [csharp](#tab/csharp)
365
+
### [C#](#tab/csharp)
366
366
367
367
``` csharp
368
368
if (acsEvent is ContinuousDtmfRecognitionToneFailed continuousDtmfRecognitionToneFailed)
@@ -407,7 +407,7 @@ if event.type == "Microsoft.Communication.ContinuousDtmfRecognitionToneFailed":
407
407
408
408
An example of what to do when continuous DTMF recognition stops. Maybe your application invoked the `StopContinuousDtmfRecognitionAsync` event or the call ended.
409
409
410
-
### [csharp](#tab/csharp)
410
+
### [C#](#tab/csharp)
411
411
412
412
``` csharp
413
413
if (acsEvent is ContinuousDtmfRecognitionStopped continuousDtmfRecognitionStopped)
@@ -445,7 +445,7 @@ if event.type == "Microsoft.Communication.ContinuousDtmfRecognitionStopped":
445
445
446
446
The hold action allows developers to temporarily pause a conversation between a participant and a system or agent. This capability is useful in scenarios where the participant needs to be transferred to another agent or department or when the agent needs to consult a supervisor before continuing the conversation. During this time, you can choose to play audio to the participant who is on hold.
The unhold action allows developers to resume a conversation between a participant and a system or agent that was previously paused. When the participant is taken off hold, they can hear the system or agent again.
526
526
527
-
### [csharp](#tab/csharp)
527
+
### [C#](#tab/csharp)
528
528
529
529
``` csharp
530
530
var unHoldOptions =newUnholdOptions(target)
@@ -541,7 +541,7 @@ var UnHoldParticipant = await callMedia.UnholdAsync(target);
Copy file name to clipboardExpand all lines: articles/communication-services/how-tos/call-automation/includes/secure-webhook-endpoint-csharp.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ ms.author: richardcho
15
15
16
16
Each mid-call webhook callback sent by Call Automation uses a signed JSON Web Token (JWT) in the Authentication header of the inbound HTTPS request. You can use standard OpenID Connect (OIDC) JWT validation techniques to ensure the integrity of the token. The lifetime of the JWT is five minutes, and a new token is created for every event sent to the callback URI.
17
17
18
-
1. Obtain the OpenID configuration URL: <https://acscallautomation.communication.azure.com/calling/.well-known/acsopenidconfiguration>
18
+
1. Obtain the OpenID configuration URL: `<https://acscallautomation.communication.azure.com/calling/.well-known/acsopenidconfiguration>`
19
19
1. Install the [Microsoft.AspNetCore.Authentication.JwtBearer NuGet](https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.JwtBearer) package.
20
20
1. Configure your application to validate the JWT by using the NuGet package and the configuration of your Azure Communication Services resource. You need the `audience` value as it appears in the JWT payload.
21
21
1. Validate the issuer, the audience, and the JWT:
Copy file name to clipboardExpand all lines: articles/communication-services/how-tos/call-automation/includes/secure-webhook-endpoint-java.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ ms.author: richardcho
15
15
16
16
Each mid-call webhook callback sent by Call Automation uses a signed JSON Web Token (JWT) in the Authentication header of the inbound HTTPS request. You can use standard OpenID Connect (OIDC) JWT validation techniques to ensure the integrity of the token. The lifetime of the JWT is five minutes, and a new token is created for every event sent to the callback URI.
17
17
18
-
1. Obtain the OpenID configuration URL: <https://acscallautomation.communication.azure.com/calling/.well-known/acsopenidconfiguration>
18
+
1. Obtain the OpenID configuration URL: `<https://acscallautomation.communication.azure.com/calling/.well-known/acsopenidconfiguration>`
19
19
1. The following sample uses the Spring framework, which is created by using [spring initializr](https://start.spring.io/) with Maven as the project build tool.
20
20
1. Add the following dependencies in your `pom.xml`:
Copy file name to clipboardExpand all lines: articles/communication-services/how-tos/call-automation/includes/secure-webhook-endpoint-javascript.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ ms.author: richardcho
15
15
16
16
Each mid-call webhook callback sent by Call Automation uses a signed JSON Web Token (JWT) in the Authentication header of the inbound HTTPS request. You can use standard OpenID Connect (OIDC) JWT validation techniques to ensure the integrity of the token. The lifetime of the JWT is five minutes, and a new token is created for every event sent to the callback URI.
17
17
18
-
1. Obtain the OpenID configuration URL: <https://acscallautomation.communication.azure.com/calling/.well-known/acsopenidconfiguration>
18
+
1. Obtain the OpenID configuration URL: `<https://acscallautomation.communication.azure.com/calling/.well-known/acsopenidconfiguration>`
0 commit comments