The following list of events was discovered by reading through the Asterisk source tree, with liberal applications of grep to help out. I will hopefully come back someday and document these. This is a definitive list of all the events and their fields that Asterisk generates as of 2004-09-02 CVS.
Page Contents
- Agent Status Events
- Call Status Events
- ‘Cdr’ Event
- ‘Dial’ Event
- ‘ExtensionStatus’ Event
- ‘Hangup’ Event
- ‘MusicOnHold’ Event
- ‘Join’ Event
- ‘Leave’ Event
- ‘Link’ Event
- ‘MeetmeJoin’ Event
- ‘MeetmeLeave’ Event
- ‘MeetmeStopTalking’ Event
- ‘MeetmeTalking’ Event
- ‘MessageWaiting’ Event
- ‘Newcallerid’ Event
- ‘Newchannel’ Event
- ‘Newexten’ Event
- ‘ParkedCall’ Event
- ‘Rename’ Event
- ‘SetCDRUserField’ Event
- ‘Unlink’ Event
- ‘UnParkedCall’ Event
- System Status Events
- User Status Events
- Verbose Status Events – Unformatted and Undocumented
This list took a very long time to prepare, due to the non-uniformity of how events are triggered. I hope it helps you as much as it helped me. I have only checked the Zapata driver for events, please contribute events for the driver you use and make this reference complete! – David Wilson <dw at botanicus.net>.
Events were updated by Chris Shipman <[email protected]> from log captures from the Asterisk Manager.
Agent Status Events
‘Agentcallbacklogin’ Event
Description: [derived from chan_agent.c]
Data Sample:
- Event: Agentcallbacklogin
- Agent: <agent>
- Loginchan: <loginchan>
- Uniqueid: <uniqueid>
‘Agentcallbacklogoff’ Event
Description: [derived from chan_agent.c]
Data Sample:
- Event: Agentcallbacklogoff
- Agent: <agent>
- Loginchan: <loginchan>
- Logintime: <logintime>
- Reason: Autologoff
- Uniqueid: <uniqueid>
- Event: Agentcallbacklogoff
- Agent: <agent>
- Loginchan: <loginchan>
- Logintime: <logintime>
- Uniqueid: <uniqueid>
‘AgentCalled’ Event
Description: [derived from app_queue.c]
Data Sample:
- Event: AgentCalled
- AgentCalled: <channel>
- ChannelCalling: <channel>
- CallerID: <callerid>
- Context: <context>
- Extension: <extension>
- Priority: <priority>
‘AgentComplete’ Event
Description: [derived from app_queue.c]
Data Sample:
- Event: AgentComplete
- Queue: <queue>
- Uniqueid: <uniqueid>
- Channel: <channel>
- Member: <member>
- MemberName: <membername>
- HoldTime: <holdtime>
- TalkTime: <talktime>
- Reason: <reason>
‘AgentConnect’ Event
Description: [derived from app_queue.c]
Data Sample:
- Event: AgentConnect
- Queue: <queue>
- Uniqueid: <uniqueid>
- Channel: <channel>
- Member: <member>
- MemberName: <membername>
- Holdtime: <holdtime>
- BridgedChannel: <bridgedchannel>
‘AgentDump’ Event
Description: [derived from app_queue.c]
Data Sample:
- Event: AgentDump
- Queue: <queue>
- Uniqueid: <uniqueid>
- Channel: <channel>
- Member: <member>
- MemberName: <membername>
‘Agentlogin’ Event
Description: [derived from chan_agent.c]
Data Sample:
- Event: Agentlogin
- Agent: <agent>
- Channel: <channel>
- Uniqueid: <uniqueid>
‘Agentlogoff’ Event
Description: [derived from chan_agent.c]
Data Sample:
- Event: Agentlogoff
- Agent: <agent>
- Logintime: <logintime>
- Uniqueid: <uniqueid>
‘QueueMemberAdded’ Event
Description: Sent on Action QueueAdd – [derived from app_queue.c]
Data Sample:
- Queue: testing
- Location: Agent/AgentId
- Membership: dynamic
- Penalty: 0
- CallsTaken: 0
- LastCall: 0
- Status: 4
- Paused: 1
‘QueueMemberPaused’ Event
Description: Sent on Action: QueuePause – [derived from app_queue.c]
Data Sample:
- Event: QueueMemberPaused
- Location: <location>
- MemberName: <membername>
- Paused: <paused>
‘QueueMemberStatus’ Event
Description: [derived from app_queue.c] As far as I know Possible values are:
/*! Device is valid but channel didn't know state */
1. define AST_DEVICE_UNKNOWN 0
/*! Device is not used */
2. define AST_DEVICE_NOT_INUSE 1
/*! Device is in use */
3. define AST_DEVICE_INUSE 2
/*! Device is busy */
4. define AST_DEVICE_BUSY 3
/*! Device is invalid */
5. define AST_DEVICE_INVALID 4
/*! Device is unavailable */
6. define AST_DEVICE_UNAVAILABLE 5
/*! Device is ringing */
7. define AST_DEVICE_RINGING 6
/*! Device is ringing *and* in use */
8. define AST_DEVICE_RINGINUSE 7
/*! Device is on hold */
9. define AST_DEVICE_ONHOLD 8
Data Sample:
- Event: QueueMemberStatus
- Queue: <queue>
- Location: <location>
- MemberName: <membername>
- Membership: <membership>
- Penalty: <penalty>
- CallsTaken: <callstaken>
- LastCall: <lastcall>
- Status: <status>
- Paused: <paused>
Call Status Events
‘Cdr’ Event
Description: [derived from cdr_manager.c]
Must be enabled in cdr_manager.conf
[general] enabled = yes
Data Sample:
- Event: Cdr
- AccountCode:
- Source:
- Destination:
- DestinationContext:
- CallerID:
- Channel:
- DestinationChannel:
- LastApplication:
- LastData:
- StartTime:
- AnswerTime:
- EndTime:
- Duration:
- BillableSeconds:
- Disposition:
- AMAFlags:
- UniqueID:
- UserField:
‘Dial’ Event
Description: [derived from app_dial.c]
Data Sample:
- Event: Dial
- Privilege: call,all
- Source: Local/900@default-2dbf,2
- Destination: SIP/900-4c21
- CallerID: <unknown>
- CallerIDName: default
- SrcUniqueID: 1149161705.2
- DestUniqueID: 1149161705.4
‘ExtensionStatus’ Event
Description: [derived from manager.c]
Data Sample:
- Event: ExtensionStatus
- Exten: <ext>
- Context: <context>
- Status: <state>
‘Hangup’ Event
Description: [derived from channel.c]
Data Sample:
- Event: Hangup
- Channel: SIP/101-3f3f
- Uniqueid: 1094154427.10
- Cause: 0
Cause Codes
- UNALLOCATED = 1
- NO ROUTE TRANSIT NET = 2
- NO_ROUTE_DESTINATION = 3
- CHANNEL_UNACCEPTABLE = 6
- CALL_AWARDED_DELIVERED = 7
- NORMAL_CLEARING = 16
- USER_BUSY = 17
- NO USER RESPONSE = 18
- NO ANSWER = 19
- CALL REJECTED = 21
- NUMBER CHANGED = 22
- DESTINATION OUT OF ORDER = 27
- INVALID NUMBER FORMAT = 28
- FACILITY REJECTED = 29
- RESPONSE TO STATUS ENQUIRY = 30
- NORMAL UNSPECIFIED = 31
- NORMAL CIRCUIT CONGESTION = 34
- NETWORK OUT OF ORDER = 38
- NORMAL TEMPORARY FAILURE = 41
- SWITCH CONGESTION = 42
- ACCESS INFO DISCARDED = 43
- REQUESTED CHAN UNAVAIL = 44
- PRE EMPTED = 45
- FACILITY NOT SUBSCRIBED = 50
- OUTGOING CALL BARRED = 52
- INCOMING CALL BARRED = 54
- BEARERCAPABILITY NOTAUTH = 57
- BEARERCAPABILITY NOTAVAIL = 58
- BEARERCAPABILITY NOTIMPL = 65
- CHAN NOT IMPLEMENTED = 66
- FACILITY NOT IMPLEMENTED = 69
- INVALID CALL REFERENCE = 81
- INCOMPATIBLE DESTINATION = 88
- INVALID MSG UNSPECIFIED = 95
- MANDATORY IE MISSING = 96
- MESSAGE TYPE NONEXIST = 97
- WRONG MESSAGE = 98
- IE NONEXIST = 99
- INVALID IE CONTENTS = 100
- WRONG CALL STATE = 101
- RECOVERY ON TIMER EXPIRE = 102
- MANDATORY IE LENGTH ERROR = 103
- PROTOCOL ERROR = 111
- INTERWORKING = 127
- NOT DEFINED = 0
‘MusicOnHold’ Event
Description: Occurs when a channel is placed on hold/unhold and music is played to the caller.
Data Sample:
- Event: MusicOnHold
- Channel: <Channel ID>
- State: <Start/Stop>
- Uniqueid: <Unique ID>
‘Join’ Event
Description: [derived from app_queue.c]
Data Sample:
- Event: Join
- Channel: <channel>
- CallerID: <callerid|unknown>
- Queue: <queuename>
- Position: <entryposition>
- Count: <queuemembercount>
‘Leave’ Event
Description: [derived from app_queue.c]
Data Sample:
- Event: Leave
- Channel: <channel>
- Queue: <queuename>
- Count: <queuemembercount>
‘Link’ Event
Description: Fired when two voice channels are linked together and voice data exchange commences.
Notes: Several Link events may be seen for a single call. This can occur when Asterisk fails to setup a native bridge for the call. As far as I can tell, this is when Asterisk must sit between two telephones and perform CODEC conversion on their behalf.
Data Sample:
- Event: Link
- Channel1: SIP/101-3f3f
- Channel2: Zap/2-1
- Uniqueid1: 1094154427.10
- Uniqueid2: 1094154427.11
Note: in current version it replaced by Bridge event, example is
- Channel2: SIP/1-1.1.1.1-0002ef99
- Bridgestate: Link
- Event: Bridge
- Privilege: call,all
- Uniqueid2: 1393028418.530941
- Channel1: SIP/peer-local-0002ef98,
- Bridgetype: core
- Uniqueid1: 1393028346.530940
- Timestamp: 1393028428.618726
- CallerID1: 323187134981
- CallerID2: 323187134981
‘MeetmeJoin’ Event
Description: [derived from app_meetme.c]
Data Sample:
- Event: MeetmeJoin
- Channel: <channel>
- Uniqueid: <uniqueid>
- Meetme: <meetme>
- Usernum: <usernum>
‘MeetmeLeave’ Event
Description: [derived from app_meetme.c]
Data Sample:
- Event: MeetmeLeave
- Channel: <channel>
- Uniqueid: <uniqueid>
- Meetme: <meetme>
- Usernum: <usernum>
‘MeetmeStopTalking’ Event
Description: [derived from app_meetme.c]
Notes:This requires the T option on the meetme application
Data Sample:
- Event: MeetmeStopTalking
- Privilege: call,all
- Channel: SIP/200-ABC1
- Uniqueid: 1234567890.1
- Meetme: 400
- Usernum: 2
‘MeetmeTalking’ Event
Description: [derived from app_meetme.c]
Notes: This requires the T option on the meetme application
Data Sample:
- Event: MeetmeTalking
- Privilege: call,all
- Channel: SIP/200-ABC1
- Uniqueid: 1234567890.1
- Meetme: 400
- Usernum: 2
‘MessageWaiting’ Event
Description: [derived from app_voicemail.c]
Data Sample:
- Event: MessageWaiting
- Mailbox: <mailbox>@<context>
- Waiting: <count>
- New: <number>
- Old: <number>
- Event: MessageWaiting
- Mailbox: <context>
- Waiting: <count>
‘Newcallerid’ Event
Description: [derived from channel.c]
Data Sample:
- Event: Newcallerid
- Channel: <channel>
- Callerid: <callerid>
- Uniqueid: <uniqueid>
‘Newchannel’ Event
Description: [derived from channel.c]
Data Sample:
- Event: Newchannel
- Channel: Zap/2-1
- State: Rsrvd
- Callerid: <unknown>
- Uniqueid: 1094154427.11
- Event: Newchannel
- Channel: SIP/101-3f3f
- State: Ring
- Callerid: 101
- Uniqueid: 1094154427.10
‘Newexten’ Event
Description: Fired whenever a pbx function (such as execution of dialplan) occurs
Data Sample:
- Event: Newexten
- Channel: SIP/101-00c7
- Context: macro-ext
- Extension: s
- Priority: 3
- Application: Goto
- AppData: s-BUSY
- Uniqueid: 1094154321.8
- Event: Newexten
- Channel: SIP/101-3f3f
- Context: local_extensions
- Extension: 917070
- Priority: 1
- Application: AGI
- AppData: /etc/asterisk/agi/ks_doorman_pickup.py|channel_up
- Uniqueid: 1094154427.10
- Event: Newexten
- Channel: SIP/101-3f3f
- Context: local_extensions
- Extension: 917070
- Priority: 2
- Application: Dial
- AppData: Zap/G1/17070
- Uniqueid: 1094154427.10
‘ParkedCall’ Event
Description: [derived from res_features.c]
Data Sample:
- Event: ParkedCall
- Exten: <parkexten>
- Channel: <channel>
- From: <from>
- Timeout: <timeout>
- CallerID: <callerid>
‘Rename’ Event
Description: [derived from channel.c: channel ‘rename’ event]
Data Sample:
- Event: Rename
- Oldname: <oldname>
- Newname: <newname>
- Uniqueid: <uniqueid>
‘SetCDRUserField’ Event
Description: [derived from app_setcdruserfield.c]
‘Unlink’ Event
Description: Fired when a link between two voice channels is discontinued, for example, just before call completion.
Notes: Several Unlink events may be seen for a single call. This can occur when Asterisk fails to setup a native bridge for the call. As far as I can tell, this is when Asterisk must sit between two telephones and perform CODEC conversion on their behalf.
Data Sample:
- Event: Unlink
- Channel1: SIP/101-3f3f
- Channel2: Zap/2-1
- Uniqueid1: 1094154427.10
- Uniqueid2: 1094154427.11
- Note: in current version it replaced by Bridge event, example is
- Channel2: SIP/1-1.1.1.1-0002ef99
- Bridgestate: Unlink
- Event: Bridge
- Privilege: call,all
- Uniqueid2: 1393028418.530941
- Channel1: SIP/peer-local-0002ef98,
- Bridgetype: core
- Uniqueid1: 1393028346.530940
- Timestamp: 1393028428.618726
- CallerID1: 323187134981
- CallerID2: 323187134981
‘UnParkedCall’ Event
Description: [derived from res_features.c]
System Status Events
‘Alarm’ Event:
Description: [derived from chan_zap.c]
Data Sample:
- Event: Alarm
- Alarm: <(Red|Yellow|Blue|No|Unknown) Alarm|Recovering|Loopback|Not Open|None>
- Channel: <channel>
‘AlarmClear’ Event:
Description: [derived from chan_zap.c]
Data Sample:
- Event: AlarmClear
- Channel: <channel>
‘DNDState’ Event:
Description: [derived from chan_dahdi.c]
Data Sample:
- Event: DNDState
- Channel: Zap/1
- Status: <enabled|disabled>
‘LogChannel’ Event
Description: [derived from logger.c]
Data Sample:
- Event: LogChannel
- Channel: /var/log/asterisk/messages
- Enabled: Yes
- Event: LogChannel
- Channel: /var/log/asterisk/messages
- Enabled: No
- Reason: 13 – Permission denied
‘PeerStatus’ Event
Description: Fired when a peer registers/unregisters with Asterisk – [derived from chan_sip.c, chan_iax2.c]
Data Sample:
- Event: PeerStatus
- Peer: SIP/2005
- PeerStatus: Registered
- Event: PeerStatus
- Peer: SIP/2005
- PeerStatus: Unregistered
- Cause: Expired
- Event: PeerStatus
- Peer: IAX2/2007
- PeerStatus: <Lagged|Reachable|Unreachable>
- Time: 1000
‘Registry’ Event
Description: Fired when Asterisk registers with a peer – [derived from chan_sip.c, chan_iax2.c]
Notes: For an entry like:
register => username:password:[email protected]:port/local_contact
Domain would reflect the value of sip.domain
Data Sample:
- Event: Registry
- Channel: SIP
- Domain: sip.domain
- Status: Registered
‘Reload’ Event
Description: Fired when the “RELOAD” console command is executed. – [derived from manager.c]
Data Sample:
- Event: Reload
- Message: Reload Requested
‘Shutdown’ Event
Description: [derived from asterisk.c]
Data Sample:
- Event: Shutdown
- Shutdown: <Uncleanly|Cleanly>
- Restart: <True|False>
User Status Events
‘UserEvent’ Event
Description: [derived from app_userevent.c]
Data Sample:
- Event: <event>
- Channel: <channel>
- Uniqueid: <uniqueid>
- Event: <event>
- Channel: <channel>
- Uniqueid: <uniqueid>
- <body>
Verbose Status Events – Unformatted and Undocumented
Newstate:
Event: Newstate
Channel: Zap/2-1
State: Dialing
Callerid: 101
Uniqueid: 1094154427.11
Event: Newstate
Channel: Zap/2-1
State: Up
Callerid: 101
Uniqueid: 1094154427.11
ParkedCallsComplete:
[sent following an Action: ParkedCalls]
Event: ParkedCallsComplete
QueueParams:
[sent following an Action: Queues]
Event: QueueParams
Queue: sales
Max: 0
Calls: 0
Holdtime: 0
Completed: 0
Abandoned: 0
ServiceLevel: 0
ServicelevelPerf: 0.0
QueueMember:
[sent following an Action: Queues if a queue has members]
Event: QueueMember
Queue: sales
Location: SIP/101
Membership: dynamic
Penalty: 0
CallsTaken: 0
LastCall: 0
QueueStatusEnd:
[sent following an Action: Queues to signify end of output]
Event: QueueStatusEnd
Status:
Event: Status
Channel: Zap/2-1
CallerID: 101
Account:
State: Up
Link: SIP/101-5cf0
Uniqueid: 1094166088.26
Event: Status
Channel: SIP/101-5cf0
CallerID: 101
Account:
State: Up
Context: local_extensions
Extension: 917070
Priority: 2
Seconds: 11
Link: Zap/2-1
Uniqueid: 1094166088.25
StatusComplete:
[sent on end of Status events after Action: status]
Event: StatusComplete
ZapShowChannels:
[sent on Action: ZapShowChannels]
Event: ZapShowChannels
Channel: 2
Signalling: FXS Kewlstart
Context: pstn_menu
Alarm: No Alarm
ZapShowChannelsComplete:
[send on Action: ZapShowChannels end]
Event: ZapShowChannelsComplete