Skip to content

Asterisk Library for Enhanced Fast AGI (Asterisk Gateway Interface) server

Notifications You must be signed in to change notification settings

libtv/asterisk-eagi-for-nodejs

Repository files navigation

EAGI ding-dong

ding-dong - Extensions Version

Build Status

node.js lib for Fast AGI (Asterisk Gateway Interface) server

Fork of node-agi

Use ding-dong

voicer - AGI voice recognizer for Asterisk (use Yandex and Google speech recognizers)

agi-number-archer - AGI server for find region code of phone number (Russia)

lcr-finder - least cost router for Asterisk

Install

npm install ding-dong

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

Links

Asterisk AGI

About

Asterisk Library for Enhanced Fast AGI (Asterisk Gateway Interface) server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published