<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/en/2172/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+11+Application_Record">Asterisk 11 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="Asterisk11Application_Record-Record%28%29"></a>Record()</h1>
<h3><a name="Asterisk11Application_Record-Synopsis"></a>Synopsis</h3>
<p>Record to a file.</p>
<h3><a name="Asterisk11Application_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>RECORDED_FILE - Will be set to the final filename of the recording.</li>
        <li>RECORD_STATUS - This is the final status of the command
        <ul>
                <li>DTMF - A terminating DTMF was received ('#' or '*', depending upon option 't')</li>
                <li>SILENCE - The maximum silence occurred in the recording.</li>
                <li>SKIP - The line was not yet answered and the 's' option was specified.</li>
                <li>TIMEOUT - The maximum length was reached.</li>
                <li>HANGUP - The channel was hung up.</li>
                <li>ERROR - An unrecoverable error occurred, which resulted in a WARNING to the logs.</li>
        </ul>
        </li>
</ul>
<h3><a name="Asterisk11Application_Record-Syntax"></a>Syntax</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>Record(filename.format,silence,maxduration,options)</pre>
</div></div>
<h5><a name="Asterisk11Application_Record-Arguments"></a>Arguments</h5>
<ul>
        <li>filename
        <ul>
                <li>filename</li>
                <li>format - Is the format of the file type to be recorded (wav, gsm, etc).</li>
        </ul>
        </li>
        <li>silence - Is the number of seconds of silence to allow before returning.</li>
        <li>maxduration - Is the maximum recording duration in seconds. If missing or 0 there is no maximum.</li>
        <li>options
        <ul>
                <li>a - Append to existing recording rather than replacing.</li>
                <li>n - Do not answer, but record anyway if line not yet answered.</li>
                <li>q - quiet (do not play a beep tone).</li>
                <li>s - skip recording if the line is not yet answered.</li>
                <li>t - use alternate '*' terminator key (DTMF) instead of default '#'</li>
                <li>x - Ignore all terminator keys (DTMF) and keep recording until hangup.</li>
                <li>k - Keep recorded file upon hangup.</li>
                <li>y - Terminate recording if <b>any</b> DTMF digit is received.</li>
        </ul>
        </li>
</ul>
<h3><a name="Asterisk11Application_Record-ImportVersion"></a>Import Version</h3>
<p>This documentation was imported from Asterisk Version SVN-trunk-r370322</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+11+Application_Record">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_Record?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>