This is another post more for my reference than some new interesting thing I’ve discovered.
It seems difficult to find the correct command for this. Some places say “soft hangup” others say “hangup request” or just tell you to restart asterisk.
The correct command and example is:
channel request hangup PJSIP/itsptrunk-00000002
Where the final thing in the command is the channel you want to hang up.
To find the channel name you may normally type
core show channels
But you may notice it chops off the end of the channel name. If you try to use one copied from that command it will say it can’t find the channel name.
Instead use the command:
core show channels concise
To view the full channel name! copy and paste it (e.g. PJSIP/anonymous-00026032) into the command for example:
channel request hangup PJSIP/anonymous-00026032
Hope this helps!