<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_BackGround">Asterisk 10 Application_BackGround</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_BackGround-BackGround%28%29"></a>BackGround()</h1>

<h3><a name="Asterisk10Application_BackGround-Synopsis"></a>Synopsis</h3>
<p>Play an audio file while waiting for digits of an extension to go to.</p>

<h3><a name="Asterisk10Application_BackGround-Description"></a>Description</h3>
<p>This application will play the given list of files <b>(do not put extension)</b> while waiting for an extension to be dialed by the calling channel. To continue waiting for digits after this application has finished playing files, the <tt>WaitExten</tt> application should be used. </p>

<p>If one of the requested sound files does not exist, call processing will be terminated. </p>

<p>This application sets the following channel variable upon completion: </p>
<ul>
        <li><tt>BACKGROUNDSTATUS</tt> - The status of the background attempt as a text string.
        <ul>
                <li><tt>SUCCESS</tt></li>
                <li><tt>FAILED</tt></li>
        </ul>
        </li>
</ul>


<h3><a name="Asterisk10Application_BackGround-Syntax"></a>Syntax</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>BackGround(filename1[&amp;filename2[&amp;...]][,options[,langoverride[,context]]])</pre>
</div></div>

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

<ul>
        <li><tt>filenames</tt>
        <ul>
                <li><tt>filename1</tt></li>
                <li><tt>filename2</tt></li>
        </ul>
        </li>
        <li><tt>options</tt>
        <ul>
                <li><tt>s</tt> - Causes the playback of the message to be skipped if the channel is not in the <tt>up</tt> state (i.e. it hasn't been answered yet). If this happens, the application will return immediately.</li>
                <li><tt>n</tt> - Don't answer the channel before playing the files.</li>
                <li><tt>m</tt> - Only break if a digit hit matches a one digit extension in the destination context.</li>
        </ul>
        </li>
        <li><tt>langoverride</tt> - Explicitly specifies which language to attempt to use for the requested sound files.</li>
        <li><tt>context</tt> - This is the dialplan context that this application will use when exiting to a dialed extension.</li>
</ul>



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

<p><a href="/wiki/display/AST/Asterisk+10+Application_ControlPlayback" title="Asterisk 10 Application_ControlPlayback">Asterisk 10 Application&#95;ControlPlayback</a><br/>
<a href="/wiki/pages/createpage.action?spaceKey=AST&amp;title=Asterisk+10+Application_WaitExten&amp;linkCreation=true&amp;fromPageId=19005990" class="createlink">Asterisk 10 Application&#95;WaitExten</a><br/>
<a href="/wiki/display/AST/Asterisk+10+Application_BackgroundDetect" title="Asterisk 10 Application_BackgroundDetect">Asterisk 10 Application&#95;BackgroundDetect</a><br/>
<a href="/wiki/display/AST/Asterisk+10+Function_TIMEOUT" title="Asterisk 10 Function_TIMEOUT">Asterisk 10 Function&#95;TIMEOUT</a></p>


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