加载中…
个人资料
东水
东水
  • 博客等级:
  • 博客积分:0
  • 博客访问:20,353
  • 关注人气:3
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
相关博文
推荐博文
谁看过这篇博文
加载中…
正文 字体大小:

Asterisk Manager: Events

(2012-10-23 16:21:54)
标签:

杂谈

分类: asterisk
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.

Page Contents


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 .

Events were updated by Chris Shipman from log captures from the Asterisk Manager.


Agent Status Events


'Agentcallbacklogin' Event

Description:
[derived from chan_agent.c]

Data Sample:
Event: Agentcallbacklogin
Agent:
Loginchan:
Uniqueid:

'Agentcallbacklogoff' Event

Description:
[derived from chan_agent.c]

Data Sample:
Event: Agentcallbacklogoff
Agent:
Loginchan:
Logintime:
Reason: Autologoff
Uniqueid:

Event: Agentcallbacklogoff
Agent:
Loginchan:
Logintime:
Uniqueid:

'AgentCalled' Event

Description:
[derived from app_queue.c]

Data Sample:
Event: AgentCalled
AgentCalled:
ChannelCalling:
CallerID:
Context:
Extension:
Priority:

'AgentComplete' Event

Description:
[derived from app_queue.c]

Data Sample:
Event: AgentComplete
Queue:
Uniqueid:
Channel:
Member:
MemberName:
HoldTime:
TalkTime:
Reason:

'AgentConnect' Event

Description:
[derived from app_queue.c]

Data Sample:
Event: AgentConnect
Queue:
Uniqueid:
Channel:
Member:
MemberName:
Holdtime:
BridgedChannel:

'AgentDump' Event

Description:
[derived from app_queue.c]

Data Sample:
Event: AgentDump
Queue:
Uniqueid:
Channel:
Member:
MemberName:

'Agentlogin' Event

Description:
[derived from chan_agent.c]

Data Sample:
Event: Agentlogin
Agent:
Channel:
Uniqueid:

'Agentlogoff' Event

Description:
[derived from chan_agent.c]

Data Sample:
Event: Agentlogoff
Agent:
Logintime:
Uniqueid:

'QueueMemberAdded' Event

Description:
  1. 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:
  1. Sent on Action: QueuePause
[derived from app_queue.c]

Data Sample:
Event: QueueMemberPaused
Location:
MemberName:
Paused:

'QueueMemberStatus' Event

Description:
[derived from app_queue.c]


As far as I know Possible values are:

  1. define AST_DEVICE_UNKNOWN 0

  1. define AST_DEVICE_NOT_INUSE 1

  1. define AST_DEVICE_INUSE 2

  1. define AST_DEVICE_BUSY 3

  1. define AST_DEVICE_INVALID 4

  1. define AST_DEVICE_UNAVAILABLE 5

  1. define AST_DEVICE_RINGING 6

  1. define AST_DEVICE_RINGINUSE 7

  1. define AST_DEVICE_ONHOLD 8

fernando.berretta@voipexperts.com.ar

Data Sample:
Event: QueueMemberStatus
Queue:
Location:
MemberName:
Membership:
Penalty:
CallsTaken:
LastCall:
Status:
Paused:




Command Status Events



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:
CallerIDName: default
SrcUniqueID: 1149161705.2
DestUniqueID: 1149161705.4

'ExtensionStatus' Event

Description:
[derived from manager.c]

Data Sample:
Event: ExtensionStatus
Exten:
Context:
Status:

'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:
1. Occurs when a channel is placed on hold/unhold and music is played to the caller.

Data Sample:

Event: MusicOnHold
Channel:
State:
Uniqueid:

'Join' Event

Description:
[derived from app_queue.c]

Data Sample:
Event: Join
Channel:
CallerID:
Queue:
Position:
Count:

'Leave' Event

Description:
[derived from app_queue.c]

Data Sample:
Event: Leave
Channel:
Queue:
Count:

'Link' Event

Description:
  1. Fired when two voice channels are linked together and voice data exchange commences.

Notes:
  1. 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

'MeetmeJoin' Event

Description:
[derived from app_meetme.c]

Data Sample:
Event: MeetmeJoin
Channel:
Uniqueid:
Meetme:
Usernum:

'MeetmeLeave' Event

Description:
[derived from app_meetme.c]

Data Sample:
Event: MeetmeLeave
Channel:
Uniqueid:
Meetme:
Usernum:

'MeetmeStopTalking' Event

Description:
[derived from app_meetme.c]

Notes:
  1. 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:
  1. 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


owChannelsComplete

0

阅读 收藏 转载 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 电话:4000520066 提示音后按1键(按当地市话标准计费) 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 会员注册 | 产品答疑

新浪公司 版权所有