Skip to content

Latest commit

History

38 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Build Status

node-ami

node.js JavaScript client to communicate with an __A__sterisk __M__anager __I__nterface

install

npm install ami

use

//requirevarClient=require('ami').Client;varport=5038;//default AMI portvarhost='localhost';varclient=newClient();//connect to AMI serverclient.connect(port,host,functiononConnection(err){if(err)throwerr;//create the login action (plain javascript object)varlogin={action: 'login',username: 'brian',secret: 'shhh!'}//send the action to asterisk and handle the responseclient.send(login,function(err,response){})})//subscribe to all AMI messages (responses and events)client.on('message',function(msg){//message will be plain javascript object//in the case of our login response message:assert.equal(msg.actionID,'0');assert.equal(msg.response,'Success');assert.equal(msg.message,'Authentication accepted');})

more info

Very much a work in progress. Would love contributions.

AMI documentation

more, more info

Fork & contribute! Open Source is awesome.

license

unlicense

About

Asterisk AMI client for node.js

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors