Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Icon

This Specification is still in draft form.

1. Introduction

This Asterisk Manager Interface (AMI) specification describes the relationship between Asterisk and an external entity wishing to communicate with Asterisk over the AMI protocol. It describes:

  • An overview of the AMI protocol
  • The operations AMI provides external entities wishing to control Asterisk
  • Basic formatting of AMI message structures
  • Guaranteed operations, configuration control, and other information provided by Asterisk in AMI 1.4

1.1. Scope

This specification describes AMI version 1.4 for Asterisk 12. This specification provides details on the functional, operational and design requirements for AMI 1.4. Note that this does not include a comprehensive listing of the AMI configuration file parameters or messages that a system interfacing over AMI in Asterisk 12 will send/receive; however, it does provide a baseline of the supported features and messages provided in AMI 1.4. This specification should be used in conjunction with the documented AMI actions and events in Asterisk 12 to encompass the full range of functionality provided by AMI in Asterisk 12.

In addition, this specification provides interface requirements levied on AMI by Stasis Core. It conveys sufficient detail to understand how AMI attaches to Stasis Core and interacts with other entities on the Stasis Core message bus.

This specification is intended for all parties requiring such information, including software developers, system designers and testers responsible for implementing the interface.

2. Terminology

Term

Definition

Action

A command issued to Asterisk from an external entity via AMI

Client

An external entity communicating with Asterisk via AMI over some transport mechanism

Event

A message sent from Asterisk to an external entity via AMI

Field

A key/value pair that exists in either an action or event

Stasis Core

The internal framework that AMI is built on top of

3. Protocol Overview

Asterisk provides a number of interfaces that serve different purposes. Say, for example, we wanted to manipulate a call between Alice and Bob via some external mechanism. Depending on what we wanted to do with the call, we may use one or more interfaces to manipulate the channels that make up the call between Alice and Bob.

Alice calls Bob and...

Interface

... we want to use a local script to execute some logic on Alice's channel

AGI

... we want to execute a script on a remote machine on Bob's channel

FastAGI

... we want to put Alice into an IVR with fine grained media control, where the IVR is written outside of extensions.conf

ExternalIVR

... we want to control Alice and Bob's underlying channel objects

AMI (with, possibly, AsyncAGI as well)

In general, AMI is used to manage Asterisk and its channels. It does not determine what actions are executed on a particular channel - the dialplan and some AGI interface does that - but it does allow a client to control call generation, aspects of call flow, and other internals of Asterisk.

At its heart, AMI is an asynchronous message bus: it spills events that contain information about the Asterisk system over some transport. In response, clients may request that Asterisk takes some action. These two concepts - actions and events - make up the core of what is AMI. As AMI is asynchronous, as events occur in Asterisk they are immediately sent to the clients. This means that actions issued by entities happen without any synchronization with the events being received, even if those events occur in response to an action. It is the responsibility of entities to associate event responses back to actions.

Clients wishing to use AMI act as clients and connect to Asterisk's AMI server over a supported transport mechanism. Authentication may or may not be enabled, depending on the configuration. Once connected, events can be automatically spilled to the connected clients, or limited in a variety of fashions. A connected client can send an action to the AMI server at any time. Depending on the allowed authorizations, the action may be allowed or disallowed.

More information on the various ways a client can be configured can be seen in [AMI Configuration].

Icon

Sometimes, the term command may be used instead of the term action. With respect to AMI actions, command is synonymous with action, and the two can be treated the same. For the sake of consistency, we've attempted to use the term action where possible.

Historically, AMI has existed in Asterisk as its own core component manager. AMI events were raised throughout Asterisk encoded in an AMI specific format, and AMI actions were processed and passed to the functions that implemented the logic. In Asterisk 12, AMI has been refactored to sit on top of Stasis Core, which is a generic, protocol independent message bus internal to Asterisk. From the perspective of clients wishing to communicate with Asterisk over AMI very little has changed; internally, the Stasis representation affords a much higher degree of flexibility with how messages move through Asterisk.

Unknown macro: {table}
Unknown macro: {tr}
Unknown macro: {td}
Full Size
Unknown macro: {tr}
Unknown macro: {td}

Asterisk's Stasis Core provides a generic publish/subscribe message bus inside of Asterisk. AMI sits on top of Stasis Core, publishing messagse on the Stasis bus (actions) and receiving messages from the bus (events). It translates the generic Stasis messages into an AMI message, and sends those to the appropriate AMI clients.

4. Semantics and Syntax

4.1. Message Sending and Receiving

By default, AMI is an asynchronous protocol that sends events immediately to clients when those events are available. Likewise, clients are free to send actions to AMI at any time, which may or may not trigger additional events. The exception to this is when the connection is over [HTTP/HTTPS]; in that scenario, events are only transmitted as part of the response to an HTTP POST.

Various options for configuration of clients can control which events are sent to a client. Events can be whitelisted/blacklisted either explicitly, or implicitly by [class authorizations]. A separate mechanism for sending/receiving messages is also supported, which allows clients to subscribe only to events associated with tagged endpoints. This changes AMI from a "send everything" message bus to a publish/subscribe message bus that clients can configure themselves for.

4.1.1. Publish/Subscribe

AMI supports an optional publish/subscribe model of event distribution through the use of endpoint tags. While AMI by default sends all events to a client, if the client has been configured with a set of tags, then only events associated with channels that were created in relation to an endpoint with that tag will be sent to the client. Events that are in relation to an action initiated by the client are not checked for tags.

Configuration Example
Unknown macro: {table}
Unknown macro: {tr}
Unknown macro: {td}
sip.conf
[sip_peer_a](my_peer_template)
type=peer
secret=secret
tag=endpoint_group_one
tag=special_endpoints

[sip_peer_b](my_peer_template)
type=peer
secret=secret
tag=endpoint_group_two
Unknown macro: {td}

Two peers have been defined: sip_peer_a and sip_peer_b. sip_peer_a has tags of endpoint_group_one and special_endpoints, while sip_peer_b has a tag of endpoint_group_two.

Unknown macro: {tr}
Unknown macro: {td}
manager.conf
[manager_account]
secret=mysecret
read=all
write=all
tag=endpoint_group_one
...
Unknown macro: {td}

