Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Astersik Manager Interface
This module requires node.js 14.0.0 or above and ES modules.
npm install ami
import AMISocket from 'ami';
const ami = new AMISocket();
Construct a new AMI connection instance. Default options:
{
connect: {
host: 'localhost',
port: 5038
},
credentials: {
username: 'local',
secret: 'local'
},
events: true
}
Version string provided by the Asterisk server, example 2.10.5
.
This property is undefined
prior to receiving first line from connected
socket.
Boolean value if the socket is connected.
Boolean value if the socket is authenticated.
Connect to the AMI server for this instance. Promise is resolved once authentication is successful. Rejection occurs if connection or authentication fails.
This function resolves after queued packets are sent but before responses are received.
Disconnect from the AMI server. No attempt is made to wait for responses to requests that are in progress.
object
is the key/value pairs to send as an AMI request. This must contain an action
key.
A key can be specified multiple times by providing an array, for example:
ami.send({
action: 'originate',
// channel / app / etc
variable: [
'CHANVAR1=value',
'CHANVAR2=value'
]
});
options.ignoreResponse
can be set to true
if you don't care about the result. In this
case the promise resolves as soon as the request is written to the socket.
options.responseType
controls the information provided when resolving:
response
: resolves with a single object structured like the input object. This is default for AMISocket#send
.responses
: resolves with an array of objects. This is default for AMISocket#getList
.responsePacket
: resolves with a single AMIPacket
instance.responsePackets
: resolves with an array of AMIPacket
instances.Keys of all responses are normalized to lowercase strings.
This is the property which resolve requests that used responseType
of response
or responses
.
An ordered array of name/value pairs, for example:
[
['actionid', 'random-generated-id'],
['response', 'success']
]
This is only needed to deal with responses which violate the AMI specification. An example
of this is the app_queue
QueueRule
response, see ASTERISK-27072.
This is used internally to produce the raw data. It could also be used for debug output. Note that keys are already tranformed to lowercase.
FAQs
Astersik Manager Interface
The npm package ami receives a total of 11 weekly downloads. As such, ami popularity was classified as not popular.
We found that 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.