<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ExtenSpy()</title><link rel="stylesheet" href="styles.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /><link rel="start" href="index.html" title="Asterisk™: The Future of Telephony" /><link rel="up" href="asterisk-APP-B.html" title="Appendix B. Application Reference" /><link rel="prev" href="asterisk-APP-B-257.html" title="ExitWhile()" /><link rel="next" href="asterisk-APP-B-357.html" title="ExternalIVR()" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ExtenSpy()</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="asterisk-APP-B-257.html">Prev</a> </td><th width="60%" align="center">Appendix B. Application Reference</th><td width="20%" align="right"> <a accesskey="n" href="asterisk-APP-B-357.html">Next</a></td></tr></table><hr /></div><div class="refentry" lang="en" xml:lang="en"><a id="asterisk-APP-B-355"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ExtenSpy() — Listen to the audio on an extension, and optionally whisper to the calling channel</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><a id="I_programlisting_tt2201"></a><pre class="programlisting">ExtenSpy([<em class="replaceable"><code>exten@context</code></em>[,<em class="replaceable"><code>options</code></em>]])</pre></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4183818"></a><h2></h2><p><a id="I_indexterm_tt2202" class="indexterm"></a>This application is used to listen to the audio going to and from an Asterisk channel. Only channels created by outgoing calls for the specified extension will be selected for spying.</p><p>While a channel is being spied upon, the following actions may be performed:</p><div class="itemizedlist"><ul type="disc"><li><p>Dialing <code class="literal">#</code> cycles the volume level</p></li><li><p>Dialing <code class="literal">*</code> will cause the application to spy on the next available channel</p></li></ul></div><p>The <em class="replaceable"><code>options</code></em> parameter may contain zero or more of the following options:</p><div class="variablelist"><dl><dt><span class="term"> <code class="literal">b</code> </span></dt><dd><p>Only spy on channels that are involved in a bridged call.</p></dd><dt><span class="term"> <code class="literal">g(<em class="replaceable"><code>group</code></em>)</code> </span></dt><dd><p>Only spy on channels that contain a channel variable named <code class="literal">SPYGROUP</code>, which should contain <em class="replaceable"><code>group</code></em> in an optional colon-delimited list.</p></dd><dt><span class="term"> <code class="literal">q</code> </span></dt><dd><p>Quiet mode. Tells the application not to beep or read the selected channel’s name when spying begins.</p></dd><dt><span class="term"> <code class="literal">r[(<em class="replaceable"><code>basename</code></em>)]</code> </span></dt><dd><p>Records the channel audio to the monitor spool directory (usually <code class="filename">/var/spool/asterisk/monitor</code>). An optional <em class="replaceable"><code>basename</code></em> set the base filename of the recordings, which defaults to <code class="literal">chanspy</code>.</p></dd><dt><span class="term"> <code class="literal">v([<em class="replaceable"><code>value</code></em>])</code> </span></dt><dd><p>Adjusts the volume of the audio being listened to. The <em class="replaceable"><code>value</code></em> must be in the range of <code class="literal">4</code> to <code class="literal">-4</code>. A negative <em class="replaceable"><code>value</code></em> will make the volume quieter, while a positive value will make it louder.</p></dd><dt><span class="term"> <code class="literal">w</code> </span></dt><dd><p>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.</p></dd><dt><span class="term"> <code class="literal">W</code> </span></dt><dd><p>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.</p></dd></dl></div><a id="I_programlisting_tt2203"></a><pre class="programlisting">; Spy on channels created by extension 125 in the lab context <span class="strong"><strong>exten => 123,1,ExtenSpy(125@lab,w)</strong></span> </pre></div><div class="refsect1" lang="en" xml:lang="en"><a id="asterisk-APP-B-356"></a><h2>See Also</h2><p> <a href="asterisk-APP-B-351.html" title="ChanSpy()"><span class="refentrytitle">ChanSpy()</span></a> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="asterisk-APP-B-257.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="asterisk-APP-B.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="asterisk-APP-B-357.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ExitWhile() </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> ExternalIVR()</td></tr></table></div><div xmlns="" id="svn-footer"><hr /><p>You are reading <em>Asterisk: The Future of Telephony</em> (2nd Edition for Asterisk 1.4), by Jim van Meggelen, Jared Smith, and Leif Madsen.<br /> This work is licensed under the <a href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative Commons Attribution-Noncommercial-No Derivative Works License v3.0</a>.<br /> To submit comments, corrections, or other contributions to the text, please visit <a href="http://oreilly.com/catalog/9780596510480/">http://www.oreilly.com/</a>.</p></div></body></html>