A manager account has been set up to only receive events related to channels that correspond with endpoints with the tag endpoint_group_one. Because SIP peer sip_peer_a has that tag, the AMI client authenticated under manager_account will receive events from channels associated with that endpoint. It will not receive channel events associated with SIP peer sip_peer_b, as it does not share that tag.

Icon

An AMI client receives events from channels with an endpoint's tag if the intersection of the tag sets for the client and the channel is not the empty set; that is, only a single tag has to match.

In addition to channels created for endpoints via the dialplan or by channel drivers for inbound calls, tags may also be added to outbound channels via the Originate action. Tags may be added to channels via the CHANNEL dialplan function.

4.1.1.1. Properties of Tags

Tags are constant properties of channels; that is, once a tag is added it cannot be modified. Tags can be added to channels on creation and during a channel's lifetime; however, once a tag is added to a channel the tag cannot be removed and will persist until the channel's destruction. When a tag is added to a channel after the channel's creation, a TagAdded event MUST be sent to all clients. Tags that are created with a channel are included in the channel's NewChannel event.

4.1.1.2. Local Channels and Tags

Local channels have no configuration, and are not associated with endpoints. As such, based on the previous definition of tag subscriptions, an AMI client would never receive events associated with Local channels. This is problematic when you have a Local channel tied to an Asterisk application, as opposed to another channel. Say we have a tagged SIP channel in a bridge with a non-optimizing Local channel that is locally bridged with a source of music (or is playing back some sound file). By default, the only BridgeEnter/BridgeLeave events we would receive would be the events associated with the SIP channel. This means that we would not be able to determine what sound files were being played back to the SIP channel, as that information is associated with the Local channel.

This scenario leads to the following exception: Local channels MUST inherit the tags of whatever channels they are bridged to, either in a local bridge or core bridge.

4.1.1.3. Objects and Tags

While tags are typically used by some channel technology's definition of an "endpoint", other objects in Asterisk can also be associated with tags. This includes the following:

  • Bridges (created either via the dialplan or through an AMI action)
    • Parking Lots
    • ConfBridge conferences
  • Queues
  • VoiceMail Mailboxes

4.2. Message Layout

AMI is an ASCII protocol that provides bidirectional communication with clients. Each field in an AMI message - action or event - is delineated by the '\r\n' characters. An action or event is terminated by an additional '\r\n' character. Within a message, each field is a key value pair delineated by a ':'. A single space MUST follow the ':' and preceed the value.

Event: NewChannel
Channel: SIP/misspiggy-00000001
Uniqueid: G0001-asdf87-1n23j-18237
ChannelState: 3
ChannelStateDesc: Up
CallerIDNum: 657-5309
CallerIDName: Miss Piggy
AccountCode: Pork
Exten: 31337
Context: inbound

This is syntantically equivalent to the following ASCII string:

Event: NewChannel\r\nChannel: SIP/misspiggy-00000001\r\n
Uniqueid: G0001-asdf87-1n23j-18237\r\nChannelState: 3\r\n
ChannelStateDesc: Up\r\nCallerIDNum: 657-5309\r\n
CallerIDName: Miss Piggy\r\nAccountCode: Pork\r\n
Exten: 31337\r\nContext: inbound\r\n\r\n

Actions are specified in a similar manner. Note that depending on the message, some keys can be repeated.

Action: Originate
ActionId: SDY4-12837-123878782
Channel: SIP/kermit
Context: outbound
Exten: s
Priority: 1
CallerID: "Kermit the Frog" <123-4567>
Account: FrogLegs
Variable: MY_VAR=frogs
Variable: HIDE_FROM_CHEF=true

In addition, no ordering is implied on message specific keys. Hence, the following two messages are semantically the same.

Action: Originate
ActionId: SDY4-12837-123878782
Channel: SIP/kermit
Context: outbound
Exten: s
Priority: 1
CallerID: "Kermit the Frog" <123-4567>
Account: FrogLegs
Variable: MY_VAR=frogs
Variable: HIDE_FROM_CHEF=true
ActionId: SDY4-12837-123878782
Action: Originate
Variable: HIDE_FROM_CHEF=true
Variable: MY_VAR=frogs
Channel: SIP/kermit
Account: FrogLegs
Context: outbound
Exten: s
CallerID: "Kermit the Frog" <123-4567>
Priority: 1

The exception to this is AMI events. In an event, the Event key MUST be the first key. All other keys in an event are unordered. If an action or event contains duplicate keys, such as Variable, the order in which they are processed is the order in which they occur within the action or event.

Keys are case insensitive. Hence, the following keys are equivalent:

Action: Originate
ACTION: Originate
action: Originate

The case sensitivity for values is left up to the context in which they are interpreted.

4.2.1. Common Fields

4.2.1.1. Actions

4.2.1.1.1. General Fields

This section lists fields that apply generally to all actions.

4.2.1.1.1.1. Action

Action specifies the action to execute within Asterisk. Each value corresponds to a unique action to execute within Asterisk. The value of the Action field determines the allowed fields within the rest of the message. By convention, the first field in any action is the Action field.

4.2.1.1.1.2. ActionId

ActionId is a universal unique identifier that can optionally be provided with an action. If provided in an action, events that are related to that action will contain the same ActionId value, allowing a client to associate actions with events that were caused by that action.

It is recommended that clients always provide an ActionId for each action they submit.

4.2.1.1.2. Channels

This section lists fields that apply generally to all actions that interact upon an Asterisk channel. Note that an Action that interacts with a channel must supply either the Channel field or the Uniqueid field.

Icon

In the past, only the Channel field could be used. As Asterisk can change the name of a channel, the Uniqueid is now the preferred way of initiating an action on a channel.

4.2.1.1.2.1. Channel

The current Asterisk channel name. A channel name is provided by AMI to clients during a NewChannel event. Note that Asterisk channel names can change during the lifetime of the communication path between the endpoint and Asterisk. These channel name changes are indicated by a Rename event.

4.2.1.1.2.2. Uniqueid

A universal unique identifier that acts as a handle to the channel. Once a communication path between an endpoint and Asterisk is established, a Uniqueid is created as a handle to that communication path. This survives operations within Asterisk that may change the channel object or the channel name.

4.2.1.2. Events

4.2.1.2.1. General Fields

This section lists fields that apply generally to all events.

4.2.1.2.1.1. Event

The unique name of the event being raised. The value of the Event field determines the rest of the contents of the message. The Event field MUST be the first field in an AMI message.

