Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Azure Communication Services enable developers to add communication capabilities

1. [Add Voice Calling to your Web App](https://docs.microsoft.com/azure/communication-services/quickstarts/voice-video-calling/getting-started-with-calling?pivots=platform-javascript)

2. [Send SMS](https://docs.microsoft.com/azure/communication-services/quickstarts/telephony-sms/send?pivots=programming-language-javascript)
2. [Send SMS](https://docs.microsoft.com/azure/communication-services/quickstarts/telephony/send?pivots=programming-language-javascript)

3. [Add Chat to your app](https://docs.microsoft.com/azure/communication-services/quickstarts/chat/get-started?pivots=programming-language-javascript)

4. [Add Video Calling to your Web App](https://docs.microsoft.com/azure/communication-services/quickstarts/voice-video-calling/get-started-with-video-calling)

5. [Manage Phone Numbers](https://docs.microsoft.com/azure/communication-services/quickstarts/telephony-sms/get-phone-number?pivots=programming-language-javascript)
5. [Manage Phone Numbers](https://docs.microsoft.com/azure/communication-services/quickstarts/telephony/get-phone-number?pivots=programming-language-javascript)

6. [Create and manage access tokens](https://docs.microsoft.com/azure/communication-services/quickstarts/access-tokens?pivots=programming-language-javascript)

Expand Down
12 changes: 7 additions & 5 deletions add-1-on-1-phone-calling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ products:

# Add 1 on 1 phone calling to your application

This code sample walks through the process of integration Azure Communication Services phone calling into your JavaScript application.
This code sample describes the process of integrating Azure Communication Services phone calling into your JavaScript application.

This quickstart sample includes the code that is explained as part of [this document](https://docs.microsoft.com/azure/communication-services/quickstarts/voice-video-calling/pstn-call?pivots=platform-web). See that document for additional details on how this sample works.
This sample includes the code that is explained as part of [Outbound call to a telephone number](https://docs.microsoft.com/azure/communication-services/quickstarts/voice-video-calling/pstn-call?pivots=platform-web). See that document for more information about how this sample works.

## Prerequisites

- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
- [Node.js](https://nodejs.org/en/) Active LTS and Maintenance LTS versions (8.11.1 and 10.14.1).
- An active Communication Services resource. [Create a Communication Services resource](https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource).
- A user access token to instantiate the call client. [Learn how to create and manage user access tokens](https://docs.microsoft.com/azure/communication-services/quickstarts/access-tokens?pivots=programming-language-javascript).
- A phone number acquired in your Communication Services resource. [how to get a phone number](https://docs.microsoft.com/azure/communication-services/quickstarts/telephony-sms/get-phone-number?pivots=programming-language-javascript).
- A phone number acquired in your Communication Services resource. [how to get a phone number](https://docs.microsoft.com/azure/communication-services/quickstarts/telephony/get-phone-number?pivots=programming-language-javascript).

## Before running sample code

Expand All @@ -27,13 +28,14 @@ This quickstart sample includes the code that is explained as part of [this docu
```call = callAgent.startCall([{phoneNumber: phoneToCall}], { alternateCallerId: {phoneNumber: 'ACS Number'}});```.

## Run the code

1. Run `npm i` on the directory of the project to install dependencies
2. Use the webpack-dev-server to build and run your app. Run the following command to bundle application host in on a local webserver:

npx webpack-dev-server --entry ./client.js --output bundle.js --debug --devtool inline-source-map
```npx webpack-dev-server --entry ./client.js --output bundle.js --debug --devtool inline-source-map```

Open your browser and navigate to http://localhost:8080/. You should see the following:

![Render of sample application](../media/add-1-on-1-phone-calling.png)

You can make an 1:1 outgoing phone call by providing a phone number in the text field and clicking the Start Call button.
You can make a 1:1 outgoing phone call by providing a phone number in the text field and clicking **Start Call**.
22 changes: 11 additions & 11 deletions direct-routing-quickstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,33 @@ products:

# Direct Routing Configuration

For full instructions on how to build this code sample from scratch, look at [Quickstart: Direct Routing](https://docs.microsoft.com/azure/communication-services/quickstarts/telephony-sms/voice-routing-sdk-config?pivots=programming-language-javascript)
To build this code sample from scratch, see [Configure voice routing programmatically](https://docs.microsoft.com/azure/communication-services/quickstarts/telephony/voice-routing-sdk-config?pivots=programming-language-javascript).

## Prerequisites

- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) .
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
- [Node.js](https://nodejs.org/en/) Active LTS and Maintenance LTS versions (8.11.1 and 10.14.1 recommended).
- An active Communication Services resource and connection string. [Create a Communication Services resource](https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource).

## Install the package

npm install @azure/[email protected] --save
`npm install @azure/[email protected] --save`

## Before running sample code

1. Open an instance of PowerShell, Windows Terminal, Command Prompt or equivalent and navigate to the directory that you'd like to clone the sample to.
1. Open an instance of PowerShell, Windows Terminal, Command Prompt or equivalent and navigate to the directory where you want to clone the sample.
2. `git clone https://github.com/Azure-Samples/communication-services-javascript-quickstarts.git`
3. With the Communication Services procured in pre-requisites, add connection string to environment variable using below command
With the `Connection String` procured in pre-requisites, add it to the *./direct-routing-quickstart* file. Assign your connection string in line 4:
3. Note your resource name and the connection string generated when you created a Communication Services resource during prerequisites. Replace variables with the appropriate values on line 4 of the *./direct-routing-quickstart* file.

```javascript
const connectionString = "endpoint=https://<RESOURCE_NAME>.communication.azure.com/;accesskey=<ACCESS_KEY>";
```
```javascript
const connectionString = "endpoint=https://<RESOURCE_NAME>.communication.azure.com/;accesskey=<ACCESS_KEY>";
```
4. Save and close the file.

## Run the code

From a console prompt, navigate to the directory containing the *direct-routing-quickstart.js* file, then execute the following node command to run the app.
From a console prompt, navigate to the directory containing the *direct-routing-quickstart.js* file. Use the following node command to run the app.

```console
node direct-routing-quickstart.js
```
```
16 changes: 8 additions & 8 deletions phone-numbers-quickstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@ products:

# Manage Phone Numbers

For full instructions on how to build this code sample from scratch, look at [Quickstart: Manage Phone Numbers](https://docs.microsoft.com/azure/communication-services/quickstarts/telephony-sms/get-phone-number?pivots=programming-language-javascript)
For full instructions to build this code sample from scratch, see [Manage Phone Numbers](https://docs.microsoft.com/azure/communication-services/quickstarts/telephony/get-phone-number?pivots=programming-language-javascript)

## Prerequisites

- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) .
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
- [Node.js](https://nodejs.org/en/) Active LTS and Maintenance LTS versions (8.11.1 and 10.14.1 recommended).
- An active Communication Services resource and connection string. [Create a Communication Services resource](https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource).

## Install the package

npm install @azure/communication-phone-numbers --save
`npm install @azure/communication-phone-numbers --save`

## Before running sample code

1. Open an instance of PowerShell, Windows Terminal, Command Prompt or equivalent and navigate to the directory that you'd like to clone the sample to.
1. Open an instance of PowerShell, Windows Terminal, Command Prompt or equivalent and navigate to the directory where you want to clone the sample.
2. `git clone https://github.com/Azure-Samples/communication-services-javascript-quickstarts.git`
3. With the Communication Services procured in pre-requisites, add connection string to environment variable using below command
3. With the Communication Services procured in pre-requisites, add the connection string to environment variable using below command.

setx COMMUNICATION_SERVICES_CONNECTION_STRING <CONNECTION_STRING>
`setx COMMUNICATION_SERVICES_CONNECTION_STRING <CONNECTION_STRING>`

## Run the code

From a console prompt, navigate to the directory containing the phone-numbers-quickstart.js file, then execute the following node command to run the app.
From a console prompt, navigate to the directory containing the `phone-numbers-quickstart.js` file, then execute the following node command to run the app.

node phone-numbers-quickstart.js
`node phone-numbers-quickstart.js`
16 changes: 8 additions & 8 deletions send-sms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ products:

# Send an SMS Message Quickstart

For full instructions on how to build this code sample from scratch, look at [Quickstart: Send an SMS Message](https://docs.microsoft.com/azure/communication-services/quickstarts/telephony-sms/send?pivots=programming-language-javascript)
For instructions to build this code sample from scratch, see [Send an SMS Message](https://docs.microsoft.com/azure/communication-services/quickstarts/telephony/send?pivots=programming-language-javascript).

## Prerequisites

- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
- [Visual Studio Code](https://code.visualstudio.com/) on one of the [supported platforms](https://code.visualstudio.com/docs/supporting/requirements#_platforms).
- [Node.js](https://nodejs.org/), Active LTS and Maintenance LTS versions (10.14.1 recommended). Use the `node --version` command to check your version.
- [Node.js](https://nodejs.org/), Active LTS and Maintenance LTS versions (10.14.1 recommended). Use the `node --version` command to check your version.
- An active Communication Services resource and connection string. [Create a Communication Services resource](https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource).
- An SMS enabled telephone number. [Get a phone number](https://docs.microsoft.com/azure/communication-services/quickstarts/telephony-sms/get-phone-number).
- An SMS enabled telephone number. [Get a phone number](https://docs.microsoft.com/azure/communication-services/quickstarts/telephony/get-phone-number).

## Code Structure

- **./send-SMS/send-sms.js:** Core application code with send SMS implementation.
- `./send-SMS/send-sms.js:` Core application code with send SMS implementation.

## Before running sample code

1. Open an instance of PowerShell, Windows Terminal, Command Prompt or equivalent and navigate to the directory that you'd like to clone the sample to.
1. Open an instance of PowerShell, Windows Terminal, Command Prompt or equivalent and navigate to the directory where you'd like to clone the sample.
2. `git clone https://github.com/Azure-Samples/Communication-Services-javascript-quickstarts.git`
3. With the `Connection String` procured in pre-requisites, follow [instructions](https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?pivots=#store-your-connection-string) to add it to your environment variables.
4. With the SMS enabled telephone number procured in pre-requisites, add it to the **send-SMS/send-sms.js** file. Assign your telephone number in line 7:
3. With the `Connection String` procured in pre-requisites, follow the instructions at [Create and manage Communication Services resources > Store your connection string](https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?pivots=#store-your-connection-string) to add it to your environment variables.
4. With the SMS enabled telephone number procured in pre-requisites, add it to the `send-SMS/send-sms.js` file. Assign your telephone number in line 7:
```from: "<from-phone-number>",```
5. Add a phone number to send the SMS to in line 8:
```to: ["<to-phone-number-1>", "<to-phone-number-2>"],```
Expand Down
12 changes: 6 additions & 6 deletions use-managed-Identity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ products:

# Use managed identities Quickstart

For full instructions on how to build this code sample from scratch, look at [Quickstart: Use managed identities](https://docs.microsoft.com/azure/communication-services/quickstarts/managed-identity?pivots=programming-language-javascript)
For instructions to build this code sample from scratch, see [Use managed identities](https://docs.microsoft.com/azure/communication-services/quickstarts/managed-identity?pivots=programming-language-javascript).

## Prerequisites

- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
- An active Communication Services resource. [Create a Communication Services resource](https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource).
- An SMS enabled telephone number. [Get a phone number](https://docs.microsoft.com/azure/communication-services/quickstarts/telephony-sms/get-phone-number?pivots=programming-language-javascript).
- An SMS enabled telephone number. [Get a phone number](https://docs.microsoft.com/azure/communication-services/quickstarts/telephony/get-phone-number?pivots=programming-language-javascript).
- A setup managed identity for a development environment,see [Authorize access with managed identity](https://docs.microsoft.com/azure/communication-services/quickstarts/managed-identity-from-cli).

## Code Structure

- **./use-managed-Identity/index.js:** Core application code with managed identity implementation.
- `./use-managed-Identity/index.js:` Core application code with managed identity implementation.

## Before running sample code

1. Open an instance of PowerShell, Windows Terminal, Command Prompt or equivalent and navigate to the directory that you'd like to clone the sample to.
2. git clone https://github.com/Azure-Samples/Communication-Services-javascript-quickstarts.git
3. With the `endpoint` procured in pre-requisites, add it to the **index.js** file. Assign your endpoint in line 28:
3. With the `endpoint` procured in pre-requisites, add it to the `index.js` file. Assign your endpoint in line 28:
```const endpoint = "https://<RESOURCE_NAME>.communication.azure.com/"```
4. With the SMS enabled telephone number procured in pre-requisites, add it to the **index.js** file. Assign your ACS telephone number and sender number in line 38:
4. With the SMS enabled telephone number procured in pre-requisites, add it to the `index.js` file. Assign your ACS telephone number and sender number in line 38:
```const smsResult = await sendSms(endpoint, "<FROM NUMBER>", "<TO NUMBER>", "Hello from Managed Identities");```

## Run Locally
Expand Down