# i360-modules-button-call

> > Usefull module to make calls using Twilio framework.

Latest version **1.0.1** (published 2021-10-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install i360-modules-button-call
pnpm add i360-modules-button-call
yarn add i360-modules-button-call
bun add i360-modules-button-call
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-10-06 |
| First published | 2021-10-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Pablo Ojeda |
| Maintainers | pbojeda |

## Links

- npm: https://www.npmjs.com/package/i360-modules-button-call
- npm.io page: https://npm.io/package/i360-modules-button-call

## Dependencies (1)

- [@twilio/voice-sdk](https://npm.io/package/@twilio/voice-sdk.md) ^2.0.1

## Recent versions

- 1.0.1 (latest) — 2021-10-06
- 1.0.0 — 2021-10-06

## README

# i360-module-button-call

> Usefull module to make calls using Twilio framework.

_CREATED BY PABLO OJEDA_
_Last update: 07/09/21_

## Steps to use:
 * 1.- import { createDevice, callCustomer, hangUp, mute } from i360-modules-button-call'
 * 2.- Get twilio access token from server. You will need a bearer token before
 * 3.- Call method createDevice with twilio token as a parameter 
 * 4.- Call method callCustomer with phoneNumber callCustomer(+34620825001)
 * 5.- If you needed, you can call mute method
 * 6.- Call method hangUp to finish the call
 
## Recommendations:
Add event listeners for all the events:
```
    document.addEventListener("twilio-event-ready", function(e) {
        console.log(e.detail); // Prints "Example of an event"
    });
```
**List of events:**

_Device events_
* twilio-device-event-registered'
* twilio-device-event-registering'
* twilio-device-event-unregistered'
* twilio-device-event-destroyed'
* twilio-device-event-incoming'
* twilio-device-event-error'

_Call events_
* twilio-call-event-accept'
* twilio-call-event-cancel'
* twilio-call-event-disconnected'
* twilio-call-event-error'
* twilio-call-event-mute'
* twilio-call-event-reject'

---
_Source: https://npm.io/package/i360-modules-button-call · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
