Streamlining Asterisk configuration - SIP only

Part of the greatness of Asterisk is it’s flexibility with so many codecs and protocols. However, if I know I’ll only be using SIP with G711 over the Internet would it help to disable everything else? If so, how does one go about that? I googled and searched the forums to no avail.

I don’t know if it helps to disable all codecs except the one you will use, however this topic explain how to enable only the codecs you want/need:


Thanks for the reply.
Guess I should have been more specific.
I’m more interested in disabling protocols like IAX, google talk, h323, zap etc. and if doing so will allow the same hardware to handle more SIP connections.

hmm… been reading … k+channels

It mentions how to configure channels but I’d really like to disable channels completely. If Asterisk is loading any libraries or modules for the channel it’s probably consuming some memory unnecessarily.

Yes, now I understood better, check the file /etc/asterisk/modules.conf, you should find something useful inside.


yeah. All you have to do is set the modules you dont want to load in /etc/asterisk/modules.conf. ie… to not load IAX

noload =>

That’s exactly what I was looking for. Thanks for your help.

I’m using a new modules.conf that only enables the modules I think I’ll need. I only need SIP protocols and some PBX functionality like answering calls and asking for an extension. Some softphones connected to asterisk have a direct number and others are answered by Asterisk. The direct calls work great but Asterisk is having a problem playing the sounds. If I revert back to the default modules.conf everything works fine so I’m probably just missing a module. I’m using Background() to play the files. Below is the error and my modules.conf:

[Jun 22 11:05:30] WARNING[9365] file.c: File thank-you-for-calling does not exist in any format [Jun 22 11:05:30] WARNING[9365] file.c: Unable to open thank-you-for-calling (format 0x4 (ulaw)): Resource temporarily unavailable [Jun 22 11:05:30] WARNING[9365] pbx.c: ast_streamfile failed on SIP/100-0821c090 for thank-you-for-calling

[modules] load => load => load => load => load => load => load => load => load => load => load => load => load =>