<?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>Record()</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-150.html" title="RealTimeUpdate()" /><link rel="next" href="asterisk-APP-B-153.html" title="RemoveQueueMember()" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Record()</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="asterisk-APP-B-150.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-153.html">Next</a></td></tr></table><hr /></div><div class="refentry" lang="en" xml:lang="en"><a id="asterisk-APP-B-152"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Record() — Records channel audio to a file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><a id="I_programlisting_tt2371"></a><pre class="programlisting">Record(<em class="replaceable"><code>filename</code></em>.<em class="replaceable"><code>format</code></em>[,<em class="replaceable"><code>silence</code></em>[,<em class="replaceable"><code>maxduration</code></em>[,<em class="replaceable"><code>options</code></em>]]])</pre></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4194752"></a><h2></h2><p><a id="I_indexterm_tt2372" class="indexterm"></a>Records audio from the channel in to the given <em class="replaceable"><code>filename</code></em>. If the file already exists, it will be overwritten.</p><p>Optional arguments include:</p><div class="variablelist"><dl><dt><span class="term"> <em class="replaceable"><code>format</code></em> </span></dt><dd><p>Specifies the format of the file type to be recorded.</p></dd><dt><span class="term"> <em class="replaceable"><code>silence</code></em> </span></dt><dd><p>Specifies the number of seconds of silence to allow before ending the recording and continuing on with the next priority in the dialplan.</p></dd><dt><span class="term"> <em class="replaceable"><code>maxduration</code></em> </span></dt><dd><p>Specifies the maximum recording duration, in seconds. If not specified or <code class="literal">0</code>, there is no maximum.</p></dd><dt><span class="term"> <em class="replaceable"><code>options</code></em> </span></dt><dd><p>May contain any of the following letters:</p><div class="variablelist"><dl><dt><span class="term"> <code class="literal">a</code> </span></dt><dd><p>Append to the recording, instead of overwriting it.</p></dd><dt><span class="term"> <code class="literal">n</code> </span></dt><dd><p>Do not answer, but record anyway if the line is not yet answered.</p></dd><dt><span class="term"> <code class="literal">q</code> </span></dt><dd><p>Quiet mode; do not play a beep tone at the beginning of the recording.</p></dd><dt><span class="term"> <code class="literal">s</code> </span></dt><dd><p>Skip recording if the line is not yet answered.</p></dd><dt><span class="term"> <code class="literal">t</code> </span></dt><dd><p>Use the alternate <code class="literal">*</code> terminator key instead of the default <code class="literal">#</code>.</p></dd><dt><span class="term"> <code class="literal">x</code> </span></dt><dd><p>Ignore all termination keys and keep recording until hangup.</p></dd></dl></div></dd></dl></div><p>If the <em class="replaceable"><code>filename</code></em> contains <code class="literal">%d</code>, these characters will be replaced with a number incremented by one each time the file is recorded.</p><p>The user can press <code class="literal">#</code> to terminate the recording and continue to the next priority in the dialplan.</p><a id="I_programlisting_tt2373"></a><pre class="programlisting">; record the caller's name exten => 123,1,Playback(pls-rcrd-name-at-tone) <span class="strong"><strong>exten => 123,n,Record(/tmp/name.gsm,3,30)</strong></span> exten => 123,n,Playback(/tmp/name)</pre></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-150.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-153.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">RealTimeUpdate() </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> RemoveQueueMember()</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>