Asterisk Manager: Events
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 some day and document these. This is a definitive list of all the events and their fields that Asterisk generates as of 2004-09-02 CVS.
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>.
Call Status Events
'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
'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
'Registry' Event
Description:- Fired when Asterisk registers with a peer
Notes:
For an entry like:
register => username:password:authname@sip.domain:port/local_contact
Domain would reflect the value of sip.domain
Data Sample:
Event: Registry
Privilege: system,all
Channel: SIP
Domain: sip.domain
Status: Registered
Unformatted and Undocumented
Newexten:
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
Dial:
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
Hangup:
Event: Hangup
Channel: SIP/101-3f3f
Uniqueid: 1094154427.10
Cause: 0
Newchannel:
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
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
Reload:
Fired when the "RELOAD" console command is executed.
Event: Reload
Message: Reload Requested
Shutdown:
[derived from asterisk.c]
Event: Shutdown
Shutdown: <Uncleanly|Cleanly>
Restart: <True|False>
ExtensionStatus:
[derived from manager.c]
Event: ExtensionStatus
Exten: <ext>
Context: <context>
Status: <state>
Rename:
[derived from channel.c: channel 'rename' event]
Event: Rename
Oldname: <oldname>
Newname: <newname>
Uniqueid: <uniqueid>
Newcallerid:
[derived from channel.c]
Event: Newcallerid
Channel: <channel>
Callerid: <callerid>
Uniqueid: <uniqueid>
Alarm:
[derived from chan_zap.c]
Event: Alarm
Alarm: <(Red|Yellow|Blue|No|Unknown) Alarm|Recovering|Loopback|Not Open|None>
Channel: <channel>
AlarmClear:
[derived from chan_zap.c]
Event: AlarmClear
Channel: <channel>
Agentcallbacklogoff:
[derived from chan_agent.c]
Event: Agentcallbacklogoff
Agent: <agent>
Loginchan: <loginchan>
Logintime: <logintime>
Reason: Autologoff
Uniqueid: <uniqueid>
Event: Agentcallbacklogoff
Agent: <agent>
Loginchan: <loginchan>
Logintime: <logintime>
Uniqueid: <uniqueid>
Agentcallbacklogin:
[derived from chan_agent.c]
Event: Agentcallbacklogin
Agent: <agent>
Loginchan: <loginchan>
Uniqueid: <uniqueid>
Agentlogin:
[derived from chan_agent.c]
Event: Agentlogin
Agent: <agent>
Channel: <channel>
Uniqueid: <uniqueid>
Agentlogoff:
[derived from chan_agent.c]
Event: Agentlogoff
Agent: <agent>
Logintime: <logintime>
Uniqueid: <uniqueid>
MeetmeJoin:
[derived from app_meetme.c]
Event: MeetmeJoin
Channel: <channel>
Uniqueid: <uniqueid>
Meetme: <meetme>
Usernum: <usernum>
MeetmeLeave:
[derived from app_meetme.c]
Event: MeetmeLeave
Channel: <channel>
Uniqueid: <uniqueid>
Meetme: <meetme>
Usernum: <usernum>
MessageWaiting:
[derived from app_voicemail.c]
Event: MessageWaiting
Mailbox: <mailbox>@<context>
Waiting: <count>
Event: MessageWaiting
Mailbox: <context>
Waiting: <count>
[UserEvent]:
[derived from app_userevent.c]
Event: <event>
Channel: <channel>
Uniqueid: <uniqueid>
Event: <event>
Channel: <channel>
Uniqueid: <uniqueid>
<body>
Join:
[derived from app_queue.c]
Event: join
Channel: <channel>
CallerID: <callerid|unknown>
Queue: <queuename>
Position: <entryposition>
Count: <queuemembercount>
Leave:
[derived from app_queue.c]
Event: leave
Channel: <channel>
Queue: <queuename>
Count: <queuemembercount>
AgentCalled:
[derived from app_queue.c]
Event: AgentCalled
AgentCalled: <channel>
ChannelCalling: <channel>
CallerID: <callerid>
Context: <context>
Extension: <extension>
Priority: <priority>
ParkedCall:
[derived from res_features.c]
Event: ParkedCall
Exten: <parkexten>
Channel: <channel>
From: <from>
Timeout: <timeout>
CallerID: <callerid>
Cdr:
[derived from cdr_manager.c]
Event: Cdr
AccountCode:
Source:
Destination:
DestinationContext:
CallerID:
Channel:
DestinationChannel:
LastApplication:
LastData:
StartTime:
AnswerTime:
EndTime:
Duration:
BillableSeconds:
Disposition:
AMAFlags:
UniqueID:
UserField:
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
Event: QueueMemberAdded
[Sent on Action QueueAdd ]
Privilege: agent,all
Queue: testing
Location: Agent/AgentId
Membership: dynamic
Penalty: 0
CallsTaken: 0
LastCall: 0
Status: 4
Paused: 1
Page Changes
ExtensionStatus with Zap/1r1
I need some help (with my very bad english).
If I call an FXS extension with Zap/1, in the manager, I get an ExtensionStatus Event.
If I call the same extension with Zap/1r1 (to have CID on my french DECT phone), I don't get any ExtensionStatus Event.
I can't find what I can try to get it again.
Any help appreciated.
Alternate documentation about Events
Asterisk Java documentation has some useful notes about what events are in Asterisk 1.2 and the information that is available with those events. I will use this documentation until this article is updated.