0.1.0 • Published 11 years ago

asterisk-ami v0.1.0

Weekly downloads
109
License
-
Repository
github
Last release
11 years ago

asterisk-ami

An extremely lightweight Asterisk AMI connector

Install

npm install asterisk-ami

Usage

var AsteriskAmi = require('./lib/AsteriskAmi');
var ami = new AsteriskAmi( { host: 'hostname', username: 'username', password: 'secret' } );

ami.on('ami_data', function(data){
	console.log('AMI DATA', data);
	//decide between Events and non events here and what to do with them, maybe run an event emitter for the ones you care about
});

ami.connect(function(){
	ami.send({action: 'Ping'});//run a callback event when we have connected to the socket
});//connect creates a socket connection and sends the login action

ami.send({action: 'Ping'});

Configuration options

AsteriskAmi has preset/configurable options, you can set these via an object passed in to AsteriskAmi

  • port: Port number for Asterisk AMI, default 5038
  • host: Host of Asterisk, default localhost
  • username: Username of Asterisk AMI user, default: username
  • password: Password of Asterisk AMI user, default: password

NPM Maintainers

The npm module for this library is maintained by:

License

asterisk-ami is licensed under the MIT license.

0.2.0-beta1

11 years ago

0.2.0-beta

11 years ago

0.1.0

11 years ago

0.0.9

11 years ago

0.0.8

12 years ago

0.0.7

12 years ago

0.0.6

12 years ago

0.0.5

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago