Foniva Contact Center Software
Asterisk Experts Support

Asterisk : spy a conversation

Hi everybody

Today, we will look at the ChanSpy application.

Let say you have channels coming on our asterisk and you want to be able

to hear what people are doing without them knowing that.

Then, Chanspy is for you.



Listen in on a call. Useful in a call center to monitor agents on the phone.


This adds the ability to spy on any bridged call, this includes VoIP only calls where ZapScan/ZapBarge couldn’t this can.


Valid Options:
- b: Only spy on channels involved in a bridged call.
- g(grp): Match only channels where their ${SPYGROUP} variable is set to contain ’grp’ in an optional : delimited list.
- q: Don’t play a beep when beginning to spy on a channel, or speak the selected channel name.
- r[(basename)]: Record the session to the monitor spool directory. An optional base for the filename may be specified.
The default is ’chanspy’.
- v([value]): Adjust the initial volume in the range from -4 to 4. A negative value refers to a quieter setting.

Since 1.4:
- w Enable ’whisper’ mode, so the spying channel can talk to the spied-on channel.
- W Enable ’private whisper’ mode, so the spying channel can talk to the spied-on
channel but cannot listen to that channel.

Since 1.6:
- o: Only listen to audio coming from this channel.
- X: Allow the user to exit ChanSpy to a valid single digit numeric extension in the current context or
the context specified by the SPY_EXIT_CONTEXT channel variable. The name of the last channel
that was spied on will be stored in the SPY_CHANNEL variable.
- e(ext): Enable ’enforced’ mode, so the spying channel can only monitor extensions whose name
is in the ’ext’ : delimited list.

If <chanprefix> is specified, only channel names *beginning* with that string will be scanned.
(’all’ or an empty string are also both valid <chanprefix>)

While spying, the following actions may be performed:

Dialing # cycles the volume level.
Dialing * will stop spying and look for another channel to spy on.
Dialing a series of digits followed by # builds a channel name to append to <chanprefix>
(e.g. run ChanSpy(Agent) and dial 1234# while spying to jump to channel Agent/1234)

Our sponsors

Asterisk Experts Support