<html>
<head>
    <base href="https://wiki.asterisk.org/wiki">
            <link rel="stylesheet" href="/wiki/s/en/2171/18/9/_/styles/combined.css?spaceKey=AST&amp;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_ControlPlayback">Asterisk 10 Application_ControlPlayback</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_ControlPlayback-ControlPlayback%28%29"></a>ControlPlayback()</h1>

<h3><a name="Asterisk10Application_ControlPlayback-Synopsis"></a>Synopsis</h3>
<p>Play a file with fast forward and rewind.</p>

<h3><a name="Asterisk10Application_ControlPlayback-Description"></a>Description</h3>
<p>This application will play back the given <em>filename</em>. </p>

<p>It sets the following channel variables upon completion: </p>
<ul>
        <li><tt>CPLAYBACKSTATUS</tt> - Contains the status of the attempt as a text string
        <ul>
                <li><tt>SUCCESS</tt></li>
                <li><tt>USERSTOPPED</tt></li>
                <li><tt>ERROR</tt></li>
        </ul>
        </li>
        <li><tt>CPLAYBACKOFFSET</tt> - Contains the offset in ms into the file where playback was at when it stopped. <tt>-1</tt> is end of file.</li>
        <li><tt>CPLAYBACKSTOPKEY</tt> - If the playback is stopped by the user this variable contains the key that was pressed.</li>
</ul>


<h3><a name="Asterisk10Application_ControlPlayback-Syntax"></a>Syntax</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>ControlPlayback(filename[,skipms[,ff[,rew[,stop[,pause[,restart[,options]]]]]]])</pre>
</div></div>

<h5><a name="Asterisk10Application_ControlPlayback-Arguments"></a>Arguments</h5>

<ul>
        <li><tt>filename</tt></li>
        <li><tt>skipms</tt> - This is number of milliseconds to skip when rewinding or fast-forwarding.</li>
        <li><tt>ff</tt> - Fast-forward when this DTMF digit is received. (defaults to <tt>#</tt> )</li>
        <li><tt>rew</tt> - Rewind when this DTMF digit is received. (defaults to <tt>*</tt> )</li>
        <li><tt>stop</tt> - Stop playback when this DTMF digit is received.</li>
        <li><tt>pause</tt> - Pause playback when this DTMF digit is received.</li>
        <li><tt>restart</tt> - Restart playback when this DTMF digit is received.</li>
        <li><tt>options</tt>
        <ul>
                <li><tt>o</tt>
                <ul>
                        <li><tt>time</tt> - Start at <em>time</em> ms from the beginning of the file.</li>
                </ul>
                </li>
        </ul>
        </li>
</ul>



<h3><a name="Asterisk10Application_ControlPlayback-SeeAlso"></a>See Also</h3>



<h3><a name="Asterisk10Application_ControlPlayback-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_ControlPlayback">View Online</a>
              |
       <a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+10+Application_ControlPlayback?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
           </div>
</div>
</div>
</div>
</div>
</body>
</html>