Skip to content
Open
Changes from 1 commit
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
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
```
```