Asterisk ami-event: Difference between revisions

From 탱이의 잡동사니
Jump to navigation Jump to search
No edit summary
Line 2: Line 2:
Asterisk AMI event 메시지 내용 정리. Asterisk-13,14 버전 기준.
Asterisk AMI event 메시지 내용 정리. Asterisk-13,14 버전 기준.


== Newchannel ==
== Agent ==
새로운 채널이 생성되었을 때 발생한다.
== AgentCalled ==
Queue에서 대기중인 Agent 에게 현재 대기중인 콜이 있다는 알림을 줄때 발생한다.
<pre>
<pre>
Event: Newchannel
Event: AgentCalled
Channel: <value>
Channel: <value>
ChannelState: <value>
ChannelState: <value>
Line 19: Line 20:
Uniqueid: <value>
Uniqueid: <value>
Linkedid: <value>
Linkedid: <value>
DestChannel: <value>
DestChannelState: <value>
DestChannelStateDesc: <value>
DestCallerIDNum: <value>
DestCallerIDName: <value>
DestConnectedLineNum: <value>
DestConnectedLineName: <value>
DestAccountCode: <value>
DestContext: <value>
DestExten: <value>
DestPriority: <value>
DestUniqueid: <value>
DestLinkedid: <value>
Queue: <value>
MemberName: <value>
Interface: <value>
</pre>
</pre>


=== Example ===
== AgentComplete ==
<pre>
<pre>
Event: Newchannel
Event: AgentComplete
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>
 
== QueueCallerAbandon ==
Queue 에 인입된 콜이 분배되기 전 Hangup 되었을 때 발생하는 이벤트이다.
<pre>
Event: QueueCallerAbandon
Channel: <value>
Channel: <value>
ChannelState: <value>
ChannelState: <value>
Line 58: Line 54:
Uniqueid: <value>
Uniqueid: <value>
Linkedid: <value>
Linkedid: <value>
Queue: <value>
DestChannel: <value>
Position: <value>
DestChannelState: <value>
OriginalPosition: <value>
DestChannelStateDesc: <value>
DestCallerIDNum: <value>
DestCallerIDName: <value>
DestConnectedLineNum: <value>
DestConnectedLineName: <value>
DestAccountCode: <value>
DestContext: <value>
DestExten: <value>
DestPriority: <value>
DestUniqueid: <value>
DestLinkedid: <value>
Queue: <value>
MemberName: <value>
Interface: <value>
HoldTime: <value>
HoldTime: <value>
TalkTime: <value>
Reason: <value>
</pre>
</pre>
* Channel
* Channel
* ChannelState - A numeric code for the channel's current state, related to ChannelStateDesc
* ChannelState - A numeric code for the channel's current state, related to ChannelStateDesc
* ChannelStateDesc
* ChannelStateDesc
* * Down
** Down
* * Rsrvd
** Rsrvd
* * OffHook
** OffHook
* * Dialing
** Dialing
* * Ring
** Ring
* * Ringing
** Ringing
* * Up
** Up
* * Busy
** Busy
* * Dialing Offhook
** Dialing Offhook
* * Pre-ring
** Pre-ring
* * Unknown
** Unknown
* CallerIDNum
* CallerIDNum
* CallerIDName
* CallerIDName
Line 88: Line 98:
* Uniqueid
* Uniqueid
* Linkedid - Uniqueid of the oldest channel associated with this channel.
* Linkedid - Uniqueid of the oldest channel associated with this channel.
* Queue - The name of the queue.
* DestChannel
* Position - This channel's current position in the queue.
* DestChannelState - A numeric code for the channel's current state, related to DestChannelStateDesc
* OriginalPosition - The channel's original position in the queue.
* DestChannelStateDesc
* HoldTime - The time the channel was in the queue, expressed in seconds since 00:00, Jan 1, 1970 UTC.
** Down
 
** Rsrvd
== QueueCallerJoin ==
** OffHook
Queue 에 콜이 인입될 때 발생하는 이벤트이다.
** Dialing
<pre>
** Ring
Event: QueueCallerJoin
** Ringing
Channel: <value>
** Up
ChannelState: <value>
** Busy
ChannelStateDesc: <value>
** Dialing Offhook
CallerIDNum: <value>
** Pre-ring
CallerIDName: <value>
** Unknown
ConnectedLineNum: <value>
* DestCallerIDNum
ConnectedLineName: <value>
* DestCallerIDName
AccountCode: <value>
* DestConnectedLineNum
Context: <value>
* DestConnectedLineName
Exten: <value>
* DestAccountCode
Priority: <value>
* DestContext
Uniqueid: <value>
* DestExten
Linkedid: <value>
* DestPriority
Queue: <value>
* DestUniqueid
Position: <value>
* DestLinkedid - Uniqueid of the oldest channel associated with this channel.
Count: <value>
* Queue - The name of the queue.
</pre>
* MemberName - The name of the queue member.
* Interface - The queue member's channel technology or location.
* HoldTime - The time the channel was in the queue, expressed in seconds since 00:00, Jan 1, 1970 UTC.
* TalkTime - The time the queue member talked with the caller in the queue, expressed in seconds since 00:00, Jan 1, 1970 UTC.
* Reason
** caller
** agent
** transfer


* Channel
== AgentConnect ==
* ChannelState - A numeric code for the channel's current state, related to ChannelStateDesc
Queue member 가 answer 를 한 후, 대기 중인 콜과 bridge 되었을 때 발생한다.
* ChannelStateDesc
<pre>
** Down
Event: AgentConnect
** Rsrvd
Channel: <value>
** OffHook
ChannelState: <value>
** Dialing
ChannelStateDesc: <value>
** Ring
CallerIDNum: <value>
** Ringing
CallerIDName: <value>
** Up
ConnectedLineNum: <value>
** Busy
ConnectedLineName: <value>
** Dialing Offhook
AccountCode: <value>
** Pre-ring
Context: <value>
** Unknown
Exten: <value>
* CallerIDNum
Priority: <value>
* CallerIDName
Uniqueid: <value>
* ConnectedLineNum
Linkedid: <value>
* ConnectedLineName
DestChannel: <value>
* AccountCode
DestChannelState: <value>
* Context
DestChannelStateDesc: <value>
* Exten
DestCallerIDNum: <value>
* Priority
DestCallerIDName: <value>
* Uniqueid
DestConnectedLineNum: <value>
* Linkedid - Uniqueid of the oldest channel associated with this channel.
DestConnectedLineName: <value>
* Queue - The name of the queue.
DestAccountCode: <value>
* Position - This channel's current position in the queue.
DestContext: <value>
* Count - The total number of channels in the queue.
DestExten: <value>
 
DestPriority: <value>
=== Example ===
DestUniqueid: <value>
DestLinkedid: <value>
Queue: <value>
MemberName: <value>
Interface: <value>
RingTime: <value>
HoldTime: <value>
</pre>
 
== AgentDump ==
 
== AgentLogin ==
 
== AgentLogoff ==
 
== AgentRingNoAnswer ==
 
== Hangup ==
<pre>
<pre>
Event: QueueCallerJoin
Event: Hangup
Privilege: agent,all
Channel: <value>
Channel: SIP/trunk_test_1-0000019a
ChannelState: <value>
ChannelState: 6
ChannelStateDesc: <value>
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 ==
Queue 에 인입된 콜이 빠져나갈 때 발생하는 이벤트이다.
<pre>
Event: QueueCallerLeave
Channel: <value>
ChannelState: <value>
ChannelStateDesc: <value>
CallerIDNum: <value>
CallerIDNum: <value>
CallerIDName: <value>
CallerIDName: <value>
Line 183: Line 193:
Uniqueid: <value>
Uniqueid: <value>
Linkedid: <value>
Linkedid: <value>
Queue: <value>
Cause: <value>
Count: <value>
Cause-txt: <value>
Position: <value>
</pre>
</pre>
* Channel
* Channel
* ChannelState - A numeric code for the channel's current state, related to ChannelStateDesc
* ChannelState - A numeric code for the channel's current state, related to ChannelStateDesc
* ChannelStateDesc
* ChannelStateDesc
** Down
* * Down
** Rsrvd
* * Rsrvd
** OffHook
* * OffHook
** Dialing
* * Dialing
** Ring
* * Ring
** Ringing
* * Ringing
** Up
* * Up
** Busy
* * Busy
** Dialing Offhook
* * Dialing Offhook
** Pre-ring
* * Pre-ring
** Unknown
* * Unknown
* CallerIDNum
* CallerIDNum
* CallerIDName
* CallerIDName
Line 212: Line 220:
* Uniqueid
* Uniqueid
* Linkedid - Uniqueid of the oldest channel associated with this channel.
* Linkedid - Uniqueid of the oldest channel associated with this channel.
* Queue - The name of the queue.
* Cause - A numeric cause code for why the channel was hung up.
* Count - The total number of channels in the queue.
* Cause-txt - A description of why the channel was hung up.
* Position - This channel's current position in the queue.


=== Example ===
'''Cause'''
<pre>
<pre>
Event: QueueCallerLeave
/*! \name Causes for disconnection (from Q.850/Q.931)
Privilege: agent,all
*  These are the internal cause codes used in Asterisk.
Channel: SIP/trunk_test_1-0000019a
*  \ref AstCauses
ChannelState: 6
*/
ChannelStateDesc: Up
/*@{ */
CallerIDNum: <unknown>
#define AST_CAUSE_UNALLOCATED                    1
CallerIDName: <unknown>
#define AST_CAUSE_NO_ROUTE_TRANSIT_NET          2
ConnectedLineNum: <unknown>
#define AST_CAUSE_NO_ROUTE_DESTINATION          3
ConnectedLineName: <unknown>
#define AST_CAUSE_MISDIALLED_TRUNK_PREFIX        5
Language: en
#define AST_CAUSE_CHANNEL_UNACCEPTABLE          6
AccountCode:
#define AST_CAUSE_CALL_AWARDED_DELIVERED        7
Context: from_provider
#define AST_CAUSE_PRE_EMPTED                    8
Exten:
#define AST_CAUSE_NUMBER_PORTED_NOT_HERE        14
Priority: 1
#define AST_CAUSE_NORMAL_CLEARING              16
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
#define AST_CAUSE_USER_BUSY                    17
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
#define AST_CAUSE_NO_USER_RESPONSE              18
Queue: TestQueue
#define AST_CAUSE_NO_ANSWER                    19
Count: 0
#define AST_CAUSE_SUBSCRIBER_ABSENT            20
Position: 1
#define AST_CAUSE_CALL_REJECTED                21
</pre>
#define AST_CAUSE_NUMBER_CHANGED                22
 
#define AST_CAUSE_REDIRECTED_TO_NEW_DESTINATION 23
== QueueMemberAdded ==
#define AST_CAUSE_ANSWERED_ELSEWHERE            26
Queue 에 새롭게 멤버가 등록되었을 때 발생하는 이벤트 메시지이다.
#define AST_CAUSE_DESTINATION_OUT_OF_ORDER      27
<pre>
#define AST_CAUSE_INVALID_NUMBER_FORMAT        28
Event: QueueMemberAdded
#define AST_CAUSE_FACILITY_REJECTED            29
Privilege: agent,all
#define AST_CAUSE_RESPONSE_TO_STATUS_ENQUIRY    30
Queue: Dragon
#define AST_CAUSE_NORMAL_UNSPECIFIED            31
Location: Local/603-test-mac_address-what-ever-002-1@DialLine/n
#define AST_CAUSE_NORMAL_CIRCUIT_CONGESTION    34
MemberName: Local/603-test-mac_address-what-ever-002-1@DialLine/n
#define AST_CAUSE_NETWORK_OUT_OF_ORDER          38
Membership: dynamic
#define AST_CAUSE_NORMAL_TEMPORARY_FAILURE      41
Penalty: 0
#define AST_CAUSE_SWITCH_CONGESTION            42
CallsTaken: 0
#define AST_CAUSE_ACCESS_INFO_DISCARDED        43
LastCall: 0
#define AST_CAUSE_REQUESTED_CHAN_UNAVAIL        44
Status: 1
#define AST_CAUSE_FACILITY_NOT_SUBSCRIBED      50
Paused: 0
#define AST_CAUSE_OUTGOING_CALL_BARRED          52
</pre>
#define AST_CAUSE_INCOMING_CALL_BARRED          54
#define AST_CAUSE_BEARERCAPABILITY_NOTAUTH      57
#define AST_CAUSE_BEARERCAPABILITY_NOTAVAIL    58
#define AST_CAUSE_BEARERCAPABILITY_NOTIMPL      65
#define AST_CAUSE_CHAN_NOT_IMPLEMENTED          66
#define AST_CAUSE_FACILITY_NOT_IMPLEMENTED      69
#define AST_CAUSE_INVALID_CALL_REFERENCE        81
#define AST_CAUSE_INCOMPATIBLE_DESTINATION      88
#define AST_CAUSE_INVALID_MSG_UNSPECIFIED      95
#define AST_CAUSE_MANDATORY_IE_MISSING          96
#define AST_CAUSE_MESSAGE_TYPE_NONEXIST        97
#define AST_CAUSE_WRONG_MESSAGE                98
#define AST_CAUSE_IE_NONEXIST                  99
#define AST_CAUSE_INVALID_IE_CONTENTS          100
#define AST_CAUSE_WRONG_CALL_STATE            101
#define AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE    102
#define AST_CAUSE_MANDATORY_IE_LENGTH_ERROR    103
#define AST_CAUSE_PROTOCOL_ERROR              111
#define AST_CAUSE_INTERWORKING                127


