CLI Commands Quick Reference

CLI Commands -- Last reviewed 2026-03-29 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 PJSIP endpoints and their status
pjsip show endpoint <name> Show detailed info for a specific endpoint
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 SIP 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 dialplan
dialplan show <context> Show dialplan for a specific context
dialplan show <exten>@<context> Show a specific extension 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 channel 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 codec 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 voicemail 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 queue
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

No notes yet. Be the first to contribute a tip or example.

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