For privacy reasons it is strongly recommended (and also mandatory in many countries) to advice the agent about an incoming whisper and barge-in from any supervisors and generally from any other contact center people.
Here it is a solution to advice the agent before performing any Spy process.
Using an internal inbound dialplan, we are able to send a "fake" call to the agent we want to spy in order to ring his phone for a few seconds before starting the spy call. we can also dens a popup on the agent phonebar to inform him a spy call is active on his channel.
Add an internal inbound dialplan, for example, we can use the DID
spy#.
In the advanced settings
add a SET application to define the popup message
add a DIAL application and set a very short timeout (3 or 4 seconds)
add a CUSTOM application to define the chanspy action
The dial plan is complete,
Now, to spy the agent john doe, for example, just call from a Phonebar spy#john.doe and now the agent will be informed by the ringing sound and a popup.