4.2.1.2.1.2. ActionId

If present, the Action's corresponding [ActionId] that caused this event to be created. If an Action contained an ActionId, any event relating the success or failure of that action MUST contain an ActionId field with the same value.

4.2.1.2.1.3. Privilege

The class authorizations associated with this particular event. The class authorizations for a particular event are in a comma-delineated list. For more information, see [class authorizations].

4.2.1.2.2. Channels

This section lists fields that apply generally to all events that occur due to interactions upon an Asterisk channel.

Icon

In cases where an event represents interactions on multiple channels, the following fields will be appended with a sequentially increasing integer, beginning with 1.

4.2.1.2.2.1. Channel

The current Asterisk channel name. This corresponds to the [Channel] field in actions.

4.2.1.2.2.2. Uniqueid

A universal unique identifier that acts as a handle to the channel. This corresponds to the [Uniqueid] field in actions.

4.2.1.2.2.3. ChannelState

The current state of the channel, represented as an integer value. The valid values are:

Value

State

Description

0

Down

Channel is down and available

1

Rsrvd

Channel is down, but reserved

2

OffHook

Channel is off hook

3

Dialing

The channel is in the midst of a dialing operation

4

Ring

The channel is ringing

5

Ringing

The remote endpoint is ringing. Note that for many channel technologies, this is the same as Ring.

6

Up

A communication path is established between the endpoint and Asterisk

7

Busy

A busy indication has occurred on the channel

8

Dialing Offhook

Digits (or equivalent) have been dialed while offhook

9

Pre-ring

The channel technology has detected an incoming call and is waiting for a ringing indication

10

Unknown

The channel is an unknown state

Icon

Depending on the underlying channel technology, not all states will be used. Channels typically begin in either the Down or Up states.

4.2.1.2.2.4. ChannelStateDesc

The text description of the channel state. This will be one of the State descriptions in the table in [ChannelState].

4.2.1.2.2.5. CallerIDNum

The current caller ID number. If the caller ID number is not known, the string "<unknown>" is returned instead.

4.2.1.2.2.6. CallerIDName

The current caller ID name. If the caller ID name is not known, the string "<unknown>" is returned instead.

4.2.1.2.2.7. ConnectedLineNum

The current connected line number. If the connected line number is not known, the string "<unknown>" is returned instead.

4.2.1.2.2.8. ConnectedLineName

The current connected line name. If the connected line name is not known, the string "<unknown>" is returned instead.

4.2.1.2.2.9. Tag

The tags associated with the channel. If more than one tag is associated with the channel, the tags will be in a comma delineated list.

4.2.1.2.3. Bridges

Events raised on bridges most often involve one or more channels. As such, the fields in [Channels] are a subset of the fields in bridge events. If multiple channels in a bridge event is represented, the nomenclature Channel1, Channel2, Uniqueid1, Uniqueid2, etc. is used.

4.2.1.2.3.1. Bridgetype

Whether or not the Bridge being referenced is 'native' or 'core'. A native bridge is one that occurs directly between the endpoint's respective technologies, bypassing Asterisk processing as much as possible. A core bridge implies full decoding of the media in the Asterisk core.

4.2.1.2.3.2. BridgeUniqueid

A unique identifier for the bridge. BridgeEnter and BridgeLeave events MUST contain a BridgeUniqueid field, which provides a way to determine which bridge a channel has entered/left.

4.2.1.2.4. Action Responses

When an Action is submitted to AMI, the success or failure of the action is communicated in subsequent events.

4.2.1.2.4.1. Response

Contains whether or not the action succeeded or failed. Valid values are "Success" or "Error". Events that are in response to an action MUST include this field.

4.2.1.2.4.2. EventList

Some actions will cause a chain of events to be created. Events that are a response to an action that causes such a sequence will contain the EventList field with a value of "start". When all generated events have been sent, a final event will be sent containing the EventList field with the value "complete".

If, for some reason, an error occurs and the events cannot be sent, an event will be sent with an EventList field that contains the value "cancelled".

Note that the events that mark the completion or cancellation of an event list are not technically action responses, and have their own specific event types.

4.2.1.2.4.3. Message

An optional text message that provides additional contextual information regarding the success or failure of the action.

4.3. Actions

The supported actions for Asterisk 12 are listed here:

Asterisk 12 AMI Actions

Icon

These currently link to the Actions for Asterisk 11. This will be changed to point to documentation for Asterisk 12 when that documentation is available.

4.4. Events

The supported events for Asterisk 12 are listed here:

Asterisk 12 AMI Events

Icon

These currently link to the Actions for Asterisk 11. This will be changed to point to documentation for Asterisk 12 when that documentation is available.

4.5. Channel Interaction/Lifetime

While channels are independent of AMI, they have a large implication on the events sent out over AMI. Many of the events in AMI correspond to changes in channel state. While AMI is an asynchronous protocol, there is some ordering with respect to the events that are relayed for a particular channel. This section provides the basic event relationships that are guaranteed through AMI.

4.5.1. Basic Channel Lifetime

All channels begin with a NewChannel event. A NewChannel contains the following fields:

  • The current [Channel] name
  • The [Uniqueid] that acts as a handle to the channel for that channel's lifetime
  • The [Tag] field that lists all tags associated with the channel

Notification of a Channel being disposed of occurs via a Hangup event. A Hangup signals the termination of the channel associated with the Uniqueid. After the Hangup event, no further events will be raised in relation to the channel with that Uniqueid, and the communication between the endpoint and Asterisk via that channel is terminated.

4.5.2. Channel Variables

For each channel variable that is changed, a VarSet event is sent to the client. The VarSet event contains the new value of the appropriate channel variable.

4.5.3. DTMF

DTMF is indicated via a DTMFBegin/DTMFEnd events. A DTMFEnd event MUST convey the duration of the DTMF tone in milliseconds.

Icon

The combination of DTMFBegin/DTMFEnd events replaces the deprecated DTMF event.

4.5.4. Dialplan Execution

As a channel executes operations in the dialplan, those operations are conveyed via a NewExten event. Each transition to a new combination of context, extension, and priority will trigger a NewExten event.

Example
Unknown macro: {table}
Unknown macro: {tr}
Unknown macro: {td}
Event: Newexten
Privilege: dialplan,all
Channel: SIP/kermit-00000001
Uniqueid: 550e8400-e29b-41d4-a716-446655440000
...
Context: default
Extension: h
Priority: 1
Application: NoOp
AppData: Ah Snap
Unknown macro: {td}

