Asterisk ami-event

From 탱이의 잡동사니
Revision as of 23:01, 24 November 2015 by Pchero (talk | contribs)
Jump to navigation Jump to search

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

Call

OriginateResponse

Event: OriginateResponse
[ActionID:] <value>
Response: <value>
Channel: <value>
Context: <value>
Exten: <value>
Reason: <value>
Uniqueid: <value>
CallerIDNum: <value>
CallerIDName: <value>
  • ActionID
  • Response
  • * Failure
  • * Success
  • Channel
  • Context
  • Exten
  • Reason
  • Uniqueid
  • CallerIDNum
  • CallerIDName

Example

"event": "OriginateResponse",
"privilege": "call,all",
"response": "Failure",
"channel": "SIP/111-111-0004@trunk_test_1",
"reason": "5",
"uniqueid": "<null>",
"calleridname": "<unknown>",
"context": "",
"exten": "",
"calleridnum": "<unknown>"

"event": "OriginateResponse",
"privilege": "call,all",
"response": "Success",
"channel": "SIP/trunk_test_1-00000000",
"reason": "4",
"uniqueid": "dd420b95-c52d-467a-8f65-63efaa094eb6",
"calleridname": "<unknown>",
"context": "",
"exten": "",
"calleridnum": "<unknown>"

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

BridgeLeave

Event: BridgeLeave
Privilege: call,all
BridgeUniqueid: 1d859980-a7f9-4c7c-87ab-d39862ad238b
BridgeType: basic
BridgeTechnology: simple_bridge
BridgeCreator: <unknown>
BridgeName: <unknown>
BridgeNumChannels: 1
Channel: SIP/test-04-0000019b
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: test-04
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 
Context: common-incoming
Exten: 
Priority: 1
Uniqueid: 1447438716.469
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967

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

BridgeEnter

Event: BridgeEnter
Privilege: call,all
BridgeUniqueid: 1d859980-a7f9-4c7c-87ab-d39862ad238b
BridgeType: basic
BridgeTechnology: simple_bridge
BridgeCreator: <unknown>
BridgeName: <unknown>
BridgeNumChannels: 1
Channel: SIP/test-04-0000019b
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: test-04
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 
Context: common-incoming
Exten: 
Priority: 1
Uniqueid: 1447438716.469
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967

BridgeDestroy

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

AgentConnect

Event: AgentConnect
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: 6
DestChannelStateDesc: Up
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
HoldTime: 4
RingTime: 3

RTCPReceived

Event: RTCPReceived
Privilege: reporting,all
Channel: SIP/test-04-0000019b
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: test-04
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 
Context: common-incoming
Exten: 
Priority: 1
Uniqueid: 1447438716.469
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
To: 127.0.1.1:0
From: 192.168.200.1:27223
RTT: 0.0000
SSRC: 0x00f17974
PT: 201(RR)
ReportCount: 1
Report0SourceSSRC: 0x34634503
Report0FractionLost: 0
Report0CumulativeLost: 0
Report0HighestSequence: 41649
Report0SequenceNumberCycles: 0
Report0IAJitter: 0
Report0LSR: 0
Report0DLSR: 0.0000

LocalOptimizationBegin

Event: LocalOptimizationBegin
Privilege: call,all
LocalOneChannel: Local/test-04@common-incoming-0000000a;1
LocalOneChannelState: 6
LocalOneChannelStateDesc: Up
LocalOneCallerIDNum: <unknown>
LocalOneCallerIDName: <unknown>
LocalOneConnectedLineNum: <unknown>
LocalOneConnectedLineName: <unknown>
LocalOneLanguage: en
LocalOneAccountCode: 
LocalOneContext: common-incoming
LocalOneExten: 
LocalOnePriority: 1
LocalOneUniqueid: 1447438716.467
LocalOneLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
LocalTwoChannel: Local/test-04@common-incoming-0000000a;2
LocalTwoChannelState: 6
LocalTwoChannelStateDesc: Up
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
SourceChannel: SIP/test-04-0000019b
SourceChannelState: 6
SourceChannelStateDesc: Up
SourceCallerIDNum: test-04
SourceCallerIDName: <unknown>
SourceConnectedLineNum: <unknown>
SourceConnectedLineName: <unknown>
SourceLanguage: en
SourceAccountCode: 
SourceContext: common-incoming
SourceExten: 
SourcePriority: 1
SourceUniqueid: 1447438716.469
SourceLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
DestUniqueId: 1447438716.468
Id: 5

LocalOptimizationEnd

Event: LocalOptimizationEnd
Privilege: call,all
LocalOneChannel: Local/test-04@common-incoming-0000000a;1
LocalOneChannelState: 6
LocalOneChannelStateDesc: Up
LocalOneCallerIDNum: <unknown>
LocalOneCallerIDName: <unknown>
LocalOneConnectedLineNum: <unknown>
LocalOneConnectedLineName: <unknown>
LocalOneLanguage: en
LocalOneAccountCode: 
LocalOneContext: common-incoming
LocalOneExten: 
LocalOnePriority: 1
LocalOneUniqueid: 1447438716.467
LocalOneLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
LocalTwoChannel: Local/test-04@common-incoming-0000000a;2
LocalTwoChannelState: 6
LocalTwoChannelStateDesc: Up
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
Success: No
Id: 5

SoftHangupRequest

Event: SoftHangupRequest
Privilege: call,all
Channel: Local/test-04@common-incoming-0000000a;2
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 
Context: common-incoming
Exten: test-04
Priority: 1
Uniqueid: 1447438716.468
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Cause: 16

See also