ChanSpy How to keep call when Extension hangup

Hello everyone,

My question is very simple.


  • Extension A receives a call.
  • Extension B wants to spy on that call.
  • Extension A hangs up.

Is it possible to keep executing that call between source AND Extension B?

Thanks in advance.

You are confusing extension with devices. I think you mean.
Device “source” calls Extension A.
Extension A calls device A’ which answers
Device B wants to spy on the call leg to A’ (which will involve a “Setup Spy” extension).
Device A’ hangs up.
Can a call be established between Device B and device “source”?

The answer is not with ChanSpy, which relies on an API that taps the media on an up channel.

It could sort of be done if you replaced:

Device B wants to spy on the call leg to A’


Device B wants to spy on the call leg to device “source”.

However, Extension B would have to be modified, to pass the g option to Dial, so that Dial didn’t signal end of call, and there would also have to be a place holder action after the Dial, so that the call didn’t end as the result of control running off the end of the dial plan.

Alternatively, you could create a conference between all the parties. This would probably have to be done with AMI, as it would involve a simultaneous redirection of both source and A’, which cannot be done from the dialplan. Or, I think you might be able to replace Dial, and the spy application, with Stasis, and use ARI to set up the conference.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.