[asterisk-dev] Appdoc for manager events

Philipp Kempgen philipp.kempgen at amooma.de
Fri Feb 5 10:53:43 CST 2010


Fredrik Liljegren schrieb:

> I recently added a manager event, and wanted to document it, only to
> find (or rather NOT find) there's no documentation praxis for manager
> events.

BTW: I had written a script to find manager events and actions in
the source code of Asterisk a while ago.
Afaicr it was never really finished and misses a few multi-event
responses which are written to the socket through astman_append().

FWIW here's the output for Asterisk 1.6.1:

AMI version: 1.1 (Asterisk 1.6)
Permissions:
  EVENT_FLAG_SYSTEM      = "system"
  EVENT_FLAG_CALL        = "call"
  EVENT_FLAG_LOG         = "log"
  EVENT_FLAG_VERBOSE     = "verbose"
  EVENT_FLAG_COMMAND     = "command"
  EVENT_FLAG_AGENT       = "agent"
  EVENT_FLAG_USER        = "user"
  EVENT_FLAG_CONFIG      = "config"
  EVENT_FLAG_DTMF        = "dtmf"
  EVENT_FLAG_REPORTING   = "reporting"
  EVENT_FLAG_CDR         = "cdr"
  EVENT_FLAG_DIALPLAN    = "dialplan"
  EVENT_FLAG_ORIGINATE   = "originate"
  -1                     = "all"
  0                      = "none"


