The modules.conf file controls which modules are loaded or not loaded at Asterisk startup. This is done through the use of the load => or noload => constructs.

This file is a key component to building a secure Asterisk installation: best practice suggests that only required modules be loaded.

The modules.conf file always starts with the [modules] header. The autoload statement tells Asterisk whether to automatically load all modules contained within the modules directory or to load only those modules specifically defined by load => statements. We recommend you manually load only those modules you need, but many people find it easier to let Asterisk attempt to autoload whatever it finds in /usr/lib/asterisk/modules. You can then exclude certain modules with noload => statements.

Here's a sample modules.conf file:

    autoload=no                ; set this to yes and Asterisk will load any
                               ; modules it finds in /usr/lib/asterisk/modules

    load =>
    load =>      ; Requires: N/A
    load =>       ; Requires:,
    load =>        ; Requires:
    load =>      ; Requires: N/A
    load =>       ; Requires: N/A
    load =>      ; Requires: N/A
    load =>      ; Requires: N/A
    load =>        ; Requires:,


Since we assume Asterisk is built on Linux, all the module names we use end in a .so extension. However, this may not be the case if you have built Asterisk on a different operating system.

As of this writing, there are eight module types: resources , applications, Call Detail Record database connectors, channels, codecs, formats, pbx modules, and standalone functions. Let's take a look at each of them.


A resource provides a connection to a static repository of a particular type of information, such as a unique regional requirement or a library of constant elements. This information must be configurable for each system, but once loaded it doesn't need to change in the course of normal operations.

For each resource below, we have outlined the applications and features it provides to other Asterisk modules We've indicated the .conf file used to define the resource, where needed; if no file is listed, then a configuration file isn't required. The resource modules are:

Configuration file: adsi.conf

Provides: ADSI functions to ADSIProg( ) and Voicemail( )

Provides: DeadAGI( ), EAGI( ), AGI( )

Provides: Loads public and private keys located in /var/lib/asterisk/keys/

Configuration file: features.conf

Provides: ParkedCall( ), Park( )

Configuration file: indications.conf

Provides: Playtones( ), StopPlaytones( )

Provides: Monitor( ), StopMonitor( ), ChangeMonitor( ), action Monitor, action StopMonitor, action ChangeMonitor

Configuration file: musiconhold.conf

Provides: MusicOnHold( ), WaitMusicOnHold( ), SetMusicOnHold( ), StartMusicOnHold( ), StopMusicOnHold( )

Configuration file: res_odbc.conf

Provides: Connectivity information to the ODBC172 driverthe purpose is to store configuration file information in a database and retrieve that information from the database; however, a reload is required to make changes take effect

172 Open DataBase Connectivity (ODBC) is a standard by which access to a database can be provided.


If you build an Asterisk dialplan of any size, you are going to use at least oneand more likely dozensof applications.172 If an application is never going to be used, it is not strictly required that it be loaded. For performance-challenged systems (or if you just like to keep it lean), you may elect to load only those applications that are referenced in your dialplan.

172 To be of any use, a self-contained dialplan will always require several applications. Some folks, however, use the dialplan for no other purpose than to pass control to an external application. In this case, it would be possible to have the dialplan use no application other than AGI( ). We're not recommending that you do this, but again, it demonstrates Asterisk's enormous flexibility.

For each application module, we will define any resource requirements and name the applications that the module provides. Unless we have stated otherwise, the application does not require a configuration file or any other modules. The available application modules are:


Provides: ADSIProg( )

Provides: AlarmReceiver( )

Provides: Authenticate( )

Provides: NoCDR( )

Provides: ChanIsAvail( )

Provides: ChanSpy( )

Provides: ControlPlayback( )

Provides: Curl( )

Provides: Cut( )

Provides: DBget( ), DBput( ), DBdel( ), DBdeltree( )


Provides: Dial( ), RetryDial( )

Provides: Dictate( )

Provides: Directory( )

Provides: DISA( )

Provides: DumpChan( )

Provides: Echo( )

Configuration file: enum.conf

Provides: EnumLookup( )

Provides: Eval( )

Provides: Exec( )

Provides: Festival( )

Provides: ForkCDR( )


Provides: GetCPEID( )

Provides: GetGroupCount( ), SetGroup( ), CheckGroup( ), GetGroupMatchCount( )

Provides: HasVoicemail( ), HasNewVoicemail( )

Provides: ICES( )

Provides: SendImage( )

Provides: LookupBlacklist( )

Provides: LookupCIDName( )

Provides: Macro( ), MacroExit( ), MacroIf( )

Provides: Math( )

Provides: MD5( ), MD5Check( )

Provides: Milliwatt( )

Provides: MP3Player( )

Provides: NBScat( )


Provides: ParkAndAnnounce( )

Provides: Playback( )

Provides: PrivacyManager( )


Provides: Queue( ), AddQueueMember( ), RemoveQueueMember( ), PauseQueueMember( ), UnpauseQueueMember( ), action Queues, action QueueStatus, action QueueAdd, action QueueRemove, action QueuePause

Provides: Random( )

Provides: Read( )

Provides: ReadFile( )

Provides: RealTime( ), RealTimeUpdate( )

Provides: Record( )

Provides: SayUnixTime( ), DateTime( )

Provides: SendDTMF( )

Provides: SendText( )

Provides: SetCallerPres( ), SetCallerID( )

Provides: SetCDRUserField( ), AppendCDRUserField( ), action SetCDRUserField

Provides: SetCIDName( )

Provides: SetCIDNum( )

Provides: SetRDNIS( )

Provides: SetTransferCapability( )

Provides: SMS( )

Provides: SoftHangup( )

Provides: StripLSD( ) (deprecated)

