Name

ChanSpy() — Listens to the audio on a channel, and optionally whisper to the calling channel

Synopsis

ChanSpy([chanprefix[,options]])

This application is used to listen to the audio going to and from an Asterisk channel. If the chanprefix parameter is specified, only channels beginning with this value will be spied upon.

While a channel is being spied upon, the following actions may be performed:

  • Dialing # cycles the volume level.

  • Dialing * will cause the application to spy on the next available channel.

  • Dialing a series of digits followed by # builds a channel name (which will be appended to chanprefix). For example, placing ChanSpy(Zap) and then dialing the digits 42# while spying will begin spying on the channel Zap/42.

The options parameter may contain zero or more of the following options:

b

Only spy on channels that are involved in a bridged call.

g(group)

Only spy on channels that contain a channel variable named SPYGROUP, which should contain group in an optional colon-delimited list.

q

Quiet mode. Tells the application not to beep or read the selected channel’s name when spying begins.

r[(basename)]

Records the channel audio to the monitor spool directory (usually /var/spool/asterisk/monitor). An optional basename set the base filename of the recordings, which defaults to chanspy.

v([value])

Adjusts the volume of the audio being listened to. The value must be in the range of 4 to -4. A negative value will make the volume quieter, while a positive value will make it louder.

w

Whisper mode. This allows the spying channel to talk to the spied-upon channel, without any other bridged channel being able to hear the audio.

W

Private whisper mode. This enables the spying channel to speak to the spied-upon channel without being able to hear the audio from the spied-upon channel.

; Spy on the Zap channels in whisper mode
exten => 123,1,ChannelSpy(Zap,w)

See Also

ExtenSpy()

Get Asterisk: The Future of Telephony, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.