mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Updating asterisk init script in tutorial
This commit is contained in:
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/README
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/README
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/ari.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/ari.conf
Normal file → Executable file
18
data/tutorials/asterisk_events/asterisk/etc/asterisk/asterisk.conf
Normal file → Executable file
18
data/tutorials/asterisk_events/asterisk/etc/asterisk/asterisk.conf
Normal file → Executable file
@@ -1,13 +1,11 @@
|
||||
[directories]
|
||||
astetcdir => /usr/share/cgrates/tutorials/asterisk_events/asterisk/etc/asterisk
|
||||
astspooldir => /tmp/cgr_astevents/asterisk/spool
|
||||
astlogdir => /tmp/cgr_astevents/asterisk/log
|
||||
astrundir => /tmp/cgr_astevents/asterisk/run
|
||||
|
||||
[options]
|
||||
; If we want to start Asterisk with a default verbosity for the verbose
|
||||
; or debug logger channel types, then we use these settings (by default
|
||||
; they are disabled).
|
||||
;verbose = 5
|
||||
;debug = 2
|
||||
runuser = asterisk ; The user to run as. The default is root.
|
||||
rungroup = asterisk ; The group to run as. The default is root
|
||||
|
||||
; User and group to run asterisk as. NOTE: This will require changes to
|
||||
; directory and device permissions.
|
||||
;runuser = asterisk ; The user to run as. The default is root.
|
||||
;rungroup = asterisk ; The group to run as. The default is root
|
||||
|
||||
;defaultlanguage = es
|
||||
|
||||
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/cdr.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/cdr.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/cdr_custom.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/cdr_custom.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/confbridge.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/confbridge.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/extensions.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/extensions.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/indications.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/indications.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/logger.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/logger.conf
Normal file → Executable file
2
data/tutorials/asterisk_events/asterisk/etc/asterisk/manager.conf
Normal file → Executable file
2
data/tutorials/asterisk_events/asterisk/etc/asterisk/manager.conf
Normal file → Executable file
@@ -19,7 +19,7 @@
|
||||
; default is 60 seconds.
|
||||
;
|
||||
[general]
|
||||
enabled = no
|
||||
enabled = yes
|
||||
;webenabled = yes
|
||||
|
||||
port = 5038
|
||||
|
||||
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/modules.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/modules.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/musiconhold.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/musiconhold.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/pjsip.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/pjsip.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/queues.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/queues.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/voicemail.conf
Normal file → Executable file
0
data/tutorials/asterisk_events/asterisk/etc/asterisk/voicemail.conf
Normal file → Executable file
@@ -20,11 +20,18 @@
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
NAME=asterisk
|
||||
DESC="Asterisk PBX"
|
||||
TUTDIR=/usr/share/cgrates/tutorials/asterisk_events/asterisk
|
||||
TMP_DIR=/tmp/cgr_astevents/asterisk
|
||||
# Full path to asterisk binary
|
||||
DAEMON=__ASTERISK_SBIN_DIR__/asterisk
|
||||
ASTVARRUNDIR=__ASTERISK_VARRUN_DIR__
|
||||
ASTETCDIR=__ASTERISK_ETC_DIR__
|
||||
DAEMON=/usr/sbin/asterisk
|
||||
ASTVARRUNDIR=$TMP_DIR/run
|
||||
LOGDIR=$TMP_DIR/log
|
||||
SPOOLDIR=$TMP_DIR/spool
|
||||
ALTCONF=$TUTDIR/etc/asterisk/asterisk.conf
|
||||
TRUE=/bin/true
|
||||
AST_USER="asterisk"
|
||||
AST_GROUP="asterisk"
|
||||
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: asterisk
|
||||
@@ -50,6 +57,16 @@ if ! [ -d $ASTETCDIR ] ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ ! -d $LOGDIR ]; then
|
||||
mkdir -p $LOGDIR
|
||||
chown -R $AST_USER:$AST_GROUP $LOGDIR
|
||||
fi
|
||||
|
||||
if [ ! -d $SPOOLDIR ]; then
|
||||
mkdir -p $SPOOLDIR
|
||||
chown -R $AST_USER:$AST_GROUP $SPOOLDIR
|
||||
fi
|
||||
|
||||
# Use the LSB standard functions for services management
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
@@ -77,7 +94,7 @@ case "$1" in
|
||||
mkdir -p $ASTVARRUNDIR
|
||||
fi
|
||||
if [ $AST_USER ] ; then
|
||||
ASTARGS="-U $AST_USER"
|
||||
ASTARGS="$ASTARGS -U $AST_USER"
|
||||
chown $AST_USER $ASTVARRUNDIR
|
||||
fi
|
||||
if [ $AST_GROUP ] ; then
|
||||
@@ -85,7 +102,7 @@ case "$1" in
|
||||
chgrp $AST_GROUP $ASTVARRUNDIR
|
||||
fi
|
||||
if [ $ALTCONF ]; then
|
||||
ASTARGS="$ASTARGS -C \"$ALTCONF\""
|
||||
ASTARGS="$ASTARGS -C $ALTCONF"
|
||||
fi
|
||||
if [ "x$COREDUMP" = "xyes" ]; then
|
||||
ASTARGS="$ASTARGS -g"
|
||||
|
||||
Reference in New Issue
Block a user