6.1.0 • Published 3 months ago
@bandwidth/voice v6.1.0
Bandwidth Node Voice SDK
OS | Node |
---|---|
Windows 2016 | 12, 14, 16 |
Windows 2019 | 12, 14, 16 |
Ubuntu 20.04 | 12, 14, 16 |
Ubuntu 22.04 | 12, 14, 16 |
Note: As of version 2.0.0, this package has been upgraded to TypeScript
Getting Started
Installation
npm install @bandwidth/voice
Initialize
import { CreateCallRequest, ApiError, ApiController, Client, Response, SpeakSentence } from '@bandwidth/voice';
const client = new Client({
basicAuthUserName: "username",
basicAuthPassword: "password"
});
const controller = new ApiController(client);
const accountId = "12345";
To use a custom environment
import { ApiController, Client, Environment } from '@bandwidth/voice';
const client = new Client({
basicAuthUserName: "username",
basicAuthPassword: "password",
environment: Environment.Custom,
baseUrl: 'https://custom.bandwidth.com'
});
const controller = new ApiController(client);
const accountId = "12345";
Create A Phone Call
var from = "+15554443333";
var to = "+15553334444";
var answerUrl = "https://sample.com";
var applicationId = "3-a-b-c";
var body = {
from: from,
to: to,
answerUrl: answerUrl,
applicationId: applicationId,
};
var createCallResponse = await controller.createCall(accountId, body);
console.log(createCallResponse.result.callId);
Create BXML
var speakSentence = new SpeakSentence({
sentence: "test",
voice: "susan",
gender: "female",
locale: "en_US",
});
var response = new Response(speakSentence);
console.log(response.toBxml());
Supported Node Versions
This package can be used with Node >= 10
Credentials
Information for credentials for this package can be found at https://dev.bandwidth.com/guides/accountCredentials.html
6.1.0
3 months ago
6.0.6
4 months ago
6.0.5
5 months ago
5.6.0
11 months ago
6.0.1
9 months ago
6.0.0
11 months ago
6.0.3
7 months ago
6.0.2
7 months ago
6.0.4
7 months ago
5.5.0
11 months ago
5.4.0
12 months ago
5.3.2
1 year ago
5.3.1
2 years ago
5.3.0
2 years ago
5.2.0
2 years ago
5.1.0
2 years ago
5.0.0
2 years ago
4.4.0
2 years ago
4.3.0
2 years ago
4.1.2
2 years ago
4.2.0
2 years ago
4.2.1-beta.0
2 years ago
4.1.1
2 years ago
4.1.0
3 years ago
4.0.0
3 years ago
3.0.0
3 years ago
2.0.2
3 years ago
2.0.1
3 years ago
2.0.0
3 years ago
2.0.0-beta
4 years ago
1.5.0
4 years ago
1.4.0
4 years ago
1.3.0
4 years ago
1.2.1
4 years ago
1.2.0
4 years ago
1.1.0
4 years ago
1.0.0
4 years ago
0.1.0
4 years ago