Skip to end of metadata
Go to start of metadata

AsteriskInfo

Asterisk system information

 Expand source
  • build: BuildInfo (optional) - Info about how Asterisk was built
  • config: ConfigInfo (optional) - Info about Asterisk configuration
  • status: StatusInfo (optional) - Info about Asterisk status
  • system: SystemInfo (optional) - Info about the system running Asterisk

BuildInfo

Info about how Asterisk was built

 Expand source
  • date: string - Date and time when Asterisk was built.
  • kernel: string - Kernel version Asterisk was built on.
  • machine: string - Machine architecture (x86_64, i686, ppc, etc.)
  • options: string - Compile time options, or empty string if default.
  • os: string - OS Asterisk was built on.
  • user: string - Username that build Asterisk

ConfigInfo

Info about Asterisk configuration

 Expand source
  • default_language: string - Default language for media playback.
  • max_channels: int (optional) - Maximum number of simultaneous channels.
  • max_load: double (optional) - Maximum load avg on system.
  • max_open_files: int (optional) - Maximum number of open file handles (files, sockets).
  • name: string - Asterisk system name.
  • setid: SetId - Effective user/group id for running Asterisk.

SetId

Effective user/group id

 Expand source
  • group: string - Effective group id.
  • user: string - Effective user id.

StatusInfo

Info about Asterisk status

 Expand source
  • last_reload_time: Date - Time when Asterisk was last reloaded.
  • startup_time: Date - Time when Asterisk was started.

SystemInfo

Info about Asterisk

 Expand source
  • entity_id: string
  • version: string - Asterisk version.

Variable

The value of a channel variable

 Expand source
  • value: string - The value of the variable requested

Endpoint

An external device that may offer/accept calls to/from Asterisk.

Unlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.

 Expand source
  • channel_ids: List[string] - Id's of channels associated with this endpoint
  • resource: string - Identifier of the endpoint, specific to the given technology.
  • state: string (optional) - Endpoint's state
  • technology: string - Technology of the endpoint

TextMessage

A text message.

 Expand source
  • body: string - The text of the message.
  • from: string - A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message.
  • to: string - A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint.
  • variables: List[TextMessageVariable] (optional) - Technology specific key/value pairs associated with the message.

TextMessageVariable

A key/value pair variable in a text message.

 Expand source
  • key: string - A unique key identifying the variable.
  • value: string - The value of the variable.

CallerID

Caller identification

 Expand source
  • name: string
  • number: string

Channel

A specific communication connection between Asterisk and an Endpoint.

 Expand source
  • accountcode: string
  • caller: CallerID
  • connected: CallerID
  • creationtime: Date - Timestamp when channel was created
  • dialplan: DialplanCEP - Current location in the dialplan
  • id: string - Unique identifier of the channel.

This is the same as the Uniqueid field in AMI.

  • language: string - The default spoken language
  • name: string - Name of the channel (i.e. SIP/foo-0000a7e3)
  • state: string

Dialed

Dialed channel information.

 Expand source

DialplanCEP

Dialplan location (context/extension/priority)

 Expand source
  • context: string - Context in the dialplan
  • exten: string - Extension in the dialplan
  • priority: long - Priority in the dialplan

Bridge

The merging of media from one or more channels.

Everyone on the bridge receives the same audio.

 Expand source
  • bridge_class: string - Bridging class
  • bridge_type: string - Type of bridge technology
  • channels: List[string] - Ids of channels participating in this bridge
  • creator: string - Entity that created the bridge
  • id: string - Unique identifier for this bridge
  • name: string - Name the creator gave the bridge
  • technology: string - Name of the current bridging technology

LiveRecording

A recording that is in progress

 Expand source
  • cause: string (optional) - Cause for recording failure if failed
  • duration: int (optional) - Duration in seconds of the recording
  • format: string - Recording format (wav, gsm, etc.)
  • name: string - Base name for the recording
  • silence_duration: int (optional) - Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds.
  • state: string
  • talking_duration: int (optional) - Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds.
  • target_uri: string - URI for the channel or bridge being recorded

StoredRecording

A past recording that may be played back.

 Expand source
  • format: string
  • name: string

FormatLangPair

Identifies the format and language of a sound file

 Expand source
  • format: string
  • language: string

Sound

A media file that may be played back.

 Expand source
  • formats: List[FormatLangPair] - The formats and languages in which this sound is available.
  • id: string - Sound's identifier.
  • text: string (optional) - Text description of the sound, usually the words spoken.

Playback

Object representing the playback of media to a channel

 Expand source
  • id: string - ID for this playback operation
  • language: string (optional) - For media types that support multiple languages, the language requested for playback.
  • media_uri: string - URI for the media to play back.
  • state: string - Current state of the playback operation.
  • target_uri: string - URI for the channel or bridge to play the media on

DeviceState

Represents the state of a device.

 Expand source
  • name: string - Name of the device.
  • state: string - Device's state

Mailbox

Represents the state of a mailbox.

 Expand source
  • name: string - Name of the mailbox.
  • new_messages: int - Count of new messages in the mailbox.
  • old_messages: int - Count of old messages in the mailbox.

