Asterisk ami-event: Difference between revisions

From 탱이의 잡동사니
Jump to navigation Jump to search
No edit summary
Line 2: Line 2:
Asterisk AMI event 메시지 내용 정리.
Asterisk AMI event 메시지 내용 정리.


== Channel ==
=== Newchannel ===
'''Example'''
<pre>
Event: Newchannel
Privilege: call,all
Channel: SIP/trunk_test_1-0000019a
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode:
Context: from_provider
Exten: s
Priority: 1
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
</pre>


== Queue ==
== Queue ==
Line 56: Line 77:


=== QueueCallerJoin ===
=== QueueCallerJoin ===
<pre>
Event: QueueCallerJoin
Privilege: agent,all
Channel: SIP/trunk_test_1-0000019a
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode:
Context: from_provider
Exten:
Priority: 1
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Queue: TestQueue
Count: 1
Position: 1
</pre>
=== QueueCallerLeave ===
=== QueueCallerLeave ===
<pre>
Event: QueueCallerLeave
Privilege: agent,all
Channel: SIP/trunk_test_1-0000019a
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode:
Context: from_provider
Exten:
Priority: 1
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Queue: TestQueue
Count: 0
Position: 1
</pre>
=== QueueMemberAdded ===
=== QueueMemberAdded ===
=== QueueMemberPause ===
=== QueueMemberPause ===
Line 105: Line 169:
</pre>
</pre>


== ETC ==
=== VarSet ===
'''Example'''
<pre>
Event: VarSet
Privilege: dialplan,all
Channel: SIP/trunk_test_1-0000019a
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode:
Context: from_provider
Exten: s
Priority: 1
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Variable: SIPCALLID
Value: 2bfd10aa59fd6d695ef6f5393b5e9286@10.0.2.15:5060
</pre>
=== Newexten ===
<pre>
Event: Newexten
Privilege: call,all
Channel: SIP/trunk_test_1-0000019a
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode:
Context: from_provider
Exten:
Priority: 1
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Extension:
Application: AppDial2
AppData: (Outgoing Line)
</pre>
=== DeviceStateChange ===
<pre>
Event: DeviceStateChange
Privilege: call,all
Device: SIP/trunk_test_1
State: RINGING
</pre>
=== DialBegin ===
<pre>
Event: DialBegin
Privilege: call,all
DestChannel: SIP/trunk_test_1-0000019a
DestChannelState: 0
DestChannelStateDesc: Down
DestCallerIDNum: <unknown>
DestCallerIDName: <unknown>
DestConnectedLineNum: <unknown>
DestConnectedLineName: <unknown>
DestLanguage: en
DestAccountCode:
DestContext: from_provider
DestExten:
DestPriority: 1
DestUniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
DestLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
DialString: 1237764000@trunk_test_1
</pre>
=== DialEnd ===
<pre>
Event: DialEnd
Privilege: call,all
DestChannel: SIP/trunk_test_1-0000019a
DestChannelState: 6
DestChannelStateDesc: Up
DestCallerIDNum: <unknown>
DestCallerIDName: <unknown>
DestConnectedLineNum: <unknown>
DestConnectedLineName: <unknown>
DestLanguage: en
DestAccountCode:
DestContext: from_provider
DestExten:
DestPriority: 1
DestUniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
DestLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
DialStatus: ANSWER
</pre>
=== Newstate ===
<pre>
Event: Newstate
Privilege: call,all
Channel: SIP/trunk_test_1-0000019a
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode:
Context: from_provider
Exten:
Priority: 1
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
</pre>
=== MusicOnHoldStart ===
<pre>
Event: MusicOnHoldStart
Privilege: call,all
Channel: SIP/trunk_test_1-0000019a
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode:
Context: from_provider
Exten:
Priority: 1
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Class: default
</pre>
=== LocalBridge ===
<pre>
Event: LocalBridge
Privilege: call,all
LocalOneChannel: Local/test-04@common-incoming-0000000a;1
LocalOneChannelState: 0
LocalOneChannelStateDesc: Down
LocalOneCallerIDNum: <unknown>
LocalOneCallerIDName: <unknown>
LocalOneConnectedLineNum: <unknown>
LocalOneConnectedLineName: <unknown>
LocalOneLanguage: en
LocalOneAccountCode:
LocalOneContext: common-incoming
LocalOneExten: test-04
LocalOnePriority: 1
LocalOneUniqueid: 1447438716.467
LocalOneLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
LocalTwoChannel: Local/test-04@common-incoming-0000000a;2
LocalTwoChannelState: 4
LocalTwoChannelStateDesc: Ring
LocalTwoCallerIDNum: <unknown>
LocalTwoCallerIDName: <unknown>
LocalTwoConnectedLineNum: <unknown>
LocalTwoConnectedLineName: <unknown>
LocalTwoLanguage: en
LocalTwoAccountCode:
LocalTwoContext: common-incoming
LocalTwoExten: test-04
LocalTwoPriority: 1
LocalTwoUniqueid: 1447438716.468
LocalTwoLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Context: common-incoming
Exten: test-04
LocalOptimization: Yes
</pre>
=== AgentCalled ===
<pre>
Event: AgentCalled
Privilege: agent,all
Channel: SIP/trunk_test_1-0000019a
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode:
Context: from_provider
Exten:
Priority: 1
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
DestChannel: Local/test-04@common-incoming-0000000a;1
DestChannelState: 0
DestChannelStateDesc: Down
DestCallerIDNum: <unknown>
DestCallerIDName: <unknown>
DestConnectedLineNum: <unknown>
DestConnectedLineName: <unknown>
DestLanguage: en
DestAccountCode:
DestContext: common-incoming
DestExten:
DestPriority: 1
DestUniqueid: 1447438716.467
DestLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Queue: TestQueue
Interface: Local/test-04@common-incoming
MemberName: test 04
</pre>
=== BridgeCreate ===
<pre>
Event: BridgeCreate
Privilege: call,all
BridgeUniqueid: 1d859980-a7f9-4c7c-87ab-d39862ad238b
BridgeType: basic
BridgeTechnology: simple_bridge
BridgeCreator: <unknown>
BridgeName: <unknown>
BridgeNumChannels: 0
</pre>
== See also ==
== See also ==
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+AMI+Events - Asterisk 13 AMI Events
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+AMI+Events - Asterisk 13 AMI Events


