Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chadxz/awry
An Asterisk REST Interface (ARI) websocket and API client library
https://github.com/chadxz/awry
ari asterisk javascript nodejs
Last synced: 20 days ago
JSON representation
An Asterisk REST Interface (ARI) websocket and API client library
- Host: GitHub
- URL: https://github.com/chadxz/awry
- Owner: chadxz
- License: mit
- Created: 2016-08-28T02:35:31.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-01-05T14:11:13.000Z (11 months ago)
- Last Synced: 2024-10-14T10:35:32.196Z (about 1 month ago)
- Topics: ari, asterisk, javascript, nodejs
- Language: JavaScript
- Homepage:
- Size: 1.39 MB
- Stars: 21
- Watchers: 5
- Forks: 9
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# awry
[![Build Status][Build Status Image]][Build Status Link]
[![Codecov][Codecov Image]][Codecov Link]
[![Known Vulnerabilities][Snyk Image]][Snyk Link]An [Asterisk REST Interface][] websocket and API client library for Node.js.
[Build Status Image]: https://travis-ci.org/chadxz/awry.svg?branch=master
[Build Status Link]: https://travis-ci.org/chadxz/awry
[Codecov Image]: https://img.shields.io/codecov/c/github/chadxz/awry.svg
[Codecov Link]: https://codecov.io/gh/chadxz/awry
[Snyk Image]: https://snyk.io/test/github/chadxz/awry/badge.svg
[Snyk Link]: https://snyk.io/test/github/chadxz/awry
[Asterisk REST Interface]: https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=29395573### installation
`npm install awry`
### usage
```js
const awry = require('awry');const api = new awry.API({
baseUrl: 'http://asterisk.local:8088/ari',
username: 'asterisk',
password: 'asterisk'
});api.applications.list().then(apps => {
console.log(apps);
});const events = awry.Events.connect({
app: 'someApp',
url: 'http://asterisk.local:8088/ari/events',
username: 'asterisk',
password: 'asterisk'
});events.on('message', message => {
console.log(message);
});
```### documentation
Documentation is available in the repository. You can compile the documentation
by doing the following:```shell
git clone [email protected]:chadxz/awry.git
cd awry
npm install
npm run docs
```The latest documentation can now be found under the `docs` directory.
### debugging
awry uses the [debug](https://github.com/visionmedia/debug) module to log
debugging output. To enable this output to print to the console, set the
environment variable `DEBUG` to one of the following when running your app:- `awry:*` - shows all debug output from this library.
- `awry:ARIWebSocket` - shows only the debug output from the ARIWebSocket
sub-module.
- `awry:ReconnectingWebSocket` - shows only the debug output from the
ReconnectingWebSocket sub-module.For example: `DEBUG=awry:* node myapp.js`
### contributing
See [CONTRIBUTING.md](CONTRIBUTING.md).
### license
[MIT](LICENSE-MIT)