Upgrade 3CX to v18 and get it hosted free!

Asterisk Manager API Action Command

Author image

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:

ACTION: COMMAND
command: Show Channels

RECEIVE:

Response: Follows
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

Response: Follows\r\n
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)

Back

Asterisk manager API

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.