Provides: SubString( )

Provides: System( ), TRySystem( )

Provides: BackgroundDetect( )

Provides: TestClient( ), TestServer( )

Provides: transfer( )

Configuration file: enum.conf

Provides: TXTCIDName( )

Provides: SendURL( )

Provides: UserEvent( )

Provides: Verbose( )

Configuration file: voicemail.conf


Provides: VoiceMail( ), VoiceMailMain( ), MailboxExists( ), VMAuthenticate( )

Provides: WaitForRing( )

Provides: WaitForSilence( )

Provides: While( ), ExecIf( ), EndWhile( )

Provides: Zapateller( )

Asterisk normally stores Call Detail Records (CDRs) in a Comma-Separated Values (CSV) file.172 If you want CDRs to be stored in a database, you'll need to load the appropriate module and define the relevant .conf file.

 172 Information stored in a text file as Comma-Separated Values can be imported into pretty much any spreadsheet or database (yes, even stuff from Microsoft). This makes the CSV format extremely portable.

For each module below, we state the database type it supports, and specify the configuration file, if required. The CDR database connector modules are:

Provides: CSV CDR backend

Configuration file: cdr_custom.conf

Provides: Customizable CSV CDR backend

Configuration file: cdr_manager.conf

Provides: Asterisk Call Manager CDR backend

Configuration file: cdr_odbc.conf

Provides: ODBC CDR backend

Configuration file: cdr_pgsql.conf

Provides: PostgreSQL CDR backend


Next, let's take a look at the channel modules. For each channel module, we identify dependencies and list the capabilities the module provides. We show the configuratin file, if one is required. The available modules are:

Configuration file: agents.conf


Provides: channel Agent, AgentLogin( ), AgentCallbackLogin( ), AgentMonitorOutgoing( ), action Agents

Provides: channel Feature

Configuration file: iax.conf, iaxprov.conf


Provides: channel IAX2, IAX2Provision( ), function IAXPEER, action IAXPEERS, action IAXnetstats

Provides: channel Local

Configuration file: mgcp.conf


Provides: channel MGCP

Configuration file: modem.conf

Provides: channel Modem


Provides: A/Open (Rockwell Chipset) ITU-2 VoiceModem Driver


Provides: BestData (Conexant V.90 Chipset) VoiceModem Driver


Provides: ISDN4Linux Emulated Modem Driver

Provides: channel Console (soundcard required)

Configuration file: phone.conf

Provides: channel Phone

Configuration file: sip.conf, sip_notify.conf


Provides: channel SIP, SIPDtmfMode( ), SIPAddHeader( ), SIPGetHeader( ), action SIPpeers, action SIPshowpeer, function SIP_HEADER

Configuration file: skinny.conf


Provides: channel Skinny


There are several acceptable ways to pass audio information in digital form. The formulas used to encode and decode (or compress and decompress) this information are collectively referred to as codecs. Most of Asterisk's codecs are provided free of license requirements; however, some (such as G.729) are encumbered by patents and thus must be licensed before they can be used.

Asterisk will load these codecs without complaint, but if you attempt to transcode a channel using an unlicensed codec, your calls will be dropped as soon as they connect.

Here, then, are the codec modulesif there are parameters that can be defined, they will be configurable in the codecs.conf file:

Provides: translator alawtoulaw, translator ulawtoalaw

Configuration file: codecs.conf

Provides: translator adpcmtolin, TRanslator lintoadpcm

Configuration file: codecs.conf

Provides: translator alawtolin, translator lintoalaw

Configuration file: codecs.conf

Provides: translator g726tolin, TRanslator lintog726

Configuration file: codecs.conf

Provides: translator gsmtolin, translator lintogsm

Configuration file: not required

Provides: translator ilbctolin, translator lintoilbc

Configuration file: codecs.conf

Provides: translator lpc10tolin, translator lintolpc10

Configuration file: codecs.conf

Provides: translator ulawtolin, translator lintoulaw


Formats are essentially the same as codecs, except that they relate to handling files instead of live media streams. If you are talking to someone, a codec (or two) will be employed. If you are leaving a voicemail or listening to Music on Hold, a format will be involved.

Here are the current Asterisk formats. Formats do not have associated configuration files:

Provides: format g723sf

Provides: format g726-40, format g726-32, format g726-24, format g726-16

Provides: format g729

Provides: format gsm

Provides: format H263

Provides: format ilbc

Provides: format jpg

Provides: format pcm

Provides: format alaw

Provides: format sln

Provides: format vox

Provides: format wav

Provides: format wav49

PBX Core Modules

The PBX modules deliver the core functionality of the system. For each module, we show the services it provides, and list the configuration file, if one is required. At minimum, config, functions, and spool are required. dundi, loopback, and realtime are needed only if you are going to make use of their capabilities. The PBX core modules are:

Configuration file: extensions.conf

Provides: Loads dialplan into memory

Configuration file: dundi.conf


Provides: DUNDiLookup( )

Configuration file: not required

Provides: function CDR, function CHECK_MD5, function DB, function DB_EXISTS, function ENV, function EVAL, function EXISTS, function FIELDQTY, function GROUP_COUNT, function GROUP_MATCH_COUNT, function GROUP, function GROUP_LIST, function IF, function ISNULL, function LANGUAGE, function LEN, function MD5, function REGEX, function STRFTIME, function SET, function TIMEOUT

Provides: Loopback switch

Provides: Realtime switch

Provides: Outgoing spool support

Standalone Functions

There is currently only one standalone function available. This function operates identically to those in, but because it is standalone, it can be loaded (or not) completely independently of the pbx functions. The function is:

Configuration file: not required

Provides: function CALLERID