ChanSpy
Synopsis
Listen in on a call, or whisper into a conversation. Useful in a call center to monitor agents on the phone.Description
This adds the ability to spy on any bridged call, this includes VoIP-only calls where in the past ZapScan/ZapBarge couldn't - this can.Chanspy([<chanprefix>][,<options>])
Chanspy([<chanprefix>][|<options>]) in Asterisk 1.4
chanprefix:
May be empty, can also be set to 'all' (without the quotes) meaning empty
Is typically set to something like 'SIP' or 'Agent'
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 (by colon). Multiple arguments for 'grp' are not possible in asterisk 1.4 though and require a later asterisk release - see Asterisk-15294 and Asterisk-11894. The SPYGROUP variable, however, may contain multiple values also in Asterisk 1.4. The number of SPYGROUPs was raised from 25 to 128 as well in Asterisk-11894.
- 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'. ChanSpy only records to a .raw file.
- v([value]): Adjust the initial volume in the range from -4 to 4. A negative value refers to a quieter setting.
Included with and 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.
Included with and since 1.6.x:
- 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.
Description
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)
Update: Asterisk 1.4 includes a 'whisper' feature as part of ChanSpy(): A third party may speak to only one of the two parties of a bridged call.
Attention
- Up to and including Asterisk 1.4.17 ChanSpy can cause a crash/segfault if used together with Monitor or MixMonitor at the same time. 1.4.18 is supposed to attack this issue by using "audiohooks" that replaces the current ChanSpy approach.