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.
| Command | Description |
|---|---|
| core show help | Show all commands |
| core show version | Show Asterisk version |
| core show uptime | Show server uptime |
| core restart now | Restart Asterisk |
| core reload | Reload configuration |
| core stop now | Stop Asterisk |
Example:
core show version
3. Dialplan Commands
Dialplan controls how calls are routed.
| Command | Description |
|---|---|
| dialplan reload | Reload dialplan |
| dialplan show | Show all dialplans |
| dialplan show 100 | Show extension 100 |
| dialplan show internal | Show context |
Example:
dialplan show
4. PJSIP Commands (Most Important)
If you are using modern VoIP, these are critical.
| Command | Description |
|---|---|
| pjsip reload | Reload PJSIP |
| pjsip show endpoints | Show extensions |
| pjsip show contacts | Show registered devices |
| pjsip show aors | Show AOR |
| pjsip show auths | Show authentication |
| pjsip show transports | Show transport |
| pjsip show registrations | Show SIP trunks |
Example:
pjsip show endpoints
5. Channel Commands
Channels represent active calls.
| Command | Description |
|---|---|
| core show channels | Show active calls |
| core show channels verbose | Detailed call info |
| core show channel CHANNEL_NAME | Channel details |
Example:
core show channels
Example output:
PJSIP/1001-00000001
PJSIP/1002-00000002
6. Queue Commands (Call Center)
Used in call center systems.
| Command | Description |
|---|---|
| queue show | Show all queues |
| queue show support | Show 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.
| Command | Description |
|---|---|
| module show | Show modules |
| module reload | Reload modules |
| module load | Load module |
| module unload | Unload 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'"