AMI messages by type, name:
+----------------------------------------------------------------------------------------+
| type     | name                   | permissions            | file                      |
+----------------------------------------------------------------------------------------+
| action   | AGI                    | call                   | res/res_agi.c             |
| "        | AbsoluteTimeout        | system,call            | main/manager.c            |
| "        | AgentLogoff            | agent                  | channels/chan_agent.c     |
| "        | Agents                 | "                      | "                         |
| "        | Atxfer                 | call                   | main/manager.c            |
| "        | Bridge                 | "                      | main/features.c           |
| "        | Challenge              | none                   | main/manager.c            |
| "        | ChangeMonitor          | call                   | res/res_monitor.c         |
| "        | Command                | command                | main/manager.c            |
| "        | CoreSettings           | system,reporting       | "                         |
| "        | CoreShowChannels       | "                      | "                         |
| "        | CoreStatus             | "                      | "                         |
| "        | CreateConfig           | config                 | "                         |
| "        | DAHDIDNDoff            | none                   | channels/chan_dahdi.c     |
| "        | DAHDIDNDon             | "                      | "                         |
| "        | DAHDIDialOffhook       | "                      | "                         |
| "        | DAHDIHangup            | "                      | "                         |
| "        | DAHDIRestart           | "                      | "                         |
| "        | DAHDIShowChannels      | "                      | "                         |
| "        | DAHDITransfer          | "                      | "                         |
| "        | DBDel                  | system                 | main/db.c                 |
| "        | DBDelTree              | "                      | "                         |
| "        | DBGet                  | system,reporting       | "                         |
| "        | DBPut                  | system                 | "                         |
| "        | Events                 | none                   | main/manager.c            |
| "        | ExtensionState         | call,reporting         | "                         |
| "        | GetConfig              | system,config          | "                         |
| "        | GetConfigJSON          | "                      | "                         |
| "        | Getvar                 | call,reporting         | "                         |
| "        | Hangup                 | system,call            | "                         |
| "        | IAXnetstats            | system,reporting       | channels/chan_iax2.c      |
| "        | IAXpeerlist            | "                      | "                         |
| "        | IAXpeers               | "                      | "                         |
| "        | JabberSend             | system                 | res/res_jabber.c          |
| "        | ListCategories         | config                 | main/manager.c            |
| "        | ListCommands           | none                   | "                         |
| "        | Login                  | "                      | "                         |
| "        | Logoff                 | "                      | "                         |
| "        | MailboxCount           | call,reporting         | "                         |
| "        | MailboxStatus          | "                      | "                         |
| "        | MeetmeList             | reporting              | apps/app_meetme.c         |
| "        | MeetmeMute             | call                   | "                         |
| "        | MeetmeUnmute           | "                      | "                         |
| "        | ModuleCheck            | system                 | main/manager.c            |
| "        | ModuleLoad             | "                      | "                         |
| "        | Monitor                | call                   | res/res_monitor.c         |
| "        | Originate              | originate              | main/manager.c            |
| "        | Park                   | call                   | main/features.c           |
| "        | ParkedCalls            | none                   | "                         |
| "        | PauseMonitor           | call                   | res/res_monitor.c         |
| "        | Ping                   | none                   | main/manager.c            |
| "        | PlayDTMF               | call                   | apps/app_senddtmf.c       |
| "        | QueueAdd               | agent                  | apps/app_queue.c          |
| "        | QueueLog               | "                      | "                         |
| "        | QueuePause             | "                      | "                         |
| "        | QueuePenalty           | "                      | "                         |
| "        | QueueRemove            | "                      | "                         |
| "        | QueueRule              | none                   | "                         |
| "        | QueueStatus            | "                      | "                         |
| "        | QueueSummary           | "                      | "                         |
| "        | Queues                 | "                      | "                         |
| "        | Redirect               | call                   | main/manager.c            |
| "        | Reload                 | config,system          | "                         |
| "        | RptLocalNodes          | none                   | apps/app_rpt.c            |
| "        | RptStatus              | "                      | "                         |
| "        | SIPnotify              | system                 | channels/chan_sip.c       |
| "        | SIPpeers               | system,reporting       | "                         |
| "        | SIPqualifypeer         | "                      | "                         |
| "        | SIPshowpeer            | "                      | "                         |
| "        | SIPshowregistry        | "                      | "                         |
| "        | SendText               | call                   | main/manager.c            |
| "        | Setvar                 | "                      | "                         |
| "        | ShowDialPlan           | config,reporting       | main/pbx.c                |
| "        | Status                 | system,call,reporting  | main/manager.c            |
| "        | StopMonitor            | call                   | res/res_monitor.c         |
| "        | UnpauseMonitor         | "                      | "                         |
| "        | UpdateConfig           | config                 | main/manager.c            |
| "        | UserEvent              | user                   | "                         |
| "        | VoicemailUsersList     | call,reporting         | apps/app_voicemail.c      |
| "        | WaitEvent              | none                   | main/manager.c            |
| event    | AGIExec                | call                   | res/res_agi.c             |
| "        | AgentCalled            | agent                  | apps/app_queue.c          |
| "        | AgentComplete          | "                      | "                         |
| "        | AgentConnect           | "                      | "                         |
| "        | AgentDump              | "                      | "                         |
| "        | AgentRingNoAnswer      | "                      | "                         |
| "        | Agentcallbacklogoff    | "                      | channels/chan_agent.c     |
| "        | Agentlogin             | "                      | "                         |
| "        | Agentlogoff            | "                      | "                         |
| "        | Alarm                  | system                 | channels/chan_dahdi.c     |
| "        | AlarmClear             | "                      | "                         |
| "        | AsyncAGI               | call                   | res/res_agi.c             |
| "        | Bridge                 | "                      | main/channel.c            |
| "        | BridgeExec             | "                      | main/features.c           |
| "        | Cdr                    | cdr                    | cdr/cdr_manager.c         |
| "        | ChannelReload          | system                 | channels/chan_sip.c       |
| "        | ChannelUpdate          | "                      | channels/chan_gtalk.c     |
| "        | "                      | "                      | channels/chan_iax2.c      |
| "        | "                      | "                      | channels/chan_sip.c       |
| "        | DNDState               | "                      | channels/chan_dahdi.c     |
| "        | Dial                   | call                   | apps/app_dial.c           |
| "        | ExtensionStatus        | "                      | main/manager.c            |
| "        | Hangup                 | "                      | main/channel.c            |
| "        | Hold                   | "                      | channels/chan_iax2.c      |
| "        | "                      | "                      | channels/chan_sip.c       |
| "        | JabberEvent            | user                   | res/res_jabber.c          |
| "        | JitterBufStats         | reporting              | channels/chan_iax2.c      |
| "        | Join                   | call                   | apps/app_queue.c          |
| "        | Leave                  | "                      | "                         |
| "        | LogChannel             | system                 | main/logger.c             |
| "        | Masquerade             | call                   | main/channel.c            |
| "        | MeetmeEnd              | "                      | apps/app_meetme.c         |
| "        | MeetmeJoin             | "                      | "                         |
| "        | MeetmeLeave            | "                      | "                         |
| "        | MeetmeMute             | "                      | "                         |
| "        | MeetmeTalkRequest      | "                      | "                         |
| "        | MeetmeTalking          | "                      | "                         |
| "        | MessageWaiting         | "                      | apps/app_voicemail.c      |
| "        | MiniVoiceMail          | "                      | apps/app_minivm.c         |
| "        | ModuleLoadReport       | system                 | main/loader.c             |
| "        | MonitorStart           | call                   | res/res_monitor.c         |
| "        | MonitorStop            | "                      | "                         |
| "        | MusicOnHold            | "                      | res/res_musiconhold.c     |
| "        | NewAccountCode         | "                      | main/cdr.c                |
| "        | NewCallerid            | "                      | main/channel.c            |
| "        | Newchannel             | "                      | "                         |
| "        | Newexten               | dialplan               | main/pbx.c                |
| "        | "                      | "                      | pbx/pbx_realtime.c        |
| "        | OriginateResponse      | call                   | main/manager.c            |
| "        | PRIEvent               | system                 | channels/chan_dahdi.c     |
| "        | ParkedCall             | call                   | main/features.c           |
| "        | PeerStatus             | system                 | channels/chan_iax2.c      |
| "        | "                      | "                      | channels/chan_sip.c       |
| "        | QueueCallerAbandon     | agent                  | apps/app_queue.c          |
| "        | QueueMemberAdded       | "                      | "                         |
| "        | QueueMemberPaused      | "                      | "                         |
| "        | QueueMemberPenalty     | "                      | "                         |
| "        | QueueMemberRemoved     | "                      | "                         |
| "        | QueueMemberStatus      | "                      | "                         |
| "        | RTCPReceived           | reporting              | main/rtp.c                |
| "        | RTCPSent               | "                      | "                         |
| "        | RTPReceiverStat        | "                      | "                         |
| "        | RTPSenderStat          | "                      | "                         |
| "        | Registry               | system                 | channels/chan_iax2.c      |
| "        | "                      | "                      | channels/chan_sip.c       |
| "        | Reload                 | "                      | main/cdr.c                |
| "        | "                      | "                      | main/dnsmgr.c             |
| "        | "                      | "                      | main/enum.c               |
| "        | "                      | "                      | main/manager.c            |
| "        | Rename                 | call                   | main/channel.c            |
| "        | ShowDialPlanComplete   | config                 | main/pbx.c                |
| "        | Shutdown               | system                 | main/asterisk.c           |
| "        | Transfer               | call                   | channels/chan_sip.c       |
| "        | UnParkedCall           | "                      | main/features.c           |
| "        | Unlink                 | "                      | main/channel.c            |
| "        | UserEvent              | user                   | apps/app_userevent.c      |
| "        | "                      | "                      | main/manager.c            |
| "        | VarSet                 | dialplan               | apps/app_stack.c          |
| "        | "                      | "                      | funcs/func_global.c       |
| "        | "                      | "                      | main/pbx.c                |
+----------------------------------------------------------------------------------------+


