Skip to content

v20.0.1

Choose a tag to compare

@brandonlehmann brandonlehmann released this 13 Dec 19:10
· 2 commits to master since this release
548e9d2

Asterisk Manager Interface

Documentation

https://gibme-npm.github.io/asterisk-manager-interface/

Sample Code

import AMI from '@gibme/asterisk-manager-interface';

(async () => {
    const ami = new AMI({
        user: 'amiuser',
        password: 'amipassword',
        host: 'asterisk-ip'
    });
    
    if (!await ami.login()) {
        throw new Error('Could not login');
    }
    
    console.log(await ami.moduleCheck('chan_sip'));
    
    // fetch sip peers
    console.log(await ami.send({
        Action: 'SIPpeers'
    }));
})()