<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/en/2171/18/9/_/styles/combined.css?spaceKey=AST&forWysiwyg=true" type="text/css">
</head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
<h2><a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+10+Application_Record">Asterisk 10 Application_Record</a></h2>
<h4>Page <b>added</b> by <a href="https://wiki.asterisk.org/wiki/display/~wikibot">Wiki Bot</a>
</h4>
<br/>
<div class="notificationGreySide">
<h1><a name="Asterisk10Application_Record-Record%28%29"></a>Record()</h1>
<h3><a name="Asterisk10Application_Record-Synopsis"></a>Synopsis</h3>
<p>Record to a file.</p>
<h3><a name="Asterisk10Application_Record-Description"></a>Description</h3>
<p>If filename contains <tt>%d</tt>, these characters will be replaced with a number incremented by one each time the file is recorded. Use <tt>core show file formats</tt> to see the available formats on your system User can press <tt>#</tt> to terminate the recording and continue to the next priority. If the user hangs up during a recording, all data will be lost and the application will terminate. </p>
<ul>
        <li><tt>RECORDED_FILE</tt> - Will be set to the final filename of the recording.</li>
        <li><tt>RECORD_STATUS</tt> - This is the final status of the command
        <ul>
                <li><tt>DTMF</tt> - A terminating DTMF was received ('#' or '*', depending upon option 't')</li>
                <li><tt>SILENCE</tt> - The maximum silence occurred in the recording.</li>
                <li><tt>SKIP</tt> - The line was not yet answered and the 's' option was specified.</li>
                <li><tt>TIMEOUT</tt> - The maximum length was reached.</li>
                <li><tt>HANGUP</tt> - The channel was hung up.</li>
                <li><tt>ERROR</tt> - An unrecoverable error occurred, which resulted in a WARNING to the logs.</li>
        </ul>
        </li>
</ul>
<h3><a name="Asterisk10Application_Record-Syntax"></a>Syntax</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>Record(filenameformat[,silence[,maxduration[,options]]])</pre>
</div></div>
<h5><a name="Asterisk10Application_Record-Arguments"></a>Arguments</h5>
<ul>
        <li><tt>filename</tt>
        <ul>
                <li><tt>filename</tt></li>
                <li><tt>format</tt> - Is the format of the file type to be recorded (wav, gsm, etc).</li>
        </ul>
        </li>
        <li><tt>silence</tt> - Is the number of seconds of silence to allow before returning.</li>
        <li><tt>maxduration</tt> - Is the maximum recording duration in seconds. If missing or 0 there is no maximum.</li>
        <li><tt>options</tt>
        <ul>
                <li><tt>a</tt> - Append to existing recording rather than replacing.</li>
                <li><tt>n</tt> - Do not answer, but record anyway if line not yet answered.</li>
                <li><tt>q</tt> - quiet (do not play a beep tone).</li>
                <li><tt>s</tt> - skip recording if the line is not yet answered.</li>
                <li><tt>t</tt> - use alternate '*' terminator key (DTMF) instead of default '#'</li>
                <li><tt>x</tt> - Ignore all terminator keys (DTMF) and keep recording until hangup.</li>
                <li><tt>k</tt> - Keep recorded file upon hangup.</li>
                <li><tt>y</tt> - Terminate recording if <b>any</b> DTMF digit is received.</li>
        </ul>
        </li>
</ul>
<h3><a name="Asterisk10Application_Record-SeeAlso"></a>See Also</h3>
<h3><a name="Asterisk10Application_Record-ImportVersion"></a>Import Version</h3>
<p>This documentation was imported from Asterisk version SVN-branch-10-r340810.</p>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;" class="grey">
<a href="https://wiki.asterisk.org/wiki/users/removespacenotification.action?spaceKey=AST">Stop watching space</a>
<span style="padding: 0px 5px;">|</span>
<a href="https://wiki.asterisk.org/wiki/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
<a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+10+Application_Record">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+10+Application_Record?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>