Asterisk CLI provide 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. Use the below command 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. If you want to see a detailed information on the channels in asterisk, use the command

core show channels concise

For hanging up the call, use the command

hangup request channelname

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

asterisk -rx “hangup request channelname”

If you want to hang all the calls running through your asterisk , use the command

hangup request all