Kermit the Frog's SIP channel has been hung up, and he's been tossed rudely into the h extension. This event informs the clients that Kermit's channel is in context default, extension h, priority 1, and is about to execute the NoOp application with application data "Ah Snap".

4.5.5. Dialing

Dial operations always result in two events: a DialBegin event that signals the beginning of the dial to a particular destination, and a DialEnd event that signals the end of the dialing. In parallel dialing situations, DialBegin/DialEnd events MUST be sent for each channel dialed. For each DialBegin event sent, there MUST be a corresponding DialEnd event.

Icon

The pair of DialBegin/DialEnd events replaces the deprecated Dial event. Note that the Dial event signalling the end of dialing would not normally be sent until after bridging was complete; this operation should now occur when the dial operation has determined the status of a particular called channel.

A DialEnd occurs whenever Asterisk knows the final state of the channel that it was attempting to establish. This is communicated in the DialStatus field.

Simple Successful Dial
Unknown macro: {table}
Unknown macro: {tr}
Unknown macro: {td}
Event: NewChannel
Channel: SIP/animal-00000001
Uniqueid: 550e8400-e29b-41d4-a716-446655440000
...
Event: DialBegin
Channel: SIP/animal-00000001
Uniqueid: 550e8400-e29b-41d4-a716-446655440000
...
Event: DialEnd
Channel: SIP/animal-00000001
Uniqueid: 550e8400-e29b-41d4-a716-446655440000
DialStatus: ANSWER
...
Unknown macro: {td}

In this example, we decide to dial Animal. We create a new channel to between Asterisk and Animal's SIP device, and begin a dial operation. When Animal eats his handset (causing the device to think he merely took it off the hook), the SIP device answers and the dial operation completes. This indicated by a DialEnd event. At this point, the channel is ready for something - it can execute in the dialplan, or be immediately bridged with another channel (which is usually the channel that initiated the dial operation in the first place.)

Simple Failed Dial
Unknown macro: {table}
Unknown macro: {tr}
Unknown macro: {td}
Event: NewChannel
Channel: SIP/animal-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440002
...
Event: DialBegin
Channel: SIP/animal-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440002
...
Event: DialEnd
Channel: SIP/animal-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440002
DialStatus: TIMEDOUT
...
Event: Hangup
Channel: SIP/animal-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440002
...
Unknown macro: {td}

In this example, we decide to dial Animal again. Unfortunately, Animal ate his handset, so we inevitably time out. When we do, a DialEnd event is received indicating the failure.

Parallel Dial
Unknown macro: {table}
Unknown macro: {tr}
Unknown macro: {td}
Event: NewChannel
Channel: SIP/animal-00000003
Uniqueid: 550e8400-e29b-41d4-a716-446655440003
...
Event: NewChannel
Channel: SIP/drteeth-00000004
Uniqueid: 550e8400-e29b-41d4-a716-446655440004
...
Event: DialBegin
Channel: SIP/animal-00000003
Uniqueid: 550e8400-e29b-41d4-a716-446655440003
...
Event: DialBegin
Channel: SIP/drteeth-00000004
Uniqueid: 550e8400-e29b-41d4-a716-446655440004
...
Event: DialEnd
Channel: SIP/drteeth-00000004
Uniqueid: 550e8400-e29b-41d4-a716-446655440004
DialStatus: ANSWER
...
Event: DialEnd
Channel: SIP/animal-00000003
Uniqueid: 550e8400-e29b-41d4-a716-446655440003
DialStatus: CANCEL
...
Unknown macro: {td}

In this example, we decide to dial Animal and Dr. Teeth. Dr. Teeth immediately answers, and so we cancel the dial to Animal. We can now do something with Dr. Teeth's channel (such as bridge him with his dentist) - however, Animal's channel is implicitly destroyed, as his device never answered.

4.5.6. Bridging

A bridge contains 0 or more channels. When a channel is in a bridge, it has the potential to communicate with other channels within the bridge. Before channels enter a bridge, a BridgeCreate event is sent, indicating that a bridge has been created. When a bridge is destroyed, a BridgeDestroy event is sent. All channels within a bridge must leave a bridge prior to the BridgeDestroy event being sent.

When a channel enters a bridge, a BridgeEnter event is raised. When a channel is put into a bridge, it is implied that the channel can pass media between other channels in the bridge. This is not guaranteed, as other properties on the channel or bridge may restrict media flow. When a channel leaves a bridge, a corresponding BridgeLeave event is raised. A BridgeLeave event MUST mean that the channel that left the bridge can no longer pass media to other channels still in the bridge. This does not necessarily mean that the channel is being hung up; rather, that it is no longer in a communication path with some other set of channels. In some scenarios, a channel may enter a bridge that has no other channels; this could occur when the channel has been put in some hold state (such as in a parking lot).

In all cases, if a channel has a BridgeEnter event, it MUST have a corresponding BridgeLeave event. If a channel is hung up and it is in a bridge, a BridgeLeave event MUST precede the Hangup event.

If a transfer operation begins, a Transfer event MUST be raised for the channels involved in the transfer prior to those channels leaving the bridge or entering another bridge. Similarly, if a channel enters a parking lot, a ParkedCall event MUST be raised for the channel prior to it entering the bridge that represents the parking lot.

If a property of a bridge is changed, such as the type going from a "native" bridge to a "core" bridge, then the BridgeUpdate event is sent with the updated parameters.

4.5.6.1. Two Party Bridging

Parties are bridged by virtue of them entering a bridge, as indicated by a BridgeEnter. When parties are no longer talking, a BridgeLeave event is sent for each channel that leaves the bridge.

Example - Two Party Bridge
Unknown macro: {table}
Unknown macro: {tr}
Unknown macro: {td}
Event: BridgeCreate
Bridgetype: core
BridgeUniqueid: 1234
...
Event: BridgeEnter
Bridgetype: core
BridgeUniqueid: 1234
Channel: SIP/kermit-00000001
Uniqueid: 550e8400-e29b-41d4-a716-446655440000
...
Unknown macro: {td}

Kermit the Frog's SIP channel enters into Bridge 1234. As a result, the bridge is first created (denoted by the BridgeCreate event), and then Kermit's channel enters the bridge (the BridgeEnter event)

