manager.txt 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. The Asterisk Manager TCP/IP API
  2. ===============================
  3. The manager is a client/server model over TCP. With the manager interface,
  4. you'll be able to control the PBX, originate calls, check mailbox status,
  5. monitor channels and queues as well as execute Asterisk commands.
  6. Management users are configured in the configuration file manager.conf and are
  7. given permissions for read and write, where write represents their ability
  8. to perform this class of "action", and read represents their ability to
  9. receive this class of "event".
  10. Command Syntax
  11. --------------
  12. Management communication consists of tags of the form "header: value",
  13. terminated with an empty newline (\r\n) in the style of SMTP, HTTP, and
  14. other headers.
  15. The first tag MUST be one of the following:
  16. * Action: An action requested by the CLIENT to the Asterisk SERVER. Only one "Action" may be outstanding at any time.
  17. * Response: A response to an action from the Asterisk SERVER to the CLIENT.
  18. * Event: An event reported by the Asterisk SERVER to the CLIENT
  19. Manager commands
  20. ----------------
  21. Output from the CLI command 'show manager' command:
  22. * Ping: Ping
  23. * Logoff: Logoff Manager
  24. * Hangup: Hangup Channel
  25. * Status: Status
  26. * Redirect: Redirect
  27. * Originate: Originate Call
  28. * MailboxStatus: Check Mailbox
  29. * Command: Execute Command
  30. * ExtensionState: Check Extension Status
  31. * AbsoluteTimeout: Set Absolute Timeout
  32. * MailboxCount: Check Mailbox Message Count
  33. * Monitor: Monitor a channel
  34. * StopMonitor: Stop monitoring a channel
  35. * ChangeMonitor: Change monitoring filename of a channel
  36. * IAXpeers: List IAX Peers (Defaults to IAX2)
  37. * IAX1peers: List IAX version 1 Peers
  38. * Queues: Queues
  39. * QueueStatus: Queue Status
  40. Command Summary
  41. --------------
  42. Command: Command
  43. Parameters: Command
  44. Command: ExtensionState
  45. Parameters: Exten, Context, ActionID
  46. Command: Hangup
  47. Parameters: Channel
  48. Command: Logoff
  49. Parameters: None
  50. Command: MailboxCount
  51. Parameters: Mailbox, ActionID
  52. Command: MailboxStatus
  53. Parameters: Mailbox, ActionID
  54. Command: Originate
  55. Parameters: Channel, Exten, Context, Priority, Timeout,
  56. CallerID, Variable, Account, Application, Data, Async
  57. Command: Ping
  58. Parameters: None
  59. Command: Redirect
  60. Parameters: Channel, ExtraChannel, Exten, Context, Priority
  61. Command: Timeout
  62. Parameters: Channel, Timeout
  63. Examples
  64. --------
  65. Login - Log a user into the manager interface.
  66. Action: Login
  67. Username: testuser
  68. Secret: testsecret
  69. Originate - Originate a call from a channel to an extension.
  70. Action: Originate
  71. Channel: sip/12345
  72. Exten: 1234
  73. Context: default
  74. Originate - Originate a call from a channel to an extension without waiting
  75. for call to complete.
  76. Action: Originate
  77. Channel: sip/12345
  78. Exten: 1234
  79. Context: default
  80. Async: yes
  81. Redirect with ExtraChannel:
  82. Attempted goal:
  83. Have a 'robot' program Redirect both ends of an already-connected call
  84. to a meetme room using the ExtraChannel feature through the management interface.
  85. Action: Redirect
  86. Channel: Zap/1-1
  87. ExtraChannel: SIP/3064-7e00 (varies)
  88. Exten: 680
  89. Priority: 1
  90. Where 680 is an extension that sends you to a MeetMe room.
  91. There are a number of GUI tools that use the manager interface, please search
  92. the mailing list archives and the documentation page on the http://www.asterisk.org
  93. web site for more information.
  94. -----------------