Sophie

Sophie

distrib > Mandriva > 2008.1 > i586 > by-pkgid > c7095aefea7b97fbd2a596dcbfb9d481 > files > 103

asterisk-docs-1.4.26.1-1mdv2008.1.i586.rpm

<?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>Background()</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-21.html" title="Authenticate()" /><link rel="next" href="asterisk-APP-B-25.html" title="BackgroundDetect()" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Background()</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="asterisk-APP-B-21.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-25.html">Next</a></td></tr></table><hr /></div><div class="refentry" lang="en" xml:lang="en"><a id="asterisk-APP-B-23"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>Background() — Plays a file while accepting touch-tone (DTMF)
      digits</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><a id="I_programlisting_tt2122"></a><pre class="programlisting">Background(<em class="replaceable"><code>filename1</code></em>[&amp;<em class="replaceable"><code>filename2</code></em>...][,<em class="replaceable"><code>options</code></em>[,<em class="replaceable"><code>language</code></em>]])</pre></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4177883"></a><h2></h2><p><a id="I_indexterm_tt2123" class="indexterm"></a>Plays the specified audio file(s) while waiting for the
      user to begin entering DTMF digits. Once the user begins to enter DTMF
      digits, the playback is terminated. Asterisk tries to find a matching
      extension in the destination <em class="replaceable"><code>context</code></em> (or the
      current context if none is specified), and execution of the dialplan
      will continue at the matching extension as soon as an unambiguous match
      is found.</p><p>The <em class="replaceable"><code>filename</code></em> should be specified
      without a file extension, as Asterisk will automatically find the file
      format with the lowest translation cost.</p><p>Valid <em class="replaceable"><code>options</code></em> include one of the
      following:</p><div class="variablelist"><dl><dt><span class="term">
              <code class="literal">s</code>
            </span></dt><dd><p>Causes the playback of the message to be skipped if the
            channel is not in the “up” state (i.e., hasn’t yet been answered).
            If <code class="literal">s</code> is specified, the
            application will return immediately should the channel not be
            off-hook.</p></dd><dt><span class="term">
              <code class="literal">n</code>
            </span></dt><dd><p>Does not answer the channel before playing the specified
            file. Without this option, the channel will automatically be
            answered before the sound is played. Not all channels support
            playing messages before being answered.</p></dd><dt><span class="term">
              <code class="literal">m</code>
            </span></dt><dd><p>Only break if a digit hit matches a one-digit extension in
            the destination context.</p></dd></dl></div><p>The <em class="replaceable"><code>language</code></em> argument may be used to
      specify a language to use for playing the prompt, if it differs from the
      current language of the channel.</p><a id="I_programlisting_tt2124"></a><pre class="programlisting">exten =&gt; 123,1,Answer()
<span class="strong"><strong>exten =&gt; 123,2,Background('exter-ext-of-person');</strong></span>
</pre></div><div class="refsect1" lang="en" xml:lang="en"><a id="asterisk-APP-B-24"></a><h2>See Also</h2><p><a href="asterisk-APP-B-38.html" title="ControlPlayback()"><span class="refentrytitle">ControlPlayback()</span></a>, <a href="asterisk-APP-B-243.html" title="WaitExten()"><span class="refentrytitle">WaitExten()</span></a>, <a href="asterisk-APP-B-25.html" title="BackgroundDetect()"><span class="refentrytitle">BackgroundDetect()</span></a>,
      <a href="asterisk-APP-E-62.html" title="TIMEOUT">TIMEOUT</a></p></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-21.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-25.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Authenticate() </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> BackgroundDetect()</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>