[[category:asterisk]]
[[category:asterisk]]

Revision as of 00:13, 20 November 2015

Overview

Asterisk AMI event 메시지 내용 정리.

Channel

Newchannel

Example

Event: Newchannel
Privilege: call,all
Channel: SIP/trunk_test_1-0000019a
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 
Context: from_provider
Exten: s
Priority: 1
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967

Queue

QueueCallerAbandon

Event: QueueCallerAbandon
Channel: <value>
ChannelState: <value>
ChannelStateDesc: <value>
CallerIDNum: <value>
CallerIDName: <value>
ConnectedLineNum: <value>
ConnectedLineName: <value>
AccountCode: <value>
Context: <value>
Exten: <value>
Priority: <value>
Uniqueid: <value>
Linkedid: <value>
Queue: <value>
Position: <value>
OriginalPosition: <value>
HoldTime: <value>
  • Channel
  • ChannelState - A numeric code for the channel's current state, related to ChannelStateDesc
  • ChannelStateDesc
  • * Down
  • * Rsrvd
  • * OffHook
  • * Dialing
  • * Ring
  • * Ringing
  • * Up
  • * Busy
  • * Dialing Offhook
  • * Pre-ring
  • * Unknown
  • CallerIDNum
  • CallerIDName
  • ConnectedLineNum
  • ConnectedLineName
  • AccountCode
  • Context
  • Exten
  • Priority
  • Uniqueid
  • Linkedid - Uniqueid of the oldest channel associated with this channel.
  • Queue - The name of the queue.
  • Position - This channel's current position in the queue.
  • OriginalPosition - The channel's original position in the queue.
  • HoldTime - The time the channel was in the queue, expressed in seconds since 00:00, Jan 1, 1970 UTC.

QueueCallerJoin

Event: QueueCallerJoin
Privilege: agent,all
Channel: SIP/trunk_test_1-0000019a
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 
Context: from_provider
Exten: 
Priority: 1
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Queue: TestQueue
Count: 1
Position: 1

QueueCallerLeave

Event: QueueCallerLeave
Privilege: agent,all
Channel: SIP/trunk_test_1-0000019a
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 
Context: from_provider
Exten: 
Priority: 1
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Queue: TestQueue
Count: 0
Position: 1

QueueMemberAdded

QueueMemberPause

QueueMemberPenalty

QueueMemberRemoved

QueueMemberRinginuse

QueueMemberStatus

Queue 의 멤버 상태 정보가 변경되었을 때, 발생한다.

Event: QueueMemberStatus
Queue: <value>
MemberName: <value>
Interface: <value>
StateInterface: <value>
Membership: <value>
Penalty: <value>
CallsTaken: <value>
LastCall: <value>
Status: <value>
Paused: <value>
Ringinuse: <value>
  • Queue - The name of the queue.
  • MemberName - The name of the queue member.
  • Interface - The queue member's channel technology or location.
  • StateInterface - Channel technology or location from which to read device state changes.
  • Membership(dynamic, realtime, static)
  • Penalty - The penalty associated with the queue member.
  • CallsTaken - The number of calls this queue member has serviced.
  • LastCall - The time this member last took a call, expressed in seconds since 00:00, Jan 1, 1970 UTC.
  • Status - The numeric device state status of the queue member.(0:AST_DEVICE_UNKNOWN, 1:AST_DEVICE_NOT_INUSE, 2:AST_DEVICE_INUSE, 3:AST_DEVICE_BUSY, 4:AST_DEVICE_INVALID, 5:AST_DEVICE_UNAVAILABLE, 6:AST_DEVICE_RINGING, 7:AST_DEVICE_RINGINUSE, 8:AST_DEVICE_ONHOLD)
  • Paused(0, 1)
  • Ringinuse(0, 1)

