Skip to content

Commit 288faba

Browse files
authored
Merge pull request #275070 from dmceachernmsft/dmceachernmsft/doc-bug-fixes-05-24
Dmceachernmsft/doc bug fixes 05 24
2 parents dae8dd3 + 4b3afd6 commit 288faba

File tree

4 files changed

+48
-7
lines changed

4 files changed

+48
-7
lines changed

articles/communication-services/tutorials/calling-widget/calling-widget-tutorial.md

Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ ms.subservice: calling
1515

1616
# Get started with Azure Communication Services UI library calling to Teams Voice Apps
1717

18-
![Home page of Calling Widget sample app](../media/calling-widget/sample-app-splash-widget-open.png)
19-
2018
This project aims to guide developers to initiate a call from the Azure Communication Services Calling Web SDK to Teams Call Queue and Auto Attendant using the Azure Communication UI Library.
2119

2220
As per your requirements, you might need to offer your customers an easy way to reach out to you without any complex setup.
@@ -30,10 +28,13 @@ Following this tutorial will:
3028
- Allow you to control your customers audio and video experience depending on your customer scenario
3129
- Teach you how to build a widget for starting calls on your webapp using the UI library.
3230

31+
![Home page of Calling Widget sample app](../media/calling-widget/sample-app-splash-widget-open.png)
32+
3333
## Prerequisites
34+
These steps are **needed** in order to follow this tutorial. Contact your Teams admin for the last two items to make sure you are set up appropriately.
3435

3536
- [Visual Studio Code](https://code.visualstudio.com/) on one of the [supported platforms](https://code.visualstudio.com/docs/supporting/requirements#_platforms).
36-
- [Node.js](https://nodejs.org/), Active LTS and Maintenance LTS versions [Node 18 LTS](https://nodejs.org/en) is recommended. Use the `node --version` command to check your version.
37+
- [Node.js](https://nodejs.org/), Active LTS (Long Term Support) and versions [Node 18](https://nodejs.org/en) is recommended. Use the `node --version` command to check your version.
3738
- An Azure Communication Services resource. [Create a Communications Resource](../../quickstarts/create-communication-resource.md)
3839
- Complete the Teams tenant setup in [Teams Call Queues](../../quickstarts/voice-video-calling/get-started-teams-call-queue.md)
3940
- Working with [Teams Call Queues](../../quickstarts/voice-video-calling/get-started-teams-call-queue.md) and Azure Communication Services.
@@ -44,7 +45,20 @@ Following this tutorial will:
4445
Only use this step if you're creating a new application.
4546

4647
To set up the react App, we use the `create-react-app` command line tool. This tool
47-
creates an easy to run TypeScript application powered by React. This command creates a react application using TypeScript.
48+
creates an easy to run TypeScript application powered by React.
49+
50+
To make sure that you have Node installed on your machine, run this command in PowerShell or the terminal to see your Node version:
51+
52+
```bash
53+
node -v
54+
```
55+
56+
If you don't have `create-react-app` installed on your machine, run the following command to install it as a global command:
57+
58+
```bash
59+
npm install -g create-react-app
60+
```
61+
After that command is installed, run this next command to create a new react application to build the sample in:
4862

4963
```bash
5064
# Create an Azure Communication Services App powered by React.
@@ -56,7 +70,7 @@ cd ui-library-calling-widget-app
5670

5771
### Get your dependencies
5872

59-
Then you need to update the dependency array in the `package.json` to include some packages from Azure Communication Services for the widget experience we're going to build to work:
73+
Then, you need to update the dependency array in the `package.json` to include some packages from Azure Communication Services for the widget experience we're going to build to work:
6074

6175
```json
6276
"@azure/communication-calling": "1.22.1",
@@ -68,7 +82,7 @@ Then you need to update the dependency array in the `package.json` to include so
6882
"@fluentui/react": "~8.98.3",
6983
```
7084

71-
Once you add these packages to your `package.json`, youre all set to start working on your new project. In this tutorial, we are modifying the files in the `src` directory.
85+
After you add these packages to your `package.json`, you're all set to start working on your new project. In this tutorial, we are modifying the files in the `src` directory.
7286

7387
## Initial app setup
7488

@@ -622,6 +636,33 @@ export const callingWidgetInCallContainerStyles = (
622636
};
623637
```
624638

639+
### Swap placeholders for identifiers
640+
641+
Before we run the app, go to `App.tsx` and replace the placeholder values there with your Azure Communication Services Identities and the identifier for your Teams Voice application. Here are input values for the `token`, `userId` and `teamsAppIdentifier`.
642+
643+
`./src/App.tsx`
644+
```typescript
645+
/**
646+
* Token for local user.
647+
*/
648+
const token = "<Enter your ACS Token here>";
649+
650+
/**
651+
* User identifier for local user.
652+
*/
653+
const userId: CommunicationIdentifier = {
654+
communicationUserId: "Enter your ACS Id here",
655+
};
656+
657+
/**
658+
* Enter your Teams voice app identifier from the Teams admin center here
659+
*/
660+
const teamsAppIdentifier: MicrosoftTeamsAppIdentifier = {
661+
teamsAppId: "<Enter your Teams Voice app id here>",
662+
cloud: "public",
663+
};
664+
```
665+
625666
### Run the app
626667

627668
Finally we can run the application to make our calls! Run the following commands to install our dependencies and run our app.
@@ -642,7 +683,7 @@ Then when you action the widget button, you should see a little menu:
642683

643684
![Screenshot of calling widget sample app home page widget open.](../media/calling-widget/sample-app-splash-widget-open.png)
644685

645-
After you fill out your name click start call and the call should begin. The widget should look like so after starting a call:
686+
After you fill out your name, click start call and the call should begin. The widget should look like so after starting a call:
646687

647688
![Screenshot of click to call sample app home page with calling experience embedded in widget.](../media/calling-widget/calling-widget-embedded-start.png)
648689

11.2 KB
Loading
8.22 KB
Loading
12.5 KB
Loading

0 commit comments

Comments
 (0)