I’m constructing “pickup from hold” feature. I have it mostly build using some channel parsing via AMI (with CoreShowChannels) followed by an AMI Bridge command. I would like to add a restriction where you can only bridge a channel that is on hold (to prevent someone from accidentally pulling a live call where people are talking).
However, there seems to be no way to tell whether a channel is on hold or not. Viewing the channel status of the held call always yields “AST_STATE_UP”, which is indistinguishable from a non-held channel.
How can I determine which channels are on hold? Thanks.