Unknown macro: {tr}
Unknown macro: {td}
Event: BridgeEnter
Bridgetype: core
BridgeUniqueid: 1234
Channel: SIP/gonzo-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440001
...
Unknown macro: {td}

Gonzo the Great enters the bridge and talks with Kermit. Note that the bridge Gonzo entered is Bridge 1234; by virtue of this being the same bridge Kermit entered, we know that the two can talk.

Unknown macro: {tr}
Unknown macro: {td}
Event: BridgeLeave
Bridgetype: core
BridgeUniqueid: 1234
Channel: SIP/kermit-00000001
Uniqueid: 550e8400-e29b-41d4-a716-446655440000
...

Event: Hangup
Channel: SIP/kermit-00000001
Uniqueid: 550e8400-e29b-41d4-a716-446655440000
...
Unknown macro: {td}

Kermit decided he was tired of Gonzo's pontificating, and hung up on Gonzo. We are first alerted that Kermit has left the bridge; quickly thereafter, we receive the Hangup event indicating that Kermit's channel is dead.

Unknown macro: {tr}
Unknown macro: {td}
Event: BridgeLeave
Bridgetype: core
BridgeUniqueid: 1234
Channel: SIP/gonzo-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440001
...

Event: Hangup
Channel: SIP/gonzo-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440001
...

Event: BridgeDestroy
Bridgetype: core
BridgeUniqueid: 1234
...
Unknown macro: {td}

Asterisk is configured to not let Gonzo continue on in the dialplan once his bridge is broken. As such, Gonzo is forcibly ejected from the bridge, and is hung up on after. Because no channels are left in the bridge, the bridge is destroyed.

Icon

In this scenario, it was perfectly acceptable for either Kermit or Gonzo's channels to continue after the bridge was broken. Since this represents the most basic two-party call scenario, once one party decided to hang up, the other party was also hung up on.

4.5.6.2. Transfers

Transfers begin with a Transfer event, which indicates information about the transfer that is about to take place. Subsequently, BridgeLeave/BridgeEnter events are used to indicate which channels are talking at different stages during the transfer.

Example - Blind Transfer
Unknown macro: {table}
Unknown macro: {tr}
Unknown macro: {td}
Event: BridgeCreate
Bridgetype: core
BridgeUniqueid: 1234
...
Event: BridgeEnter
Bridgetype: core
BridgeUniqueid: 1234
Channel: SIP/kermit-00000001
Uniqueid: 550e8400-e29b-41d4-a716-446655440000
...
Unknown macro: {td}

Kermit the Frog's SIP channel enters into Bridge 1234

Unknown macro: {tr}
Unknown macro: {td}
Event: BridgeEnter
Bridgetype: core
BridgeUniqueid: 1234
Channel: SIP/fozzie-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440001
...
Unknown macro: {td}

Fozzie Bear's SIP channel enters into Bridge 1234. At this point, Fozzie and Kermit can talk to each other.

Unknown macro: {tr}
Unknown macro: {td}
Event: Transfer
Privilege: call,all
TransferMethod: Core
TransferType: Blind
Channel: SIP/fozzie-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440001
TargetChannel: SIP/kermit-00000001
TargetUniqueid: 550e8400-e29b-41d4-a716-446655440000
TransferExten: call_miss_piggy
TransferContext: default
Unknown macro: {td}

Fozzie decides he's tired of telling Kermit jokes and blind transfers him off to Miss Piggy via the dialplan extension call_miss_piggy. The fact that a transfer is occurring starts off with the Transfer event. This tells the user who initiates the transfer, who is being transferred, and where the transfer target is going.

Unknown macro: {tr}
Unknown macro: {td}
Event: BridgeLeave
Bridgetype: core
BridgeUniqueid: 1234
Channel: SIP/kermit-00000001
...
Unknown macro: {td}

Kermit leaves the bridge with Fozzie.

Unknown macro: {tr}
Unknown macro: {td}
Icon

At this point, the order of the events that affect Fozzie versus Kermit are not defined. Fozzie and Kermit are no longer bridged together, and their respective events may arrive in any order.

Unknown macro: {tr}
Unknown macro: {td}
Event: BridgeLeave
Bridgetype: core
BridgeUniqueid: 1234
Channel: SIP/fozzie-00000002
...

Event: BridgeDestroy
Bridgetype: core
BridgeUniqueid: 1234
...
Unknown macro: {td}

Because Fozzie isn't talking to anyone anymore, he leaves the bridge as well. At this point Asterisk could hang up Fozzie's channel, or, if configured, he could continue on in the dialplan (say, perhaps, to talk to his rubber chicken).

Unknown macro: {tr}
Unknown macro: {td}
Event: NewChannel
Channel: SIP/miss_piggy-00000003
Uniqueid: 550e8400-e29b-41d4-a716-446655440002
...
Event: DialBegin
Channel: SIP/miss_piggy-00000003
Uniqueid: 550e8400-e29b-41d4-a716-446655440002
...
Event: DialEnd
Channel: SIP/miss_piggy-00000003
Uniqueid: 550e8400-e29b-41d4-a716-446655440002
DialStatus: ANSWER
...
Unknown macro: {td}

The act of Kermit entering into extension call_miss_piggy causes a new channel to be created between Asterisk and Miss Piggy. Asterisk immediately dials Miss Piggy, who answers.

Unknown macro: {tr}
Unknown macro: {td}
Event: BridgeCreate
Bridgetype: core
BridgeUniqueid: 1235
...
Event: BridgeEnter
Bridgetype: core
BridgeUniqueid: 1235
Channel: SIP/kermit-00000001
Uniqueid: 550e8400-e29b-41d4-a716-446655440000
...
Unknown macro: {td}

Kermit enters into a bridge. Note that the BridgeUniqueid is different than the previous bridge's BridgeUniqueid.

Unknown macro: {tr}
Unknown macro: {td}
Event: BridgeEnter
Bridgetype: core
BridgeUniqueid: 1235
Channel: SIP/miss_piggy-00000003
Uniqueid: 550e8400-e29b-41d4-a716-446655440002
...
Unknown macro: {td}

Miss Piggy enters the bridge. At this point, Kermit and Miss Piggy can converse, and the blind transfer is complete.

4.5.7. Local Channels

