https://github.com/antirek/ding-dong
Create AGI server on #Node.js for #Asterisk quickly!
https://github.com/antirek/ding-dong
agi asterisk ding-dong javascript nodejs npm
Last synced: 6 months ago
JSON representation
Create AGI server on #Node.js for #Asterisk quickly!
- Host: GitHub
- URL: https://github.com/antirek/ding-dong
- Owner: antirek
- License: mit
- Created: 2014-10-24T12:21:34.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-05-04T14:37:02.000Z (over 6 years ago)
- Last Synced: 2025-04-05T07:17:53.839Z (6 months ago)
- Topics: agi, asterisk, ding-dong, javascript, nodejs, npm
- Language: JavaScript
- Homepage: https://github.com/antirek/ding-dong
- Size: 51.8 KB
- Stars: 53
- Watchers: 5
- Forks: 25
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ding-dong
[](https://travis-ci.org/antirek/ding-dong)
node.js lib for Fast AGI (Asterisk Gateway Interface) server
[Fork of node-agi](http://github.com/brianc/node-agi)
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```
`````javascript
const AGIServer = require('ding-dong');
const handler = (context) => {
context.onEvent('variables')
.then((vars) => {
return context.streamFile('beep');
})
.then((result) => {
return context.setVariable('RECOGNITION_RESULT', 'I\'m your father, Luc');
})
.then((result) => {
return context.close();
});
};var agi = new AGIServer(handler, {port: 3000});
agi.init();`````
### Add to Asterisk extensions.conf
`````
[default]
exten = > 1000,1,AGI(agi://localhost:3000)
`````## API
see [API.md](API.md)
## Links
[Asterisk AGI](https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+AGI+Commands)