== QueueMemberPause ==
/* Special Asterisk aliases */
Queue 멤버가 Pause 되었을 때 발생하는 이벤트이다.
#define AST_CAUSE_BUSY          AST_CAUSE_USER_BUSY
<pre>
#define AST_CAUSE_FAILURE      AST_CAUSE_NETWORK_OUT_OF_ORDER
Event: QueueMemberPaused
#define AST_CAUSE_NORMAL        AST_CAUSE_NORMAL_CLEARING
Privilege: agent,all
#define AST_CAUSE_NOANSWER      AST_CAUSE_NO_ANSWER
Queue: Dragon
#define AST_CAUSE_CONGESTION    AST_CAUSE_NORMAL_CIRCUIT_CONGESTION
Location: Local/603-test-mac_address-what-ever-002-1@DialLine/n
#define AST_CAUSE_UNREGISTERED  AST_CAUSE_SUBSCRIBER_ABSENT
MemberName: dummy_name
#define AST_CAUSE_NOTDEFINED    0
Paused: 0
#define AST_CAUSE_NOSUCHDRIVER  AST_CAUSE_CHAN_NOT_IMPLEMENTED
Reason: Test pause
</pre>
</pre>
== QueueMemberPenalty ==
Queue 멤버의 Penalty 값이 조정되었을 때 발생하는 이벤트이다.


'''Example'''
'''Example'''
<pre>
<pre>
Event: QueueMemberPenalty
"accountcode": "",
Privilege: agent,all
"channelstatedesc": "Down",
Queue: Dragon
"uniqueid": "5ca0da71-3cc2-4c54-b51c-575d72f70b82",
Location: Local/603-test-mac_address-what-ever-002-1@DialLine/n
"event": "Hangup",
Penalty: 100
"context": "from_provider",
"connectedlinenum": "<unknown>",
"privilege": "call,all",
"channel": "SIP/trunk_test_1-00000005",
"calleridnum": "<unknown>",
"channelstate": "0",
"calleridname": "<unknown>",
"exten": "",
"cause": "19",
"connectedlinename": "<unknown>",
"language": "en",
"linkedid": "5ca0da71-3cc2-4c54-b51c-575d72f70b82",
"priority": "1",
"cause-txt": "User alerting, no answer"
</pre>
</pre>


== QueueMemberRemoved ==
== DeviceStateChange ==
Queue 에서 멤버가 Leave(삭제) 되었을 때 발생하는 이벤트이다.
Device의 state 가 변경되었음을 나타낸다.


'''Example'''
ExtensionStatus 이벤트는 dialplan hints 와 연관된 내용에만 발생하는 것에 반해, DeviceStateChange 이벤트는 모든 device state 의 변경에 발생한다는 것이 다르다.
<pre>
<pre>
Event: QueueMemberRemoved
Event: DeviceStateChange
Privilege: agent,all
Device: <value>
Queue: Dragon
State: <value>
Location: Local/603-test-mac_address-what-ever-002-1@DialLine/n
MemberName: dummy_name
</pre>
</pre>
* Device : state 가 변경된 device
* State : 변경된 state