Local channels are different than 'normal' channels in Asterisk, in that they have several properties that make them unique:

  • A Local channel never has a physical device that it directly communicates with - it exists as a virtual channel within Asterisk.
  • A Local channel can communicate with one or more channels, or directly with an Asterisk application.
  • Local channels can be optimized out of a communication path, causing the state of bridges and channels to change.
  • A Local channel is actually always two separate channels with a special bridge between them.
Full Size

While the Local channel exists as a single concept from the perspective of the dialplan, from the perspective of an AMI client, it is always two channels that are tied together by a special bridge. When the bridge between the Local channel halves is formed, a LocalBridge event is raised denoting that the two are connected.

4.5.7.1. Local Channel Creation

When a Local channel is created, a NewChannel event is created for each half of the Local channel being created. Each Local channel half has its own Channel field name and its own Uniqueid - for the purposes of an AMI client, they are two separate channels that can be manipulated separately but whose lifetime is tied together. When either Local channel half is hungup, denoted by a Hangup event, the other Local channel half will also be hungup automatically.

4.5.7.2. Local Channel Bridging

Local channels receive bridge events in the same fashion as other channels. Thus, when they join a bridge, they receive a BridgeEnter event and when they leave a bridge, a corresponding BridgeLeave event. The exception to this is a Local channel bridge, denoted by a LocalBridge event. Once a LocalBridge event occurs, the two Local channel halves can pass frames back and forth between each other. Because the lifetime of the Local channel halves is the same, there is no event representing a Local channel bridge being broken.

Example - Local Channel between two SIP Channels
Unknown macro: {table}
Unknown macro: {tr}
Unknown macro: {td}
Event: NewChannel
Channel: SIP/miss_piggy-00000003
Uniqueid: 550e8400-e29b-41d4-a716-446655440002
...
Unknown macro: {td}

Miss Piggy decides to call Kermit the Frog, and a channel is created between Asterisk and Miss Piggy's SIP device.

Unknown macro: {tr}
Unknown macro: {td}
Event: NewChannel
Channel: Local/kermit@default-00000001;1
Uniqueid: 550e8400-e29b-41d4-a716-446655440003
...
Event: NewChannel
Channel: Local/kermit@default-00000001;2
Uniqueid: 550e8400-e29b-41d4-a716-446655440004
...
Event: LocalBridge
Channel1: Local/kermit@default-00000001;1
Channel2: Local/kermit@default-00000001;2
Uniqueid1: 550e8400-e29b-41d4-a716-446655440003
Uniqueid2: 550e8400-e29b-41d4-a716-446655440004
LocalOptimization: No
...Event: DialBegin
Channel: Local/kermit@default-00000001;1
Uniqueid: 550e8400-e29b-41d4-a716-446655440003
...
Unknown macro: {td}

Instead of dialing Kermit the Frog directly, a Local channel is created inside Asterisk and Asterisk dials one half of the Local channel. Note that both halves of the Local channel are created first; the Local channel bridges its two halves together; then a DialBegin event indicates that Asterisk is attempting to connect to one half of the Local channel, Local/kermit@default-00000001;1.

Unknown macro: {tr}
Unknown macro: {td}
Event: DialEnd
Channel: Local/kermit@default-00000001;1
Uniqueid: 550e8400-e29b-41d4-a716-446655440003
DialStatus: ANSWER
...
Event: BridgeCreate
Bridgetype: core
BridgeUniqueid: 1234
...
Event: BridgeEnter
Bridgetype: core
BridgeUniqueid: 1234
Channel: SIP/miss_piggy-00000003
Uniqueid: 550e8400-e29b-41d4-a716-446655440002
...
Event: BridgeEnter
Bridgetype: core
BridgeUniqueid: 1234
Channel: Local/kermit@default-00000001;1
Uniqueid: 550e8400-e29b-41d4-a716-446655440003
...
Unknown macro: {td}

The dial operation succeeds and Miss Piggy is bridged with one half of the Local channel that will eventually connect her to Kermit. Note that Miss Piggy doesn't realize that any changes have occurred - from her perspective, nothing has really happened, as the Local channel is a virtual channel and we haven't yet dialed Kermit.

Unknown macro: {tr}
Unknown macro: {td}
Event: NewChannel
Channel: SIP/kermit-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440005
...
Event: DialBegin
Channel: SIP/kermit-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440005
...
Event: DialEnd
Channel: SIP/kermit-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440005
DialStatus: ANSWER
...
Event: BridgeCreate
Bridgetype: core
BridgeUniqueid: 5678
...
Event: BridgeEnter
Bridgetype: core
BridgeUniqueid: 5678
Channel: Local/kermit@default-00000001;2
Uniqueid: 550e8400-e29b-41d4-a716-446655440004
...
Event: BridgeEnter
Bridgetype: core
BridgeUniqueid: 5678
Channel: SIP/kermit-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440005
...
Unknown macro: {td}

We dial Kermit, and he foolishly answers. He is now bridged with the second half of the Local channel, Local/kermit@default-00000001;2, as both that channel and the SIP channel communicating with his SIP device have corresponding BridgeEnter events.

Icon

In those situations where both a Local channel half and a SIP channel are bridged, there is no ordering guaranteed on which channel enters the bridge first - however, both a Local channel half and the SIP channel will be bridged in the same bridge.

Unknown macro: {tr}
Unknown macro: {td}
Event: BridgeLeave
Bridgetype: core
BridgeUniqueid: 1234
Channel: SIP/miss_piggy-00000003
Uniqueid: 550e8400-e29b-41d4-a716-446655440002
...
Event: Hangup
Channel: SIP/miss_piggy-00000003
Uniqueid: 550e8400-e29b-41d4-a716-446655440002
...
Event: BridgeLeave
Bridgetype: core
BridgeUniqueid: 1234
Channel: Local/kermit@default-00000001;1
Uniqueid: 550e8400-e29b-41d4-a716-446655440003
...
Event: Hangup
Channel: Local/kermit@default-00000001;1
Uniqueid: 550e8400-e29b-41d4-a716-446655440003
...
Event: BridgeDestroy
Bridgetype: core
BridgeUniqueid: 1234
...
Event: BridgeLeave
Bridgetype: core
BridgeUniqueid: 5678
Channel: Local/kermit@default-00000001;2
Uniqueid: 550e8400-e29b-41d4-a716-446655440004
...
Event: Hangup
Channel: Local/kermit@default-00000001;2
Uniqueid: 550e8400-e29b-41d4-a716-446655440004
...
Event: BridgeLeave
Bridgetype: core
BridgeUniqueid: 5678
Channel: SIP/kermit-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440005
...
Event: Hangup
Channel: SIP/kermit-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440005
...

