asterisk Command Example

The Asterisk Project is a free and open-source software project that provides a complete PBX (private branch exchange) system for telecommunication. It is a popular choice for building custom telephony systems, such as private branch exchanges (PBX), call centers, and voicemail systems.

Asterisk was created in 1999 by Mark Spencer, and it has since become one of the most widely used PBX systems in the world. It runs on a variety of operating systems, including Linux, BSD, and Mac OS X, and it supports a wide range of hardware platforms.

The asterisk command is used for running the server itself, and managing an already running instance.

asterisk Command Examples in Linux

1. [R]econnect to a running server, and turn on logging 3 levels of [v]erbosity:

# asterisk -r -vvv

2. [R]econnect to a running server, run a single command, and return:

# asterisk -r -x "command"

3. Show chan_SIP clients (phones):

# asterisk -r -x "sip show peers"

4. Show active calls and channels:

# asterisk -r -x "core show channels"

5. Show voicemail mailboxes:

# asterisk -r -x "voicemail show users"

6. Terminate a channel:

# asterisk -r -x "hangup request channel_ID"

7. Reload chan_SIP configuration:

# asterisk -r -x "sip reload"
Related Post