asterisk.conf

asterisk.conf

Мы продолжаем рассматривать конфигурационные файлы Asterisk. В данной статье мы еще раз поговорим о конфигурационном файле /etc/asterisk/asterisk.conf а приведем примеры его использования.

В файле конфигурации asterisk.conf Вы определяете следующее:

  • Местоположение, права доступа и владельца сокета, которые используется для подключения удаленной консоли управления сервером.
  • Местоположение различных директорий, используемых сервером Asterisk для определения местоположения файлов конфигурации, библиотек, скриптов и место, где будут создаваться лог фалы.
  • Параметры командной строки запуска сервера, используемые по умолчанию.
Пример конфигурации.
Директории используемые в Asterisk.
[directories](!)
astetcdir => /etc/asterisk
astmoddir => /usr/lib/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk
astsbindir => /usr/sbin

astetcdir => /etc/asterisk

Конфигурационные .conf файлы.
asterisk.conf
ccss.conf
ccss_general_additional.conf
ccss_general_custom.conf
cdr_adaptive_odbc.conf
cdr.conf
cdr_mysql.conf
cdr_mysql.conf.bak
cel.conf
cel_custom_post.conf
cel_general_additional.conf
cel_general_custom.conf
cel_odbc.conf
cel_odbc_custom.conf
chan_dahdi_additional.conf
chan_dahdi.conf
chan_dahdi.conf.bk
chan_dahdi.conf.template
confbridge_additional.conf
confbridge.conf
confbridge_custom.conf
dahdi-channels.conf
dahdi-channels.conf.bak
enum.conf
extensions_additional.conf
extensions.conf
extensions_custom.conf
extensions_custom.conf.sample
extensions_override_freepbx.conf
features_applicationmap_additional.conf
features_applicationmap_custom.conf
features.conf
features_featuremap_additional.conf
features_featuremap_custom.conf
features_general_additional.conf
features_general_custom.conf
freepbx_featurecodes.conf.template
freepbx_menu.conf.template
freepbx_module_admin.conf
globals_custom.conf
http_additional.conf
http.conf
http_custom.conf
iax_additional.conf
iax.conf
iax_custom.conf
iax_custom_post.conf
iax_general_additional.conf
iax_general_custom.conf
iax_registrations.conf
iax_registrations_custom.conf
indications.conf
localprefixes.conf
logger.conf
logger_general_additional.conf
logger_general_custom.conf
logger_logfiles_additional.conf
logger_logfiles_custom.conf
manager_additional.conf
manager.conf
manager.conf.bak
manager_custom.conf
meetme_additional.conf
meetme.conf
modem.conf
modules.conf
musiconhold_additional.conf
musiconhold.conf
musiconhold_custom.conf
phone.conf
phpagi.conf
privacy.conf
queuerules_additional.conf
queuerules.conf
queuerules_custom.conf
queues_additional.conf
queues.conf
queues_custom.conf
queues_custom_general.conf
queues_general_additional.conf
queues_post_custom.conf
res_digium_phone_additional.conf
res_digium_phone_applications.conf
res_digium_phone.conf
res_digium_phone_devices.conf
res_digium_phone_firmware.conf
res_digium_phone_general.conf
res_fax.conf
res_fax_custom.conf
res_fax_digium.conf
res_fax_digium_custom.conf
res_odbc_additional.conf
res_odbc.conf
res_odbc_custom.conf
rtp_additional.conf
rtp.conf
rtp_custom.conf
sip_additional.conf
sip.conf
sip_custom.conf
sip_custom_post.conf
sip_general_additional.conf
sip_general_custom.conf
sip_nat.conf
sip_notify_additional.conf
sip_notify.conf
sip_notify_custom.conf
sip_registrations.conf
sip_registrations_custom.conf
udptl.conf
udptl_custom.conf
version
vm_email.inc
vm_general.inc
voicemail.conf
voicemail.conf.template
zapata.conf.template

astmoddir => /usr/lib/asterisk/modules