ApplicationReplaced

Base type: Event

Notification that another WebSocket has taken over for an application.

An application may only be subscribed to by a single WebSocket at a time. If multiple WebSockets attempt to subscribe to the same application, the newer WebSocket wins, and the older one receives this event.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.

BridgeAttendedTransfer

Base type: Event

Notification that an attended transfer has occurred.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • destination_application: string (optional) - Application that has been transferred into
  • destination_bridge: string (optional) - Bridge that survived the merge result
  • destination_link_first_leg: Channel (optional) - First leg of a link transfer result
  • destination_link_second_leg: Channel (optional) - Second leg of a link transfer result
  • destination_threeway_bridge: Bridge (optional) - Bridge that survived the threeway result
  • destination_threeway_channel: Channel (optional) - Transferer channel that survived the threeway result
  • destination_type: string - How the transfer was accomplished
  • is_external: boolean - Whether the transfer was externally initiated or not
  • replace_channel: Channel (optional) - The channel that is replacing transferer_first_leg in the swap
  • result: string - The result of the transfer attempt
  • transfer_target: Channel (optional) - The channel that is being transferred to
  • transferee: Channel (optional) - The channel that is being transferred
  • transferer_first_leg: Channel - First leg of the transferer
  • transferer_first_leg_bridge: Bridge (optional) - Bridge the transferer first leg is in
  • transferer_second_leg: Channel - Second leg of the transferer
  • transferer_second_leg_bridge: Bridge (optional) - Bridge the transferer second leg is in

BridgeBlindTransfer

Base type: Event

Notification that a blind transfer has occurred.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • bridge: Bridge (optional) - The bridge being transferred
  • channel: Channel - The channel performing the blind transfer
  • context: string - The context transferred to
  • exten: string - The extension transferred to
  • is_external: boolean - Whether the transfer was externally initiated or not
  • replace_channel: Channel (optional) - The channel that is replacing transferer when the transferee(s) can not be transferred directly
  • result: string - The result of the transfer attempt
  • transferee: Channel (optional) - The channel that is being transferred

BridgeCreated

Base type: Event

Notification that a bridge has been created.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • bridge: Bridge

BridgeDestroyed

Base type: Event

Notification that a bridge has been destroyed.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • bridge: Bridge

BridgeMerged

Base type: Event

Notification that one bridge has merged into another.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • bridge: Bridge
  • bridge_from: Bridge

ChannelCallerId

Base type: Event

Channel changed Caller ID.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • caller_presentation: int - The integer representation of the Caller Presentation value.
  • caller_presentation_txt: string - The text representation of the Caller Presentation value.
  • channel: Channel - The channel that changed Caller ID.

ChannelCreated

Base type: Event

Notification that a channel has been created.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • channel: Channel

ChannelDestroyed

Base type: Event

Notification that a channel has been destroyed.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • cause: int - Integer representation of the cause of the hangup
  • cause_txt: string - Text representation of the cause of the hangup
  • channel: Channel

ChannelDialplan

Base type: Event

Channel changed location in the dialplan.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • channel: Channel - The channel that changed dialplan location.
  • dialplan_app: string - The application about to be executed.
  • dialplan_app_data: string - The data to be passed to the application.

ChannelDtmfReceived

Base type: Event

DTMF received on a channel.