== QueueMemberRinginuse ==
=== Example ===
== QueueMemberStatus ==
Queue 의 멤버 상태 정보가 변경되었을 때, 발생한다.
<pre>
<pre>
Event: QueueMemberStatus
Event: DeviceStateChange
Queue: <value>
Privilege: call,all
MemberName: <value>
Device: SIP/trunk_test_1
Interface: <value>
State: RINGING
StateInterface: <value>
Membership: <value>
Penalty: <value>
CallsTaken: <value>
LastCall: <value>
Status: <value>
Paused: <value>
Ringinuse: <value>
</pre>
</pre>
* 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'''
=== See also ===
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerEvent_DeviceStateChange
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerEvent_ExtensionStatus
 
== DialBegin ==
<pre>
<pre>
Event: QueueMemberStatus
Event: DialBegin
Privilege: agent,all
Privilege: call,all
Queue: Camp200
DestChannel: SIP/trunk_test_1-0000019a
Location: Local/200@DialCamp
DestChannelState: 0
MemberName: user1
DestChannelStateDesc: Down
Membership: static
DestCallerIDNum: <unknown>
Penalty: 0
DestCallerIDName: <unknown>
CallsTaken: 3
DestConnectedLineNum: <unknown>
LastCall: 1447947996
DestConnectedLineName: <unknown>
Status: 6
DestLanguage: en
Paused: 0
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>
</pre>


== OriginateResponse ==
== DialEnd ==
<pre>
<pre>
Event: OriginateResponse
Event: DialEnd
[ActionID:] <value>
Privilege: call,all
Response: <value>
DestChannel: SIP/trunk_test_1-0000019a
Channel: <value>
DestChannelState: 6
Context: <value>
DestChannelStateDesc: Up
Exten: <value>
DestCallerIDNum: <unknown>
Reason: <value>
DestCallerIDName: <unknown>
Uniqueid: <value>
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 ==
Channel 의 state 의 변경되었음을 알려준다.
<pre>
Event: Newstate
Channel: <value>
ChannelState: <value>
ChannelStateDesc: <value>
CallerIDNum: <value>
CallerIDNum: <value>
CallerIDName: <value>
CallerIDName: <value>
ConnectedLineNum: <value>
ConnectedLineName: <value>
AccountCode: <value>
Context: <value>
Exten: <value>
Priority: <value>
Uniqueid: <value>
Linkedid: <value>
</pre>
</pre>
* ActionID
* Response
* * Failure
* * Success
* Channel
* Context
* Exten
* Reason
* Uniqueid
* CallerIDNum
* CallerIDName


'''Reason'''
=== Example ===
 
Reason code 내용은 다음과 같다(asterisk/frame.h).
<pre>
<pre>
AST_CONTROL_HANGUP = 1, /*!< Other end has hungup */
Event: Newstate
AST_CONTROL_RING = 2, /*!< Local ring */
Privilege: call,all
AST_CONTROL_RINGING = 3, /*!< Remote end is ringing */
Channel: SIP/trunk_test_1-0000019a
AST_CONTROL_ANSWER = 4, /*!< Remote end has answered */
ChannelState: 6
AST_CONTROL_BUSY = 5, /*!< Remote end is busy */
ChannelStateDesc: Up
AST_CONTROL_TAKEOFFHOOK = 6, /*!< Make it go off hook */
CallerIDNum: <unknown>
AST_CONTROL_OFFHOOK = 7, /*!< Line is off hook */
CallerIDName: <unknown>
AST_CONTROL_CONGESTION = 8, /*!< Congestion (circuits busy) */
ConnectedLineNum: <unknown>
AST_CONTROL_FLASH = 9, /*!< Flash hook */
ConnectedLineName: <unknown>
AST_CONTROL_WINK = 10, /*!< Wink */
Language: en
AST_CONTROL_OPTION = 11, /*!< Set a low-level option */
AccountCode:
AST_CONTROL_RADIO_KEY = 12, /*!< Key Radio */
Context: from_provider
AST_CONTROL_RADIO_UNKEY = 13, /*!< Un-Key Radio */
Exten:
AST_CONTROL_PROGRESS = 14, /*!< Indicate PROGRESS */
Priority: 1
AST_CONTROL_PROCEEDING = 15, /*!< Indicate CALL PROCEEDING */
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
AST_CONTROL_HOLD = 16, /*!< Indicate call is placed on hold */
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
AST_CONTROL_UNHOLD = 17, /*!< Indicate call is left from hold */
</pre>
AST_CONTROL_VIDUPDATE = 18, /*!< Indicate video frame update */
_XXX_AST_CONTROL_T38 = 19, /*!< T38 state change request/notification \deprecated This is no longer supported. Use AST_CONTROL_T38_PARAMETERS instead. */
AST_CONTROL_SRCUPDATE = 20, /*!< Indicate source of media has changed */
AST_CONTROL_TRANSFER = 21, /*!< Indicate status of a transfer request */
AST_CONTROL_CONNECTED_LINE = 22,/*!< Indicate connected line has changed */
AST_CONTROL_REDIRECTING = 23, /*!< Indicate redirecting id has changed */
AST_CONTROL_T38_PARAMETERS = 24,/*!< T38 state change request/notification with parameters */
AST_CONTROL_CC = 25, /*!< Indication that Call completion service is possible */
AST_CONTROL_SRCCHANGE = 26, /*!< Media source has changed and requires a new RTP SSRC */
AST_CONTROL_READ_ACTION = 27, /*!< Tell ast_read to take a specific action */
AST_CONTROL_AOC = 28, /*!< Advice of Charge with encoded generic AOC payload */
AST_CONTROL_END_OF_Q = 29, /*!< Indicate that this position was the end of the channel queue for a softhangup. */
AST_CONTROL_INCOMPLETE = 30, /*!< Indication that the extension dialed is incomplete */
AST_CONTROL_MCID = 31, /*!< Indicate that the caller is being malicious. */
AST_CONTROL_UPDATE_RTP_PEER = 32, /*!< Interrupt the bridge and have it update the peer */
AST_CONTROL_PVT_CAUSE_CODE = 33, /*!< Contains an update to the protocol-specific cause-code stored for branching dials */
AST_CONTROL_MASQUERADE_NOTIFY = 34, /*!< A masquerade is about to begin/end. (Never sent as a frame but directly with ast_indicate_data().) */


/*
== MusicOnHoldStart ==
  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
<pre>
  *
Event: MusicOnHoldStart
  * IAX2 sends these values out over the wire.  To prevent future
Privilege: call,all
  * incompatibilities, pick the next value in the enum from whatever
Channel: SIP/trunk_test_1-0000019a
  * is on the current trunk.  If you lose the merge race you need to
ChannelState: 6
  * fix the previous branches to match what is on trunk.  In addition
ChannelStateDesc: Up
  * you need to change chan_iax2 to explicitly allow the control
CallerIDNum: <unknown>
  * frame over the wire if it makes sense for the frame to be passed
CallerIDName: <unknown>
  * to another Asterisk instance.
ConnectedLineNum: <unknown>
  *
ConnectedLineName: <unknown>
  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
Language: en
  */
AccountCode:
 
Context: from_provider
/* Control frames used to manipulate a stream on a channel. The values for these
Exten:
  * must be greater than the allowed value for a 8-bit char, so that they avoid
Priority: 1
  * conflicts with DTMF values. */
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
AST_CONTROL_STREAM_STOP = 1000, /*!< Indicate to a channel in playback to stop the stream */
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
AST_CONTROL_STREAM_SUSPEND = 1001, /*!< Indicate to a channel in playback to suspend the stream */
Class: default
AST_CONTROL_STREAM_RESTART = 1002, /*!< Indicate to a channel in playback to restart the stream */
AST_CONTROL_STREAM_REVERSE = 1003, /*!< Indicate to a channel in playback to rewind */
AST_CONTROL_STREAM_FORWARD = 1004, /*!< Indicate to a channel in playback to fast forward */
/* Control frames to manipulate recording on a channel. */
AST_CONTROL_RECORD_CANCEL = 1100, /*!< Indicated to a channel in record to stop recording and discard the file */
AST_CONTROL_RECORD_STOP = 1101, /*!< Indicated to a channel in record to stop recording */
AST_CONTROL_RECORD_SUSPEND = 1102, /*!< Indicated to a channel in record to suspend/unsuspend recording */
AST_CONTROL_RECORD_MUTE = 1103, /*!< Indicated to a channel in record to mute/unmute (i.e. write silence) recording */
</pre>
</pre>


'''Example'''
== LocalBridge ==
<pre>
<pre>
"event": "OriginateResponse",
Event: LocalBridge
"privilege": "call,all",
Privilege: call,all
"response": "Failure",
LocalOneChannel: Local/test-04@common-incoming-0000000a;1
"channel": "SIP/111-111-0004@trunk_test_1",
LocalOneChannelState: 0
"reason": "5",
LocalOneChannelStateDesc: Down
"uniqueid": "<null>",
LocalOneCallerIDNum: <unknown>
"calleridname": "<unknown>",
LocalOneCallerIDName: <unknown>
"context": "",
LocalOneConnectedLineNum: <unknown>
"exten": "",
LocalOneConnectedLineName: <unknown>
"calleridnum": "<unknown>"
LocalOneLanguage: en
 
LocalOneAccountCode:  
"event": "OriginateResponse",
LocalOneContext: common-incoming
"privilege": "call,all",
LocalOneExten: test-04
"response": "Success",
LocalOnePriority: 1
"channel": "SIP/trunk_test_1-00000000",
LocalOneUniqueid: 1447438716.467
"reason": "4",
LocalOneLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
"uniqueid": "dd420b95-c52d-467a-8f65-63efaa094eb6",
LocalTwoChannel: Local/test-04@common-incoming-0000000a;2
"calleridname": "<unknown>",
LocalTwoChannelState: 4
"context": "",
LocalTwoChannelStateDesc: Ring
"exten": "",
LocalTwoCallerIDNum: <unknown>
"calleridnum": "<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>
</pre>


== Hangup ==
== BridgeLeave ==
<pre>
<pre>
Event: Hangup
Event: BridgeLeave
Channel: <value>
Privilege: call,all
ChannelState: <value>
BridgeUniqueid: 1d859980-a7f9-4c7c-87ab-d39862ad238b
ChannelStateDesc: <value>
BridgeType: basic
CallerIDNum: <value>
BridgeTechnology: simple_bridge
CallerIDName: <value>
BridgeCreator: <unknown>
ConnectedLineNum: <value>
BridgeName: <unknown>
ConnectedLineName: <value>
BridgeNumChannels: 1
AccountCode: <value>
Channel: SIP/test-04-0000019b
Context: <value>
ChannelState: 6
Exten: <value>
ChannelStateDesc: Up
Priority: <value>
CallerIDNum: test-04
Uniqueid: <value>
CallerIDName: <unknown>
Linkedid: <value>
ConnectedLineNum: <unknown>
Cause: <value>
ConnectedLineName: <unknown>
Cause-txt: <value>
Language: en
AccountCode:  
Context: common-incoming
Exten:
Priority: 1
Uniqueid: 1447438716.469
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
</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>
</pre>
* 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.
* Cause - A numeric cause code for why the channel was hung up.
* Cause-txt - A description of why the channel was hung up.


'''Cause'''
== BridgeCreate ==
<pre>
<pre>
/*! \name Causes for disconnection (from Q.850/Q.931)
Event: BridgeCreate
*  These are the internal cause codes used in Asterisk.
Privilege: call,all
*  \ref AstCauses
BridgeUniqueid: 1d859980-a7f9-4c7c-87ab-d39862ad238b
*/
BridgeType: basic
/*@{ */
BridgeTechnology: simple_bridge
#define AST_CAUSE_UNALLOCATED                    1
BridgeCreator: <unknown>
#define AST_CAUSE_NO_ROUTE_TRANSIT_NET          2
BridgeName: <unknown>
#define AST_CAUSE_NO_ROUTE_DESTINATION          3
BridgeNumChannels: 0
#define AST_CAUSE_MISDIALLED_TRUNK_PREFIX        5
</pre>
#define AST_CAUSE_CHANNEL_UNACCEPTABLE          6
 
#define AST_CAUSE_CALL_AWARDED_DELIVERED        7
== BridgeEnter ==
#define AST_CAUSE_PRE_EMPTED                    8
Channel 이 Bridge 로 들어왔음을 나타낸다.
#define AST_CAUSE_NUMBER_PORTED_NOT_HERE        14
<pre>
#define AST_CAUSE_NORMAL_CLEARING              16
Event: BridgeEnter
#define AST_CAUSE_USER_BUSY                    17
BridgeUniqueid: <value>
#define AST_CAUSE_NO_USER_RESPONSE              18
BridgeType: <value>
#define AST_CAUSE_NO_ANSWER                    19
BridgeTechnology: <value>
#define AST_CAUSE_SUBSCRIBER_ABSENT            20
BridgeCreator: <value>
#define AST_CAUSE_CALL_REJECTED                21
BridgeName: <value>
#define AST_CAUSE_NUMBER_CHANGED                22
BridgeNumChannels: <value>
#define AST_CAUSE_REDIRECTED_TO_NEW_DESTINATION 23
Channel: <value>
#define AST_CAUSE_ANSWERED_ELSEWHERE            26
ChannelState: <value>
#define AST_CAUSE_DESTINATION_OUT_OF_ORDER      27
ChannelStateDesc: <value>
#define AST_CAUSE_INVALID_NUMBER_FORMAT        28
CallerIDNum: <value>
#define AST_CAUSE_FACILITY_REJECTED            29
CallerIDName: <value>
#define AST_CAUSE_RESPONSE_TO_STATUS_ENQUIRY    30
ConnectedLineNum: <value>
#define AST_CAUSE_NORMAL_UNSPECIFIED            31
ConnectedLineName: <value>
#define AST_CAUSE_NORMAL_CIRCUIT_CONGESTION    34
AccountCode: <value>
#define AST_CAUSE_NETWORK_OUT_OF_ORDER          38
Context: <value>
#define AST_CAUSE_NORMAL_TEMPORARY_FAILURE      41
Exten: <value>
#define AST_CAUSE_SWITCH_CONGESTION            42
Priority: <value>
#define AST_CAUSE_ACCESS_INFO_DISCARDED        43
Uniqueid: <value>
#define AST_CAUSE_REQUESTED_CHAN_UNAVAIL        44
Linkedid: <value>
#define AST_CAUSE_FACILITY_NOT_SUBSCRIBED      50
SwapUniqueid: <value>
#define AST_CAUSE_OUTGOING_CALL_BARRED          52
</pre>
#define AST_CAUSE_INCOMING_CALL_BARRED          54
* BridgeUniqueid
#define AST_CAUSE_BEARERCAPABILITY_NOTAUTH      57
* BridgeType : The type of bridge
#define AST_CAUSE_BEARERCAPABILITY_NOTAVAIL    58
* BridgeTechnology : Technology in use by the bridge.
#define AST_CAUSE_BEARERCAPABILITY_NOTIMPL      65
* BridgeCreator : Entity that created the bridge if applicable.
#define AST_CAUSE_CHAN_NOT_IMPLEMENTED          66
* BridgeName : Name used to refer to the bridge by its BridgeCreator if applicable.
#define AST_CAUSE_FACILITY_NOT_IMPLEMENTED      69
* BridgeNumChannels : Number of channels in the bridge.
#define AST_CAUSE_INVALID_CALL_REFERENCE        81
* Channel : Channel name.
#define AST_CAUSE_INCOMPATIBLE_DESTINATION      88
* ChannelState : A numeric code for the channel's current state, related to ChannelStateDesc.
#define AST_CAUSE_INVALID_MSG_UNSPECIFIED      95
* ChannelStateDesc
#define AST_CAUSE_MANDATORY_IE_MISSING          96
: Down
#define AST_CAUSE_MESSAGE_TYPE_NONEXIST        97
: Rsvd
#define AST_CAUSE_WRONG_MESSAGE                98
: OffHook
#define AST_CAUSE_IE_NONEXIST                  99
: Dialing
#define AST_CAUSE_INVALID_IE_CONTENTS          100
: Ring
#define AST_CAUSE_WRONG_CALL_STATE            101
: Ringing
#define AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE    102
: Up
#define AST_CAUSE_MANDATORY_IE_LENGTH_ERROR    103
: Busy
#define AST_CAUSE_PROTOCOL_ERROR              111
: Dialing Offhook
#define AST_CAUSE_INTERWORKING                127
: Pre-ring
 
: Unknown
/* Special Asterisk aliases */
* CallerIDNum
#define AST_CAUSE_BUSY          AST_CAUSE_USER_BUSY
* CallerIDName
#define AST_CAUSE_FAILURE      AST_CAUSE_NETWORK_OUT_OF_ORDER
* ConnectedLineNum
#define AST_CAUSE_NORMAL        AST_CAUSE_NORMAL_CLEARING
* ConnectedLineName
#define AST_CAUSE_NOANSWER      AST_CAUSE_NO_ANSWER
* AccountCode
#define AST_CAUSE_CONGESTION    AST_CAUSE_NORMAL_CIRCUIT_CONGESTION
* Context
#define AST_CAUSE_UNREGISTERED  AST_CAUSE_SUBSCRIBER_ABSENT
* Exten
#define AST_CAUSE_NOTDEFINED    0
* Priority
#define AST_CAUSE_NOSUCHDRIVER  AST_CAUSE_CHAN_NOT_IMPLEMENTED
* Uniqueid
</pre>
* Linkedid : Uniqueid of the oldest channel associated with this channel.
* SwapUniqueid : The uniqueid of the channel being swapped out of the bridge.


'''Example'''
=== Example ===
<pre>
<pre>
"accountcode": "",
Event: BridgeEnter
"channelstatedesc": "Down",
Privilege: call,all
"uniqueid": "5ca0da71-3cc2-4c54-b51c-575d72f70b82",
BridgeUniqueid: 1d859980-a7f9-4c7c-87ab-d39862ad238b
"event": "Hangup",
BridgeType: basic
"context": "from_provider",
BridgeTechnology: simple_bridge
"connectedlinenum": "<unknown>",
BridgeCreator: <unknown>
"privilege": "call,all",
BridgeName: <unknown>
"channel": "SIP/trunk_test_1-00000005",
BridgeNumChannels: 1
"calleridnum": "<unknown>",
Channel: SIP/test-04-0000019b
"channelstate": "0",
ChannelState: 6
"calleridname": "<unknown>",
ChannelStateDesc: Up
"exten": "",
CallerIDNum: test-04
"cause": "19",
CallerIDName: <unknown>
"connectedlinename": "<unknown>",
ConnectedLineNum: <unknown>
"language": "en",
ConnectedLineName: <unknown>
"linkedid": "5ca0da71-3cc2-4c54-b51c-575d72f70b82",
Language: en
"priority": "1",
AccountCode:
"cause-txt": "User alerting, no answer"
Context: common-incoming
Exten:
Priority: 1
Uniqueid: 1447438716.469
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
</pre>
</pre>


== Agent ==
=== See also ===
== AgentCalled ==
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerEvent_BridgeEnter
Queue에서 대기중인 Agent 에게 현재 대기중인 콜이 있다는 알림을 줄때 발생한다.
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerEvent_BridgeCreate
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerEvent_BridgeDestroy
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerEvent_BridgeLeave
 
== BridgeDestroy ==
<pre>
<pre>
Event: AgentCalled
Event: BridgeDestroy
Channel: <value>
Privilege: call,all
ChannelState: <value>
BridgeUniqueid: 1d859980-a7f9-4c7c-87ab-d39862ad238b
ChannelStateDesc: <value>
BridgeType: basic
CallerIDNum: <value>
BridgeTechnology: simple_bridge
CallerIDName: <value>
BridgeCreator: <unknown>
ConnectedLineNum: <value>
BridgeName: <unknown>
ConnectedLineName: <value>
BridgeNumChannels: 0
AccountCode: <value>
</pre>
Context: <value>
 
Exten: <value>
== AgentConnect ==
Priority: <value>
<pre>
Uniqueid: <value>
Event: AgentConnect
Linkedid: <value>
Privilege: agent,all
DestChannel: <value>
Channel: SIP/trunk_test_1-0000019a
DestChannelState: <value>
ChannelState: 6
DestChannelStateDesc: <value>
ChannelStateDesc: Up
DestCallerIDNum: <value>
CallerIDNum: <unknown>
DestCallerIDName: <value>
CallerIDName: <unknown>
DestConnectedLineNum: <value>
ConnectedLineNum: <unknown>
DestConnectedLineName: <value>
ConnectedLineName: <unknown>
DestAccountCode: <value>
Language: en
DestContext: <value>
AccountCode:  
DestExten: <value>
Context: from_provider
DestPriority: <value>
Exten:  
DestUniqueid: <value>
Priority: 1
DestLinkedid: <value>
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Queue: <value>
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
MemberName: <value>
DestChannel: Local/test-04@common-incoming-0000000a;1
Interface: <value>
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
</pre>
</pre>


== AgentComplete ==
== RTCPReceived ==
<pre>
<pre>
Event: AgentComplete
Event: RTCPReceived
Channel: <value>
Privilege: reporting,all
ChannelState: <value>
Channel: SIP/test-04-0000019b
ChannelStateDesc: <value>
ChannelState: 6
CallerIDNum: <value>
ChannelStateDesc: Up
CallerIDName: <value>
CallerIDNum: test-04
ConnectedLineNum: <value>
CallerIDName: <unknown>
ConnectedLineName: <value>
ConnectedLineNum: <unknown>
AccountCode: <value>
ConnectedLineName: <unknown>
Context: <value>
Language: en
Exten: <value>
AccountCode:  
Priority: <value>
Context: common-incoming
Uniqueid: <value>
Exten:  
Linkedid: <value>
Priority: 1
DestChannel: <value>
Uniqueid: 1447438716.469
DestChannelState: <value>
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
DestChannelStateDesc: <value>
To: 127.0.1.1:0
DestCallerIDNum: <value>
From: 192.168.200.1:27223
DestCallerIDName: <value>
RTT: 0.0000
DestConnectedLineNum: <value>
SSRC: 0x00f17974
DestConnectedLineName: <value>
PT: 201(RR)
DestAccountCode: <value>
ReportCount: 1
DestContext: <value>
Report0SourceSSRC: 0x34634503
DestExten: <value>
Report0FractionLost: 0
DestPriority: <value>
Report0CumulativeLost: 0
DestUniqueid: <value>
Report0HighestSequence: 41649
DestLinkedid: <value>
Report0SequenceNumberCycles: 0
Queue: <value>
Report0IAJitter: 0
MemberName: <value>
Report0LSR: 0
Interface: <value>
Report0DLSR: 0.0000
HoldTime: <value>
</pre>
TalkTime: <value>
 
Reason: <value>
== LocalOptimizationBegin ==
<pre>
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
</pre>
</pre>
* 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.
* DestChannel
* DestChannelState - A numeric code for the channel's current state, related to DestChannelStateDesc
* DestChannelStateDesc
** Down
** Rsrvd
** OffHook
** Dialing
** Ring
** Ringing
** Up
** Busy
** Dialing Offhook
** Pre-ring
** Unknown
* DestCallerIDNum
* DestCallerIDName
* DestConnectedLineNum
* DestConnectedLineName
* DestAccountCode
* DestContext
* DestExten
* DestPriority
* DestUniqueid
* DestLinkedid - Uniqueid of the oldest channel associated with this channel.
* Queue - The name of the queue.
* MemberName - The name of the queue member.
* Interface - The queue member's channel technology or location.
* HoldTime - The time the channel was in the queue, expressed in seconds since 00:00, Jan 1, 1970 UTC.
* TalkTime - The time the queue member talked with the caller in the queue, expressed in seconds since 00:00, Jan 1, 1970 UTC.
* Reason
** caller
** agent
** transfer


== AgentConnect ==
== LocalOptimizationEnd ==
Queue member 가 answer 를 한 후, 대기 중인 콜과 bridge 되었을 때 발생한다.
<pre>
<pre>
Event: AgentConnect
Event: LocalOptimizationEnd
Channel: <value>
Privilege: call,all
ChannelState: <value>
LocalOneChannel: Local/test-04@common-incoming-0000000a;1
ChannelStateDesc: <value>
LocalOneChannelState: 6
CallerIDNum: <value>
LocalOneChannelStateDesc: Up
CallerIDName: <value>
LocalOneCallerIDNum: <unknown>
ConnectedLineNum: <value>
LocalOneCallerIDName: <unknown>
ConnectedLineName: <value>
LocalOneConnectedLineNum: <unknown>
AccountCode: <value>
LocalOneConnectedLineName: <unknown>
Context: <value>
LocalOneLanguage: en
Exten: <value>
LocalOneAccountCode:  
Priority: <value>
LocalOneContext: common-incoming
Uniqueid: <value>
LocalOneExten:  
Linkedid: <value>
LocalOnePriority: 1
DestChannel: <value>
LocalOneUniqueid: 1447438716.467
DestChannelState: <value>
LocalOneLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
DestChannelStateDesc: <value>
LocalTwoChannel: Local/test-04@common-incoming-0000000a;2
DestCallerIDNum: <value>
LocalTwoChannelState: 6
DestCallerIDName: <value>
LocalTwoChannelStateDesc: Up
DestConnectedLineNum: <value>
LocalTwoCallerIDNum: <unknown>
DestConnectedLineName: <value>
LocalTwoCallerIDName: <unknown>
DestAccountCode: <value>
LocalTwoConnectedLineNum: <unknown>
DestContext: <value>
LocalTwoConnectedLineName: <unknown>
DestExten: <value>
LocalTwoLanguage: en
DestPriority: <value>
LocalTwoAccountCode:  
DestUniqueid: <value>
LocalTwoContext: common-incoming
DestLinkedid: <value>
LocalTwoExten: test-04
Queue: <value>
LocalTwoPriority: 1
MemberName: <value>
LocalTwoUniqueid: 1447438716.468
Interface: <value>
LocalTwoLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
RingTime: <value>
Success: No
HoldTime: <value>
Id: 5
</pre>
</pre>


== AgentDump ==
== Newchannel ==
 
새로운 채널이 생성되었을 때 발생한다.
== AgentLogin ==
 
== AgentLogoff ==
 
== AgentRingNoAnswer ==
 
== VarSet ==
'''Example'''
<pre>
<pre>
Event: VarSet
Event: Newchannel
Privilege: dialplan,all
Channel: <value>
Channel: SIP/trunk_test_1-0000019a
ChannelState: <value>
ChannelStateDesc: <value>
CallerIDNum: <value>
CallerIDName: <value>
ConnectedLineNum: <value>
ConnectedLineName: <value>
AccountCode: <value>
Context: <value>
Exten: <value>
Priority: <value>
Uniqueid: <value>
Linkedid: <value>
</pre>
 
=== Example ===
<pre>
Event: Newchannel
Privilege: call,all
Channel: SIP/trunk_test_1-0000019a
ChannelState: 0
ChannelState: 0
ChannelStateDesc: Down
ChannelStateDesc: Down
Line 783: Line 848:
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Variable: SIPCALLID
Value: 2bfd10aa59fd6d695ef6f5393b5e9286@10.0.2.15:5060
</pre>
</pre>


Line 832: Line 895:
</pre>
</pre>


== DeviceStateChange ==
== OriginateResponse ==
Device의 state 가 변경되었음을 나타낸다.
 
ExtensionStatus 이벤트는 dialplan hints 와 연관된 내용에만 발생하는 것에 반해, DeviceStateChange 이벤트는 모든 device state 의 변경에 발생한다는 것이 다르다.
<pre>
<pre>
Event: DeviceStateChange
Event: OriginateResponse
Device: <value>
[ActionID:] <value>
State: <value>
Response: <value>
</pre>
Channel: <value>
* Device : state 가 변경된 device
Context: <value>
* State : 변경된 state
Exten: <value>
Reason: <value>
Uniqueid: <value>
CallerIDNum: <value>
CallerIDName: <value>
</pre>
* ActionID
* Response
* * Failure
* * Success
* Channel
* Context
* Exten
* Reason
* Uniqueid
* CallerIDNum
* CallerIDName
 
'''Reason'''


=== Example ===
Reason code 내용은 다음과 같다(asterisk/frame.h).
<pre>
<pre>
Event: DeviceStateChange
AST_CONTROL_HANGUP = 1, /*!< Other end has hungup */
Privilege: call,all
AST_CONTROL_RING = 2, /*!< Local ring */
Device: SIP/trunk_test_1
AST_CONTROL_RINGING = 3, /*!< Remote end is ringing */
State: RINGING
AST_CONTROL_ANSWER = 4, /*!< Remote end has answered */
</pre>
AST_CONTROL_BUSY = 5, /*!< Remote end is busy */
 
AST_CONTROL_TAKEOFFHOOK = 6, /*!< Make it go off hook */
=== See also ===
AST_CONTROL_OFFHOOK = 7, /*!< Line is off hook */
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerEvent_DeviceStateChange
AST_CONTROL_CONGESTION = 8, /*!< Congestion (circuits busy) */
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerEvent_ExtensionStatus
AST_CONTROL_FLASH = 9, /*!< Flash hook */
 
AST_CONTROL_WINK = 10, /*!< Wink */
== DialBegin ==
AST_CONTROL_OPTION = 11, /*!< Set a low-level option */
<pre>
AST_CONTROL_RADIO_KEY = 12, /*!< Key Radio */
Event: DialBegin
AST_CONTROL_RADIO_UNKEY = 13, /*!< Un-Key Radio */
Privilege: call,all
AST_CONTROL_PROGRESS = 14, /*!< Indicate PROGRESS */
DestChannel: SIP/trunk_test_1-0000019a
AST_CONTROL_PROCEEDING = 15, /*!< Indicate CALL PROCEEDING */
DestChannelState: 0
AST_CONTROL_HOLD = 16, /*!< Indicate call is placed on hold */
DestChannelStateDesc: Down
AST_CONTROL_UNHOLD = 17, /*!< Indicate call is left from hold */
DestCallerIDNum: <unknown>
AST_CONTROL_VIDUPDATE = 18, /*!< Indicate video frame update */
DestCallerIDName: <unknown>
_XXX_AST_CONTROL_T38 = 19, /*!< T38 state change request/notification \deprecated This is no longer supported. Use AST_CONTROL_T38_PARAMETERS instead. */
DestConnectedLineNum: <unknown>
AST_CONTROL_SRCUPDATE = 20, /*!< Indicate source of media has changed */
DestConnectedLineName: <unknown>
AST_CONTROL_TRANSFER = 21, /*!< Indicate status of a transfer request */
DestLanguage: en
AST_CONTROL_CONNECTED_LINE = 22,/*!< Indicate connected line has changed */
DestAccountCode:
AST_CONTROL_REDIRECTING = 23, /*!< Indicate redirecting id has changed */
DestContext: from_provider
AST_CONTROL_T38_PARAMETERS = 24,/*!< T38 state change request/notification with parameters */
DestExten:
AST_CONTROL_CC = 25, /*!< Indication that Call completion service is possible */
DestPriority: 1
AST_CONTROL_SRCCHANGE = 26, /*!< Media source has changed and requires a new RTP SSRC */
DestUniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
AST_CONTROL_READ_ACTION = 27, /*!< Tell ast_read to take a specific action */
DestLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
AST_CONTROL_AOC = 28, /*!< Advice of Charge with encoded generic AOC payload */
DialString: 1237764000@trunk_test_1
AST_CONTROL_END_OF_Q = 29, /*!< Indicate that this position was the end of the channel queue for a softhangup. */
</pre>
AST_CONTROL_INCOMPLETE = 30, /*!< Indication that the extension dialed is incomplete */
AST_CONTROL_MCID = 31, /*!< Indicate that the caller is being malicious. */
AST_CONTROL_UPDATE_RTP_PEER = 32, /*!< Interrupt the bridge and have it update the peer */
AST_CONTROL_PVT_CAUSE_CODE = 33, /*!< Contains an update to the protocol-specific cause-code stored for branching dials */
AST_CONTROL_MASQUERADE_NOTIFY = 34, /*!< A masquerade is about to begin/end. (Never sent as a frame but directly with ast_indicate_data().) */


== DialEnd ==
/*
<pre>
  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
Event: DialEnd
  *
Privilege: call,all
  * IAX2 sends these values out over the wire.  To prevent future
DestChannel: SIP/trunk_test_1-0000019a
  * incompatibilities, pick the next value in the enum from whatever
DestChannelState: 6
  * is on the current trunk.  If you lose the merge race you need to
DestChannelStateDesc: Up
  * fix the previous branches to match what is on trunk.  In addition
DestCallerIDNum: <unknown>
  * you need to change chan_iax2 to explicitly allow the control
DestCallerIDName: <unknown>
  * frame over the wire if it makes sense for the frame to be passed
DestConnectedLineNum: <unknown>
  * to another Asterisk instance.
DestConnectedLineName: <unknown>
  *
DestLanguage: en
  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
DestAccountCode:
  */
DestContext: from_provider
DestExten:
DestPriority: 1
DestUniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
DestLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
DialStatus: ANSWER
</pre>


== Newstate ==
/* Control frames used to manipulate a stream on a channel. The values for these
Channel 의 state 의 변경되었음을 알려준다.
  * must be greater than the allowed value for a 8-bit char, so that they avoid
<pre>
  * conflicts with DTMF values. */
Event: Newstate
AST_CONTROL_STREAM_STOP = 1000, /*!< Indicate to a channel in playback to stop the stream */
Channel: <value>
AST_CONTROL_STREAM_SUSPEND = 1001, /*!< Indicate to a channel in playback to suspend the stream */
ChannelState: <value>
AST_CONTROL_STREAM_RESTART = 1002, /*!< Indicate to a channel in playback to restart the stream */
ChannelStateDesc: <value>
AST_CONTROL_STREAM_REVERSE = 1003, /*!< Indicate to a channel in playback to rewind */
CallerIDNum: <value>
AST_CONTROL_STREAM_FORWARD = 1004, /*!< Indicate to a channel in playback to fast forward */
CallerIDName: <value>
/* Control frames to manipulate recording on a channel. */
ConnectedLineNum: <value>
AST_CONTROL_RECORD_CANCEL = 1100, /*!< Indicated to a channel in record to stop recording and discard the file */
ConnectedLineName: <value>
AST_CONTROL_RECORD_STOP = 1101, /*!< Indicated to a channel in record to stop recording */
AccountCode: <value>
AST_CONTROL_RECORD_SUSPEND = 1102, /*!< Indicated to a channel in record to suspend/unsuspend recording */
Context: <value>
AST_CONTROL_RECORD_MUTE = 1103, /*!< Indicated to a channel in record to mute/unmute (i.e. write silence) recording */
Exten: <value>
Priority: <value>
Uniqueid: <value>
Linkedid: <value>
</pre>
</pre>


=== Example ===
'''Example'''
<pre>
<pre>
Event: Newstate
"event": "OriginateResponse",
Privilege: call,all
"privilege": "call,all",
Channel: SIP/trunk_test_1-0000019a
"response": "Failure",
ChannelState: 6
"channel": "SIP/111-111-0004@trunk_test_1",
ChannelStateDesc: Up
"reason": "5",
CallerIDNum: <unknown>
"uniqueid": "<null>",
CallerIDName: <unknown>
"calleridname": "<unknown>",
ConnectedLineNum: <unknown>
"context": "",
ConnectedLineName: <unknown>
"exten": "",
Language: en
"calleridnum": "<unknown>"
AccountCode:
Context: from_provider
Exten:
Priority: 1
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
</pre>


== MusicOnHoldStart ==
"event": "OriginateResponse",
<pre>
"privilege": "call,all",
Event: MusicOnHoldStart
"response": "Success",
Privilege: call,all
"channel": "SIP/trunk_test_1-00000000",
Channel: SIP/trunk_test_1-0000019a
"reason": "4",
ChannelState: 6
"uniqueid": "dd420b95-c52d-467a-8f65-63efaa094eb6",
ChannelStateDesc: Up
"calleridname": "<unknown>",
CallerIDNum: <unknown>
"context": "",
CallerIDName: <unknown>
"exten": "",
ConnectedLineNum: <unknown>
"calleridnum": "<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>
</pre>


== LocalBridge ==
== ParkedCall ==
Channel 이 parked 되었을 때 발생한다.
<pre>
<pre>
Event: LocalBridge
Event: ParkedCall
Privilege: call,all
ParkeeChannel: <value>
LocalOneChannel: Local/test-04@common-incoming-0000000a;1
ParkeeChannelState: <value>
LocalOneChannelState: 0
ParkeeChannelStateDesc: <value>
LocalOneChannelStateDesc: Down
ParkeeCallerIDNum: <value>
LocalOneCallerIDNum: <unknown>
ParkeeCallerIDName: <value>
LocalOneCallerIDName: <unknown>
ParkeeConnectedLineNum: <value>
LocalOneConnectedLineNum: <unknown>
ParkeeConnectedLineName: <value>
LocalOneConnectedLineName: <unknown>
ParkeeAccountCode: <value>
LocalOneLanguage: en
ParkeeContext: <value>
LocalOneAccountCode:  
ParkeeExten: <value>
LocalOneContext: common-incoming
ParkeePriority: <value>
LocalOneExten: test-04
ParkeeUniqueid: <value>
LocalOnePriority: 1
ParkeeLinkedid: <value>
LocalOneUniqueid: 1447438716.467
ParkerDialString: <value>
LocalOneLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Parkinglot: <value>
LocalTwoChannel: Local/test-04@common-incoming-0000000a;2
ParkingSpace: <value>
LocalTwoChannelState: 4
ParkingTimeout: <value>
LocalTwoChannelStateDesc: Ring
ParkingDuration: <value>
LocalTwoCallerIDNum: <unknown>
</pre>
LocalTwoCallerIDName: <unknown>
* ParkeeChannel : Parked 된 채널 이름
LocalTwoConnectedLineNum: <unknown>
* ParkeeChannelState : A numeric code for the channel's current state, related to ParkeeChannelStateDesc.
LocalTwoConnectedLineName: <unknown>
* ParkeeChannelStateDesc
LocalTwoLanguage: en
: Down
LocalTwoAccountCode:  
: Rsrvd
LocalTwoContext: common-incoming
: OffHook
LocalTwoExten: test-04
: Dialing
LocalTwoPriority: 1
: Ring
LocalTwoUniqueid: 1447438716.468
: Ringing
LocalTwoLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
: Up
Context: common-incoming
: Busy
Exten: test-04
: Dialing Offhook
LocalOptimization: Yes
: Pre-ring
</pre>
: Unknown
 
* ParkeeCallerIDNum
== BridgeLeave ==
* ParkeeCallerIDName
<pre>
* ParkeeConnectedLineNum
Event: BridgeLeave
* ParkeeConnectedLineName
* ParkeeAccountCode
* ParkeeContext
* ParkeeExten
* ParkeePriority
* ParkeeUniqueid
* ParkeeLinkedid : Uniqueid of the oldest channel associated with this channel.
* ParkeeDialString : Dial String that can be used to call back the parker on ParkingTimout.
* Parkinglot : Name of the parking lot that the parked in.
* ParkingSpace : Parking Space that the parkee is parked in.
* ParkingTimeout : Time remaining until the parkee is forcefully removed from parking in seconds.
* ParkingDuration : Time the parkee has been in the parking bridge(in seconds)
 
=== Example ===
<pre>
Event: ParkedCall
Privilege: call,all
Privilege: call,all
BridgeUniqueid: 1d859980-a7f9-4c7c-87ab-d39862ad238b
ParkeeChannel: SIP/agent-01-00000001
BridgeType: basic
ParkeeChannelState: 6
BridgeTechnology: simple_bridge
ParkeeChannelStateDesc: Up
BridgeCreator: <unknown>
ParkeeCallerIDNum: agent-01
BridgeName: <unknown>
ParkeeCallerIDName: <unknown>
BridgeNumChannels: 1
ParkeeConnectedLineNum: <unknown>
Channel: SIP/test-04-0000019b
ParkeeConnectedLineName: <unknown>
ChannelState: 6
ParkeeLanguage: en
ChannelStateDesc: Up
ParkeeAccountCode:  
CallerIDNum: test-04
ParkeeContext: sample_park
CallerIDName: <unknown>
ParkeeExten: s
ConnectedLineNum: <unknown>
ParkeePriority: 2
ConnectedLineName: <unknown>
ParkeeUniqueid: 1480409788.2
Language: en
ParkeeLinkedid: 1480409788.2
AccountCode:  
ParkerDialString: SIP/agent-01
Context: common-incoming
Parkinglot: default
Exten:  
ParkingSpace: 701
Priority: 1
ParkingTimeout: 45
Uniqueid: 1447438716.469
ParkingDuration: 0
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
</pre>
</pre>


== AgentCalled ==
=== See also ===
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerEvent_ParkedCall
 
== QueueCallerAbandon ==
Queue 에 인입된 콜이 분배되기 전 Hangup 되었을 때 발생하는 이벤트이다.
<pre>
<pre>
Event: AgentCalled
Event: QueueCallerAbandon
Privilege: agent,all
Channel: <value>
Channel: SIP/trunk_test_1-0000019a
ChannelState: <value>
ChannelState: 6
ChannelStateDesc: <value>
ChannelStateDesc: Up
CallerIDNum: <value>
CallerIDNum: <unknown>
CallerIDName: <value>
CallerIDName: <unknown>
ConnectedLineNum: <value>
ConnectedLineNum: <unknown>
ConnectedLineName: <value>
ConnectedLineName: <unknown>
AccountCode: <value>
Language: en
Context: <value>
AccountCode:  
Exten: <value>
Context: from_provider
Priority: <value>
Exten:  
Uniqueid: <value>
Priority: 1
Linkedid: <value>
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Queue: <value>
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Position: <value>
DestChannel: Local/test-04@common-incoming-0000000a;1
OriginalPosition: <value>
DestChannelState: 0
HoldTime: <value>
DestChannelStateDesc: Down
</pre>
DestCallerIDNum: <unknown>
 
DestCallerIDName: <unknown>
* Channel
DestConnectedLineNum: <unknown>
* ChannelState - A numeric code for the channel's current state, related to ChannelStateDesc
DestConnectedLineName: <unknown>
* ChannelStateDesc
DestLanguage: en
* * Down
DestAccountCode:
* * Rsrvd
DestContext: common-incoming
* * OffHook
DestExten:
* * Dialing
DestPriority: 1
* * Ring
DestUniqueid: 1447438716.467
* * Ringing
DestLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
* * Up
Queue: TestQueue
* * Busy
Interface: Local/test-04@common-incoming
* * Dialing Offhook
MemberName: test 04
* * Pre-ring
</pre>
* * Unknown
 
* CallerIDNum
== BridgeCreate ==
* 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 ==
Queue 에 콜이 인입될 때 발생하는 이벤트이다.
<pre>
<pre>
Event: BridgeCreate
Event: QueueCallerJoin
Privilege: call,all
Channel: <value>
BridgeUniqueid: 1d859980-a7f9-4c7c-87ab-d39862ad238b
ChannelState: <value>
BridgeType: basic
BridgeTechnology: simple_bridge
BridgeCreator: <unknown>
BridgeName: <unknown>
BridgeNumChannels: 0
</pre>
 
== BridgeEnter ==
Channel 이 Bridge 로 들어왔음을 나타낸다.
<pre>
Event: BridgeEnter
BridgeUniqueid: <value>
BridgeType: <value>
BridgeTechnology: <value>
BridgeCreator: <value>
BridgeName: <value>
BridgeNumChannels: <value>
Channel: <value>
ChannelState: <value>
ChannelStateDesc: <value>
ChannelStateDesc: <value>
CallerIDNum: <value>
CallerIDNum: <value>
Line 1,093: Line 1,163:
Uniqueid: <value>
Uniqueid: <value>
Linkedid: <value>
Linkedid: <value>
SwapUniqueid: <value>
Queue: <value>
Position: <value>
Count: <value>
</pre>
</pre>
* BridgeUniqueid
 
* BridgeType : The type of bridge
* Channel
* BridgeTechnology : Technology in use by the bridge.
* ChannelState - A numeric code for the channel's current state, related to ChannelStateDesc
* BridgeCreator : Entity that created the bridge if applicable.
* BridgeName : Name used to refer to the bridge by its BridgeCreator if applicable.
* BridgeNumChannels : Number of channels in the bridge.
* Channel : Channel name.
* ChannelState : A numeric code for the channel's current state, related to ChannelStateDesc.
* ChannelStateDesc
* ChannelStateDesc
: Down
** Down
: Rsvd
** Rsrvd
: OffHook
** OffHook
: Dialing
** Dialing
: Ring
** Ring
: Ringing
** Ringing
: Up
** Up
: Busy
** Busy
: Dialing Offhook
** Dialing Offhook
: Pre-ring
** Pre-ring
: Unknown
** Unknown
* CallerIDNum
* CallerIDNum
* CallerIDName
* CallerIDName
Line 1,124: Line 1,191:
* Priority
* Priority
* Uniqueid
* Uniqueid
* Linkedid : Uniqueid of the oldest channel associated with this channel.
* Linkedid - Uniqueid of the oldest channel associated with this channel.
* SwapUniqueid : The uniqueid of the channel being swapped out of the bridge.
* Queue - The name of the queue.
* Position - This channel's current position in the queue.
* Count - The total number of channels in the queue.


=== Example ===
=== Example ===
<pre>
<pre>
Event: BridgeEnter
Event: QueueCallerJoin
Privilege: call,all
Privilege: agent,all
BridgeUniqueid: 1d859980-a7f9-4c7c-87ab-d39862ad238b
Channel: SIP/trunk_test_1-0000019a
BridgeType: basic
BridgeTechnology: simple_bridge
BridgeCreator: <unknown>
BridgeName: <unknown>
BridgeNumChannels: 1
Channel: SIP/test-04-0000019b
ChannelState: 6
ChannelState: 6
ChannelStateDesc: Up
ChannelStateDesc: Up
CallerIDNum: test-04
CallerIDNum: <unknown>
CallerIDName: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineNum: <unknown>
Line 1,146: Line 1,209:
Language: en
Language: en
AccountCode:  
AccountCode:  
Context: common-incoming
Context: from_provider
Exten:  
Exten:  
Priority: 1
Priority: 1
Uniqueid: 1447438716.469
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Queue: TestQueue
Count: 1
Position: 1
</pre>
</pre>


=== See also ===
== QueueCallerLeave ==
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerEvent_BridgeEnter
Queue 에 인입된 콜이 빠져나갈 때 발생하는 이벤트이다.
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerEvent_BridgeCreate
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerEvent_BridgeDestroy
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerEvent_BridgeLeave
 
== BridgeDestroy ==
<pre>
<pre>
Event: BridgeDestroy
Event: QueueCallerLeave
Privilege: call,all
Channel: <value>
BridgeUniqueid: 1d859980-a7f9-4c7c-87ab-d39862ad238b
ChannelState: <value>
BridgeType: basic
ChannelStateDesc: <value>
BridgeTechnology: simple_bridge
CallerIDNum: <value>
BridgeCreator: <unknown>
CallerIDName: <value>
BridgeName: <unknown>
ConnectedLineNum: <value>
BridgeNumChannels: 0
ConnectedLineName: <value>
AccountCode: <value>
Context: <value>
Exten: <value>
Priority: <value>
Uniqueid: <value>
Linkedid: <value>
Queue: <value>
Count: <value>
Position: <value>
</pre>
</pre>


== AgentConnect ==
* Channel
<pre>
* ChannelState - A numeric code for the channel's current state, related to ChannelStateDesc
Event: AgentConnect
* ChannelStateDesc
Privilege: agent,all
** Down
Channel: SIP/trunk_test_1-0000019a
** Rsrvd
ChannelState: 6
** OffHook
ChannelStateDesc: Up
** Dialing
CallerIDNum: <unknown>
** Ring
CallerIDName: <unknown>
** Ringing
ConnectedLineNum: <unknown>
** Up
ConnectedLineName: <unknown>
** Busy
Language: en
** Dialing Offhook
AccountCode:
** Pre-ring
Context: from_provider
** Unknown
Exten:
* CallerIDNum
Priority: 1
* CallerIDName
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
* ConnectedLineNum
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
* ConnectedLineName
DestChannel: Local/test-04@common-incoming-0000000a;1
* AccountCode
DestChannelState: 6
* Context
DestChannelStateDesc: Up
* Exten
DestCallerIDNum: <unknown>
* Priority
DestCallerIDName: <unknown>
* Uniqueid
DestConnectedLineNum: <unknown>
* Linkedid - Uniqueid of the oldest channel associated with this channel.
DestConnectedLineName: <unknown>
* Queue - The name of the queue.
DestLanguage: en
* Count - The total number of channels in the queue.
DestAccountCode:
* Position - This channel's current position in the queue.
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
</pre>


== RTCPReceived ==
=== Example ===
<pre>
<pre>
Event: RTCPReceived
Event: QueueCallerLeave
Privilege: reporting,all
Privilege: agent,all
Channel: SIP/test-04-0000019b
Channel: SIP/trunk_test_1-0000019a
ChannelState: 6
ChannelState: 6
ChannelStateDesc: Up
ChannelStateDesc: Up
CallerIDNum: test-04
CallerIDNum: <unknown>
CallerIDName: <unknown>
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineNum: <unknown>
Line 1,223: Line 1,282:
Language: en
Language: en
AccountCode:  
AccountCode:  
Context: common-incoming
Context: from_provider
Exten:  
Exten:  
Priority: 1
Priority: 1
Uniqueid: 1447438716.469
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
To: 127.0.1.1:0
Queue: TestQueue
From: 192.168.200.1:27223
Count: 0
RTT: 0.0000
Position: 1
SSRC: 0x00f17974
</pre>
PT: 201(RR)
 
ReportCount: 1
== QueueMemberAdded ==
Report0SourceSSRC: 0x34634503
Queue 에 새롭게 멤버가 등록되었을 때 발생하는 이벤트 메시지이다.
Report0FractionLost: 0
<pre>
Report0CumulativeLost: 0
Event: QueueMemberAdded
Report0HighestSequence: 41649
Privilege: agent,all
Report0SequenceNumberCycles: 0
Queue: Dragon
Report0IAJitter: 0
Location: Local/603-test-mac_address-what-ever-002-1@DialLine/n
Report0LSR: 0
MemberName: Local/603-test-mac_address-what-ever-002-1@DialLine/n
Report0DLSR: 0.0000
Membership: dynamic
Penalty: 0
CallsTaken: 0
LastCall: 0
Status: 1
Paused: 0
</pre>
</pre>


== LocalOptimizationBegin ==
== QueueMemberPause ==
Queue 멤버가 Pause 되었을 때 발생하는 이벤트이다.
<pre>
<pre>
Event: LocalOptimizationBegin
Event: QueueMemberPaused
Privilege: call,all
Privilege: agent,all
LocalOneChannel: Local/test-04@common-incoming-0000000a;1
Queue: Dragon
LocalOneChannelState: 6
Location: Local/603-test-mac_address-what-ever-002-1@DialLine/n
LocalOneChannelStateDesc: Up
MemberName: dummy_name
LocalOneCallerIDNum: <unknown>
Paused: 0
LocalOneCallerIDName: <unknown>
Reason: Test pause
LocalOneConnectedLineNum: <unknown>
</pre>
LocalOneConnectedLineName: <unknown>
 
LocalOneLanguage: en
== QueueMemberPenalty ==
LocalOneAccountCode:
Queue 멤버의 Penalty 값이 조정되었을 때 발생하는 이벤트이다.
LocalOneContext: common-incoming
 
LocalOneExten:
'''Example'''
LocalOnePriority: 1
<pre>
LocalOneUniqueid: 1447438716.467
Event: QueueMemberPenalty
LocalOneLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Privilege: agent,all
LocalTwoChannel: Local/test-04@common-incoming-0000000a;2
Queue: Dragon
LocalTwoChannelState: 6
Location: Local/603-test-mac_address-what-ever-002-1@DialLine/n
LocalTwoChannelStateDesc: Up
Penalty: 100
LocalTwoCallerIDNum: <unknown>
</pre>
LocalTwoCallerIDName: <unknown>
 
LocalTwoConnectedLineNum: <unknown>
== QueueMemberRemoved ==
LocalTwoConnectedLineName: <unknown>
Queue 에서 멤버가 Leave(삭제) 되었을 때 발생하는 이벤트이다.
LocalTwoLanguage: en
 
LocalTwoAccountCode:
'''Example'''
LocalTwoContext: common-incoming
<pre>
LocalTwoExten: test-04
Event: QueueMemberRemoved
LocalTwoPriority: 1
Privilege: agent,all
LocalTwoUniqueid: 1447438716.468
Queue: Dragon
LocalTwoLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Location: Local/603-test-mac_address-what-ever-002-1@DialLine/n
SourceChannel: SIP/test-04-0000019b
MemberName: dummy_name
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
</pre>
</pre>


== LocalOptimizationEnd ==
== QueueMemberRinginuse ==
== QueueMemberStatus ==
Queue 의 멤버 상태 정보가 변경되었을 때, 발생한다.
<pre>
<pre>
Event: LocalOptimizationEnd
Event: QueueMemberStatus
Privilege: call,all
Queue: <value>
LocalOneChannel: Local/test-04@common-incoming-0000000a;1
MemberName: <value>
LocalOneChannelState: 6
Interface: <value>
LocalOneChannelStateDesc: Up
StateInterface: <value>
LocalOneCallerIDNum: <unknown>
Membership: <value>
LocalOneCallerIDName: <unknown>
Penalty: <value>
LocalOneConnectedLineNum: <unknown>
CallsTaken: <value>
LocalOneConnectedLineName: <unknown>
LastCall: <value>
LocalOneLanguage: en
Status: <value>
LocalOneAccountCode:  
Paused: <value>
LocalOneContext: common-incoming
Ringinuse: <value>
LocalOneExten:
</pre>
LocalOnePriority: 1
* Queue - The name of the queue.
LocalOneUniqueid: 1447438716.467
* MemberName - The name of the queue member.
LocalOneLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
* Interface - The queue member's channel technology or location.
LocalTwoChannel: Local/test-04@common-incoming-0000000a;2
* StateInterface - Channel technology or location from which to read device state changes.
LocalTwoChannelState: 6
* Membership(dynamic, realtime, static)
LocalTwoChannelStateDesc: Up
* Penalty - The penalty associated with the queue member.
LocalTwoCallerIDNum: <unknown>
* CallsTaken - The number of calls this queue member has serviced.
LocalTwoCallerIDName: <unknown>
* LastCall - The time this member last took a call, expressed in seconds since 00:00, Jan 1, 1970 UTC.
LocalTwoConnectedLineNum: <unknown>
* 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)
LocalTwoConnectedLineName: <unknown>
* Paused(0, 1)
LocalTwoLanguage: en
* Ringinuse(0, 1)
LocalTwoAccountCode:  
 
LocalTwoContext: common-incoming
'''Example'''
LocalTwoExten: test-04
<pre>
LocalTwoPriority: 1
Event: QueueMemberStatus
LocalTwoUniqueid: 1447438716.468
Privilege: agent,all
LocalTwoLinkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Queue: Camp200
Success: No
Location: Local/200@DialCamp
Id: 5
MemberName: user1
Membership: static
Penalty: 0
CallsTaken: 3
LastCall: 1447947996
Status: 6
Paused: 0
</pre>
</pre>


== ParkedCall ==
== SoftHangupRequest ==
Channel 이 parked 되었을 때 발생한다.
<pre>
<pre>
Event: ParkedCall
Event: SoftHangupRequest
ParkeeChannel: <value>
Privilege: call,all
ParkeeChannelState: <value>
Channel: Local/test-04@common-incoming-0000000a;2
ParkeeChannelStateDesc: <value>
ChannelState: 6
ParkeeCallerIDNum: <value>
ChannelStateDesc: Up
ParkeeCallerIDName: <value>
CallerIDNum: <unknown>
ParkeeConnectedLineNum: <value>
CallerIDName: <unknown>
ParkeeConnectedLineName: <value>
ConnectedLineNum: <unknown>
ParkeeAccountCode: <value>
ConnectedLineName: <unknown>
ParkeeContext: <value>
Language: en
ParkeeExten: <value>
AccountCode:  
ParkeePriority: <value>
Context: common-incoming
ParkeeUniqueid: <value>
Exten: test-04
ParkeeLinkedid: <value>
Priority: 1
ParkerDialString: <value>
Uniqueid: 1447438716.468
Parkinglot: <value>
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
ParkingSpace: <value>
Cause: 16
ParkingTimeout: <value>
ParkingDuration: <value>
</pre>
</pre>
* ParkeeChannel : Parked 된 채널 이름
* ParkeeChannelState : A numeric code for the channel's current state, related to ParkeeChannelStateDesc.
* ParkeeChannelStateDesc
: Down
: Rsrvd
: OffHook
: Dialing
: Ring
: Ringing
: Up
: Busy
: Dialing Offhook
: Pre-ring
: Unknown
* ParkeeCallerIDNum
* ParkeeCallerIDName
* ParkeeConnectedLineNum
* ParkeeConnectedLineName
* ParkeeAccountCode
* ParkeeContext
* ParkeeExten
* ParkeePriority
* ParkeeUniqueid
* ParkeeLinkedid : Uniqueid of the oldest channel associated with this channel.
* ParkeeDialString : Dial String that can be used to call back the parker on ParkingTimout.
* Parkinglot : Name of the parking lot that the parked in.
* ParkingSpace : Parking Space that the parkee is parked in.
* ParkingTimeout : Time remaining until the parkee is forcefully removed from parking in seconds.
* ParkingDuration : Time the parkee has been in the parking bridge(in seconds)


=== Example ===
== Status ==
Raised in response to Status command.
<pre>
Event: Status
[ActionID:] <value>
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>
Type: <value>
DNID: <value>
TimeToHangup: <value>
BridgeID: <value>
Linkedid: <value>
Application: <value>
Data: <value>
Nativeformats: <value>
Readformat: <value>
Readtrans: <value>
Writeformat: <value>
Writetrans: <value>
Callgroup: <value>
Pickupgroup: <value>
Seconds: <value>
</pre>
 
=== See also ===
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerEvent_Status
 
== VarSet ==
'''Example'''
<pre>
<pre>
Event: ParkedCall
Event: VarSet
Privilege: call,all
Privilege: dialplan,all
ParkeeChannel: SIP/agent-01-00000001
Channel: SIP/trunk_test_1-0000019a
ParkeeChannelState: 6
ChannelState: 0
ParkeeChannelStateDesc: Up
ChannelStateDesc: Down
ParkeeCallerIDNum: agent-01
ParkeeCallerIDName: <unknown>
ParkeeConnectedLineNum: <unknown>
ParkeeConnectedLineName: <unknown>
ParkeeLanguage: en
ParkeeAccountCode:
ParkeeContext: sample_park
ParkeeExten: s
ParkeePriority: 2
ParkeeUniqueid: 1480409788.2
ParkeeLinkedid: 1480409788.2
ParkerDialString: SIP/agent-01
Parkinglot: default
ParkingSpace: 701
ParkingTimeout: 45
ParkingDuration: 0
</pre>
 
=== See also ===
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerEvent_ParkedCall
 
== SoftHangupRequest ==
<pre>
Event: SoftHangupRequest
Privilege: call,all
Channel: Local/test-04@common-incoming-0000000a;2
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: <unknown>
CallerIDNum: <unknown>
CallerIDName: <unknown>
CallerIDName: <unknown>
Line 1,424: Line 1,461:
Language: en
Language: en
AccountCode:  
AccountCode:  
Context: common-incoming
Context: from_provider
Exten: test-04
Exten: s
Priority: 1
Priority: 1
Uniqueid: 1447438716.468
Uniqueid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Linkedid: 58f87007-f6a8-4fbe-8b21-cc1d3fb7f967
Cause: 16
Variable: SIPCALLID
</pre>
Value: 2bfd10aa59fd6d695ef6f5393b5e9286@10.0.2.15:5060
 
== Status ==
Raised in response to Status command.
<pre>
Event: Status
[ActionID:] <value>
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>
Type: <value>
DNID: <value>
TimeToHangup: <value>
BridgeID: <value>
Linkedid: <value>
Application: <value>
Data: <value>
Nativeformats: <value>
Readformat: <value>
Readtrans: <value>
Writeformat: <value>
Writetrans: <value>
Callgroup: <value>
Pickupgroup: <value>
Seconds: <value>
</pre>
</pre>
=== See also ===
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerEvent_Status


== See also ==
== See also ==

Revision as of 09:39, 29 November 2016

Overview

Asterisk AMI event 메시지 내용 정리. Asterisk-13,14 버전 기준.

Agent

AgentCalled

Queue에서 대기중인 Agent 에게 현재 대기중인 콜이 있다는 알림을 줄때 발생한다.

Event: AgentCalled
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>
DestChannel: <value>
DestChannelState: <value>
DestChannelStateDesc: <value>
DestCallerIDNum: <value>
DestCallerIDName: <value>
DestConnectedLineNum: <value>
DestConnectedLineName: <value>
DestAccountCode: <value>
DestContext: <value>
DestExten: <value>
DestPriority: <value>
DestUniqueid: <value>
DestLinkedid: <value>
Queue: <value>
MemberName: <value>
Interface: <value>

AgentComplete

Event: AgentComplete
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>
DestChannel: <value>
DestChannelState: <value>
DestChannelStateDesc: <value>
DestCallerIDNum: <value>
DestCallerIDName: <value>
DestConnectedLineNum: <value>
DestConnectedLineName: <value>
DestAccountCode: <value>
DestContext: <value>
DestExten: <value>
DestPriority: <value>
DestUniqueid: <value>
DestLinkedid: <value>
Queue: <value>
MemberName: <value>
Interface: <value>
HoldTime: <value>
TalkTime: <value>
Reason: <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.
  • DestChannel
  • DestChannelState - A numeric code for the channel's current state, related to DestChannelStateDesc
  • DestChannelStateDesc
    • Down
    • Rsrvd
    • OffHook
    • Dialing
    • Ring
    • Ringing
    • Up
    • Busy
    • Dialing Offhook
    • Pre-ring
    • Unknown
  • DestCallerIDNum
  • DestCallerIDName
  • DestConnectedLineNum
  • DestConnectedLineName
  • DestAccountCode
  • DestContext
  • DestExten
  • DestPriority
  • DestUniqueid
  • DestLinkedid - Uniqueid of the oldest channel associated with this channel.
  • Queue - The name of the queue.
  • MemberName - The name of the queue member.
  • Interface - The queue member's channel technology or location.
  • HoldTime - The time the channel was in the queue, expressed in seconds since 00:00, Jan 1, 1970 UTC.
  • TalkTime - The time the queue member talked with the caller in the queue, expressed in seconds since 00:00, Jan 1, 1970 UTC.
  • Reason
    • caller
    • agent
    • transfer

AgentConnect

Queue member 가 answer 를 한 후, 대기 중인 콜과 bridge 되었을 때 발생한다.

Event: AgentConnect
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>
DestChannel: <value>
DestChannelState: <value>
DestChannelStateDesc: <value>
DestCallerIDNum: <value>
DestCallerIDName: <value>
DestConnectedLineNum: <value>
DestConnectedLineName: <value>
DestAccountCode: <value>
DestContext: <value>
DestExten: <value>
DestPriority: <value>
DestUniqueid: <value>
DestLinkedid: <value>
Queue: <value>
MemberName: <value>
Interface: <value>
RingTime: <value>
HoldTime: <value>

AgentDump

AgentLogin

AgentLogoff

AgentRingNoAnswer

Hangup

Event: Hangup
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>
Cause: <value>
Cause-txt: <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.
  • Cause - A numeric cause code for why the channel was hung up.
  • Cause-txt - A description of why the channel was hung up.

Cause

/*! \name Causes for disconnection (from Q.850/Q.931)
 *  These are the internal cause codes used in Asterisk.
 *  \ref AstCauses
 */
/*@{ */
#define AST_CAUSE_UNALLOCATED                    1
#define AST_CAUSE_NO_ROUTE_TRANSIT_NET           2
#define AST_CAUSE_NO_ROUTE_DESTINATION           3
#define AST_CAUSE_MISDIALLED_TRUNK_PREFIX        5
#define AST_CAUSE_CHANNEL_UNACCEPTABLE           6
#define AST_CAUSE_CALL_AWARDED_DELIVERED         7
#define AST_CAUSE_PRE_EMPTED                     8
#define AST_CAUSE_NUMBER_PORTED_NOT_HERE        14
#define AST_CAUSE_NORMAL_CLEARING               16
#define AST_CAUSE_USER_BUSY                     17
#define AST_CAUSE_NO_USER_RESPONSE              18
#define AST_CAUSE_NO_ANSWER                     19
#define AST_CAUSE_SUBSCRIBER_ABSENT             20
#define AST_CAUSE_CALL_REJECTED                 21
#define AST_CAUSE_NUMBER_CHANGED                22
#define AST_CAUSE_REDIRECTED_TO_NEW_DESTINATION 23
#define AST_CAUSE_ANSWERED_ELSEWHERE            26
#define AST_CAUSE_DESTINATION_OUT_OF_ORDER      27
#define AST_CAUSE_INVALID_NUMBER_FORMAT         28
#define AST_CAUSE_FACILITY_REJECTED             29
#define AST_CAUSE_RESPONSE_TO_STATUS_ENQUIRY    30
#define AST_CAUSE_NORMAL_UNSPECIFIED            31
#define AST_CAUSE_NORMAL_CIRCUIT_CONGESTION     34
#define AST_CAUSE_NETWORK_OUT_OF_ORDER          38
#define AST_CAUSE_NORMAL_TEMPORARY_FAILURE      41
#define AST_CAUSE_SWITCH_CONGESTION             42
#define AST_CAUSE_ACCESS_INFO_DISCARDED         43
#define AST_CAUSE_REQUESTED_CHAN_UNAVAIL        44
#define AST_CAUSE_FACILITY_NOT_SUBSCRIBED       50
#define AST_CAUSE_OUTGOING_CALL_BARRED          52
#define AST_CAUSE_INCOMING_CALL_BARRED          54
#define AST_CAUSE_BEARERCAPABILITY_NOTAUTH      57
#define AST_CAUSE_BEARERCAPABILITY_NOTAVAIL     58
#define AST_CAUSE_BEARERCAPABILITY_NOTIMPL      65
#define AST_CAUSE_CHAN_NOT_IMPLEMENTED          66
#define AST_CAUSE_FACILITY_NOT_IMPLEMENTED      69
#define AST_CAUSE_INVALID_CALL_REFERENCE        81
#define AST_CAUSE_INCOMPATIBLE_DESTINATION      88
#define AST_CAUSE_INVALID_MSG_UNSPECIFIED       95
#define AST_CAUSE_MANDATORY_IE_MISSING          96
#define AST_CAUSE_MESSAGE_TYPE_NONEXIST         97
#define AST_CAUSE_WRONG_MESSAGE                 98
#define AST_CAUSE_IE_NONEXIST                   99
#define AST_CAUSE_INVALID_IE_CONTENTS          100
#define AST_CAUSE_WRONG_CALL_STATE             101
#define AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE     102
#define AST_CAUSE_MANDATORY_IE_LENGTH_ERROR    103
#define AST_CAUSE_PROTOCOL_ERROR               111
#define AST_CAUSE_INTERWORKING                 127

/* Special Asterisk aliases */
#define AST_CAUSE_BUSY          AST_CAUSE_USER_BUSY
#define AST_CAUSE_FAILURE       AST_CAUSE_NETWORK_OUT_OF_ORDER
#define AST_CAUSE_NORMAL        AST_CAUSE_NORMAL_CLEARING
#define AST_CAUSE_NOANSWER      AST_CAUSE_NO_ANSWER
#define AST_CAUSE_CONGESTION    AST_CAUSE_NORMAL_CIRCUIT_CONGESTION
#define AST_CAUSE_UNREGISTERED  AST_CAUSE_SUBSCRIBER_ABSENT
#define AST_CAUSE_NOTDEFINED    0
#define AST_CAUSE_NOSUCHDRIVER  AST_CAUSE_CHAN_NOT_IMPLEMENTED

Example

"accountcode": "",
"channelstatedesc": "Down",
"uniqueid": "5ca0da71-3cc2-4c54-b51c-575d72f70b82",
"event": "Hangup",
"context": "from_provider",
"connectedlinenum": "<unknown>",
"privilege": "call,all",
"channel": "SIP/trunk_test_1-00000005",
"calleridnum": "<unknown>",
"channelstate": "0",
"calleridname": "<unknown>",
"exten": "",
"cause": "19",
"connectedlinename": "<unknown>",
"language": "en",
"linkedid": "5ca0da71-3cc2-4c54-b51c-575d72f70b82",
"priority": "1",
"cause-txt": "User alerting, no answer"

DeviceStateChange

Device의 state 가 변경되었음을 나타낸다.

ExtensionStatus 이벤트는 dialplan hints 와 연관된 내용에만 발생하는 것에 반해, DeviceStateChange 이벤트는 모든 device state 의 변경에 발생한다는 것이 다르다.

Event: DeviceStateChange
Device: <value>
State: <value>
  • Device : state 가 변경된 device
  • State : 변경된 state

Example

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

See also

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

Channel 의 state 의 변경되었음을 알려준다.

Event: Newstate
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>

Example

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

Channel 이 Bridge 로 들어왔음을 나타낸다.

Event: BridgeEnter
BridgeUniqueid: <value>
BridgeType: <value>
BridgeTechnology: <value>
BridgeCreator: <value>
BridgeName: <value>
BridgeNumChannels: <value>
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>
SwapUniqueid: <value>
  • BridgeUniqueid
  • BridgeType : The type of bridge
  • BridgeTechnology : Technology in use by the bridge.
  • BridgeCreator : Entity that created the bridge if applicable.
  • BridgeName : Name used to refer to the bridge by its BridgeCreator if applicable.
  • BridgeNumChannels : Number of channels in the bridge.
  • Channel : Channel name.
  • ChannelState : A numeric code for the channel's current state, related to ChannelStateDesc.
  • ChannelStateDesc
Down
Rsvd
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.
  • SwapUniqueid : The uniqueid of the channel being swapped out of the bridge.

Example

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

See also

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

Newchannel

새로운 채널이 생성되었을 때 발생한다.

Event: Newchannel
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>

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

Newexten

채널이 새로운 context, extension, priority 로 진입했을 때 발생한다.

Event: NewExten
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>
Extension: <value>
Application: <value>
AppData: <value>

Example

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)

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

Reason

Reason code 내용은 다음과 같다(asterisk/frame.h).

AST_CONTROL_HANGUP = 1,			/*!< Other end has hungup */
AST_CONTROL_RING = 2,			/*!< Local ring */
AST_CONTROL_RINGING = 3,		/*!< Remote end is ringing */
AST_CONTROL_ANSWER = 4,			/*!< Remote end has answered */
AST_CONTROL_BUSY = 5,			/*!< Remote end is busy */
AST_CONTROL_TAKEOFFHOOK = 6,	/*!< Make it go off hook */
AST_CONTROL_OFFHOOK = 7,		/*!< Line is off hook */
AST_CONTROL_CONGESTION = 8,		/*!< Congestion (circuits busy) */
AST_CONTROL_FLASH = 9,			/*!< Flash hook */
AST_CONTROL_WINK = 10,			/*!< Wink */
AST_CONTROL_OPTION = 11,		/*!< Set a low-level option */
AST_CONTROL_RADIO_KEY = 12,		/*!< Key Radio */
AST_CONTROL_RADIO_UNKEY = 13,	/*!< Un-Key Radio */
AST_CONTROL_PROGRESS = 14,		/*!< Indicate PROGRESS */
AST_CONTROL_PROCEEDING = 15,	/*!< Indicate CALL PROCEEDING */
AST_CONTROL_HOLD = 16,			/*!< Indicate call is placed on hold */
AST_CONTROL_UNHOLD = 17,		/*!< Indicate call is left from hold */
AST_CONTROL_VIDUPDATE = 18,		/*!< Indicate video frame update */
_XXX_AST_CONTROL_T38 = 19,		/*!< T38 state change request/notification \deprecated This is no longer supported. Use AST_CONTROL_T38_PARAMETERS instead. */
AST_CONTROL_SRCUPDATE = 20,		/*!< Indicate source of media has changed */
AST_CONTROL_TRANSFER = 21,		/*!< Indicate status of a transfer request */
AST_CONTROL_CONNECTED_LINE = 22,/*!< Indicate connected line has changed */
AST_CONTROL_REDIRECTING = 23,	/*!< Indicate redirecting id has changed */
AST_CONTROL_T38_PARAMETERS = 24,/*!< T38 state change request/notification with parameters */
AST_CONTROL_CC = 25,			/*!< Indication that Call completion service is possible */
AST_CONTROL_SRCCHANGE = 26,		/*!< Media source has changed and requires a new RTP SSRC */
AST_CONTROL_READ_ACTION = 27,	/*!< Tell ast_read to take a specific action */
AST_CONTROL_AOC = 28,			/*!< Advice of Charge with encoded generic AOC payload */
AST_CONTROL_END_OF_Q = 29,		/*!< Indicate that this position was the end of the channel queue for a softhangup. */
AST_CONTROL_INCOMPLETE = 30,	/*!< Indication that the extension dialed is incomplete */
AST_CONTROL_MCID = 31,			/*!< Indicate that the caller is being malicious. */
AST_CONTROL_UPDATE_RTP_PEER = 32, /*!< Interrupt the bridge and have it update the peer */
AST_CONTROL_PVT_CAUSE_CODE = 33, /*!< Contains an update to the protocol-specific cause-code stored for branching dials */
AST_CONTROL_MASQUERADE_NOTIFY = 34,	/*!< A masquerade is about to begin/end. (Never sent as a frame but directly with ast_indicate_data().) */

/*
  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
  *
  * IAX2 sends these values out over the wire.  To prevent future
  * incompatibilities, pick the next value in the enum from whatever
  * is on the current trunk.  If you lose the merge race you need to
  * fix the previous branches to match what is on trunk.  In addition
  * you need to change chan_iax2 to explicitly allow the control
  * frame over the wire if it makes sense for the frame to be passed
  * to another Asterisk instance.
  *
  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
  */

/* Control frames used to manipulate a stream on a channel. The values for these
  * must be greater than the allowed value for a 8-bit char, so that they avoid
  * conflicts with DTMF values. */
AST_CONTROL_STREAM_STOP = 1000,		/*!< Indicate to a channel in playback to stop the stream */
AST_CONTROL_STREAM_SUSPEND = 1001,	/*!< Indicate to a channel in playback to suspend the stream */
AST_CONTROL_STREAM_RESTART = 1002,	/*!< Indicate to a channel in playback to restart the stream */
AST_CONTROL_STREAM_REVERSE = 1003,	/*!< Indicate to a channel in playback to rewind */
AST_CONTROL_STREAM_FORWARD = 1004,	/*!< Indicate to a channel in playback to fast forward */
/* Control frames to manipulate recording on a channel. */
AST_CONTROL_RECORD_CANCEL = 1100,	/*!< Indicated to a channel in record to stop recording and discard the file */
AST_CONTROL_RECORD_STOP = 1101,	/*!< Indicated to a channel in record to stop recording */
AST_CONTROL_RECORD_SUSPEND = 1102,	/*!< Indicated to a channel in record to suspend/unsuspend recording */
AST_CONTROL_RECORD_MUTE = 1103,	/*!< Indicated to a channel in record to mute/unmute (i.e. write silence) recording */

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>"

ParkedCall

Channel 이 parked 되었을 때 발생한다.

Event: ParkedCall
ParkeeChannel: <value>
ParkeeChannelState: <value>
ParkeeChannelStateDesc: <value>
ParkeeCallerIDNum: <value>
ParkeeCallerIDName: <value>
ParkeeConnectedLineNum: <value>
ParkeeConnectedLineName: <value>
ParkeeAccountCode: <value>
ParkeeContext: <value>
ParkeeExten: <value>
ParkeePriority: <value>
ParkeeUniqueid: <value>
ParkeeLinkedid: <value>
ParkerDialString: <value>
Parkinglot: <value>
ParkingSpace: <value>
ParkingTimeout: <value>
ParkingDuration: <value>
  • ParkeeChannel : Parked 된 채널 이름
  • ParkeeChannelState : A numeric code for the channel's current state, related to ParkeeChannelStateDesc.
  • ParkeeChannelStateDesc
Down
Rsrvd
OffHook
Dialing
Ring
Ringing
Up
Busy
Dialing Offhook
Pre-ring
Unknown
  • ParkeeCallerIDNum
  • ParkeeCallerIDName
  • ParkeeConnectedLineNum
  • ParkeeConnectedLineName
  • ParkeeAccountCode
  • ParkeeContext
  • ParkeeExten
  • ParkeePriority
  • ParkeeUniqueid
  • ParkeeLinkedid : Uniqueid of the oldest channel associated with this channel.
  • ParkeeDialString : Dial String that can be used to call back the parker on ParkingTimout.
  • Parkinglot : Name of the parking lot that the parked in.
  • ParkingSpace : Parking Space that the parkee is parked in.
  • ParkingTimeout : Time remaining until the parkee is forcefully removed from parking in seconds.
  • ParkingDuration : Time the parkee has been in the parking bridge(in seconds)

Example

Event: ParkedCall
Privilege: call,all
ParkeeChannel: SIP/agent-01-00000001
ParkeeChannelState: 6
ParkeeChannelStateDesc: Up
ParkeeCallerIDNum: agent-01
ParkeeCallerIDName: <unknown>
ParkeeConnectedLineNum: <unknown>
ParkeeConnectedLineName: <unknown>
ParkeeLanguage: en
ParkeeAccountCode: 
ParkeeContext: sample_park
ParkeeExten: s
ParkeePriority: 2
ParkeeUniqueid: 1480409788.2
ParkeeLinkedid: 1480409788.2
ParkerDialString: SIP/agent-01
Parkinglot: default
ParkingSpace: 701
ParkingTimeout: 45
ParkingDuration: 0

See also

QueueCallerAbandon

Queue 에 인입된 콜이 분배되기 전 Hangup 되었을 때 발생하는 이벤트이다.

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

Queue 에 콜이 인입될 때 발생하는 이벤트이다.

Event: QueueCallerJoin
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>
Count: <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.
  • Count - The total number of channels in the queue.

Example

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

Queue 에 인입된 콜이 빠져나갈 때 발생하는 이벤트이다.

Event: QueueCallerLeave
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>
Count: <value>
Position: <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.
  • Count - The total number of channels in the queue.
  • Position - This channel's current position in the queue.

Example

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

Queue 에 새롭게 멤버가 등록되었을 때 발생하는 이벤트 메시지이다.

Event: QueueMemberAdded
Privilege: agent,all
Queue: Dragon
Location: Local/603-test-mac_address-what-ever-002-1@DialLine/n
MemberName: Local/603-test-mac_address-what-ever-002-1@DialLine/n
Membership: dynamic
Penalty: 0
CallsTaken: 0
LastCall: 0
Status: 1
Paused: 0

QueueMemberPause

Queue 멤버가 Pause 되었을 때 발생하는 이벤트이다.

Event: QueueMemberPaused
Privilege: agent,all
Queue: Dragon
Location: Local/603-test-mac_address-what-ever-002-1@DialLine/n
MemberName: dummy_name
Paused: 0
Reason: Test pause

QueueMemberPenalty

Queue 멤버의 Penalty 값이 조정되었을 때 발생하는 이벤트이다.

Example

Event: QueueMemberPenalty
Privilege: agent,all
Queue: Dragon
Location: Local/603-test-mac_address-what-ever-002-1@DialLine/n
Penalty: 100

QueueMemberRemoved

Queue 에서 멤버가 Leave(삭제) 되었을 때 발생하는 이벤트이다.

Example

Event: QueueMemberRemoved
Privilege: agent,all
Queue: Dragon
Location: Local/603-test-mac_address-what-ever-002-1@DialLine/n
MemberName: dummy_name

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

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

Status

Raised in response to Status command.

Event: Status
[ActionID:] <value>
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>
Type: <value>
DNID: <value>
TimeToHangup: <value>
BridgeID: <value>
Linkedid: <value>
Application: <value>
Data: <value>
Nativeformats: <value>
Readformat: <value>
Readtrans: <value>
Writeformat: <value>
Writetrans: <value>
Callgroup: <value>
Pickupgroup: <value>
Seconds: <value>

See also

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

See also