Getting no response to a question like this normally means that people don’t think that Asterisk can do what you want, but are not sufficiently familiar with the function in question to be able to say so with certainty. (In addition, it isn’t of sufficient interest to someone who can read the code to see what the code actually does.)
“Spy” implies that this is done without alerting the parties to the call.
One could use AMI to send a DTMF beep to the channel.
But it’s really a strange thing to beep the “spier” as the spier knows that he’s going to spy.
It would have been better to have a way to be compliant with the law
I suspect most people cover the legal side by using the “this call may be monitored or recorded” announcement, at the start of the call.
If you warn an agent that they are being monitored (you cannot avoid some echo), they are going to be careful what they say, so you will never catch them misbehaving (the right to monitor would normally be in the contract of employment).
We’ve never installed a system with spy enabled, so we won’t have fully researched the legality, but normally when you call a call centre, you are calling a company, rather than an individual, so I’m a bit surprised that there would be any restriction on how many employees were listening, as long as they were doing so for legitimate business reasons.