Asterisk Manager API Action: Command
Action: Command
Parameters: Command (Asterisk CLI command, not an application command), ActionID
Example (Show Channels) via Asterisk 1.0.9:
SEND:
command: Show Channels
RECEIVE:
Channel (Context Extension Pri ) State Appl. Data
0 active channel(s)
–END COMMAND–
Note
The sequence in the response event doesn’t send a carriage return – line feed (\r\n), it only sends a line-feed (\n), if you write a handler who wait for a carriage return – line feed, the result sequence is ignored and send the respond that you mention.
Example
Channel Location State Application(Data)\n
SIP/x7065551212b-1af (None) Ringing AppDial((Outgoing Line))\n
SIP/x7065551212c-2aa 29@default:2 Ring Dial(SIP/x7065551212b)\n
2 active channels\n
1 active call\r\n
–END COMMAND–\r\n
\r\n
(I’m not sure about the \r after “1 active call” at the moment, I can’t check. – flobi)