Event: BridgeDestroy
Bridgetype: core
BridgeUniqueid: 5678
Unknown macro: {td}

Miss Piggy, in a fit of frustrated porkine anger, karate chops her SIP phone, causing it to hangup. She leaves the bridge with the Local channel half, Local/kermit@default-00000001;1. This causes it to be hungup, as no one else is in the bridge. Because Local/kermit@default-00000001;1 is hungup, its corresponding other Local channel half, Local/kermit@default-00000001;2, leaves the bridge with Kermit's SIP phone and is also hung up. Kermit's SIP channel realizes it's all by itself (it's not easy being green), leaves the bridge it had with its Local channel half, and hangs up as well.

4.5.7.3. Local Channel Optimization

Local channels have an option wherein they can be optimized away if there are two other channels in the Answered state on either end of the Local channel half. This option is performed on Local channel creation, and is communicated back to the AMI clients in the LocalBridge event in the LocalOptimization field. When a Local channel optimization occurs, a LocalOptimization event is sent that indicates the channels involved in the optimization and any bridges they happen to be in. If, after the Local channel optimization, either bridges contains only a single channel, then a single channel in that bridge is moved to the bridge that had the other channel half.

Icon

It is not defined which channel is moved first - in this situation, that is an implementation detail left up to Asterisk. Suffice to say, if a Local channel is optimized away, Asterisk attempts to rebridge the channels left over.

Example - Optimizing Local Channel between two SIP Channels
Unknown macro: {table}
Unknown macro: {tr}
Unknown macro: {td}
Event: NewChannel
Channel: SIP/gonzo-00000001
Uniqueid: 550e8400-e29b-41d4-a716-446655440000
...
Unknown macro: {td}

Gonzo decides to call Kermit the Frog, and a channel is created between Asterisk and Gonzo's SIP device.

Unknown macro: {tr}
Unknown macro: {td}
Event: NewChannel
Channel: Local/kermit@default-00000001;1
Uniqueid: 550e8400-e29b-41d4-a716-446655440001
...
Event: NewChannel
Channel: Local/kermit@default-00000001;2
Uniqueid: 550e8400-e29b-41d4-a716-446655440002
...
Event: DialBegin
Channel: Local/kermit@default-00000001;1
Uniqueid: 550e8400-e29b-41d4-a716-446655440001
...
Unknown macro: {td}

Instead of dialing Kermit the Frog directly, a Local channel is created inside Asterisk and Asterisk dials it.

Unknown macro: {tr}
Unknown macro: {td}
Event: DialEnd
Channel: Local/kermit@default-00000001;1
Uniqueid: 550e8400-e29b-41d4-a716-446655440001
DialStatus: ANSWER
...
Event: BridgeCreate
Bridgetype: core
BridgeUniqueid: 1234
...
Event: BridgeEnter
Bridgetype: core
BridgeUniqueid: 1234
Channel: SIP/gonzo-00000001
Uniqueid: 550e8400-e29b-41d4-a716-446655440000
...
Event: BridgeEnter
Bridgetype: core
BridgeUniqueid: 1234
Channel: Local/kermit@default-00000001;1
Uniqueid: 550e8400-e29b-41d4-a716-446655440001
...
Event: LocalBridge
Channel1: Local/kermit@default-00000001;1
Channel2: Local/kermit@default-00000001;2
Uniqueid1: 550e8400-e29b-41d4-a716-446655440001
Uniqueid2: 550e8400-e29b-41d4-a716-446655440002
LocalOptimization: Yes
...
Unknown macro: {td}

The dial operation succeeds and Gonzo is bridged with one half of the Local channel that will eventually connect him (it?) to Kermit. The Local channel itself has also decided to go ahead and bridge the two local halves together, since we have one half of the full chain of channels established. Note that we are told at this point that the Local channel will attempt to optimize itself away, if Kermit answers.

Unknown macro: {tr}
Unknown macro: {td}
Event: DialBegin
Channel: SIP/kermit-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440003
...
Event: DialEnd
Channel: SIP/kermit-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440003
DialStatus: ANSWER
...
Event: BridgeCreate
Bridgetype: core
BridgeUniqueid: 5678
...
Event: BridgeEnter
Bridgetype: core
BridgeUniqueid: 5678
Channel: Local/kermit@default-00000001;2
Uniqueid: 550e8400-e29b-41d4-a716-446655440002
...
Event: BridgeEnter
Bridgetype: core
BridgeUniqueid: 5678
Channel: SIP/kermit-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440003
...
Unknown macro: {td}

We dial Kermit and he answers. He is now bridged with the second half of the Local channel, Local/kermit@default-00000001;2.

Icon

Note that even in the optimizing case, both the Local channel halves and the other channels involved first enter their respective bridges.

Unknown macro: {tr}
Unknown macro: {td}
Event: LocalOptimization
Channel1: Local/kermit@default-00000001;1
Uniqueid1: 550e8400-e29b-41d4-a716-446655440001
BridgeUniqueid1: 1234
Channel2: Local/kermit@default-00000001;2
Uniqueid2: 550e8400-e29b-41d4-a716-446655440002
BridgeUniqueid2: 5678
...
Event: BridgeLeave
Bridgetype: core
BridgeUniqueid: 5678
Channel: SIP/kermit-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440003
...Event: BridgeEnter
Bridgetype: core
BridgeUniqueid: 1234
Channel: SIP/kermit-00000002
Uniqueid: 550e8400-e29b-41d4-a716-446655440003
...
Unknown macro: {td}

Asterisk determines that it can optimize away the Local channel. It notifies the AMI client that this is about to occur, which Local channels are involved, and what bridges they are currently in. It starts first by moving Kermit into Gonzo's bridge. From their perspective, nothing has happened - they just now happen to be in the same bridge, instead of having a Local channel pass frames for them.

Note that before this happens, a LocalOptimization event is sent indicating that some shenanigans are about to ensue with the Local channels and by extension, the bridges they are in.

