Инструменты пользователя

Инструменты сайта


kb:asterisk:events

Содержание

Asterisk Manager: Events

Ниже представлен список ответов генерируемых Asterisk на различные события и состояния системы. Так как в официальной документации этот список не представлен, нам пришлось собирать его из различных источников, вплоть до исходных кодов Asterisk. Большая просьба, при обнаружении недокументированного здесь события, прислать его на нашу почту info@miko.ru, чтобы мы могли дополнить этот список.

Agent Status Events

'Agentcallbacklogin' Event

Описание:

[Получено из chan_agent.c]

Пример:

Event: Agentcallbacklogin
Agent: <agent>
Loginchan: <loginchan>
Uniqueid: <uniqueid>

'Agentcallbacklogoff' Event

Описание:

[Получено из chan_agent.c]

Пример:

Event: Agentcallbacklogoff
Agent: <agent>
Loginchan: <loginchan>
Logintime: <logintime>
Reason: Autologoff
Uniqueid: <uniqueid>

'AgentCalled' Event

Описание:

[Получено из app_queue.c]

Пример:

Event: AgentCalled
AgentCalled: <channel>
ChannelCalling: <channel>
CallerID: <callerid>
Context: <context>
Extension: <extension>
Priority: <priority>

'AgentComplete' Event

Описание:

[Получено из app_queue.c]

Пример:

Event: AgentComplete
Queue: <queue>
Uniqueid: <uniqueid>
Channel: <channel>
Member: <member>
MemberName: <membername>
HoldTime: <holdtime>
TalkTime: <talktime>
Reason: <reason>

'AgentConnect' Event

Описание:

[Получено из app_queue.c]

Пример:

Event: AgentConnect
Queue: <queue>
Uniqueid: <uniqueid>
Channel: <channel>
Member: <member>
MemberName: <membername>
Holdtime: <holdtime>
BridgedChannel: <bridgedchannel>

'AgentDump' Event

Описание:

[Получено из app_queue.c]

Пример:

Event: AgentDump
Queue: <queue>
Uniqueid: <uniqueid>
Channel: <channel>
Member: <member>
MemberName: <membername>

'Agentlogin' Event

Описание:

[Получено из chan_agent.c]

Пример:

Event: Agentlogin
Agent: <agent>
Channel: <channel>
Uniqueid: <uniqueid>

'Agentlogoff' Event

Описание:

[Получено из chan_agent.c]

Пример:

Event: Agentlogoff
Agent: <agent>
Logintime: <logintime>
Uniqueid: <uniqueid>

'QueueMemberAdded' Event

Описание:

  1. Sent on Action QueueAdd

[Получено из app_queue.c]

Пример:

Queue: testingLocation: 
Agent/AgentIdMembership: 
dynamicPenalty: 0
CallsTaken: 0
LastCall: 0S
tatus: 4
Paused: 1

'QueueMemberPaused' Event

Описание:

  1. Sent on Action: QueuePause

[Получено из app_queue.c]

Пример:

Event: QueueMemberPaused
Location: <location>
MemberName: <membername>
Paused: <paused>

'QueueMemberStatus' Event

Описание:

