<?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>Dictate()</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-53.html" title="Dial()" /><link rel="next" href="asterisk-APP-B-56.html" title="Directory()" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Dictate()</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="asterisk-APP-B-53.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-56.html">Next</a></td></tr></table><hr /></div><div class="refentry" lang="en" xml:lang="en"><a id="asterisk-APP-B-308"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Dictate() — Virtual dictation machine</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><a id="I_programlisting_tt2173"></a><pre class="programlisting">Dictate([<em class="replaceable"><code>base_dir</code></em>[,<em class="replaceable"><code>filename</code></em>]])</pre></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4182331"></a><h2></h2><p><a id="I_indexterm_tt2174" class="indexterm"></a>This application allows the recording and playback of files, similar to a traditional dictation machine. The <em class="replaceable"><code>base_dir</code></em> parameter specifies the directory in which Asterisk will write the recorded files. If not specified, it defaults to the <span class="emphasis"><em>dictate</em></span> subdirectory of the Asterisk spool directory (as defined in <code class="filename">asterisk.conf</code>).</p><p>If the <em class="replaceable"><code>filename</code></em> parameter is specified, it will be used when the file is written. If not specified, Asterisk will prompt the caller for a numeric filename for the file.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Asterisk writes the files in raw, headerless, signed-linear format. If you’d like to convert the file to another format, you can use an outside utility such as <code class="literal">sox</code>, or use the <code class="literal">file convert</code> command from the Asterisk command-line interface.</p></div><p>The <code class="literal">Dictate()</code> application has two main modes: recording mode and playback mode. The caller can press the <code class="literal">1</code> key to switch between these modes. In both modes, the <code class="literal">0</code> key can be used to get help. The <code class="literal">*</code> key is used to pause or unpause the recording or playback. The <code class="literal">#</code> key allows the caller to choose a new filename.</p><p>In recording mode, the <code class="literal">8</code> key can be used to erase the entire recording and start over.</p><p>In playback mode, the <code class="literal">7</code> key rewinds the recording a few frames, and the <code class="literal">8</code> key forwards the recording a few frames. The <code class="literal">2</code> key is used to toggle the playback speed (either 1x, 2x, 3x, or 4x).</p><a id="I_programlisting_tt2175"></a><pre class="programlisting">; begin dictating, and save the files in the /tmp/dictate directory <span class="emphasis"><em>exten => 123,1,Dictate(/tmp/dictate) </em></span></pre></div><div class="refsect1" lang="en" xml:lang="en"><a id="asterisk-APP-B-309"></a><h2>See Also</h2><p><a href="asterisk-APP-B-134.html" title="Playback()"><span class="refentrytitle">Playback()</span></a>, <a href="asterisk-APP-B-23.html" title="Background()"><span class="refentrytitle">Background()</span></a>, <a href="asterisk-APP-B-38.html" title="ControlPlayback()"><span class="refentrytitle">ControlPlayback()</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-53.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-56.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Dial() </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Directory()</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>