Skip to content

Commit 1efb226

Browse files
authored
Merge pull request #283553 from MicrosoftDocs/main
Publish to live, Sunday 4:00PM PDT, 08/04
2 parents 36cbd12 + d43bd03 commit 1efb226

File tree

129 files changed

+2480
-1312
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+2480
-1312
lines changed

articles/azure-monitor/app/azure-ad-authentication.md

Lines changed: 7 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The following Software Development Kits (SDKs) and features are unsupported for
6767
Application Insights .NET SDK supports the credential classes provided by [Azure Identity](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/identity/Azure.Identity#credential-classes).
6868

6969
- We recommend `DefaultAzureCredential` for local development.
70-
- Ensure you're authenticated on Visual Studio with the expected Azure user account. For more information, see [Authenticate via Visual Studio](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/identity/Azure.Identity#authenticate-via-visual-studio).
70+
- Authenticate on Visual Studio with the expected Azure user account. For more information, see [Authenticate via Visual Studio](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/identity/Azure.Identity#authenticate-via-visual-studio).
7171
- We recommend `ManagedIdentityCredential` for system-assigned and user-assigned managed identities.
7272
- For system-assigned, use the default constructor without parameters.
7373
- For user-assigned, provide the client ID to the constructor.
@@ -126,7 +126,7 @@ useAzureMonitor(options);
126126
> [!NOTE]
127127
> Support for Microsoft Entra ID in the Application Insights Node.JS is included starting with [version 2.1.0-beta.1](https://www.npmjs.com/package/applicationinsights/v/2.1.0-beta.1).
128128
129-
If using applicationinsights npm package.
129+
If using `applicationinsights` npm package.
130130
```typescript
131131
const appInsights = require("applicationinsights");
132132
const { DefaultAzureCredential } = require("@azure/identity");
@@ -139,7 +139,7 @@ appInsights.defaultClient.config.aadTokenCredential = credential;
139139

140140
#### Environment variable configuration
141141

142-
When using [Azure App Services autoinstrumentation](./azure-web-apps-nodejs.md) The `APPLICATIONINSIGHTS_AUTHENTICATION_STRING` environment variable lets Application Insights authenticate to Microsoft Entra ID and send telemetry.
142+
Use the `APPLICATIONINSIGHTS_AUTHENTICATION_STRING` environment variable to let Application Insights authenticate to Microsoft Entra ID and send telemetry when using [Azure App Services autoinstrumentation](./azure-web-apps-nodejs.md).
143143

144144
- For system-assigned identity:
145145

@@ -233,52 +233,9 @@ After setting it, restart your application. It now sends telemetry to Applicatio
233233

234234
### [Python](#tab/python)
235235

236-
> [!NOTE]
237-
> Microsoft Entra authentication is only available for Python v2.7, v3.6, and v3.7. Support for Microsoft Entra ID in the Application Insights OpenCensus Python SDK
238-
is included starting with beta version [opencensus-ext-azure 1.1b0](https://pypi.org/project/opencensus-ext-azure/1.1b0/).
239-
240-
> [!NOTE]
241-
> [OpenCensus Python SDK is deprecated](https://opentelemetry.io/blog/2023/sunsetting-opencensus/), but Microsoft supports it until retirement on September 30, 2024. We now recommend the [OpenTelemetry-based Python offering](./opentelemetry-enable.md?tabs=python) and provide [migration guidance](./opentelemetry-python-opencensus-migrate.md?tabs=aspnetcore).
242-
243-
Construct the appropriate [credentials](/python/api/overview/azure/identity-readme#credentials) and pass them into the constructor of the Azure Monitor exporter. Make sure your connection string is set up with the instrumentation key and ingestion endpoint of your resource.
244-
245-
The `OpenCensus` Azure Monitor exporters support these authentication types. We recommend using managed identities in production environments.
246-
247-
#### System-assigned managed identity
248-
249-
```python
250-
from azure.identity import ManagedIdentityCredential
251-
252-
from opencensus.ext.azure.trace_exporter import AzureExporter
253-
from opencensus.trace.samplers import ProbabilitySampler
254-
from opencensus.trace.tracer import Tracer
236+
To configure a secure connection to Azure using OpenTelemetry, see [Enable Microsoft Entra ID (formerly Azure AD) authentication](./opentelemetry-configuration.md?tabs=python#enable-microsoft-entra-id-formerly-azure-ad-authentication).
255237

256-
credential = ManagedIdentityCredential()
257-
tracer = Tracer(
258-
exporter=AzureExporter(credential=credential, connection_string="InstrumentationKey=<your-instrumentation-key>;IngestionEndpoint=<your-ingestion-endpoint>"),
259-
sampler=ProbabilitySampler(1.0)
260-
)
261-
...
262-
263-
```
264-
265-
#### User-assigned managed identity
266-
267-
```python
268-
from azure.identity import ManagedIdentityCredential
269-
270-
from opencensus.ext.azure.trace_exporter import AzureExporter
271-
from opencensus.trace.samplers import ProbabilitySampler
272-
from opencensus.trace.tracer import Tracer
273-
274-
credential = ManagedIdentityCredential(client_id="<client-id>")
275-
tracer = Tracer(
276-
exporter=AzureExporter(credential=credential, connection_string="InstrumentationKey=<your-instrumentation-key>;IngestionEndpoint=<your-ingestion-endpoint>"),
277-
sampler=ProbabilitySampler(1.0)
278-
)
279-
...
280-
281-
```
238+
To configure using OpenCensus (deprecated), see [Configure and enable Microsoft Entra ID-based authentication](/previous-versions/azure/azure-monitor/app/opencensus-python#configure-and-enable-microsoft-entra-id-based-authentication).
282239

283240
---
284241

@@ -629,7 +586,7 @@ The main OAuth2 flow supported is through [authorization codes](/azure/active-di
629586
&resource=https://api.applicationinsights.io
630587
```
631588

632-
When a request is made to the authorized URL, the client\_id is the application ID from your Microsoft Entra app, copied from the app's properties menu. The redirect\_uri is the homepage/login URL from the same Microsoft Entra app. When a request is successful, this endpoint redirects you to the sign-in page you provided at sign-up with the authorization code appended to the URL. See the following example:
589+
When a request is made to the authorized URL, the `client\_id` is the application ID from your Microsoft Entra app, copied from the app's properties menu. The `redirect\_uri` is the `homepage/login` URL from the same Microsoft Entra app. When a request is successful, this endpoint redirects you to the sign-in page you provided at sign-up with the authorization code appended to the URL. See the following example:
633590

634591
```http
635592
http://<app-client-id>/?code=AUTHORIZATION_CODE&session_state=STATE_GUID
@@ -907,7 +864,7 @@ If the SDK fails to get a token, the exception message is logged as
907864

908865
### [Node.js](#tab/nodejs)
909866

910-
Internal logs could be turned on by using the following setup. After they're enabled, error logs will be shown in the console, including any error related to Microsoft Entra integration. Examples include failure to generate the token when the wrong credentials are supplied or errors when the ingestion endpoint fails to authenticate by using the provided credentials.
867+
Turn on internal logs by using the following setup. After you enable them, the console shows error logs, including any error related to Microsoft Entra integration. Examples include failing to generate the token with the wrong credentials or errors when the ingestion endpoint fails to authenticate using the provided credentials.
911868

912869
```javascript
913870
let appInsights = require("applicationinsights");
154 KB
Loading
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Generate real-time transcripts
3+
titleSuffix: An Azure Communication Services concept document
4+
description: Provides an overview of what real-time transcription is
5+
author: kunaal
6+
ms.service: azure-communication-services
7+
ms.subservice: call-automation
8+
ms.topic: include
9+
ms.date: 07/16/2024
10+
ms.author: kpunjabi
11+
services: azure-communication-services
12+
---
13+
14+
# Generating real-time transcripts
15+
[!INCLUDE [Public Preview Disclaimer](../../includes/public-preview-include-document.md)]
16+
17+
Real-time transcriptions are a crucial component in any major business for driving improved customer service experience. Powered by Azure Communication Services and Azure AI Services integration, developers can now use real-time transcriptions through Call Automation SDKs.
18+
19+
Using the Azure Communication Services real-time transcription, you can easily integrate your Azure AI Services resource with Azure Communication Services to generate transcripts directly during the call. This eliminates the need for developers to extract audio content and deal with the overhead of converting audio into text on your side. You can store the contents of this transcript to use later on for creating a history of the call, summarizing the call to save an agent's time, and even feeding it into your training/learning modules to help improve your contact center agents' customer interactions.
20+
21+
Out of the box Microsoft utilizes a Universal Language Model as a base model that is trained with Microsoft-owned data and reflects commonly used spoken language. This model is pretrained with dialects and phonetics representing various common domains. For more information about supported languages, see [Languages and voice support for the Speech service](../../../../articles/ai-services/speech-service/language-support.md).
22+
23+
## Common use cases
24+
25+
### Improved customer experience
26+
Assist agents better understand customer needs and respond more quickly and accurately, leading to a better overall customer experience.
27+
28+
### Increased efficency
29+
Help agents focus on the conversation rather than note-taking, allowing them to handle more calls and improve productivity
30+
31+
### Context for agents
32+
Provide context to an agent before the agent picks up the call, this way the agent knows the information that the caller has provided avoiding any need for the caller to repeat their issue.
33+
34+
### Derive insights
35+
Using the transcript generated throughout the call, you can leverage other AI tools to gain live, real-time insights that will help agents and supervisors improve their interactions with customers.
36+
37+
## Sample flow of real-time transcription using Call Automation
38+
![Diagram of real-time transcription flow.](./media/transcription.png)
39+
40+
## Next Steps
41+
- Check out our how-to guide to learn [how-to use our Real-time Transcription](../../how-tos/call-automation/real-time-transcription-tutorial.md) to users.
42+
- Learn about [usage and operational logs](../analytics/logs/call-automation-logs.md) published by call automation.
43+

articles/communication-services/how-tos/call-automation/control-mid-call-media-actions.md

Lines changed: 132 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: kunaal
66
ms.topic: how-to
77
ms.service: azure-communication-services
88
ms.subservice: call-automation
9-
ms.date: 11/16/2023
9+
ms.date: 07/16/2024
1010
ms.author: kpunjabi
1111
ms.custom: public_preview
1212
services: azure-communication-services
@@ -356,3 +356,134 @@ if event.type == "Microsoft.Communication.ContinuousDtmfRecognitionStopped":
356356
app.logger.info("Tone stoped: context=%s", event.data["operationContext"])
357357
```
358358
-----
359+
360+
### Hold
361+
The hold action allows developers to temporarily pause a conversation between a participant and a system or agent. This can be useful in scenarios where the participant needs to be transferred to another agent or department or when the agent needs to consult a supervisor in the background before continuing the conversation. During this time you can choose to play audio to the participant that is on hold.
362+
363+
### [csharp](#tab/csharp)
364+
```csharp
365+
// Option 1: Hold without additional options
366+
await callAutomationClient.GetCallConnection(callConnectionId)
367+
.GetCallMedia().HoldAsync(c2Target);
368+
369+
/*
370+
// Option 2: Hold with play source
371+
PlaySource playSource = /* initialize playSource */;
372+
await callAutomationClient.GetCallConnection(callConnectionId)
373+
.GetCallMedia().HoldAsync(c2Target, playSource);
374+
375+
// Option 3: Hold with options
376+
var holdOptions = new HoldOptions(target)
377+
{
378+
OperationCallbackUri = new Uri(""),
379+
OperationContext = "holdcontext"
380+
};
381+
await callMedia.HoldAsync(holdOptions);
382+
*/
383+
```
384+
385+
### [java](#tab/java)
386+
```java
387+
// Option 1: Hold with options
388+
PlaySource playSource = /* initialize playSource */;
389+
HoldOptions holdOptions = new HoldOptions(target)
390+
.setOperationCallbackUrl(appConfig.getBasecallbackuri())
391+
.setPlaySource(playSource)
392+
.setOperationContext("holdPstnParticipant");
393+
394+
client.getCallConnection(callConnectionId).getCallMedia().holdWithResponse(holdOptions, Context.NONE);
395+
396+
/*
397+
// Option 2: Hold without additional options
398+
client.getCallConnection(callConnectionId).getCallMedia().hold(target);
399+
*/
400+
```
401+
402+
### [JavaScript](#tab/javascript)
403+
```javascript
404+
// Option 1: Hold with options
405+
const options = {
406+
playSource: playSource,
407+
operationContext: "holdUserContext",
408+
operationCallbackUrl: "URL" // replace with actual callback URL
409+
};
410+
await callMedia.hold(targetuser, options);
411+
412+
/*
413+
// Option 2: Hold without additional options
414+
await callMedia.hold(targetuser);
415+
*/
416+
```
417+
418+
### [Python](#tab/python)
419+
```python
420+
# Option 1: Hold without additional options
421+
call_connection_client.hold(target_participant=PhoneNumberIdentifier(TARGET_PHONE_NUMBER))
422+
423+
'''
424+
# Option 2: Hold with options
425+
call_connection_client.hold(
426+
target_participant=PhoneNumberIdentifier(TARGET_PHONE_NUMBER),
427+
play_source=play_source,
428+
operation_context="holdUserContext",
429+
operation_callback_url="URL" # replace with actual callback URL
430+
)
431+
'''
432+
```
433+
-----
434+
### Unhold
435+
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 will be able to hear the system or agent again.
436+
437+
### [csharp](#tab/csharp)
438+
``` csharp
439+
var unHoldOptions = new UnholdOptions(target)
440+
{
441+
OperationContext = "UnHoldPstnParticipant"
442+
};
443+
444+
// Option 1
445+
var UnHoldParticipant = await callMedia.UnholdAsync(unHoldOptions);
446+
447+
/*
448+
// Option 2
449+
var UnHoldParticipant = await callMedia.UnholdAsync(target);
450+
*/
451+
```
452+
453+
### [java](#tab/java)
454+
``` java
455+
// Option 1
456+
client.getCallConnection(callConnectionId).getCallMedia().unholdWithResponse(target, "unholdPstnParticipant", Context.NONE);
457+
458+
/*
459+
// Option 2
460+
client.getCallConnection(callConnectionId).getCallMedia().unhold(target);
461+
*/
462+
```
463+
464+
### [JavaScript](#tab/javascript)
465+
```javascript
466+
const unholdOptions = {
467+
operationContext: "unholdUserContext"
468+
};
469+
470+
// Option 1
471+
await callMedia.unhold(target);
472+
473+
/*
474+
// Option 2
475+
await callMedia.unhold(target, unholdOptions);
476+
*/
477+
```
478+
479+
### [Python](#tab/python)
480+
```python
481+
# Option 1
482+
call_connection_client.unhold(target_participant=PhoneNumberIdentifier(TARGET_PHONE_NUMBER))
483+
484+
'''
485+
# Option 2
486+
call_connection_client.unhold(target_participant=PhoneNumberIdentifier(TARGET_PHONE_NUMBER), operation_context="holdUserContext")
487+
'''
488+
```
489+
-----

articles/communication-services/how-tos/call-automation/includes/play-audio-how-to-js.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,45 @@ await callAutomationClient.getCallConnection(callConnectionId)
124124
.playToAll([ playSource ]);
125125
```
126126

127+
### Support for barge-in
128+
During scenarios where you're playing audio on loop to all participants e.g. waiting lobby you maybe playing audio to the participants in the lobby and keep them updated on their number in the queue. When you use the barge-in support, this will cancel the on-going audio and play your new message. Then if you wanted to continue playing your original audio you would make another play request.
129+
130+
```javascript
131+
// Interrupt media with text source
132+
//Option1:
133+
134+
const playSource: TextSource = { text: "Interrupt prompt", voiceName: "en-US-NancyNeural", kind: "textSource" };
135+
136+
const interruptOption: PlayToAllOptions = {
137+
loop: false,
138+
interruptCallMediaOperation: true,
139+
operationContext: "interruptOperationContext",
140+
operationCallbackUrl: process.env.CALLBACK_URI + "/api/callbacks"
141+
};
142+
143+
await callConnectionMedia.playToAll([playSource], interruptOption);
144+
145+
/*
146+
// Interrupt media with file source
147+
148+
Option2:
149+
150+
const playSource: FileSource = {
151+
url: MEDIA_URI + "MainMenu.wav",
152+
kind: "fileSource"
153+
};
154+
155+
const interruptOption: PlayToAllOptions = {
156+
loop: false,
157+
interruptCallMediaOperation: true,
158+
operationContext: "interruptOperationContext",
159+
operationCallbackUrl: process.env.CALLBACK_URI + "/api/callbacks"
160+
};
161+
162+
await callConnectionMedia.playToAll([playSource], interruptOption);
163+
*/
164+
```
165+
127166
## Play audio - Specific participant
128167

129168
In this scenario, audio is played to a specific participant.
@@ -155,7 +194,7 @@ If you're playing the same audio file multiple times, your application can provi
155194
const playSource: FileSource = { url: audioUri, playsourcacheid: "<playSourceId>", kind: "fileSource" };
156195
await callAutomationClient.getCallConnection(callConnectionId)
157196
.getCallMedia()
158-
.play([ playSource ], [ targetParticipant ]);
197+
.play([ playSource ], [ targetParticipant ]);
159198
```
160199

161200
## Handle play action event updates
@@ -177,6 +216,12 @@ if (event.type === "Microsoft.Communication.PlayFailed") {
177216
console.log("Play failed: data=%s", JSON.stringify(eventData));
178217
}
179218
```
219+
### Example of how you can deserialize the *PlayStarted* event:
220+
```javascript
221+
if (event.type === "Microsoft.Communication.PlayStarted") {
222+
console.log("Play started: data=%s", JSON.stringify(eventData));
223+
}
224+
```
180225

181226
To learn more about other supported events, visit the [Call Automation overview document](../../../concepts/call-automation/call-automation.md#call-automation-webhook-events).
182227

0 commit comments

Comments
 (0)