Sophie

Sophie

distrib > Mandriva > 2008.1 > i586 > media > contrib-updates > by-pkgid > c7095aefea7b97fbd2a596dcbfb9d481 > files > 225

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>modules.conf</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-D.html" title="Appendix D. Configuration Files" /><link rel="prev" href="asterisk-APP-D.html" title="Appendix D. Configuration Files" /><link rel="next" href="asterisk-APP-D-SECT-2.html" title="adsi.conf" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">modules.conf</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="asterisk-APP-D.html">Prev</a> </td><th width="60%" align="center">Appendix D. Configuration Files</th><td width="20%" align="right"> <a accesskey="n" href="asterisk-APP-D-SECT-2.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="asterisk-APP-D-SECT-1"></a>modules.conf</h2></div></div></div><p><a id="I_indexterm_tt2608" class="indexterm"></a>The <span class="emphasis"><em>modules.conf</em></span> file controls which
    modules are loaded or not loaded at Asterisk startup. This is done through
    the use of the <code class="literal">load =&gt;</code> or <code class="literal">noload =&gt;</code> constructs.</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title"><a id="asterisk-APP-D-NOTE-68"></a>Tip</h3><p>This file is a key component to building a secure Asterisk
      installation: best practice suggests that only required modules be
      loaded.</p></div><p>The <span class="emphasis"><em>modules.conf</em></span> file always starts with the
    <code class="literal">[modules]</code> header. The <code class="literal">autoload</code> statement tells Asterisk whether to
    automatically load all modules contained within the modules directory or
    to load only those modules specifically defined by <code class="literal">load =&gt;</code> statements. We recommend you manually
    load only those modules you need, but many people find it easier to let
    Asterisk attempt to <code class="literal">autoload</code> whatever
    it finds in <span class="emphasis"><em>/usr/lib/asterisk/modules</em></span>. You can then
    exclude<sup>[<a id="id4207422" href="#ftn.id4207422">164</a>]</sup> certain modules with <code class="literal">noload
    =&gt;</code> statements.</p><p>Here’s a sample <span class="emphasis"><em>modules.conf</em></span> file:</p><a id="I_programlisting_tt2609"></a><pre class="programlisting">[modules]
    autoload=no                ; set this to yes and Asterisk will load any
                               ; modules it finds in /usr/lib/asterisk/modules

    load =&gt; res_adsi.so
    load =&gt; pbx_config.so      ; Requires: N/A
    load =&gt; chan_iax2.so       ; Requires: res_crypto.so, res_features.so
    load =&gt; chan_sip.so        ; Requires: res_features.so
    load =&gt; codec_alaw.so      ; Requires: N/A
    load =&gt; codec_gsm.so       ; Requires: N/A
    load =&gt; codec_ulaw.so      ; Requires: N/A
    load =&gt; format_gsm.so      ; Requires: N/A
    load =&gt; app_dial.so        ; Requires: res_features.so, res_musiconhold.so</pre><p>Since we assume Asterisk is built on Linux, all the module names we
    use end in a <span class="emphasis"><em>.so</em></span> extension. However, this may not be
    the case if you have built Asterisk on a different operating
    system.</p><p>As of this writing, there are eight module types:
    <span class="emphasis"><em>resources</em></span>, <span class="emphasis"><em>applications</em></span>,
    <span class="emphasis"><em>Call Detail Record database connectors</em></span>,
    <span class="emphasis"><em>channels</em></span>, <span class="emphasis"><em>codecs</em></span>,
    <span class="emphasis"><em>formats</em></span>, <span class="emphasis"><em>PBX modules</em></span>, and
    <span class="emphasis"><em>standalone functions</em></span>. Let’s take a look at each of
    them.</p><div class="footnotes"><br /><hr width="100" align="left" /><div class="footnote"><p><sup>[<a id="ftn.id4207422" href="#id4207422">164</a>] </sup>With the advent of the new menuselect system, this best practice
        may no longer be necessary if you are building only the modules you
        need in the first place</p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="asterisk-APP-D.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="asterisk-APP-D.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="asterisk-APP-D-SECT-2.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix D. Configuration Files </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> adsi.conf</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>