CLI Commands Quick Reference

CLI Commands -- Last reviewed 2026-08-22 cli console commands reference debugging Found this useful? Upvote it. ×

CLI Commands Quick Reference

Asterisk's command-line interface (CLI) is the primary tool for real-time monitoring, debugging, and management. Access it with asterisk -r (connect to running instance) or asterisk -rvvvv (connect with high verbosity).

Exit the CLI with quit or Ctrl+C.

Connecting to the Console

# Attach to a running Asterisk instance
asterisk -r

# Attach with verbosity level 4 (more detail)
asterisk -rvvvv

# Run a single command without entering the console
asterisk -rx "pjsip show endpoints"

PJSIP Commands

Command Description
pjsip show endpoints List all PJSIPThe modern SIP channel driver in Asterisk (chan_pjsip), replacing the older chan_sip. Configured in pjsip.conf using endpoints, AORs, auths, and transports. endpoints and their status
pjsip show endpoint <name> Show detailed info for a specific endpointIn PJSIP configuration, the SIP entity Asterisk communicates with: a phone, trunk, or other user agent. Defined by an endpoint section in pjsip.conf.
pjsip show aors List all Address of Record entries
pjsip show registrations Show outbound registrations
pjsip show contacts Show all registered contacts
pjsip show channels Show active PJSIP channels
pjsip set logger on/off Enable or disable PJSIP SIPSession Initiation Protocol, the standard signaling protocol used to set up, manage, and tear down VoIP calls between Asterisk and phones or carriers. message logging
pjsip reload Reload PJSIP configuration

Legacy SIP Commands (chan_sip)

Command Description
sip show peers Display SIP peers
sip show peer <account> Display specific SIP peer details
sip show users Display SIP users
sip show registry Display SIP registrations
sip show settings Display SIP global settings
sip set debug on/off Enable or disable SIP debugging
sip set debug ip <addr> Debug SIP traffic filtered by IP address
sip set debug peer <name> Debug SIP traffic filtered by peer name
sip reload Reload SIP configuration

Dialplan Commands

Command Description
dialplan show Show the entire dialplanThe core call-routing configuration of Asterisk, written mostly in extensions.conf as contexts, extensions, and priorities that decide how every call is handled. Full definition →
dialplan show <context> Show dialplanThe core call-routing configuration of Asterisk, written mostly in extensions.conf as contexts, extensions, and priorities that decide how every call is handled. Full definition → for a specific contextA named section of the dialplan that groups extensions. Calls enter a specific context and can only reach extensions visible from it, making contexts the basic unit of call routing and security.
dialplan show <exten>@<context> Show a specific extensionA dialplan entry that matches a dialed number or pattern within a context and triggers a sequence of prioritized steps. in a context
dialplan reload Reload the dialplan from config files

Channel Commands

Command Description
core show channels List all active channels
core show channels verbose Detailed active channelA single call leg passing through Asterisk. Channels represent connections to endpoints and are what dialplan applications act on. listing
core show channel <name> Show details for a specific channel
channel originate <chan> application <app> <args> Originate a test call
channel redirect <chan> <context>,<exten>,<pri> Redirect a live channel
channel hangup <chan> Hang up a specific channel

System Commands

Command Description
core show settings Display Asterisk configuration summary
core show uptime Show how long Asterisk has been running
core show channeltypes List channel types (PJSIP, DAHDI, etc.)
core show translation Display codecA coder-decoder that compresses audio for transmission, such as ulaw, alaw, GSM, or Opus. Endpoints negotiate which codec a call uses. translation cost matrix
core set verbose <level> Set console verbosity (0-10)
core restart now Restart Asterisk immediately
core restart gracefully Restart after all calls end
core stop now Stop Asterisk immediately
core stop gracefully Stop after all calls end
reload Reload all module configurations
module show List all loaded modules
module show like <pattern> List modules matching a pattern
module load <module> Load a module
module reload <module> Reload a specific module
module unload <module> Unload a module

Voicemail Commands

Command Description
voicemail show users List all voicemailAsterisk's built-in voice messaging system (app_voicemail), configured in voicemail.conf with mailboxes per user. boxes
voicemail show users for <context> List voicemail boxes in a context
voicemail show zones Show voicemail timezone zones
voicemail reload Reload voicemail configuration

Queue Commands

Command Description
queue show Show all queues and their members
queue show <name> Show a specific queueAn Asterisk call queue (app_queue) that parks incoming calls and distributes them to logged-in agents according to a chosen ring strategy.
queue add member <chan> to <queue> Add a member to a queue
queue remove member <chan> from <queue> Remove a member from a queue
queue pause member <chan> in <queue> Pause a queue member
queue unpause member <chan> in <queue> Unpause a queue member
queue reload all Reload queue configuration

ConfBridge Commands

Command Description
confbridge list List active conferences
confbridge show profile bridge <name> Show a bridge profile
confbridge show profile user <name> Show a user profile
confbridge kick <conf> <channel> Kick a participant
confbridge mute <conf> <channel> Mute a participant
confbridge unmute <conf> <channel> Unmute a participant

AstDB Commands

Command Description
database show Show all AstDB entries
database show <family> Show entries in a family
database get <family> <key> Get a specific value
database put <family> <key> <value> Store a value
database del <family> <key> Delete a specific entry
database deltree <family> Delete an entire family

Music on Hold Commands

Command Description
moh show classes List MOH classes
moh show files Show files loaded for each MOH class
moh reload Reload MOH configuration

Tips

User Notes

Know a tip or gotcha for this topic? Share it below and help others.

Contribute a note

Share a tip, gotcha, or practical example. Keep it under 2000 characters. No questions (use the Asterisk community forums for support). Wrap code in backticks.

Moderated before publishing. Email never shown.
Related Snippets