Skip to content

Commit 8825a2f

Browse files
Merge pull request #253509 from rzdor/ruslanz/click-to-call-startup
update doc for new beta calling version
2 parents 645e318 + f3a2614 commit 8825a2f

File tree

4 files changed

+73
-17
lines changed

4 files changed

+73
-17
lines changed

articles/communication-services/quickstarts/voice-video-calling/get-started-teams-auto-attendant.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ In this quickstart you are going to learn how to start a call from Azure Communi
2323
4. Get Object ID of the Auto Attendant via Graph API.
2424
5. Start a call with Azure Communication Services Calling SDK.
2525

26-
If you'd like to skip ahead to the end, you can download this quickstart as a sample on [GitHub](https://github.com/Azure-Samples/communication-services-javascript-quickstarts/tree/main/add-1-on-1-cte-video-calling).
26+
If you'd like to skip ahead to the end, you can download this quickstart as a sample on [GitHub](https://github.com/Azure-Samples/communication-services-javascript-quickstarts/tree/main/voice-apps-calling).
2727

2828
[!INCLUDE [Enable interoperability in your Teams tenant](../../concepts/includes/enable-interoperability-for-teams-tenant.md)]
2929

articles/communication-services/quickstarts/voice-video-calling/get-started-teams-call-queue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ In this quickstart you are going to learn how to start a call from Azure Communi
2323
4. Get Object ID of the Call Queue via Graph API.
2424
5. Start a call with Azure Communication Services Calling SDK.
2525

26-
If you'd like to skip ahead to the end, you can download this quickstart as a sample on [GitHub](https://github.com/Azure-Samples/communication-services-javascript-quickstarts/tree/main/add-1-on-1-cte-video-calling).
26+
If you'd like to skip ahead to the end, you can download this quickstart as a sample on [GitHub](https://github.com/Azure-Samples/communication-services-javascript-quickstarts/tree/main/voice-apps-calling).
2727

2828
[!INCLUDE [Enable interoperability in your Teams tenant](../../concepts/includes/enable-interoperability-for-teams-tenant.md)]
2929

