
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
asterisk-ami
Advanced tools
An extremely lightweight Asterisk AMI connector
npm install asterisk-ami
var AsteriskAmi = require('asterisk-ami');
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'});
##Events
(AMI Data) These give you AMI specific information
(net socket events) Use these events to determine the status of the socket connection, as if the socket is disconnected, you would need to add your .on('close') events again, this was a bug in the previous version of asterisk-ami, use these new events instead which will always be called, even if the connection has died and been reconnected.
##methods
.connect(function(){
console.log('connection to AMI socket successful');
}, function(raw_data){
console.log('every time data comes back in the socket, this callback is called, useful for recording stats on data', raw_data);
})
.disconnect() //logs out of the AMI and then closes the connection, sets reconnect to false so that it wont try and reconnect
.send({action: 'Ping'}) //send an ami call, pass in a javascript object with the params you want to send the ami
.destroy() //terminates the connection to the ami socket if say disconnect fails, or you've lost connection to the ami and you're not using reconnect: true as a param
AsteriskAmi has preset/configurable options, you can set these via an object passed in to AsteriskAmi
5038
localhost
username
password
false
false
3000
true
The npm module for this library is maintained by:
asterisk-ami is licensed under the MIT license.
FAQs
An asterisk ami connector
The npm package asterisk-ami receives a total of 231 weekly downloads. As such, asterisk-ami popularity was classified as not popular.
We found that asterisk-ami demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.