Example

Event: QueueMemberStatus
Privilege: agent,all
Queue: Camp200
Location: Local/200@DialCamp
MemberName: user1
Membership: static
Penalty: 0
CallsTaken: 3
LastCall: 1447947996
Status: 6
Paused: 0

ETC

VarSet

Example

Event: VarSet
Privilege: dialplan,all
Channel: SIP/trunk_test_1-0000019a
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 
Context: from_provider
Exten: s
Priority: 1
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Variable: SIPCALLID
Value: 2bfd10aa59fd6d695ef6f5393b5e9286@10.0.2.15:5060

Newexten

Event: Newexten
Privilege: call,all
Channel: SIP/trunk_test_1-0000019a
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 
Context: from_provider
Exten: 
Priority: 1
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Extension: 
Application: AppDial2
AppData: (Outgoing Line)

DeviceStateChange

Event: DeviceStateChange
Privilege: call,all
Device: SIP/trunk_test_1
State: RINGING

DialBegin

Event: DialBegin
Privilege: call,all
DestChannel: SIP/trunk_test_1-0000019a
DestChannelState: 0
DestChannelStateDesc: Down
DestCallerIDNum: <unknown>
DestCallerIDName: <unknown>
DestConnectedLineNum: <unknown>
DestConnectedLineName: <unknown>
DestLanguage: en
DestAccountCode: 
DestContext: from_provider
DestExten: 
DestPriority: 1
DestUniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
DestLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
DialString: 1237764000@trunk_test_1

DialEnd

Event: DialEnd
Privilege: call,all
DestChannel: SIP/trunk_test_1-0000019a
DestChannelState: 6
DestChannelStateDesc: Up
DestCallerIDNum: <unknown>
DestCallerIDName: <unknown>
DestConnectedLineNum: <unknown>
DestConnectedLineName: <unknown>
DestLanguage: en
DestAccountCode: 
DestContext: from_provider
DestExten: 
DestPriority: 1
DestUniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
DestLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
DialStatus: ANSWER

Newstate

Event: Newstate
Privilege: call,all
Channel: SIP/trunk_test_1-0000019a
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 
Context: from_provider
Exten: 
Priority: 1
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967

MusicOnHoldStart

Event: MusicOnHoldStart
Privilege: call,all
Channel: SIP/trunk_test_1-0000019a
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 
Context: from_provider
Exten: 
Priority: 1
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Class: default

LocalBridge

Event: LocalBridge
Privilege: call,all
LocalOneChannel: Local/test-04@common-incoming-0000000a;1
LocalOneChannelState: 0
LocalOneChannelStateDesc: Down
LocalOneCallerIDNum: <unknown>
LocalOneCallerIDName: <unknown>
LocalOneConnectedLineNum: <unknown>
LocalOneConnectedLineName: <unknown>
LocalOneLanguage: en
LocalOneAccountCode: 
LocalOneContext: common-incoming
LocalOneExten: test-04
LocalOnePriority: 1
LocalOneUniqueid: 1447438716.467
LocalOneLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
LocalTwoChannel: Local/test-04@common-incoming-0000000a;2
LocalTwoChannelState: 4
LocalTwoChannelStateDesc: Ring
LocalTwoCallerIDNum: <unknown>
LocalTwoCallerIDName: <unknown>
LocalTwoConnectedLineNum: <unknown>
LocalTwoConnectedLineName: <unknown>
LocalTwoLanguage: en
LocalTwoAccountCode: 
LocalTwoContext: common-incoming
LocalTwoExten: test-04
LocalTwoPriority: 1
LocalTwoUniqueid: 1447438716.468
LocalTwoLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Context: common-incoming
Exten: test-04
LocalOptimization: Yes

AgentCalled

Event: AgentCalled
Privilege: agent,all
Channel: SIP/trunk_test_1-0000019a
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 
Context: from_provider
Exten: 
Priority: 1
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
DestChannel: Local/test-04@common-incoming-0000000a;1
DestChannelState: 0
DestChannelStateDesc: Down
DestCallerIDNum: <unknown>
DestCallerIDName: <unknown>
DestConnectedLineNum: <unknown>
DestConnectedLineName: <unknown>
DestLanguage: en
DestAccountCode: 
DestContext: common-incoming
DestExten: 
DestPriority: 1
DestUniqueid: 1447438716.467
DestLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Queue: TestQueue
Interface: Local/test-04@common-incoming
MemberName: test 04

BridgeCreate

Event: BridgeCreate
Privilege: call,all
BridgeUniqueid: 1d859980-a7f9-4c7c-87ab-d39862ad238b
BridgeType: basic
BridgeTechnology: simple_bridge
BridgeCreator: <unknown>
BridgeName: <unknown>
BridgeNumChannels: 0

See also