# ding-dong

> Write AGI-server quickly! (AGI - Asterisk Gateway Interface)

Latest version **0.1.7** (published 2019-02-26) · 0 weekly downloads

## Install

```sh
npm install ding-dong
pnpm add ding-dong
yarn add ding-dong
bun add ding-dong
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.7 |
| Published | 2019-02-26 |
| First published | 2014-10-24 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 1 |
| Unpacked size | 33.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 56 |
| Author | Sergey Dmitriev |
| Maintainers | antirek |

## Links

- npm: https://www.npmjs.com/package/ding-dong
- Repository: https://github.com/antirek/ding-dong
- Homepage: https://github.com/antirek/ding-dong#readme
- Issues: https://github.com/antirek/ding-dong/issues
- npm.io page: https://npm.io/package/ding-dong

## Dependencies (1)

- [readable-stream](https://npm.io/package/readable-stream.md) ^2.3.0

## Recent versions

- 0.1.7 (latest) — 2019-02-26
- 0.1.6 — 2018-09-12
- 0.1.5 — 2017-04-25
- 0.1.4 — 2016-05-22
- 0.1.3 — 2015-07-14
- 0.1.2 — 2015-07-06
- 0.1.1 — 2015-06-11
- 0.1.0 — 2015-06-10
- 0.0.9 — 2015-03-19
- 0.0.8 — 2015-02-18
- 0.0.7 — 2015-02-17
- 0.0.6 — 2015-02-11
- 0.0.5 — 2015-01-10
- 0.0.4 — 2015-01-04
- 0.0.3 — 2015-01-01
- … 2 more at https://npm.io/package/ding-dong/versions

## README

# ding-dong

[![Build Status](https://travis-ci.org/antirek/ding-dong.svg?branch=master)](https://travis-ci.org/antirek/ding-dong)

Create AGI server with ding-dong. Use with Asterisk for fast telephony apps. 

[Fork of node-agi](http://github.com/brianc/node-agi)

stable version 0.1.1

unstable version 0.1.5


Use ding-dong
=============

[voicer](http://github.com/antirek/voicer) - AGI voice recognizer for Asterisk (use Yandex and Google speech recognizers)

[agi-number-archer](http://github.com/antirek/agi-number-archer) - AGI server for find region code of phone number (Russia)

[lcr-finder](http://github.com/antirek/lcr-finder) - least cost router for Asterisk



## Install

```
npm install ding-dong [--save]

```


## Usage

### Write app.js and run it

`````javascript

var AGIServer = require('ding-dong');

var handler = function (context) {
    context.onEvent('variables')
        .then(function (vars) {
            return context.streamFile('beep');
        })
        .then(function (result) {
            return context.setVariable('RECOGNITION_RESULT', 'I\'m your father, Luc');
        })
        .then(function (result) {       
            return context.end();
        });
};

var agi = new AGIServer(handler);
agi.start(3000);

`````

### Add to Asterisk extensions.conf

`````
[default]
exten = > 1000,1,AGI(agi://localhost:3000)
`````

### And call to 1000 and view asterisk output. Profit!


## API 

see [API.md](API.md)


## Links

[Asterisk AGI](https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+AGI+Commands)

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