This event is sent when the DTMF ends. There is no notification about the start of DTMF

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • channel: Channel - The channel on which DTMF was received
  • digit: string - DTMF digit received (0-9, A-E, # or *)
  • duration_ms: int - Number of milliseconds DTMF was received

ChannelEnteredBridge

Base type: Event

Notification that a channel has entered a bridge.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • bridge: Bridge
  • channel: Channel (optional)

ChannelHangupRequest

Base type: Event

A hangup was requested on the channel.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • cause: int (optional) - Integer representation of the cause of the hangup.
  • channel: Channel - The channel on which the hangup was requested.
  • soft: boolean (optional) - Whether the hangup request was a soft hangup request.

ChannelLeftBridge

Base type: Event

Notification that a channel has left a bridge.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • bridge: Bridge
  • channel: Channel

ChannelStateChange

Base type: Event

Notification of a channel's state change.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • channel: Channel

ChannelTalkingFinished

Base type: Event

Talking is no longer detected on the channel.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • channel: Channel - The channel on which talking completed.
  • duration: int - The length of time, in milliseconds, that talking was detected on the channel

ChannelTalkingStarted

Base type: Event

Talking was detected on the channel.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • channel: Channel - The channel on which talking started.

ChannelUserevent

Base type: Event

User-generated event with additional user-defined fields in the object.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • bridge: Bridge (optional) - A bridge that is signaled with the user event.
  • channel: Channel (optional) - A channel that is signaled with the user event.
  • endpoint: Endpoint (optional) - A endpoint that is signaled with the user event.
  • eventname: string - The name of the user event.
  • userevent: object - Custom Userevent data

ChannelVarset

Base type: Event

Channel variable changed.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • channel: Channel (optional) - The channel on which the variable was set.

If missing, the variable is a global variable.

  • value: string - The new value of the variable.
  • variable: string - The variable that changed.

DeviceStateChanged

Base type: Event

Notification that a device state has changed.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • device_state: DeviceState - Device state object

Dial

Base type: Event

Dialing state has changed.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • caller: Channel (optional) - The calling channel.
  • dialstatus: string - Current status of the dialing attempt to the peer.
  • dialstring: string (optional) - The dial string for calling the peer channel.
  • forward: string (optional) - Forwarding target requested by the original dialed channel.
  • forwarded: Channel (optional) - Channel that the caller has been forwarded to.
  • peer: Channel - The dialed channel.

EndpointStateChange

Base type: Event

Endpoint state changed.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • endpoint: Endpoint

Event

Base type: Message
Subtypes: ApplicationReplaced BridgeAttendedTransfer BridgeBlindTransfer BridgeCreated BridgeDestroyed BridgeMerged ChannelCallerId ChannelCreated ChannelDestroyed ChannelDialplan ChannelDtmfReceived ChannelEnteredBridge ChannelHangupRequest ChannelLeftBridge ChannelStateChange ChannelTalkingFinished ChannelTalkingStarted ChannelUserevent ChannelVarset DeviceStateChanged Dial EndpointStateChange PlaybackFinished PlaybackStarted RecordingFailed RecordingFinished RecordingStarted StasisEnd StasisStart TextMessageReceived

Base type for asynchronous events from Asterisk.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.

Message

Subtypes: ApplicationReplaced BridgeAttendedTransfer BridgeBlindTransfer BridgeCreated BridgeDestroyed BridgeMerged ChannelCallerId ChannelCreated ChannelDestroyed ChannelDialplan ChannelDtmfReceived ChannelEnteredBridge ChannelHangupRequest ChannelLeftBridge ChannelStateChange ChannelTalkingFinished ChannelTalkingStarted ChannelUserevent ChannelVarset DeviceStateChanged Dial EndpointStateChange Event MissingParams PlaybackFinished PlaybackStarted RecordingFailed RecordingFinished RecordingStarted StasisEnd StasisStart TextMessageReceived

Base type for errors and events

 Expand source
  • type: string - Indicates the type of this message.

MissingParams

Base type: Message

Error event sent when required params are missing.

 Expand source
  • type: string - Indicates the type of this message.
  • params: List[string] - A list of the missing parameters

PlaybackFinished

Base type: Event

Event showing the completion of a media playback operation.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • playback: Playback - Playback control object

PlaybackStarted

Base type: Event

Event showing the start of a media playback operation.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • playback: Playback - Playback control object

RecordingFailed

Base type: Event

Event showing failure of a recording operation.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • recording: LiveRecording - Recording control object

RecordingFinished

Base type: Event

Event showing the completion of a recording operation.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • recording: LiveRecording - Recording control object

RecordingStarted

Base type: Event

Event showing the start of a recording operation.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • recording: LiveRecording - Recording control object

StasisEnd

Base type: Event

Notification that a channel has left a Stasis application.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • channel: Channel

StasisStart

Base type: Event

Notification that a channel has entered a Stasis application.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • args: List[string] - Arguments to the application
  • channel: Channel
  • replace_channel: Channel (optional)

TextMessageReceived

Base type: Event

A text message was received from an endpoint.

 Expand source
  • type: string - Indicates the type of this message.
  • application: string - Name of the application receiving the event.
  • timestamp: Date (optional) - Time at which this event was created.
  • endpoint: Endpoint (optional)
  • message: TextMessage

Application

Details of a Stasis application

 Expand source
  • bridge_ids: List[string] - Id's for bridges subscribed to.
  • channel_ids: List[string] - Id's for channels subscribed to.
  • device_names: List[string] - Names of the devices subscribed to.
  • endpoint_ids: List[string] - {tech}/{resource} for endpoints subscribed to.
  • name: string - Name of this application
  • No labels

3 Comments

  1. In PlaybackStarted and PlaybackFinished events there is an optional parameter:

    • timestamp: Date (optional) - Time at which this event was created.

    It is really usefull in my dialer app as we need to know when playback was started and when it was ended and compare it with ChannelHangupRequest timestamp to understand if a message was played in full to a customer.

    So the question is how to enable this timestamp param in these events.

    Thanks.

    1. The wiki is really not a good place to ask questions or have discussions. This page is auto-generated and will be updated periodically; as such, comments typically get removed.

      That being said, your question is a good one. In the future, please ask these kinds of questions on the Asterisk App Dev mailing list - http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev. It's the appropriate forum for discussions related to development using Asterisk's APIs.

      The timestamp field is optional for all events, as they inherit from the Message model. This is not a configurable option. In this particular case, the PlaybackStarted/PlaybackFinished events won't contain a timestamp. They probably should - please file an Improvement issue on issues.asterisk.org. Thanks!

      1. Please delete my comment then.

        Subscribed to the list.

        Thanks.