Asterisk command to show active calls live from CLI

Introduction

Sometimes when using Asterisk, you would want to quickly check and monitor current active calls running on your server. This is very helpful to know the current status of your system in realtime.

Using the command

This can be achieved using the watch command.

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

This will basically run the core show channels Asterisk CLI command once every 1 second, and print the results out on the screen.

To show the current call duration, and other important information, you can enable verbose in your command.

watch -n 1 "asterisk -vvvvvrx 'core show channels verbose' "
            

Conclusion

With this combination of the watch command and the core show channels Asterisk CLI command, you can easily achieve a wallboard-like SSH console that shows your current active calls in realtime.

Try this tutorial on a Cloud VoIP Server.

Includes 512MB RAM, 20GB SSD Disk, and Unlimited Transfer for $20/mo! Learn more