articles/communication-services/quickstarts/voice-video-calling/includes/teams-auto-attendant/teams-auto-attendant-javascript.md

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ ms.author: ruslanzdor
1111
- Obtain an Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
1212
- [Node.js](https://nodejs.org/en/) Active LTS and Maintenance LTS versions (8.11.1 and 10.14.1)
1313
- Create an active Communication Services resource. [Create a Communication Services resource](../../../create-communication-resource.md?pivots=platform-azp&tabs=windows).
14-
- Complete the Teams tenant setup in [Teams calling and chat interoperability](/communication-services/concepts/interop/calling-chat)
1514

1615
## Setting up
1716

@@ -27,19 +26,19 @@ mkdir calling-quickstart && cd calling-quickstart
2726

2827
Use the `npm install` command to install the Azure Communication Services Calling SDK for JavaScript.
2928
> [!IMPORTANT]
30-
> This quickstart uses the Azure Communication Services Calling SDK version `latest`.
29+
> This quickstart uses the Azure Communication Services Calling SDK version `next`.
3130
3231
```console
3332
npm install @azure/communication-common@next --save
34-
npm install @azure/communication-calling@latest --save
33+
npm install @azure/communication-calling@next --save
3534
```
3635

3736
### Set up the app framework
3837

3938
This quickstart uses webpack to bundle the application assets. Run the following command to install the `webpack`, `webpack-cli` and `webpack-dev-server` npm packages and list them as development dependencies in your `package.json`:
4039

4140
```console
42-
npm install webpack@4.42.0 webpack-cli@3.3.11 webpack-dev-server@3.10.3 --save-dev
41+
npm install copy-webpack-plugin@^11.0.0 webpack@^5.88.2 webpack-cli@^5.1.4 webpack-dev-server@^4.15.1 --save-dev
4342
```
4443

4544
Create an `index.html` file in the root directory of your project. We'll use this file to configure a basic layout that will allow the user to place a 1:1 video call.
@@ -79,7 +78,7 @@ Here's the code:
7978
<br>
8079
<div id="localVideoContainer" style="width: 30%;" hidden>Local video stream:</div>
8180
<!-- points to the bundle generated from client.js -->
82-
<script src="./bundle.js"></script>
81+
<script src="./main.js"></script>
8382
</body>
8483
</html>
8584
```
@@ -170,7 +169,7 @@ startCallButton.onclick = async () => {
170169
try {
171170
const localVideoStream = await createLocalVideoStream();
172171
const videoOptions = localVideoStream ? { localVideoStreams: [localVideoStream] } : undefined;
173-
call = callAgent.startCall([{ botId: applicationObjectId.value.trim(), cloud:"public" }], { videoOptions: videoOptions });
172+
call = callAgent.startCall([{ teamsAppId: applicationObjectId.value.trim(), cloud:"public" }], { videoOptions: videoOptions });
174173
// Subscribe to the call's properties and events.
175174
subscribeToCall(call);
176175
} catch (error) {
@@ -393,12 +392,41 @@ hangUpCallButton.addEventListener("click", async () => {
393392
});
394393
```
395394

395+
## Add the webpack local server code
396+
397+
Create a file in the root directory of your project called **webpack.config.js** to contain the local server logic for this quickstart. Add the following code to **webpack.config.js**:
398+
```javascript
399+
const path = require('path');
400+
const CopyPlugin = require("copy-webpack-plugin");
401+
402+
module.exports = {
403+
mode: 'development',
404+
entry: './index.js',
405+
output: {
406+
filename: 'main.js',
407+
path: path.resolve(__dirname, 'dist'),
408+
},
409+
devServer: {
410+
static: {
411+
directory: path.join(__dirname, './')
412+
},
413+
},
414+
plugins: [
415+
new CopyPlugin({
416+
patterns: [
417+
'./index.html'
418+
]
419+
}),
420+
]
421+
};
422+
```
423+
396424
## Run the code
397425

398426
Use the `webpack-dev-server` to build and run your app. Run the following command to bundle the application host in a local webserver:
399427

400428
```console
401-
npx webpack-dev-server --entry ./client.js --output bundle.js --debug --devtool inline-source-map
429+
npx webpack serve --config webpack.config.js
402430
```
403431

404432
Manual steps to setup the call:

articles/communication-services/quickstarts/voice-video-calling/includes/teams-call-queue/teams-call-queue-javascript.md

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ ms.author: ruslanzdor
1111
- Obtain an Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
1212
- [Node.js](https://nodejs.org/en/) Active LTS and Maintenance LTS versions (8.11.1 and 10.14.1)
1313
- Create an active Communication Services resource. [Create a Communication Services resource](../../../create-communication-resource.md?pivots=platform-azp&tabs=windows).
14-
- Complete the Teams tenant setup in [Teams calling and chat interoperability](/communication-services/concepts/interop/calling-chat)
1514

1615
## Setting up
1716

@@ -27,19 +26,19 @@ mkdir calling-quickstart && cd calling-quickstart
2726

2827
Use the `npm install` command to install the Azure Communication Services Calling SDK for JavaScript.
2928
> [!IMPORTANT]
30-
> This quickstart uses the Azure Communication Services Calling SDK version `latest`.
29+
> This quickstart uses the Azure Communication Services Calling SDK version `next`.
3130
3231
```console
33-
npm install @azure/communication-common@latest --save
34-
npm install @azure/communication-calling@latest --save
32+
npm install @azure/communication-common@next --save
33+
npm install @azure/communication-calling@next --save
3534
```
3635

3736
### Set up the app framework
3837

3938
This quickstart uses webpack to bundle the application assets. Run the following command to install the `webpack`, `webpack-cli` and `webpack-dev-server` npm packages and list them as development dependencies in your `package.json`:
4039

4140
```console
42-
npm install webpack@4.42.0 webpack-cli@3.3.11 webpack-dev-server@3.10.3 --save-dev
41+
npm install copy-webpack-plugin@^11.0.0 webpack@^5.88.2 webpack-cli@^5.1.4 webpack-dev-server@^4.15.1 --save-dev
4342
```
4443

4544
Create an `index.html` file in the root directory of your project. We'll use this file to configure a basic layout that will allow the user to place a 1:1 video call.
@@ -79,7 +78,7 @@ Here's the code:
7978
<br>
8079
<div id="localVideoContainer" style="width: 30%;" hidden>Local video stream:</div>
8180
<!-- points to the bundle generated from client.js -->
82-
<script src="./bundle.js"></script>
81+
<script src="./main.js"></script>
8382
</body>
8483
</html>
8584
```
@@ -170,7 +169,7 @@ startCallButton.onclick = async () => {
170169
try {
171170
const localVideoStream = await createLocalVideoStream();
172171
const videoOptions = localVideoStream ? { localVideoStreams: [localVideoStream] } : undefined;
173-
call = callAgent.startCall([{ botId: callQueueId.value.trim(), cloud:"public" }], { videoOptions: videoOptions });
172+
call = callAgent.startCall([{ teamsAppId: callQueueId.value.trim(), cloud:"public" }], { videoOptions: videoOptions });
174173
// Subscribe to the call's properties and events.
175174
subscribeToCall(call);
176175
} catch (error) {
@@ -392,12 +391,41 @@ hangUpCallButton.addEventListener("click", async () => {
392391
});
393392
```
394393

394+
## Add the webpack local server code
395+
396+
Create a file in the root directory of your project called **webpack.config.js** to contain the local server logic for this quickstart. Add the following code to **webpack.config.js**:
397+
```javascript
398+
const path = require('path');
399+
const CopyPlugin = require("copy-webpack-plugin");
400+
401+
module.exports = {
402+
mode: 'development',
403+
entry: './index.js',
404+
output: {
405+
filename: 'main.js',
406+
path: path.resolve(__dirname, 'dist'),
407+
},
408+
devServer: {
409+
static: {
410+
directory: path.join(__dirname, './')
411+
},
412+
},
413+
plugins: [
414+
new CopyPlugin({
415+
patterns: [
416+
'./index.html'
417+
]
418+
}),
419+
]
420+
};
421+
```
422+
395423
## Run the code
396424

397425
Use the `webpack-dev-server` to build and run your app. Run the following command to bundle the application host in a local webserver:
398426

399427
```console
400-
npx webpack-dev-server --entry ./client.js --output bundle.js --debug --devtool inline-source-map
428+
npx webpack serve --config webpack.config.js
401429
```
402430

403431
Manual steps to setup the call:

0 commit comments

Comments
 (0)