Skip to content

v1.0.9

Choose a tag to compare

@brandonlehmann brandonlehmann released this 10 Dec 02:02
· 9 commits to master since this release
568e841

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'
    }));
})()