This commit is contained in:
2021-06-29 12:37:08 +03:00
commit 12fdc96d20
282 changed files with 13627 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
[directories]
astcachedir => /var/cache/asterisk
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

View File

@@ -0,0 +1,5 @@
[internal]
exten = 100,1,Answer()
same = n,Wait(1)
same = n,Playback(test)
same = n,Hangup()

View File

@@ -0,0 +1,56 @@
;
; Asterisk configuration file
;
; Module Loader configuration file
;
[modules]
autoload=yes
;
; Any modules that need to be loaded before the Asterisk core has been
; initialized (just after the logger initialization) can be loaded
; using 'preload'. 'preload' forces a module and the modules it
; is known to depend upon to be loaded earlier than they normally get
; loaded.
;
; NOTE: There is no good reason left to use 'preload' anymore. It was
; historically required to preload realtime driver modules so you could
; map Asterisk core configuration files to Realtime storage.
; This is no longer needed.
;
;preload = your_special_module.so
;
; If you want Asterisk to fail if a module does not load, then use
; the "require" keyword. Asterisk will exit with a status code of 2
; if a required module does not load.
;
;require = chan_pjsip.so
;
; If you want you can combine with preload
; preload-require = your_special_module.so
;
;load = res_musiconhold.so
;
; Load one of: chan_oss, alsa, or console (portaudio).
; By default, load chan_oss only (automatically).
;
noload = chan_alsa.so
noload = chan_console.so
;noload = chan_oss.so
;
; Do not load res_hep and kin unless you are using HEP monitoring
; <http://sipcapture.org> in your network.
;
noload = res_hep.so
noload = res_hep_pjsip.so
noload = res_hep_rtcp.so
;
; Do not load chan_sip by default, it may conflict with res_pjsip.
noload = chan_sip.so
;
; Load one of the voicemail modules as they are mutually exclusive.
; By default, load app_voicemail only (automatically).
;
;noload = app_voicemail.so
noload = app_voicemail_imap.so
noload = app_voicemail_odbc.so

View File

@@ -0,0 +1,22 @@
[general]
type=transport
protocol=udp
bind=0.0.0.0
[1001]
type = endpoint
context = internal
disallow=all
allow=ulaw
aors = 1001
auth = auth1001
[1001]
type = aor
max_contacts = 1
[auth1001]
type=auth
auth_type=userpass
password=1234
username=1001

View File

@@ -0,0 +1,13 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
CONFIG_FILES=$(bashio::config 'config_files')
for config in $CONFIG_FILES; do
bashio::log.info "Apply '$config'"
cp "$config" '/etc/asterisk/'
done
chown -R asterisk:asterisk /etc/asterisk
chmod 640 -R /etc/asterisk

View File

@@ -0,0 +1 @@
/var/lib/asterisk/sounds/test.wav false asterisk:asterisk 0640 0640

View File

@@ -0,0 +1,8 @@
#!/usr/bin/with-contenv bashio
set -e
# Enable Jemalloc for better memory handling
export LD_PRELOAD="/usr/local/lib/libjemalloc.so.2"
bashio::log.info 'Start Asterisk'
asterisk -T -W -p -f -dd