AMI messages by name, type:
+----------------------------------------------------------------------------------------+
| name                   | type     | permissions            | file                      |
+----------------------------------------------------------------------------------------+
| AGI                    | action   | call                   | res/res_agi.c             |
| AGIExec                | event    | "                      | "                         |
| AbsoluteTimeout        | action   | system,call            | main/manager.c            |
| AgentCalled            | event    | agent                  | apps/app_queue.c          |
| AgentComplete          | "        | "                      | "                         |
| AgentConnect           | "        | "                      | "                         |
| AgentDump              | "        | "                      | "                         |
| AgentLogoff            | action   | "                      | channels/chan_agent.c     |
| AgentRingNoAnswer      | event    | "                      | apps/app_queue.c          |
| Agentcallbacklogoff    | "        | "                      | channels/chan_agent.c     |
| Agentlogin             | "        | "                      | "                         |
| Agentlogoff            | "        | "                      | "                         |
| Agents                 | action   | "                      | "                         |
| Alarm                  | event    | system                 | channels/chan_dahdi.c     |
| AlarmClear             | "        | "                      | "                         |
| AsyncAGI               | "        | call                   | res/res_agi.c             |
| Atxfer                 | action   | "                      | main/manager.c            |
| Bridge                 | "        | "                      | main/features.c           |
| "                      | event    | "                      | main/channel.c            |
| BridgeExec             | "        | "                      | main/features.c           |
| Cdr                    | "        | cdr                    | cdr/cdr_manager.c         |
| Challenge              | action   | none                   | main/manager.c            |
| ChangeMonitor          | "        | call                   | res/res_monitor.c         |
| ChannelReload          | event    | system                 | channels/chan_sip.c       |
| ChannelUpdate          | "        | "                      | channels/chan_gtalk.c     |
| "                      | "        | "                      | channels/chan_iax2.c      |
| "                      | "        | "                      | channels/chan_sip.c       |
| Command                | action   | command                | main/manager.c            |
| CoreSettings           | "        | system,reporting       | "                         |
| CoreShowChannels       | "        | "                      | "                         |
| CoreStatus             | "        | "                      | "                         |
| CreateConfig           | "        | config                 | "                         |
| DAHDIDNDoff            | "        | none                   | channels/chan_dahdi.c     |
| DAHDIDNDon             | "        | "                      | "                         |
| DAHDIDialOffhook       | "        | "                      | "                         |
| DAHDIHangup            | "        | "                      | "                         |
| DAHDIRestart           | "        | "                      | "                         |
| DAHDIShowChannels      | "        | "                      | "                         |
| DAHDITransfer          | "        | "                      | "                         |
| DBDel                  | "        | system                 | main/db.c                 |
| DBDelTree              | "        | "                      | "                         |
| DBGet                  | "        | system,reporting       | "                         |
| DBPut                  | "        | system                 | "                         |
| DNDState               | event    | "                      | channels/chan_dahdi.c     |
| Dial                   | "        | call                   | apps/app_dial.c           |
| Events                 | action   | none                   | main/manager.c            |
| ExtensionState         | "        | call,reporting         | "                         |
| ExtensionStatus        | event    | call                   | "                         |
| GetConfig              | action   | system,config          | "                         |
| GetConfigJSON          | "        | "                      | "                         |
| Getvar                 | "        | call,reporting         | "                         |
| Hangup                 | "        | system,call            | "                         |
| "                      | event    | call                   | main/channel.c            |
| Hold                   | "        | "                      | channels/chan_iax2.c      |
| "                      | "        | "                      | channels/chan_sip.c       |
| IAXnetstats            | action   | system,reporting       | channels/chan_iax2.c      |
| IAXpeerlist            | "        | "                      | "                         |
| IAXpeers               | "        | "                      | "                         |
| JabberEvent            | event    | user                   | res/res_jabber.c          |
| JabberSend             | action   | system                 | "                         |
| JitterBufStats         | event    | reporting              | channels/chan_iax2.c      |
| Join                   | "        | call                   | apps/app_queue.c          |
| Leave                  | "        | "                      | "                         |
| ListCategories         | action   | config                 | main/manager.c            |
| ListCommands           | "        | none                   | "                         |
| LogChannel             | event    | system                 | main/logger.c             |
| Login                  | action   | none                   | main/manager.c            |
| Logoff                 | "        | "                      | "                         |
| MailboxCount           | "        | call,reporting         | "                         |
| MailboxStatus          | "        | "                      | "                         |
| Masquerade             | event    | call                   | main/channel.c            |
| MeetmeEnd              | "        | "                      | apps/app_meetme.c         |
| MeetmeJoin             | "        | "                      | "                         |
| MeetmeLeave            | "        | "                      | "                         |
| MeetmeList             | action   | reporting              | "                         |
| MeetmeMute             | "        | call                   | "                         |
| "                      | event    | "                      | "                         |
| MeetmeTalkRequest      | "        | "                      | "                         |
| MeetmeTalking          | "        | "                      | "                         |
| MeetmeUnmute           | action   | "                      | "                         |
| MessageWaiting         | event    | "                      | apps/app_voicemail.c      |
| MiniVoiceMail          | "        | "                      | apps/app_minivm.c         |
| ModuleCheck            | action   | system                 | main/manager.c            |
| ModuleLoad             | "        | "                      | "                         |
| ModuleLoadReport       | event    | "                      | main/loader.c             |
| Monitor                | action   | call                   | res/res_monitor.c         |
| MonitorStart           | event    | "                      | "                         |
| MonitorStop            | "        | "                      | "                         |
| MusicOnHold            | "        | "                      | res/res_musiconhold.c     |
| NewAccountCode         | "        | "                      | main/cdr.c                |
| NewCallerid            | "        | "                      | main/channel.c            |
| Newchannel             | "        | "                      | "                         |
| Newexten               | "        | dialplan               | main/pbx.c                |
| "                      | "        | "                      | pbx/pbx_realtime.c        |
| Originate              | action   | originate              | main/manager.c            |
| OriginateResponse      | event    | call                   | "                         |
| PRIEvent               | "        | system                 | channels/chan_dahdi.c     |
| Park                   | action   | call                   | main/features.c           |
| ParkedCall             | event    | "                      | "                         |
| ParkedCalls            | action   | none                   | "                         |
| PauseMonitor           | "        | call                   | res/res_monitor.c         |
| PeerStatus             | event    | system                 | channels/chan_iax2.c      |
| "                      | "        | "                      | channels/chan_sip.c       |
| Ping                   | action   | none                   | main/manager.c            |
| PlayDTMF               | "        | call                   | apps/app_senddtmf.c       |
| QueueAdd               | "        | agent                  | apps/app_queue.c          |
| QueueCallerAbandon     | event    | "                      | "                         |
| QueueLog               | action   | "                      | "                         |
| QueueMemberAdded       | event    | "                      | "                         |
| QueueMemberPaused      | "        | "                      | "                         |
| QueueMemberPenalty     | "        | "                      | "                         |
| QueueMemberRemoved     | "        | "                      | "                         |
| QueueMemberStatus      | "        | "                      | "                         |
| QueuePause             | action   | "                      | "                         |
| QueuePenalty           | "        | "                      | "                         |
| QueueRemove            | "        | "                      | "                         |
| QueueRule              | "        | none                   | "                         |
| QueueStatus            | "        | "                      | "                         |
| QueueSummary           | "        | "                      | "                         |
| Queues                 | "        | "                      | "                         |
| RTCPReceived           | event    | reporting              | main/rtp.c                |
| RTCPSent               | "        | "                      | "                         |
| RTPReceiverStat        | "        | "                      | "                         |
| RTPSenderStat          | "        | "                      | "                         |
| Redirect               | action   | call                   | main/manager.c            |
| Registry               | event    | system                 | channels/chan_iax2.c      |
| "                      | "        | "                      | channels/chan_sip.c       |
| Reload                 | action   | config,system          | main/manager.c            |
| "                      | event    | system                 | main/cdr.c                |
| "                      | "        | "                      | main/dnsmgr.c             |
| "                      | "        | "                      | main/enum.c               |
| "                      | "        | "                      | main/manager.c            |
| Rename                 | "        | call                   | main/channel.c            |
| RptLocalNodes          | action   | none                   | apps/app_rpt.c            |
| RptStatus              | "        | "                      | "                         |
| SIPnotify              | "        | system                 | channels/chan_sip.c       |
| SIPpeers               | "        | system,reporting       | "                         |
| SIPqualifypeer         | "        | "                      | "                         |
| SIPshowpeer            | "        | "                      | "                         |
| SIPshowregistry        | "        | "                      | "                         |
| SendText               | "        | call                   | main/manager.c            |
| Setvar                 | "        | "                      | "                         |
| ShowDialPlan           | "        | config,reporting       | main/pbx.c                |
| ShowDialPlanComplete   | event    | config                 | "                         |
| Shutdown               | "        | system                 | main/asterisk.c           |
| Status                 | action   | system,call,reporting  | main/manager.c            |
| StopMonitor            | "        | call                   | res/res_monitor.c         |
| Transfer               | event    | "                      | channels/chan_sip.c       |
| UnParkedCall           | "        | "                      | main/features.c           |
| Unlink                 | "        | "                      | main/channel.c            |
| UnpauseMonitor         | action   | "                      | res/res_monitor.c         |
| UpdateConfig           | "        | config                 | main/manager.c            |
| UserEvent              | "        | user                   | "                         |
| "                      | event    | "                      | apps/app_userevent.c      |
| "                      | "        | "                      | main/manager.c            |
| VarSet                 | "        | dialplan               | apps/app_stack.c          |
| "                      | "        | "                      | funcs/func_global.c       |
| "                      | "        | "                      | main/pbx.c                |
| VoicemailUsersList     | action   | call,reporting         | apps/app_voicemail.c      |
| WaitEvent              | "        | none                   | main/manager.c            |
+----------------------------------------------------------------------------------------+


Cheers,

    Philipp Kempgen
-- 
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
Videos of the AMOOCON VoIP conference 2009 ->  http://www.amoocon.de
-- 



More information about the asterisk-dev mailing list