How to hangup a call via manager api


#1

How can I hang up calls via management api that have previously been generated with originate?

Sure, this is supposed to be done with the hangup command, but how can I get the full channel name (e.g.: SIP/191-efc1) via tha management api that is needed for the hang up command ?

pollyx
pbx-manager.de


#2

in Asterisk 1.0.X:
Action: Command
Command: show channels

in Asterisk 1.2.X:
Action: Command
Command: show channels concise

You then need to parse through the results to find the channel you’re looking for.


#3

This is somewhat clumsy, but it works.

Thanks so much for your quick and helpful reply, mflorell!

pollyx
pbx-manager.de