Unknown macro: {tr}
Unknown macro: {td}
Event: BridgeLeave
Bridgetype: core
BridgeUniqueid: 5678
Channel1: Local/kermit@default-00000001;2
Uniqueid1: 550e8400-e29b-41d4-a716-446655440002
...
Event: BridgeLeave
Bridgetype: core
BridgeUniqueid: 1234
Channel1: Local/kermit@default-00000001;1
Uniqueid1: 550e8400-e29b-41d4-a716-446655440001
...
Event: Hangup
Channel1: Local/kermit@default-00000001;1
Uniqueid1: 550e8400-e29b-41d4-a716-446655440001
...
Event: Hangup
Channel1: Local/kermit@default-00000001;2
Uniqueid1: 550e8400-e29b-41d4-a716-446655440002
...Event: BridgeDestroy
Bridgetype: core
BridgeUniqueid: 5678
...
Unknown macro: {td}

The Local channels now leave their bridges and are hung up. As a result, the bridge with no channels left in it - Bridge 5678 - is destroyed.

4.5.8. Masquerades

Masquerades have changed

Icon

In the past, masquerades occurred rather frequently - most often in any scenario where a transfer occurred or where a pbx_thread needed to be associated with a channel. This has now changed. Masquerades now rarely occur, and are never communicated to AMI clients. From the perspective of AMI clients, nothing changes - you still use your handle to a channel to communicate with it, regardless of the presence (or lack thereof) of a masquerade operation.

This note only exists to explicitly call out that fact.

4.6. Transports

AMI supports the following transport mechanisms:

  • TCP/TLS
  • HTTP/HTTPS

When clients connect over HTTP/HTTPS, AMI events are queued up for retrieval. Events queued up for a client are automatically retrieved and sent in the response to any POST operation. The WaitEvent action can be used to wait for and retrieve AMI events.

5. Security Considerations

AMI supports security at the transport level via TLS using OpenSSL.

5.1. Class Authorizations

Icon

Do not rely on class authorizations for security. While they provide a means to restrict a client's access to sets of functionality, there are often ways of achieving similar functionality through multiple mechanisms. Do NOT assume that because a class authorization has not been granted to a client, that they can't find a way around it. In general, view class authorizations as a coarse grained way of providing sets of filters.

Events and actions are automatically classified with particular class authorizations. Clients can be configured to support some set of class authorizations, filtering the actions that they can perform and events that they receive. The supported class authorizations are listed below.

Class Type

Description

system

The item is associated with something that reports on the status of the system or manipulates the system in some fashion

call

The item is associated with calls, i.e., state changes in a call, etc.

log

The item is associated with the logging subsystem

verbose

The item is associated with verbose messages

command

The item is associated with execution of CLI commands through AMI

agent

The item is associated with Queue Agent manipulation

user

The item is associated with user defined events

config

The item is associated with manipulating the configuration of Asterisk

dtmf

The item is associated with DTMF manipulation

reporting

The item is associated with querying information about the state of the Asterisk system

cdr

The item is associated with CDR manipulation

dialplan

The item is associated with dialplan execution

originate

The item is associated with originating a channel

agi

The item is associated with AGI execution

cc

The item is associated with call completion

aoc

The item is associated with Advice of Charge

test

The item is associated with some test action

message

The item is associated with out of call messaging

all

The item has all class authorizations associated with it

none

The item has no class authorization associated with it

5.2. Access Control Lists

Access Control Lists can be used to filter connections based on address. If an attempt to connect from an unauthorized address is detected, the connection attempt will be rejected.

5.3. Authorization

Authorization can be provided via the Login action. If a client fails to provide a valid username/password, the connection attempt and any subsequent actions will be rejected. Events will not be sent until the client provides authorized credentials.

The actions that are excluded from successful login are:

  • Login
  • Logout
  • Challenge
Icon

The action Logoff has been replaced by a corresponding action Logout. Logoff has been deprecated in favor of Logout.

6. AMI Configuration

AMI supports the following configuration options. Note that additional configurations MAY be specified; however, these configuration options are valid for Asterisk 12.

6.1. General Settings

Option

Type

Description

Default

enabled

Boolean

Enable AMI

no

webenabled

Boolean

Enable AMI over HTTP/HTTPS

no

port

Integer

The port AMI's TCP server will bind to

5038

bindaddr

IP Address

The address AMI's TCP server will bind to

0.0.0.0

tlsenable

Boolean

Enable TLS over TCP

no

tlsbindaddr

IP Address

The address AMI's TCP/TLS server will bind to

0.0.0.0:5039

tlscertfile

String

The full path to the TLS certificate to use

/tmp/asterisk.pem

tlsprivatekey

String

The full path to the private key. If no path is specified, tlscertfile will be used for the private key.

/tmp/private.pem

tlscipher

String

The string specifying which SSL ciphers to use. Valid SSL ciphers can be found at http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS

 

allowmultiplelogin

Boolean

Allow multiple logins for the same user. If set to no, multiple logins from the same user will be rejected.

Yes

timestampevents

Boolean

Add a Unix epoch Timestamp field to all AMI events

No

authlimit

Integer

The number of unauthenticated clients that can be connected at any time

 

6.2. Client Settings

Note that the name of the client settings context is the username for the client connection.

Option

Type

Description

Default

secret

String

The password that must be provided by the client via the Login action

 

deny

ACL

An address/mask to deny in an ACL. This option may be present multiple times.

 

permit

ACL

An address/mask to allow in an ACL. This option may be present multiple times.

 

acl

String

A Named ACL to apply to the client.

 

setvar

String

A channel variable key/value pair (using the nomenclature VARIABLE=value) that will be set on all channels originated from this client

 

eventfilter

Regular Expression

This option may be present multiple times. This options allows clients to whitelist or blacklist events. A filter is assumed to be a whitelist unless preceeded by a '!'. Evaluation of the filters is as follows:

  • If no filters are configured all events are reported as normal.
  • If there are white filters only: implied black all filter processed first, then white filters.
  • If there are black filters only: implied white all filter processed first, then black filters.
  • If there are both white and black filters: implied black all filter processed first, then white filters, and lastly black filters.

 

read

String

A comma delineated list of the allowed class authorizations applied to events

all

write

String

A comma delineated list of the allowed class authorizations applied to actions

all

tag

String

If present, the client will only receive events that are related to channels created in relation to endpoints that are configured with the same tag. See [Publish/Subscribe] for more information.

 

  • No labels