Complete Guide to Asterisk Commands (Full Tutorial for Beginners to Advanced)

Published On: February 22, 2026
Follow Us
Installing Asterisk 20 from source on Ubuntu

Complete Guide to Asterisk Commands: Asterisk is the world’s most popular open-source PBX system used for call centers, IVR, VoIP servers, and telephony applications. It is maintained by Sangoma Technologies and powers millions of communication systems worldwide.

In this article, you will learn all important Asterisk commands, including PJSIP, Dialplan, Channels, Queue, AGI, Debugging, and System management.


1. How to Enter Asterisk CLI

The Asterisk CLI (Command Line Interface) is where you manage and monitor calls.

Enter CLI:

asterisk -rvvv

More detailed:

asterisk -rvvvvv

Exit CLI:

exit

2. Core System Commands

These commands manage the Asterisk service.

CommandDescription
core show helpShow all commands
core show versionShow Asterisk version
core show uptimeShow server uptime
core restart nowRestart Asterisk
core reloadReload configuration
core stop nowStop Asterisk

Example:

core show version

3. Dialplan Commands

Dialplan controls how calls are routed.

CommandDescription
dialplan reloadReload dialplan
dialplan showShow all dialplans
dialplan show 100Show extension 100
dialplan show internalShow context

Example:

dialplan show

4. PJSIP Commands (Most Important)

If you are using modern VoIP, these are critical.

CommandDescription
pjsip reloadReload PJSIP
pjsip show endpointsShow extensions
pjsip show contactsShow registered devices
pjsip show aorsShow AOR
pjsip show authsShow authentication
pjsip show transportsShow transport
pjsip show registrationsShow SIP trunks

Example:

pjsip show endpoints

5. Channel Commands

Channels represent active calls.

CommandDescription
core show channelsShow active calls
core show channels verboseDetailed call info
core show channel CHANNEL_NAMEChannel details

Example:

core show channels

Example output:

PJSIP/1001-00000001
PJSIP/1002-00000002

6. Queue Commands (Call Center)

Used in call center systems.

CommandDescription
queue showShow all queues
queue show supportShow specific queue

Example:

queue show

Output shows:

  • Agents
  • Waiting callers
  • Call status

7. AGI Commands

Used for CRM integration and automation.

Enable AGI debug:

agi set debug on

Disable:

agi set debug off

This helps debug:

  • Java AGI
  • Python AGI
  • Database integration

8. SIP Debug Commands

Enable SIP logs:

pjsip set logger on

Disable:

pjsip set logger off

This helps fix:

  • Registration issues
  • Call failures
  • Audio problems

9. Module Commands

Modules are features in Asterisk.

CommandDescription
module showShow modules
module reloadReload modules
module loadLoad module
module unloadUnload module

Example:

module reload

10. Database Commands

Asterisk has an internal database.

Show database:

database show

Example output:

/SIP/1001

11. Sound Test Command

Test extension:

console dial 1001

12. RTP Commands

Check audio settings:

rtp show settings

13. Logging Commands

Enable verbose logs:

core set verbose 5

Enable debug:

core set debug 5

14. Most Important Commands (Daily Use)

These are used in real production:

asterisk -rvvvpjsip show endpoints
pjsip show contacts
pjsip reloaddialplan reload
dialplan showcore show channelsqueue showagi set debug onpjsip set logger on

15. Real Example: Troubleshooting Call

Step 1:

Enter CLI:

asterisk -rvvvvv

Step 2:

Enable debug:

pjsip set logger on

Step 3:

Check phone registration:

pjsip show contacts

Step 4:

Check active call:

core show channels

16. Useful Command for Call Center Admin

Live monitoring:

watch -n 1 "asterisk -rx 'core show channels'"

sapan singh

👨‍💻 About Sapan Singh Hi, I’m Sapan Singh — a passionate software developer with a strong love for technology, gaming, and building useful digital tools.

Join WhatsApp

Join Now

Join Telegram

Join Now

Leave a Comment