Upgrade 3CX to v18 and get it hosted free!

Asterisk config asterisk.conf

Author image

In asterisk.conf you specify:

  • location, permissions and ownership for the socket used to connect from a remote console
  • locations for various directories used by Asterisk to store configuration files, log files, library files and scripts
  • default command line options

NOTE: Due to a bug in asterisk.c (bug report #6609), options specified in asterisk.conf will override any command line options specified when invoking asterisk. If you do not wish this behaviour, do not specify the respective option in asterisk.conf.

NOTE: The default asterisk.conf is broken in Ubuntu (Hardy) and Debian (Lenny), as it lists the directories in the global section, as opposed to the directories section.

Sample config

[files]
astctlpermissions => 700
astctlowner => asterisk
astctlgroup => asterisk
astctl => /var/run/asterisk.ctl

[directories]
astetcdir => /etc/asterisk
astspooldir => /var/spool/asterisk
astvarlibdir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astlogdir => /var/log/asterisk
astagidir => /var/lib/asterisk/agi-bin
astrundir => /var/run
astmoddir => /usr/lib/asterisk/modules

[options]
verbose => 3 ; NOTE: this option prevents Asterisk forking on startup
alwaysfork => yes ; This will force a fork on startup if verbose is set
timestamp => yes
execincludes => yes
optiondebug => no
nofork => no
quiet => no
console => no
highpriority => no
initcrypto => no
nocolor = yes
dontwarn = no
dumpcore => yes
cache_record_files => yes
record_cache_dir => /private/tmp
transcode_via_sln => yes
transmit_silence_during_record = yes
maxcalls => 0
maxload => 0.0
runuser => asterisk
rungroup => asterisk
systemname => foobar
lockmode = lockfile | flock ; NOTE: This option was added in version1.6

astdatadir for example determines where asterisk looks for the sound files. If you set astdatadir to /usr/local/share/asterisk asterisk will look for files /usr/local/share/asterisk/sounds/test.* when you execute Playback(test).


Article Reviews

Write a Review

Your email address will not be published. Required fields are marked *

Required Field. Minimum 5 characters.

Required Field. Minimum 5 characters, maximum 50.

Required field.There is an error with this field.

Required Field.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

There are no reviews for this article. Be the first one to write a review.

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.