![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
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 3 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.