ts-agi
TypeScript icon, indicating that this package has built-in type declarations

0.0.26 • Public • Published

ts-agi

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

Fork of ding-dong

Install

npm install ts-agi

 
const { Agi } = require('ts-agi');
 
const agi = new Agi();
 
agi.use(async (ctx, next) => {
  await ctx.streamFile('beep');
  await next();
  const { value: myVariable } = await ctx.getFullVariable('myVar');
  await ctx.sayAlpha(myVariable);
  await ctx.hangup();
});
agi.use(async ctx => {
  await ctx.setVariable('myVar', 'Hello World!!!');
});
 
agi.listen(3456);
 
 

Add to Asterisk extensions.conf

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

Links

Asterisk AGI

Readme

Keywords

Package Sidebar

Install

npm i ts-agi

Weekly Downloads

48

Version

0.0.26

License

MIT

Unpacked Size

37.8 kB

Total Files

12

Last publish

Collaborators

  • sergey12313