Asterisk CLI provides Hangup command to hangup live calls. For using the hangup command, you need to get the name of the channel that you want to hangup.

Get Active Channels

Use the command below to get all the active channels in your Asterisk server.

core show channels

This command will show all the active channels in your server. Copy the channel name which you want to hangup.

Get detailed channel information

If you want to see a detailed information on the channels in asterisk, use the command

core show channels concise

Call Hangup

For hanging up the call, use following command

hangup request channelname

How to use hangup command from Linux shell?

If you want to use hangup command from your linux shell, use

asterisk -rx “hangup request channelname”

Hang up all calls

To hang up all the calls running through your Asterisk , use the command

hangup request all