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
Copy file name to clipboardExpand all lines: articles/communication-services/how-tos/call-automation/handle-events-with-event-processor.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ By using event processor features, you can easily build robust applications that
31
31
The Call Automation event processor first needs to consume events that were sent from the service. After the event arrives at the callback endpoint, pass the event to the event processor.
32
32
33
33
> [!IMPORTANT]
34
-
> Have you established a webhook callback events endpoint? The event processor still needs to consume callback events through a webhook callback. For information on how to establish webhook endpoints, see [Quickstart: Make an outbound call by using Call Automation](../../quickstarts/call-automation/quickstart-make-an-outbound-call.md).
34
+
> Have you established a webhook callback events endpoint? The event processor still needs to consume callback events through a webhook callback. For information on how to establish webhook endpoints, see [Make an outbound call by using Call Automation](../../quickstarts/call-automation/quickstart-make-an-outbound-call.md).
35
35
36
36
```csharp
37
37
usingAzure.Communication.CallAutomation;
@@ -79,14 +79,14 @@ With the event processor, you can easily wait for the `CallConnected` event unti
79
79
Now that the call is established, try to play some audio in the call, and then wait until the media plays.
> The event processor uses `OperationContext` to track an event with its related request. If `OperationContext` wasn't set during the request, the event processor sets generated GUID to track future events to the request. If you set your own `OperationContext` during the request, the event processor still works, but we recommend that you set them differently from request to request. In this way, the event processor can distinguish the first request's event and the second request's event.
103
+
> The event processor uses `OperationContext` to track an event with its related request. If `OperationContext` wasn't set during the request, the event processor sets generated GUID to track future events to the request. If you set `OperationContext` during the request, the event processor still works, but we recommend that you set them differently from request to request. In this way, the event processor can distinguish the first request's event and the second request's event.
With this specific ongoing event processor, you can now print the number or participants or the participants on the call whenever people join or leave the call.
120
+
With this specific ongoing event processor, you can now print the number of participants or the participants on the call whenever people join or leave the call.
121
121
122
122
> [!TIP]
123
123
> You can attach an ongoing handler to any event type. This capability opens the possibility to build your application with a callback design pattern.
Copy file name to clipboardExpand all lines: articles/communication-services/samples/call-automation-ai.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: Call Automation AI sample
2
+
title: Call Automation AI Sample
3
3
titleSuffix: An Azure Communication Services sample overview
4
-
description: Overview of Call Automation AI hero sample using Azure Communication Services to enable developers to learn how to incorporate AI into their workflows.
4
+
description: This Call Automation AI hero sample that uses Azure Communication Services enables developers to learn how to incorporate AI into their workflows.
# Get started with the Azure Communication Services Call Automation OpenAI sample
18
18
19
-
The Azure Communication Services Call Automation OpenAI sample demonstrates how you can use Call Automation SDK and the recently announced public preview integration with Azure AI services to build intelligent virtual assistants.
20
-
21
-
22
-
In this sample, we'll cover off what this sample does and what you need as pre-requisites before we run this sample locally on your machine.
19
+
The Azure Communication Services Call Automation OpenAI sample demonstrates how you can use the Call Automation SDK and the recently announced public preview integration with Azure AI services to build intelligent virtual assistants.
23
20
21
+
In this article, we cover what this sample does and what you need as prerequisites before we run this sample locally on your machine.
24
22
25
23
::: zone pivot="programming-language-csharp"
26
24
[!INCLUDE [Azure Communication Services Call Automation OpenAI C# sample](./includes/call-automation-ai-csharp.md)]
Copy file name to clipboardExpand all lines: articles/communication-services/samples/call-automation-azure-openai-sample.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: Call Automation AI sample
2
+
title: Call Automation AI Sample
3
3
titleSuffix: An Azure Communication Services sample showing how to integrate with Azure OpenAI
4
-
description: Overview of Call Automation sample using Azure Communication Services to enable developers to learn how to incorporate Azure OpenAI voice model into their workflows.
4
+
description: This Call Automation sample that uses Azure Communication Services shows developers how to incorporate an Azure OpenAI voice model into their workflows.
This sample application was demonstrated during Microsoft Ignite 2024. It highlights an integration of Azure Communication Services with Azure OpenAI Service to enable intelligent conversational agents.
18
+
This sample application was demonstrated during Microsoft Ignite 2024. It highlights the integration of Azure Communication Services with Azure OpenAI to enable intelligent conversational agents.
19
19
20
-
In this sample, we cover off what this sample does and what you need as prerequisites before we run this sample locally on your machine.
20
+
In this article, we cover what this sample does and what you need as prerequisites before we run the sample locally on your machine.
21
21
22
22
::: zone pivot="programming-language-csharp"
23
23
[!INCLUDE [Azure Communication Services Call Automation Azure OpenAI C# sample](./includes/call-automation-azure-openai-csharp.md)]
Find the project for this sample on [GitHub](https://github.com/Azure-Samples/communication-services-dotnet-quickstarts/tree/main/callautomation-openai-sample-csharp). You can download this code and run it locally to try it for yourself.
14
+
## Download code
16
15
17
-
## Overview
16
+
Find the project for this sample on [GitHub](https://github.com/Azure-Samples/communication-services-dotnet-quickstarts/tree/main/callautomation-openai-sample-csharp). You can download this code and run it locally to try it for yourself.
18
17
19
-
This sample is a server-side application that helps you create a virtual assistant capable of handling calls using Call Automation and responding to customers using the newly announced integration with Azure AI services to provide AI capabilities such as Text-to-Speech and Speech-to-Text along with smart responses provided by Azure OpenAI.
18
+
## Overview
20
19
21
-
This Azure Communication Services Call Automation AI sample demonstrates how to use the Call Automation SDK to answer an inbound call, recognizes user voice input using Call Automation recognize API with support for Speech-to-Text. Once input is recognized, it sends that information to OpenAI for an answer and plays the answer provided back by OpenAI to the caller using Call Automation play API with support for Text-to-Speech.
20
+
This sample is a server-side application that helps you create a virtual assistant that can handle calls by using Call Automation. The virtual assistant responds to customers by using the newly announced integration with Azure AI services to provide AI capabilities such as text to speech and speech to text, along with smart responses provided by Azure OpenAI.
22
21
23
-
## Prerequisites
22
+
This Azure Communication Services Call Automation AI sample demonstrates how to use the Call Automation SDK to answer an inbound call. It recognizes user voice input by using Call Automation to recognize the API with support for speech to text. When the system recognizes the input, it sends that information to OpenAI for an answer. It uses the Call Automation Play API with support for text to speech to play back the answer provided by OpenAI to the caller.
24
23
25
-
- Create an Azure account with an active subscription. For details, see [Create an account for free](https://azure.microsoft.com/free/)
26
-
- Create an Azure Communication Services resource. For details, see [Create an Azure Communication Resource](../../quickstarts/create-communication-resource.md?tabs=windows&pivots=platform-azp). You need to record your resource **connection string** for this sample.
27
-
- A Calling-enabled telephone number. [Get a phone number](../../quickstarts/telephony/get-phone-number.md).
28
-
- Azure Dev Tunnels CLI. For details, see [Enable dev tunnel](/azure/developer/dev-tunnels/get-started)
29
-
- Create an Azure AI services resource. For details, see [Create an Azure AI services Resource](/azure/ai-services/multi-service-resource)
30
-
- An Azure OpenAI Resource and Deployed Model. See [instructions](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal).
24
+
## Prerequisites
31
25
26
+
- An Azure account with an active subscription. For more information, see [Create an account for free](https://azure.microsoft.com/free/).
27
+
- An Azure Communication Services resource. For more information, see [Create an Azure Communication Services resource](../../quickstarts/create-communication-resource.md?tabs=windows&pivots=platform-azp). You need to record your resource *connection string* for this sample.
28
+
- A calling-enabled telephone number. For more information, see [Get a phone number](../../quickstarts/telephony/get-phone-number.md).
29
+
- The Azure dev tunnel CLI. For more information, see [Enable dev tunnels](/azure/developer/dev-tunnels/get-started).
30
+
- An Azure AI services resource. For more information, see [Create an Azure AI services resource](/azure/ai-services/multi-service-resource).
31
+
- An Azure OpenAI resource and deployed model. For more information, see [Create an Azure OpenAI resource and deploy a model](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal).
32
32
33
33
## Setup instructions
34
34
35
-
Before running this sample, you need to set up the resources mentioned in the 'Prerequisites' section with the following configuration updates:
35
+
Before you run this sample, you need to set up the resources mentioned in the preceding section with the following configuration updates.
36
36
37
-
#####1. Setup and host your Azure DevTunnel
37
+
#### 1. Set up and host your dev tunnel
38
38
39
-
[Azure DevTunnels](/azure/developer/dev-tunnels/overview) is an Azure service that enables you to share local web services hosted on the internet. Use the commands below to connect your local development environment to the public internet. This creates a tunnel with a persistent endpoint URL and which allows anonymous access. We'll then use this endpoint to notify your application of calling events from the Azure Communication Services Call Automation service.
39
+
With [dev tunnels](/azure/developer/dev-tunnels/overview), you can share local web services that are hosted on the internet. Use the following commands to connect your local development environment to the public internet. This process creates a tunnel with a persistent endpoint URL and allows anonymous access. Weuse this endpoint to notify your application of calling events from Call Automation.
##### 2. Add a Managed Identity to the Azure Communication Services Resource that connects to the Azure AI services resource
50
-
Follow the instructions in this [documentation](/azure/communication-services/concepts/call-automation/azure-communication-services-azure-cognitive-services-integration).
49
+
#### 2. Add a managed identity to the Azure Communication Services resource that connects to the Azure AI services resource
51
50
52
-
##### 3. Add the required API Keys and endpoints
53
-
Open the appsettings.json file to configure the following settings:
51
+
Follow the instructions in [Connect Azure Communication Services with Azure AI services](/azure/communication-services/concepts/call-automation/azure-communication-services-azure-cognitive-services-integration).
54
52
55
-
-`DevTunnelUri`: your dev tunnel endpoint
56
-
-`CognitiveServiceEndpoint`: The Azure AI services endpoint
57
-
-`AcsConnectionString`: Azure Communication Service resource's connection string.
58
-
-`AzureOpenAIServiceKey`: Azure OpenAI Service Key
59
-
-`AzureOpenAIServiceEndpoint`: Azure OpenAI Service Endpoint
60
-
-`AzureOpenAIDeploymentModelName`: Azure OpenAI Model name
53
+
#### 3. Add the required API keys and endpoints
54
+
55
+
Open the appsettings.json file to configure the following settings:
61
56
57
+
-`DevTunnelUri`: Your dev tunnel endpoint.
58
+
-`CognitiveServiceEndpoint`: Azure AI services endpoint.
59
+
-`AcsConnectionString`: Azure Communication Services resource connection string.
60
+
-`AzureOpenAIServiceKey`: Azure OpenAI service key.
61
+
-`AzureOpenAIServiceEndpoint`: Azure OpenAI service endpoint.
62
+
-`AzureOpenAIDeploymentModelName`: Azure OpenAI model name.
62
63
63
64
## Run the application
64
65
65
-
1.Azure DevTunnel: Ensure your AzureDevTunnel URI is active and points to the correct port of your localhost application
66
-
2. Run `dotnet run` to build and run the sample application
67
-
3. Register an Event Grid Webhook for the IncomingCall Event that points to your DevTunnel URI. Instructions [here](/azure/communication-services/concepts/call-automation/incoming-call-notification).
66
+
1. Ensure that your `AzureDevTunnel` URI is active and points to the correct port of your local host application.
67
+
1. Run `dotnet run` to build and run the sample application.
68
+
1. Register an Azure Event Grid webhook for the `IncomingCall` event that points to your `DevTunnel` URI. For more information, see [Incoming call concepts](/azure/communication-services/concepts/call-automation/incoming-call-notification).
68
69
70
+
Now you have a running application. The best way to test this sample is to place a call to your Azure Communication Services phone number and talk to your intelligent agent.
69
71
70
-
Once that's completed, you should have a running application. The best way to test this sample is to place a call to your Azure Communication Services phone number and talk to your intelligent agent.
72
+
## Related content
71
73
72
-
## Next steps
73
74
- Learn more about [Call Automation](../../concepts/call-automation/call-automation.md).
74
75
- Learn more about [playing custom messages](../../how-tos/call-automation/play-action.md).
75
76
- Learn more about [recognizing user input](../../how-tos/call-automation/recognize-action.md).
0 commit comments