[Получено из 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 */

  1. define AST_DEVICE_NOT_INUSE 1

/*! Device is in use */

  1. define AST_DEVICE_INUSE 2

/*! Device is busy */

  1. define AST_DEVICE_BUSY 3

/*! Device is invalid */

  1. define AST_DEVICE_INVALID 4

/*! Device is unavailable */

</code> - define AST_DEVICE_UNAVAILABLE 5

/*! Device is ringing */

  1. define AST_DEVICE_RINGING 6

/*! Device is ringing *and* in use */

  1. define AST_DEVICE_RINGINUSE 7

/*! Device is on hold */

  1. define AST_DEVICE_ONHOLD 8

Пример:

Event: QueueMemberStatus
Queue: <queue>
Location: <location>
MemberName: <membername>
Membership: <membership>
Penalty: <penalty>
CallsTaken: <callstaken>
LastCall: <lastcall>
Status: <status>
Paused: <paused>

Command Status Events


Call Status Events

'Dial' Event

Описание:

[Получено из app_dial.c]

Пример:

Event: Dial
Privilege: call,all
Subevent: Begin
Channel: SIP/mangotrunk-0000016c
Destination: SIP/261-0000016d
Calleridnum: 74997623634
Calleridname: 74997623634
Uniqueid: 1324068645.605
Destuniqueid: 1324068650.606
Dialstring: 261

'ExtensionStatus' Event

Описание:

[Получено из manager.c]

Пример:

Event: ExtensionStatus
Privilege: call,all
Exten: <ext>
Context: <context>
Hint: SIP/261
Status: <state>

'NewAccountCode' Event

Описание:

[Получено из manager.c]

Пример:

Event="NewAccountCode" 
Privilege="call,all" 
Channel="SIP/261-0000016d" 
Uniqueid="1324068650.606" 
Accountcode="miko" 
Oldaccountcode=""

'MusicOnHold' Event

Описание:

Occurs when a channel is placed on hold/unhold and music is played to the caller.

Пример:

Event: MusicOnHold
Channel: <Channel ID>
State: <Start/Stop>
Uniqueid: <Unique ID>

'Join' Event

Описание:

[Получено из app_queue.c]

Пример:

Event: JoinChannel: <channel>
CallerID: <callerid|unknown>
Queue: <queuename>
Position: <entryposition>
Count: <queuemembercount>

'Leave' Event

Описание:

[Получено из app_queue.c]

Пример:

Event: Leave
Channel: <channel>
Queue: <queuename>
Count: <queuemembercount>

Описание:

  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.

Пример:

Event: Link
Channel1: SIP/101-3f3f
Channel2: Zap/2-1
Uniqueid1: 1094154427.10
Uniqueid2: 1094154427.11

'Bridge' Event

Описание:

Пример:

 Event: Bridge
 Privilege: call,all
 Bridgestate: Link
 Bridgetype: core
 Channel1: SIP/mangotrunk-0000016c
 Channel2: SIP/261-0000016d
 Uniqueid1: 1324068645.605
 Uniqueid2: 1324068650.606
 Callerid1: 74997623634
 Callerid2: 261

'Bridge' LocalBridge

Описание:

Пример:

 Event: LocalBridge
 privilege: call,all
 sequencenumber: "195711
 file: chan_local.c
 line: 922
 func: local_call
 channel1: Local/261@from-internal-xfer-7d7c;1
 channel2: Local/261@from-internal-xfer-7d7c;2
 uniqueid1: 1324888190.2065
 uniqueid2: 1324888190.2066
 context: from-internal-xfer
 exten: 261
 localoptimization: Yes

'MeetmeJoin' Event

Описание:

[Получено из app_meetme.c]

Пример:

Event: MeetmeJoin
Channel: <channel>
Uniqueid: <uniqueid>
Meetme: <meetme>
Usernum: <usernum>

'MeetmeLeave' Event

Описание:

[Получено из app_meetme.c]

Пример:

Event: MeetmeLeave
Channel: <channel>
Uniqueid: <uniqueid>
Meetme: <meetme>
Usernum: <usernum>

'MeetmeStopTalking' Event

Описание:

[Получено из app_meetme.c]

Notes:

  1. This requires the T option on the meetme application

Пример:

Event: MeetmeStopTalking
Privilege: call,all
Channel: SIP/200-ABC1
Uniqueid: 1234567890.1
Meetme: 400
Usernum: 2

'MeetmeTalking' Event

Описание:

[Получено из app_meetme.c]

Notes:

  1. This requires the T option on the meetme application

Пример:

Event: MeetmeTalking
Privilege: call,all
Channel: SIP/200-ABC1
Uniqueid: 1234567890.1
Meetme: 400
Usernum: 2

'MessageWaiting' Event

Описание:

[Получено из app_voicemail.c]

Пример:

Event: MessageWaiting
Mailbox: <mailbox>@<context>
Waiting: <count>
New: <number>
Old: <number>

Event: MessageWaiting
Mailbox: <context>
Waiting: <count>

'Newcallerid' Event

Описание:

[Получено из channel.c]

Пример:

Event: NewCallerid
Privilege: call,all
Channel=: SIP/mangotrunk-0000016c
Calleridnum: 74997623634 
Calleridname: 74997623634
Uniqueid: 1324068645.605 
Cid_callingpres: 0 (Presentation Allowed, Not Screened)

'Newchannel' Event

Описание: [Получено из channel.c]

Пример:

Event: Newchannel
Channel: Zap/2-1State:
Rsrvd
Callerid: <unknown>
Uniqueid: 1094154427.11

Event: Newchannel
Channel: SIP/101-3f3f
State: Ring
Callerid: 101
Uniqueid: 1094154427.10

Event: Newchannel 
Privilege: call,all
Channel: SIP/mangotrunk-0000016c
Channelstate: 0
Channelstatedesc: Down
Calleridnum: 74997623634
Calleridname: 74997623634
Accountcode: miko 
Exten: info 
Context: from-trunk-sip-mangotrunk 
Uniqueid=: 1324068645.605

'ParkedCall' Event

Описание:

[Получено из res_features.c]

Пример:

Event: ParkedCall
Exten: <parkexten>
Channel: <channel>
From: <from>
Timeout: <timeout>
CallerID: <callerid>

'Rename' Event

Описание:

[Получено из channel.c: channel 'rename' event]

Пример:

Event: Rename
Oldname: <oldname>
Newname: <newname>
Uniqueid: <uniqueid>
 Event: Rename
 Privilege: call,all
 Sequencenumber: 196057
 File: channel.c
 Line: 6280
 Func: __ast_change_name_nolink
 Channel: SIP/263-0000050e<MASQ>
 Newname: Transfered/SIP/263-0000050e<ZOMBIE> 
 Uniqueid: 1324888172.2063

'SetCDRUserField' Event

Описание:

[Получено из app_setcdruserfield.c]

Пример:

Описание:

  1. Fired when a link between two voice channels is discontinued, for example, just before call completion.

Notes:

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

Пример:

Event: Unlink
Privilege: call,all
Channel1: SIP/mangotrunk-0000016c
Channel2: SIP/261-0000016d
Uniqueid1: 1324068645.605
Uniqueid2: 1324068650.606
Callerid1: 74997623634
Callerid2: 261

'SoftHangupRequest' Event

Описание:

It appears, in production environments, especially with call centers, that nothing enables us to know which side of the communication has cleared the call. HangupRequest manager event, to specify when/where a channel gets hung up. Events to let know which side (including CLI) of the call hangs up : HangupRequest and SoftHangupRequest

Пример:

Event: SoftHangupRequest
Privilege: call,all
Channel: SIP/261-00000000
Uniqueid: 1324234300.0
Cause: 16

'HangupRequest' Event

Описание:

It appears, in production environments, especially with call centers, that nothing enables us to know which side of the communication has cleared the call. HangupRequest manager event, to specify when/where a channel gets hung up. Events to let know which side (including CLI) of the call hangs up : HangupRequest and SoftHangupRequest

Пример:

 Event: HangupRequest
 Privilege: call,all
 Sequencenumber: 196035
 File: channel.c
 Line: 1553
 Func: ast_queue_hangup
 Channel: SIP/17-0000050f
 Uniqueid: 1324888173.2064

'Hangup' Event

Описание:

[Получено из channel.c]

Пример:

Event: Hangup
Privilege: call,all 
Channel: SIP/261-0000016d
Uniqueid: 1324068650.606
Calleridnum: 261
Calleridname: "unknown"
Cause: 16
Cause_txt: "Normal Clearing"

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

'Masquerade' Event

Описание:

[Получено из channel.c]

Пример:

 Event: Masquerade
 privilege: call,all
 sequencenumber: 196054
 file: channel.c
 line: 6722
 func: ast_do_masquerade
 clone: SIP/263-0000050e
 clonestate: Up
 original: Transfered/SIP/263-0000050e
 originalstate: Up

'UnParkedCall' Event

Описание:

[Получено из res_features.c]

Пример:


Log Status Events


System Status Events

'ChannelUpdate' Event

Описание: [Получено из channel.c]

Пример:

Event: ChannelUpdate 
Privilege: system,all 
Channel: SIP/261-00000164 
Uniqueid: 1324063501.597 
Channeltype: SIP" 
Sipcallid: A6F6B.zeArRKlaIrVSOlecZ0TvI931.2 
Sipfullcontact: sip:261@192.168.1.122:49256;transport=TCP 

'ChannelReload' Event

Описание: [Получено из channel.c]

Пример:

Event: ChannelReload
Privilege: system,all
ChannelType: SIP
ReloadReason: RELOAD (Channel module reload)
Registry_Count: 2
Peer_Count: 24

'Alarm' Event:

Описание:

[Получено из chan_zap.c]

Пример:

Event: Alarm
Alarm: <(Red|Yellow|Blue|No|Unknown) Alarm|Recovering|Loopback|Not Open|None>
Channel: <channel>

'AlarmClear' Event:

Описание:

[Получено из chan_zap.c]

Пример:

Event: Alarm
ClearChannel: <channel>

'DNDState' Event:

Описание:

[Получено из chan_dahdi.c]

Пример:

Event: DNDState
Channel: Zap/1
Status: <enabled|disabled>

'LogChannel' Event

Описание:

[Получено из logger.c]

Пример:

Event: LogChannel
Channel: /var/log/asterisk/messages
Enabled: Yes

Event: LogChannel
Channel: /var/log/asterisk/messages
Enabled: No
Reason: 13 - Permission denied

'PeerStatus' Event

Описание:

  1. Fired when a peer registers/unregisters with Asterisk

[Получено из chan_sip.c, chan_iax2.c]

Пример:

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

Описание:

  1. Fired when Asterisk registers with a peer

[Получено из chan_sip.c, chan_iax2.c]

Notes: For an entry like:register ⇒ username:password:authname@sip.domain:port/local_contactDomain would reflect the value of sip.domain

Пример:

Event: Registry
Privilege: system,all
ChannelType: SIP
Domain: sip.pctel.ru
Status: Registered

'Reload' Event

Описание:

  1. Fired when the «RELOAD» console command is executed.

[Получено из manager.c]

Пример:

Event: Reload
Message: Reload Requested

'Shutdown' Event

Описание:

[Получено из asterisk.c]

Пример:

Event: Shutdown
Shutdown: <Uncleanly|Cleanly>
Restart: <True|False>

User Status Events

'UserEvent' Event

Описание:

[Получено из app_userevent.c]

Пример:

Event: <event>
Channel: <channel>
Uniqueid: <uniqueid>
Event: <event>
Channel: <channel>
Uniqueid: <uniqueid>

Verbose Status Events


CDR Events

'Cdr' Event

Описание:

[Получено из cdr_manager.c] Must be enabled in cdr_manager.conf [general] enabled = yes

Пример:

Event: Cdr
AccountCode:
Source:
Destination:
DestinationContext:
CallerID:
Channel:
DestinationChannel:
LastApplication:
LastData:
StartTime:
AnswerTime:
EndTime:
Duration:
BillableSeconds:
Disposition:
AMAFlags:
UniqueID:
UserField:

Config Events


Dtmf Events

'DTMF' Event

Описание:

Пример:

Event: DTMF
Privilege: dtmf,all
Channel: SIP/261-00000178
Uniqueid: 1324070764.625
Digit: 2
Direction: Received
Begin: Yes
End: No

Dialplan Events

'VarSet' Event

Описание:

Пример:

Event: VarSet 
Privilege: dialplan,all 
Channel: SIP/261-00000165 
Variable: SIPCALLID 
Value: l2DduFUlVvNX5L3p9Byg7PmT6nUBSbFX 
Uniqueid: 1324068124.598

'Newexten' Event

Описание:

  1. Fired whenever a pbx function (such as execution of dialplan) occurs

Пример:

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

Reporting Events

'RTPReceiverStat' Event

Описание

Пример:

    event="RTPReceiverStat"
    privilege="reporting,all"
    ssrc="528671737"
    receivedpackets="67"
    lostpackets="0"
    jitter="0.0061"
    transit="-0.0153"
    rrcount="0" 

'RTPReceiverStat' Event

Описание

Пример:

    event="RTPSenderStat" 
    privilege="reporting,all" 
    ssrc="948632689" 
    sentpackets="63" 
    lostpackets="0"
    jitter="0" 
    srcount="0" 
    rtt="0.000000"

'RTCPSent' Event

Описание

Пример:

  Event=RTCPSent 
  Privilege=reporting,all 
  To=80.90.117.9:4001
  Ourssrc=1432569448 
  Sentntp=1324071081.1691504640 
  Sentrtp=32960
  Sentpackets=206
  Sentoctets=32960
  Reportblock= 
  Fractionlost=26
  Cumulativeloss=26 
  Iajitter=0.0152 
  Theirlastsr=0
  Dlsr=21.9560 (sec)

'RTCPReceived' Event

Описание

Пример:

Event=RTCPReceived 
Privilege=reporting,all 
From=80.90.117.9:4001 
Pt=201(Receiver Report) 
Receptionreports=1 
Senderssrc=0 
Fractionlost=0
Packetslost=0
Highestsequence=0 
Sequencenumbercycles=0 
Iajitter=0
Lastsr=0.0000000000 
Dlsr=0.0000(sec)

Originate Events


Undocumented

'Newstate' Event

Описание:

Пример:

   Event: Newstate
   Privilege: call,all
   Channel: SIP/mangotrunk-0000016c
   Channelstate: 4
   Channelstatedesc: Ring
   Calleridnum: 74997623634
   Calleridname: 74997623634
   Uniqueid: 1324068645.605 

   Event: Newstate
   Privilege: call,all
   Channel: SIP/mangotrunk-0000016c
   Channelstate: 6
   Channelstatedesc: Up
   Calleridnum: 74997623634
   Calleridname: 74997623634
   Uniqueid: 1324068645.605 

   Event: Newstate
   Privilege: call,all
   Channel: SIP/261-0000016d
   Channelstate: 5 
   Channelstatedesc: Ringing
   Calleridnum: 261
   Calleridname: Vasya 
   Uniqueid: 1324068650.606

'ParkedCallsComplete' Event

Описание:

Пример:

    [sent following an Action: ParkedCalls]

    Event: ParkedCallsComplete

'QueueParams' Event

Описание:

[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' Event

Описание:

  [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

'QueueStatus' Event

Описание

[sent following an Action: Queues to signify end of output]

Пример:

     Event: QueueStatus
     End

'Status' Event

Описание

Пример:

    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' Event

Описание:

[sent on end of Status events after Action: status]

Пример:

    Event: StatusComplete

'ZapShowChannels' Event

Описание

[sent on Action: ZapShowChannels]

Пример:

    Event: ZapShowChannels
    Channel: 2
    Signalling: FXS Kewlstart
    Context: pstn_menu
    Alarm: No Alarm

'ZapShowChannelsComplete' Event

Описание

[send on Action: ZapShowChannels end]

Пример:

    Event: ZapShowChannelsComplete

'SkypeBuddyStatus' Event

Описание

Пример:

    Event: SkypeBuddyStatus
    Privilege: system,all
    Buddy: Skype/miko_team@sergey_b2
    Buddystatus: Online
kb/asterisk/events.txt · Последние изменения: 2014/11/14 22:32 (внешнее изменение)