Модули (applications, codec, functions)
app_adsiprog.so
app_alarmreceiver.so
app_amd.so
app_authenticate.so
app_cdr.so
app_celgenuserevent.so
app_chanisavail.so
app_channelredirect.so
app_chanspy.so
app_confbridge.so
app_controlplayback.so
app_dahdibarge.so
app_dahdiras.so
app_db.so
app_dial.so
app_dictate.so
app_directed_pickup.so
app_directory.so
app_disa.so
app_dumpchan.so
app_echo.so
app_exec.so
app_externalivr.so
app_festival.so
app_flash.so
app_followme.so
app_forkcdr.so
app_getcpeid.so
app_ices.so
app_image.so
app_jack.so
app_macro.so
app_meetme.so
app_milliwatt.so
app_minivm.so
app_mixmonitor.so
app_morsecode.so
app_mp3.so
app_mysql.so
app_nbscat.so
app_originate.so
app_page.so
app_parkandannounce.so
app_playback.so
app_playtones.so
app_privacy.so
app_queue.so
app_readexten.so
app_read.so
app_record.so
app_saycountpl.so
app_sayunixtime.so
app_senddtmf.so
app_sendtext.so
app_sms.so
app_softhangup.so
app_speech_utils.so
app_stack.so
app_system.so
app_talkdetect.so
app_test.so
app_transfer.so
app_url.so
app_userevent.so
app_verbose.so
app_voicemail.so
app_waitforring.so
app_waitforsilence.so
app_waituntil.so
app_while.so
app_zapateller.so
bridge_builtin_features.so
bridge_multiplexed.so
bridge_simple.so
bridge_softmix.so
cdr_adaptive_odbc.so
cdr_csv.so
cdr_custom.so
cdr_manager.so
cdr_mysql.so
cdr_odbc.so
cdr_radius.so
cdr_syslog.so
cel_custom.so
cel_manager.so
cel_odbc.so
cel_radius.so
chan_agent.so
chan_bridge.so
chan_console.so
chan_dahdi.so
chan_iax2.so
chan_local.so
chan_mgcp.so
chan_mobile.so
chan_motif.so
chan_multicast_rtp.so
chan_ooh323.so
chan_oss.so
chan_phone.so
chan_sip.so
chan_skinny.so
chan_unistim.so
codec_adpcm.so
codec_alaw.so
codec_a_mu.so
codec_dahdi.so
codec_g722.so
codec_g726.so
codec_gsm.so
codec_ilbc.so
codec_lpc10.so
codec_ulaw.so
format_g719.so
format_g723.so
format_g726.so
format_g729.so
format_gsm.so
format_h263.so
format_h264.so
format_ilbc.so
format_jpeg.so
format_mp3.so
format_pcm.so
format_siren14.so
format_siren7.so
format_sln.so
format_vox.so
format_wav_gsm.so
format_wav.so
func_aes.so
func_audiohookinherit.so
func_base64.so
func_blacklist.so
func_callcompletion.so
func_callerid.so
func_cdr.so
func_channel.so
func_config.so
func_curl.so
func_cut.so
func_db.so
func_devstate.so
func_dialgroup.so
func_dialplan.so
func_enum.so
func_env.so
func_extstate.so
func_frame_trace.so
func_global.so
func_groupcount.so
func_hangupcause.so
func_iconv.so
func_jitterbuffer.so
func_lock.so
func_logic.so
func_math.so
func_md5.so
func_module.so
func_odbc.so
func_pitchshift.so
func_presencestate.so
func_rand.so
func_realtime.so
func_sha1.so
func_shell.so
func_speex.so
func_sprintf.so
func_srv.so
func_strings.so
func_sysinfo.so
func_timeout.so
func_uri.so
func_version.so
func_vmcount.so
func_volume.so
pbx_ael.so
pbx_config.so
pbx_dundi.so
pbx_loopback.so
pbx_lua.so
pbx_realtime.so
pbx_spool.so
res_adsi.so
res_ael_share.so
res_agi.so
res_calendar_caldav.so
res_calendar_ews.so
res_calendar_exchange.so
res_calendar_icalendar.so
res_calendar.so
res_clialiases.so
res_clioriginate.so
res_config_curl.so
res_config_ldap.so
res_config_mysql.so
res_config_odbc.so
res_config_sqlite3.so
res_config_sqlite.so
res_convert.so
res_crypto.so
res_curl.so
res_digium_phone.so
res_fax.so
res_fax_spandsp.so
res_format_attr_celt.so
res_format_attr_h263.so
res_format_attr_h264.so
res_format_attr_silk.so
res_http_websocket.so
res_limit.so
res_monitor.so
res_musiconhold.so
res_mutestream.so
res_mwi_blf.so
res_odbc.so
res_phoneprov.so
res_pktccops.so
res_realtime.so
res_rtp_asterisk.so
res_rtp_multicast.so
res_security_log.so
res_smdi.so
res_speech.so
res_srtp.so
res_stun_monitor.so
res_timing_dahdi.so
res_timing_pthread.so
res_timing_timerfd.so
res_xmpp.so

astvarlibdir => /var/lib/asterisk

Скрипты, документация, звуковые файлы, изображения, лицензии.
/agi-bin
astdb.sqlite3
/bin
/documentation
/images
/keys
/licenses
/moh
/phoneprov
/sounds
/static-http

/var/lib/asterisk/bin

archive_recordings
audio-email.pl
backup.php
callback
callerid_updater.php
enc
endpoint_firmware.php
fax2mail.php
faxpro_background.php
faxpro_helper.php
freepbx-cron-scheduler.php
freepbx_engine
freepbx_engine_hook_dahdiconfig
freepbx_engine_hook_endpoint
freepbx_engine_hook_pagingpro
freepbx_engine_hook_restapps
freepbx_engine_hook_sysadmin
freepbx_engine_hook_xmpp
freepbx_setting
gen_amp_conf.php
generate_hints.php
generate_queue_hints.php
libfreepbx.confgen.php
module_admin
one_touch_record.php
opencnam-alert.php
pagepro-scheduler.php
pagepro-startup.php
queue_reset_stats.php
restore.php
retrieve_conf
retrieve_parse_amportal_conf.pl
schedtc.php
storage.php

