const ami = new Ami(PORT, HOST, USER, PASSWORD, true);
ami.keepConnected();
ami.on('hangup', evt => {
console.log(evt);
});
module.exports.ami = ami;
No any messages in console. Asterisk shows "0 users connected". Manual connect with telnet work.
Do I make something wrong or library don't work with this version of asterisk ?
Thanks.
Hello. I use Asterisk 17.2.0 This seems not work at this version. My code:
const Ami = require('asterisk-manager');
const HOST = process.env.AMI_HOST || 'localhost'; const PORT = process.env.AMI_PORT || '5038'; const USER = process.env.AMI_USER || 'asterisk'; const PASSWORD = process.env.AMI_PASSWORD || '';
const ami = new Ami(PORT, HOST, USER, PASSWORD, true);
ami.keepConnected();
ami.on('hangup', evt => { console.log(evt); });
module.exports.ami = ami;
No any messages in console. Asterisk shows "0 users connected". Manual connect with telnet work. Do I make something wrong or library don't work with this version of asterisk ? Thanks.