astspooldir => /var/spool/asterisk

Директории для файлов создаваемых Asterisk в процессе работы. Например: Записи разговоров, принятые факсы, голосовая почта, call-файлы итд.
/fax
/meetme
/monitor
/outgoing
/sysadmin
/system
/tmp
/voicemail

astrundir => /var/run/asterisk

Место куда Asterisk записывает UNIX control socket файл (asterisk.ctl) и файл ID процесса (asterisk.pid)
asterisk.ctl
asterisk.pid

astlogdir => /var/log/asterisk

Файлы логов Asterisk. Настройки вывода логов производятся в файле Asterisk logger.conf
/cdr-csv ;директории CDR файлов
/cdr-custom
full
queue_log
а также могут быть:
fail2ban ;
freepbx_debug
freepbx.log

astsbindir => /usr/sbin

Исполняемые файлы Asterisk.
asterisk
rasterisk
safe_asterisk

Раздел (секция) [options]
Включить выполнение «опасных» функций из внешних источников (AMI, AGI и тд)
Некоторые функции и приложения (например, такие как SHELL) опасны тем, что могут предоставлять дополнительные привилегии. По умолчанию = no.
asterisk.conf

[options]
;verbose = 3
;debug = 3
;alwaysfork = yes ; Same as -F at startup.
;nofork = yes ; Same as -f at startup.
;quiet = yes ; Same as -q at startup.
;timestamp = yes ; Same as -T at startup.
;execincludes = yes ; Support #exec in config files.
;console = yes ; Run as console (same as -c at startup).
;highpriority = yes ; Run realtime priority (same as -p at startup).
;initcrypto = yes ; Initialize crypto keys (same as -i at startup).
;nocolor = yes ; Disable console colors.
;dontwarn = yes ; Disable some warnings.
;dumpcore = yes ; Dump core on crash (same as -g at startup).
;languageprefix = yes ; Use the new sound prefix path syntax.
;internal_timing = yes
;systemname = my_system_name ; Prefix uniqueid with a system name for
; Global uniqueness issues.
;autosystemname = yes ; Automatically set systemname to hostname,
; uses 'localhost' on failure, or systemname if
; set.
;mindtmfduration = 80 ; Set minimum DTMF duration in ms (default 80 ms)
; If we get shorter DTMF messages, these will be
; changed to the minimum duration
;maxcalls = 10 ; Maximum amount of calls allowed.
;maxload = 0.9 ; Asterisk stops accepting new calls if the
; load average exceed this limit.
;maxfiles = 1000 ; Maximum amount of openfiles.
;minmemfree = 1 ; In MBs, Asterisk stops accepting new calls if
; the amount of free memory falls below this
; watermark.
;cache_record_files = yes ; Cache recorded sound files to another
; directory during recording.
;record_cache_dir = /tmp ; Specify cache directory (used in conjunction
; with cache_record_files).
;transmit_silence = yes ; Transmit silence while a channel is in a
; waiting state, a recording only state, or
; when DTMF is being generated. Note that the
; silence internally is generated in raw signed
; linear format. This means that it must be
; transcoded into the native format of the
; channel before it can be sent to the device.
; It is for this reason that this is optional,
; as it may result in requiring a temporary
; codec translation path for a channel that may
; not otherwise require one.
;transcode_via_sln = yes ; Build transcode paths via SLINEAR, instead of
; directly.
;runuser = asterisk ; The user to run as.
;rungroup = asterisk ; The group to run as.
;lightbackground = yes ; If your terminal is set for a light-colored
; background.
;forceblackbackground = yes ; Force the background of the terminal to be
; black, in order for terminal colors to show
; up properly.
;defaultlanguage = en ; Default language
documentation_language = en_US ; Set the language you want documentation
; displayed in. Value is in the same format as
; locale names.
;hideconnect = yes ; Hide messages displayed when a remote console
; connects and disconnects.
;lockconfdir = no ; Protect the directory containing the
; configuration files (/etc/asterisk) with a
; lock.
;stdexten = gosub ; How to invoke the extensions.conf stdexten.
; macro - Invoke the stdexten using a macro as
; done by legacy Asterisk versions.
; gosub - Invoke the stdexten using a gosub as
; documented in extensions.conf.sample.
; Default gosub.
;live_dangerously = no ; Enable the execution of 'dangerous' dialplan
; functions from external sources (AMI,
; etc.) These functions (such as SHELL) are
; considered dangerous because they can allow
; privilege escalation.
; Default yes, for backward compatability.
; Changing the following lines may compromise your security.
;[files]
;astctlpermissions = 0660
;astctlowner = root
;astctlgroup = apache
;astctl = asterisk.ctl
[compat]
pbx_realtime=1.6
res_agi=1.6
app_set=1.6

Любое использование материалов сайта возможно только с разрешения автора и с обязательным указанием источника.