initial commit of a *whole bunch* of old Egressive shell scripts, used to make many people redundant.
This commit is contained in:
commit
43e0f5b59e
329 changed files with 31937 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
obsolete/*
|
20
ebu/conf/daily.conf
Normal file
20
ebu/conf/daily.conf
Normal file
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# configuration file for /etc/ebu/ebu, a simple script for doing
|
||||
# tar-based backups.
|
||||
#
|
||||
# base filename for the backups...
|
||||
BU_FROOT="daily"
|
||||
CURRENT_LINK="Current"
|
||||
#
|
||||
# directory in which to save the backups...
|
||||
BU_DIR=/extra/apu
|
||||
#
|
||||
# directories to back up
|
||||
FILES="/home /etc /var/www /var/spool/mail"
|
||||
#
|
||||
# directories/files to exclude
|
||||
EXCLUDE=" home/sites/subversion home/vmware home/server *.log *Cache* *cache* *~ */tmp *nobackup*"
|
||||
#
|
||||
# removal all but the $BU_TO_KEEP most recent
|
||||
# backups.
|
||||
BU_TO_KEEP=2
|
20
ebu/conf/weekly.conf
Normal file
20
ebu/conf/weekly.conf
Normal file
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# configuration file for /etc/ebu/ebu, a simple script for doing
|
||||
# tar-based backups.
|
||||
#
|
||||
# base filename for the backups...
|
||||
BU_FROOT="weekly"
|
||||
CURRENT_LINK="Current"
|
||||
#
|
||||
# directory in which to save the backups...
|
||||
BU_DIR=/extra/apu
|
||||
#
|
||||
# directories to back up
|
||||
FILES="/home /etc /var/www /var/spool/mail"
|
||||
#
|
||||
# directories/files to exclude
|
||||
EXCLUDE=" home/sites/subversion home/vmware home/server *.log *Cache* *cache* *~ */tmp *nobackup*"
|
||||
#
|
||||
# removal all but the $BU_TO_KEEP most recent
|
||||
# backups.
|
||||
BU_TO_KEEP=2
|
349
ebu/ebu
Executable file
349
ebu/ebu
Executable file
|
@ -0,0 +1,349 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Simple script to do a comprehensive regular tar backup of build.egressive.com
|
||||
# Copyright 1999-2003, David Lane for Egressive Limited, www.egressive.com
|
||||
#
|
||||
#
|
||||
VERSION=0.7.0
|
||||
NAME=ebu
|
||||
#
|
||||
# Defaults
|
||||
#
|
||||
# default email address to which to send backup reports
|
||||
DEF_EMAIL=root@localhost
|
||||
#
|
||||
# default email subject
|
||||
DEF_EMAIL_SUBJ="Default Backup report"
|
||||
#
|
||||
# default configuration file
|
||||
DEF_BU_CONF=/etc/egscripts/ebu/ebu.conf
|
||||
#
|
||||
# default log file
|
||||
DEF_LOG=/var/log/ebu.log
|
||||
#
|
||||
# default filename root
|
||||
DEF_BU_FROOT="defaultname"
|
||||
#
|
||||
#
|
||||
DEF_STAT_DIR=/var/log/stats
|
||||
#
|
||||
# for pruning old backups
|
||||
#
|
||||
# build list of possible pruning candidates
|
||||
BU_SUFFIX="tgz"
|
||||
LIST_SUFFIX="list"
|
||||
#
|
||||
# pattern for "ls" command to build list of
|
||||
# pruneable backup files...
|
||||
# -1t = 1 column, ordered by time of last mod
|
||||
PRUNEABLES_CMD="ls -1t"
|
||||
#
|
||||
# Commands
|
||||
#
|
||||
# tar command
|
||||
TAR=/bin/tar
|
||||
# tar command options
|
||||
FLAGS=" cvfz "
|
||||
# grep command
|
||||
GREP=/bin/grep
|
||||
# wc (word count) command
|
||||
WC=/usr/bin/wc
|
||||
# awk command
|
||||
AWK=/bin/awk
|
||||
# don't worry, this is just used to determine if the
|
||||
# disk is installed - it's not going to change the partition table!
|
||||
FDISK=/sbin/fdisk
|
||||
# determine today's date
|
||||
DATE=`date '+%Y-%m-%d-%a'`
|
||||
# determine today's date
|
||||
TIME=`date '+%H-%M-%S'`
|
||||
# email program
|
||||
MAIL=/bin/mail
|
||||
#
|
||||
# temporary holding point for email
|
||||
TMP_EMAIL=/tmp/tmp_email.$DATE_$TIME
|
||||
#
|
||||
# function to direct a message...
|
||||
message() {
|
||||
#
|
||||
# a timestamp for logging purposes
|
||||
TIMESTAMP=`date '+%Y-%m-%d %H:%M.%S'`
|
||||
echo "$0: $TIMESTAMP $@" >> $LOG
|
||||
if test -f $TMP_EMAIL ; then
|
||||
echo "$0: $TIMESTAMP $@" >> $TMP_EMAIL
|
||||
fi
|
||||
verbose "$TIMESTAMP $@"
|
||||
}
|
||||
#
|
||||
# create the temporary email file
|
||||
create_tmp_email() {
|
||||
touch $TMP_EMAIL
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "created temporary email file: $TMP_EMAIL"
|
||||
else
|
||||
message "failed to create temporary email file: $TMP_EMAIL"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# send the contents of the temporary file to the
|
||||
# designated report recipient
|
||||
send_email_report() {
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "sending email report to $EMAIL"
|
||||
$MAIL -s "$EMAIL_SUBJ" $EMAIL < $TMP_EMAIL
|
||||
rm $TMP_EMAIL
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "failed to remove temporary email file: $TMP_EMAIL"
|
||||
else
|
||||
message "successfully removed temporary email file: $TMP_EMAIL"
|
||||
fi
|
||||
message "email report successfully sent"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# insert a blank line into the log and on the console
|
||||
insert_blank() {
|
||||
echo "" >> $LOG
|
||||
verbose ""
|
||||
}
|
||||
#
|
||||
# function to direct a message...
|
||||
verbose() {
|
||||
if test $VERBOSE = 1 ; then
|
||||
echo "$@"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# build excludes list
|
||||
build_excludes() {
|
||||
message "building excludes"
|
||||
for PAT in $EXCLUDE
|
||||
do
|
||||
EXCLUDES="$EXCLUDES --exclude $PAT"
|
||||
done
|
||||
}
|
||||
#
|
||||
# function to initiate backup
|
||||
backup() {
|
||||
build_excludes
|
||||
EBU_NAME=`basename $0`
|
||||
BU_CONF_NAME=`basename $BU_CONF`
|
||||
echo "CURRENT_LINK = $CURRENT_LINK"
|
||||
if test ! $CURRENT_LINK = "none" ; then
|
||||
message "removing link: $BU_DIR/$CURRENT_LINK"
|
||||
# first remove any existing link
|
||||
rm $BU_DIR/$CURRENT_LINK.$BU_SUFFIX
|
||||
fi
|
||||
BU_CMD="$TAR $FLAGS $BU_DIR/$BU_FILE $FILES $EXCLUDES"
|
||||
message "Executing backup command: $BU_CMD"
|
||||
$BU_CMD > $BU_DIR/$BU_LIST
|
||||
if test "$?" -ne "0" ; then
|
||||
MSGCONF=`basename $BU_CONF`
|
||||
message "-------Backup ended with error, error: $? ----------"
|
||||
echo "error: $?" > $STAT_DIR/$NAME-$MSGCONF
|
||||
else
|
||||
message "+++++++Backup $BU_FILE successfully finished++++++++"
|
||||
NUM_FILES=`$WC $BU_DIR/$BU_LIST | $AWK '{print $1}'`
|
||||
message "Backed up $NUM_FILES files..."
|
||||
message "Backup size: `ls -l $BU_DIR/$BU_FILE | $AWK '{print $5;}'` bytes"
|
||||
echo "success: $NUM_FILES backed up (`ls -l $BU_DIR/$BU_FILE | $AWK '{print $5;}'` bytes)" > $STAT_DIR/$NAME-$MSGCONF
|
||||
# if the variable $CURRENT_LINK is defined in the .conf file, make
|
||||
# a link to it.
|
||||
if test ! $CURRENT_LINK = "none" ; then
|
||||
message "Linking $BU_DIR/$CURRENT_LINK to $BU_DIR/$BU_FILE..."
|
||||
# create a new link to the current archive
|
||||
ln -f $BU_DIR/$BU_FILE $BU_DIR/$CURRENT_LINK.$BU_SUFFIX
|
||||
fi
|
||||
if [ -e "$BU_DIR/$BU_LIST.gz" ]; then
|
||||
rm $BU_DIR/$BU_LIST.gz
|
||||
fi
|
||||
gzip $BU_DIR/$BU_LIST
|
||||
fi
|
||||
}
|
||||
#
|
||||
# delete old backups
|
||||
delete_old() {
|
||||
#
|
||||
if test -n $BU_FROOT && test -n $BU_TO_KEEP ; then
|
||||
# pattern to search for to build the list...
|
||||
PATTERN="$BU_DIR/$BU_FROOT.*"
|
||||
# build the list, with the suffix...
|
||||
PRUNEABLES=`$PRUNEABLES_CMD $PATTERN.$BU_SUFFIX`
|
||||
if test "$?" -eq "0" ; then
|
||||
message "pruning older files based on $PATTERN.$BU_SUFFIX"
|
||||
message "keeping last $BU_TO_KEEP backups"
|
||||
#
|
||||
# set counter
|
||||
NUM=0
|
||||
# go through the list of files and remove those we don't want
|
||||
for PRUNEABLE in $PRUNEABLES
|
||||
do
|
||||
NUM=$(($NUM + 1))
|
||||
if test $NUM -gt $BU_TO_KEEP ; then
|
||||
message "deleting $PRUNEABLE and associated list files"
|
||||
BASE=`basename $PRUNEABLE .$BU_SUFFIX`
|
||||
rm $BU_DIR/$BASE.$BU_SUFFIX 2>&1 > /dev/null
|
||||
rm $BU_DIR/$BASE.$LIST_SUFFIX 2>&1 > /dev/null
|
||||
rm $BU_DIR/$BASE.$LIST_SUFFIX.gz 2>&1 > /dev/null
|
||||
else
|
||||
message "keeping $PRUNEABLE"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
else
|
||||
message "keeping older backups, missing backup_root_filename..."
|
||||
fi
|
||||
}
|
||||
#
|
||||
# control loop, using external arguments
|
||||
#
|
||||
# process command line arguments
|
||||
#
|
||||
# set some default values, so that we can test if they've
|
||||
# been set in the configuration file...
|
||||
VERBOSE=0
|
||||
BU_CONF=0
|
||||
CURRENT_LINK="none"
|
||||
LOG=""
|
||||
TMP_EMAIL=/dev/null
|
||||
#
|
||||
# set the default mode in case somebody figures out how to get
|
||||
# past the options below...
|
||||
MODE=help
|
||||
#
|
||||
# cycle through the commandline options
|
||||
while test $# -ne 0 ; do # while there are arguments
|
||||
case $1 in
|
||||
--fileroot|-r)
|
||||
shift
|
||||
verbose "setting file root to $1"
|
||||
BU_FROOT=$1
|
||||
;;
|
||||
--config|-c)
|
||||
shift # shift from the flag to the value
|
||||
verbose "setting configuration file to $1"
|
||||
BU_CONF=$1 # record the value
|
||||
;;
|
||||
--email|-e)
|
||||
shift # shift from the flag to the value
|
||||
verbose "setting temporary email file to $1"
|
||||
TMP_EMAIL=$1 # record the value
|
||||
;;
|
||||
--log|-l)
|
||||
shift # shift from the flag to the value
|
||||
verbose "setting log file to $1"
|
||||
LOG=$1 # record the value
|
||||
;;
|
||||
--verbose|-v)
|
||||
VERBOSE=1
|
||||
verbose "setting verbosity to true"
|
||||
;;
|
||||
--backup|-b)
|
||||
MODE=backup
|
||||
verbose "setting mode to $MODE"
|
||||
;;
|
||||
--delete_old|-d)
|
||||
MODE=delete_old
|
||||
verbose "setting mode to $MODE"
|
||||
;;
|
||||
--help|-?|?|-h)
|
||||
MODE=help
|
||||
verbose "setting mode to $MODE"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
#
|
||||
# read in config info, from the config
|
||||
# file provided, or, if none is provided
|
||||
# from the default file...
|
||||
if test -f $BU_CONF ; then
|
||||
. $BU_CONF
|
||||
verbose "reading config file: $BU_CONF"
|
||||
elif test -f "$DEF_BU_CONF" ; then
|
||||
verbose "reading default config file: $DEF_BU_CONF"
|
||||
. "$DEF_BU_CONF"
|
||||
else
|
||||
verbose "config file $DEF_BU_CONF does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
#
|
||||
# set the email address to mail results to
|
||||
#
|
||||
if test -z $EMAIL ; then
|
||||
EMAIL=$DEF_EMAIL
|
||||
fi
|
||||
#
|
||||
# set the email subject for results
|
||||
#
|
||||
if test -z "$EMAIL_SUBJ" ; then
|
||||
EMAIL_SUBJ="$DEF_EMAIL_SUBJ"
|
||||
fi
|
||||
#
|
||||
# whack the date on there
|
||||
EMAIL_SUBJ="$EMAIL_SUBJ for $DATE"
|
||||
#
|
||||
# set the log file appropriately
|
||||
#
|
||||
if test -z $LOG ; then
|
||||
LOG=$DEF_LOG
|
||||
fi
|
||||
#
|
||||
# set the log file appropriately
|
||||
#
|
||||
if test -z $STAT_DIR ; then
|
||||
STAT_DIR=$DEF_STAT_DIR
|
||||
fi
|
||||
#
|
||||
# if a file root form wasn't specified use
|
||||
# a default
|
||||
if test -z $BU_FROOT ; then
|
||||
BU_FROOT=$DEF_BU_FROOT
|
||||
verbose "using default file rootname: $BU_FROOT"
|
||||
fi
|
||||
#
|
||||
# use it to build a filename list for the backup
|
||||
BU_FILE="$BU_FROOT.$DATE.$TIME.$BU_SUFFIX"
|
||||
BU_LIST="$BU_FROOT.$DATE.$TIME.$LIST_SUFFIX"
|
||||
message "backup files: $BU_FILE, $BU_LIST"
|
||||
#
|
||||
# Now actually try to do the job we've been asked to do...
|
||||
#
|
||||
case $MODE in
|
||||
backup)
|
||||
# create_tmp_email
|
||||
delete_old
|
||||
backup
|
||||
# send_email_report
|
||||
insert_blank
|
||||
;;
|
||||
delete_old)
|
||||
delete_old
|
||||
insert_blank
|
||||
;;
|
||||
help)
|
||||
echo ""
|
||||
echo "$0 version $VERSION, copyright 1999-2001 Egressive Limited, www.egressive.com"
|
||||
echo ""
|
||||
echo "Use tar to backup up a series of paths (excluding some files if desired) onto"
|
||||
echo "a filesystem (optionally removable), recording the list of files "
|
||||
echo "in a gzipped file alongside the tar archive"
|
||||
echo ""
|
||||
echo "Usage: $0 {-b|-d} [tarfile_root]"
|
||||
echo "-b or --backup - initiates tar of"
|
||||
echo " files listed in $DEF_BU_CONF - optionally takes"
|
||||
echo " a backup file rootname, e.g. weekly-backup"
|
||||
echo "-d or --delete_old - removes backups older than cutoffs"
|
||||
echo " specified in $DEF_BU_CONF"
|
||||
echo "-v or --verbose - give extra feedback on progress to stdout"
|
||||
echo "-c or --config config_filename - use an alternate configuration file"
|
||||
echo "-e or --email - filename of the temporary email file to pump backup into into"
|
||||
echo "-l or --log log_filename - use an alternate log file"
|
||||
echo "-r or --fileroot tarfile_root - optional parameter specifies the"
|
||||
echo " root filename for the tar and log files"
|
||||
echo "-? or --help - display this help information"
|
||||
echo ""
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
exit 0
|
15
ebu/ebu.cron
Executable file
15
ebu/ebu.cron
Executable file
|
@ -0,0 +1,15 @@
|
|||
#
|
||||
# run system backups
|
||||
#
|
||||
# daily - at 2:30 am, mon-sat
|
||||
30 2 * * mon,tue,wed,thu,fri,sat root /etc/egscripts/ebu/run_daily
|
||||
#
|
||||
# weekly - at 2:30 am, sun
|
||||
#30 2 * * sun root /etc/egscripts/ebu/run_weekly
|
||||
#
|
||||
# monthly - at 3:30 am, on the first of the last of the month
|
||||
#30 3 1 * * root /etc/egscripts/ebu/run_monthly
|
||||
#
|
||||
# yearly - at 1:30 am, on the last day of the year
|
||||
#30 1 1 1 * root /etc/egscripts/ebu/run_yearly
|
||||
|
100
ebu/run_daily
Executable file
100
ebu/run_daily
Executable file
|
@ -0,0 +1,100 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# this script runs a series of daily backup files, one after another
|
||||
#
|
||||
#-------------
|
||||
#-- EGAlert --
|
||||
EGALERT=/etc/egalert/egalert
|
||||
EGALERT_DAYSTAMP=`date '+%Y-%m-%d'`
|
||||
$EGALERT run "$EGALERT_DAYSTAMP-ebu"
|
||||
#-- EGAlert --
|
||||
#-------------
|
||||
|
||||
# These should be the only parameters requiring alteration
|
||||
# the root filename for the appropriate configuration files
|
||||
# in $EBU_CONF_DIR
|
||||
CONF_ROOT="daily"
|
||||
# the email subject for report emails - to have date added
|
||||
EMAIL_SUBJ="Warhol Daily Backup Report"
|
||||
# the email address (or addresses with comma separation) to send it to
|
||||
EMAIL=dlane@egressive.com
|
||||
#
|
||||
# directories...
|
||||
EBU_DIR=/etc/ebu
|
||||
EBU_CMD=$EBU_DIR/ebu
|
||||
EBU_CONF_DIR=$EBU_DIR/conf
|
||||
LOGS=/var/log
|
||||
LOG=$LOGS/ebu.log
|
||||
# determine today's date
|
||||
DATE=`date '+%Y-%m-%d-%a'`
|
||||
# determine today's date
|
||||
TIME=`date '+%H-%M-%S'`
|
||||
# email program
|
||||
MAIL=/bin/mail
|
||||
# a timestamp for logging purposes
|
||||
TIMESTAMP=`date '+%Y-%m-%d %H:%M.%S'`
|
||||
# temporary holding point for email
|
||||
TMP_EMAIL=/tmp/tmp_email_$DATE.$TIME
|
||||
# build list of backup configuration files
|
||||
CONFS=`ls -1 $EBU_CONF_DIR/$CONF_ROOT*.conf`
|
||||
#
|
||||
# function to direct a message...
|
||||
message() {
|
||||
echo "$0: $TIMESTAMP $@" >> $LOG
|
||||
if test -f $TMP_EMAIL ; then
|
||||
echo "$0: $TIMESTAMP $@" >> $TMP_EMAIL
|
||||
fi
|
||||
}
|
||||
#
|
||||
# create the temporary email file
|
||||
create_tmp_email() {
|
||||
touch $TMP_EMAIL
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "created temporary email $TMP_EMAIL"
|
||||
else
|
||||
message "failed to create temporary email $TMP_EMAIL"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# send the contents of the temporary file to the
|
||||
# designated report recipient
|
||||
send_email_report() {
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "sending email report to $EMAIL"
|
||||
$MAIL -s "$EMAIL_SUBJ" $EMAIL < $TMP_EMAIL
|
||||
rm $TMP_EMAIL
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "failed to remove temporary email $TMP_EMAIL"
|
||||
else
|
||||
message "successfully removed temporary email $TMP_EMAIL"
|
||||
fi
|
||||
message "email report successfully sent"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# insert a blank line into the log and on the console
|
||||
insert_blank() {
|
||||
echo "" >> $TMP_EMAIL
|
||||
}
|
||||
#
|
||||
# The Functional Part of the Script
|
||||
#
|
||||
# build the email for the report
|
||||
create_tmp_email
|
||||
# run backup for each file
|
||||
for CONF in $CONFS
|
||||
do
|
||||
$EBU_CMD -b -c $CONF -e $TMP_EMAIL
|
||||
# $EBU_CMD -d -c $CONF -e $TMP_EMAIL
|
||||
# put a space in the email to separate tasks
|
||||
insert_blank
|
||||
done
|
||||
#
|
||||
# send the resulting email
|
||||
send_email_report
|
||||
|
||||
#-------------
|
||||
#-- EGAlert --
|
||||
$EGALERT success "$EGALERT_DAYSTAMP-ebu"
|
||||
#-- EGAlert --
|
||||
#-------------
|
86
ebu/run_monthly
Executable file
86
ebu/run_monthly
Executable file
|
@ -0,0 +1,86 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# this script runs a series of daily backup files, one after another
|
||||
#
|
||||
# These should be the only parameters requiring alteration
|
||||
# the root filename for the appropriate configuration files
|
||||
# in $EBU_CONF_DIR
|
||||
CONF_ROOT="monthly"
|
||||
# the email subject for report emails - to have date added
|
||||
EMAIL_SUBJ="Avatar Monthly Backup Report"
|
||||
# the email address (or addresses with comma separation) to send it to
|
||||
EMAIL=dlane@egressive.com
|
||||
#
|
||||
# directories...
|
||||
EBU_DIR=/etc/ebu
|
||||
EBU_CMD=$EBU_DIR/ebu
|
||||
EBU_CONF_DIR=$EBU_DIR/conf
|
||||
LOGS=/var/log
|
||||
LOG=$LOGS/ebu.log
|
||||
# determine today's date
|
||||
DATE=`date '+%Y-%m-%d-%a'`
|
||||
# determine today's date
|
||||
TIME=`date '+%H-%M-%S'`
|
||||
# email program
|
||||
MAIL=/bin/mail
|
||||
# a timestamp for logging purposes
|
||||
TIMESTAMP=`date '+%Y-%m-%d %H:%M.%S'`
|
||||
# temporary holding point for email
|
||||
TMP_EMAIL=/tmp/tmp_email_$DATE.$TIME
|
||||
# build list of backup configuration files
|
||||
CONFS=`ls -1 $EBU_CONF_DIR/$CONF_ROOT*.conf`
|
||||
#
|
||||
# function to direct a message...
|
||||
message() {
|
||||
echo "$0: $TIMESTAMP $@" >> $LOG
|
||||
if test -f $TMP_EMAIL ; then
|
||||
echo "$0: $TIMESTAMP $@" >> $TMP_EMAIL
|
||||
fi
|
||||
}
|
||||
#
|
||||
# create the temporary email file
|
||||
create_tmp_email() {
|
||||
touch $TMP_EMAIL
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "created temporary email $TMP_EMAIL"
|
||||
else
|
||||
message "failed to create temporary email $TMP_EMAIL"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# send the contents of the temporary file to the
|
||||
# designated report recipient
|
||||
send_email_report() {
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "sending email report to $EMAIL"
|
||||
$MAIL -s "$EMAIL_SUBJ" $EMAIL < $TMP_EMAIL
|
||||
rm $TMP_EMAIL
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "failed to remove temporary email $TMP_EMAIL"
|
||||
else
|
||||
message "successfully removed temporary email $TMP_EMAIL"
|
||||
fi
|
||||
message "email report successfully sent"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# insert a blank line into the log and on the console
|
||||
insert_blank() {
|
||||
echo "" >> $TMP_EMAIL
|
||||
}
|
||||
#
|
||||
# The Functional Part of the Script
|
||||
#
|
||||
# build the email for the report
|
||||
create_tmp_email
|
||||
# run backup for each file
|
||||
for CONF in $CONFS
|
||||
do
|
||||
$EBU_CMD -b -c $CONF -e $TMP_EMAIL
|
||||
# put a space in the email to separate tasks
|
||||
insert_blank
|
||||
done
|
||||
#
|
||||
# send the resulting email
|
||||
send_email_report
|
||||
|
86
ebu/run_weekly
Executable file
86
ebu/run_weekly
Executable file
|
@ -0,0 +1,86 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# this script runs a series of daily backup files, one after another
|
||||
#
|
||||
# These should be the only parameters requiring alteration
|
||||
# the root filename for the appropriate configuration files
|
||||
# in $EBU_CONF_DIR
|
||||
CONF_ROOT="weekly"
|
||||
# the email subject for report emails - to have date added
|
||||
EMAIL_SUBJ="Avatar Weekly Backup Report"
|
||||
# the email address (or addresses with comma separation) to send it to
|
||||
EMAIL=dlane@egressive.com
|
||||
#
|
||||
# directories...
|
||||
EBU_DIR=/etc/ebu
|
||||
EBU_CMD=$EBU_DIR/ebu
|
||||
EBU_CONF_DIR=$EBU_DIR/conf
|
||||
LOGS=/var/log
|
||||
LOG=$LOGS/ebu.log
|
||||
# determine today's date
|
||||
DATE=`date '+%Y-%m-%d-%a'`
|
||||
# determine today's date
|
||||
TIME=`date '+%H-%M-%S'`
|
||||
# email program
|
||||
MAIL=/bin/mail
|
||||
# a timestamp for logging purposes
|
||||
TIMESTAMP=`date '+%Y-%m-%d %H:%M.%S'`
|
||||
# temporary holding point for email
|
||||
TMP_EMAIL=/tmp/tmp_email_$DATE.$TIME
|
||||
# build list of backup configuration files
|
||||
CONFS=`ls -1 $EBU_CONF_DIR/$CONF_ROOT*.conf`
|
||||
#
|
||||
# function to direct a message...
|
||||
message() {
|
||||
echo "$0: $TIMESTAMP $@" >> $LOG
|
||||
if test -f $TMP_EMAIL ; then
|
||||
echo "$0: $TIMESTAMP $@" >> $TMP_EMAIL
|
||||
fi
|
||||
}
|
||||
#
|
||||
# create the temporary email file
|
||||
create_tmp_email() {
|
||||
touch $TMP_EMAIL
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "created temporary email $TMP_EMAIL"
|
||||
else
|
||||
message "failed to create temporary email $TMP_EMAIL"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# send the contents of the temporary file to the
|
||||
# designated report recipient
|
||||
send_email_report() {
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "sending email report to $EMAIL"
|
||||
$MAIL -s "$EMAIL_SUBJ" $EMAIL < $TMP_EMAIL
|
||||
rm $TMP_EMAIL
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "failed to remove temporary email $TMP_EMAIL"
|
||||
else
|
||||
message "successfully removed temporary email $TMP_EMAIL"
|
||||
fi
|
||||
message "email report successfully sent"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# insert a blank line into the log and on the console
|
||||
insert_blank() {
|
||||
echo "" >> $TMP_EMAIL
|
||||
}
|
||||
#
|
||||
# The Functional Part of the Script
|
||||
#
|
||||
# build the email for the report
|
||||
create_tmp_email
|
||||
# run backup for each file
|
||||
for CONF in $CONFS
|
||||
do
|
||||
$EBU_CMD -b -c $CONF -e $TMP_EMAIL
|
||||
# put a space in the email to separate tasks
|
||||
insert_blank
|
||||
done
|
||||
#
|
||||
# send the resulting email
|
||||
send_email_report
|
||||
|
86
ebu/run_yearly
Executable file
86
ebu/run_yearly
Executable file
|
@ -0,0 +1,86 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# this script runs a series of daily backup files, one after another
|
||||
#
|
||||
# These should be the only parameters requiring alteration
|
||||
# the root filename for the appropriate configuration files
|
||||
# in $EBU_CONF_DIR
|
||||
CONF_ROOT="yearly"
|
||||
# the email subject for report emails - to have date added
|
||||
EMAIL_SUBJ="Avatar Yearly Backup Report"
|
||||
# the email address (or addresses with comma separation) to send it to
|
||||
EMAIL=dlane@egressive.com
|
||||
#
|
||||
# directories...
|
||||
EBU_DIR=/etc/ebu
|
||||
EBU_CMD=$EBU_DIR/ebu
|
||||
EBU_CONF_DIR=$EBU_DIR/conf
|
||||
LOGS=/var/log
|
||||
LOG=$LOGS/ebu.log
|
||||
# determine today's date
|
||||
DATE=`date '+%Y-%m-%d-%a'`
|
||||
# determine today's date
|
||||
TIME=`date '+%H-%M-%S'`
|
||||
# email program
|
||||
MAIL=/bin/mail
|
||||
# a timestamp for logging purposes
|
||||
TIMESTAMP=`date '+%Y-%m-%d %H:%M.%S'`
|
||||
# temporary holding point for email
|
||||
TMP_EMAIL=/tmp/tmp_email_$DATE.$TIME
|
||||
# build list of backup configuration files
|
||||
CONFS=`ls -1 $EBU_CONF_DIR/$CONF_ROOT*.conf`
|
||||
#
|
||||
# function to direct a message...
|
||||
message() {
|
||||
echo "$0: $TIMESTAMP $@" >> $LOG
|
||||
if test -f $TMP_EMAIL ; then
|
||||
echo "$0: $TIMESTAMP $@" >> $TMP_EMAIL
|
||||
fi
|
||||
}
|
||||
#
|
||||
# create the temporary email file
|
||||
create_tmp_email() {
|
||||
touch $TMP_EMAIL
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "created temporary email $TMP_EMAIL"
|
||||
else
|
||||
message "failed to create temporary email $TMP_EMAIL"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# send the contents of the temporary file to the
|
||||
# designated report recipient
|
||||
send_email_report() {
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "sending email report to $EMAIL"
|
||||
$MAIL -s "$EMAIL_SUBJ" $EMAIL < $TMP_EMAIL
|
||||
rm $TMP_EMAIL
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "failed to remove temporary email $TMP_EMAIL"
|
||||
else
|
||||
message "successfully removed temporary email $TMP_EMAIL"
|
||||
fi
|
||||
message "email report successfully sent"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# insert a blank line into the log and on the console
|
||||
insert_blank() {
|
||||
echo "" >> $TMP_EMAIL
|
||||
}
|
||||
#
|
||||
# The Functional Part of the Script
|
||||
#
|
||||
# build the email for the report
|
||||
create_tmp_email
|
||||
# run backup for each file
|
||||
for CONF in $CONFS
|
||||
do
|
||||
$EBU_CMD -b -c $CONF -e $TMP_EMAIL
|
||||
# put a space in the email to separate tasks
|
||||
insert_blank
|
||||
done
|
||||
#
|
||||
# send the resulting email
|
||||
send_email_report
|
||||
|
159
egalert/egalert
Executable file
159
egalert/egalert
Executable file
|
@ -0,0 +1,159 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# File: egalert
|
||||
#
|
||||
# egalert - script's checking & alerting tool
|
||||
# Handles all alert checking for all egressive scripts
|
||||
|
||||
# Usage: egalert FUNCTION DAYSTAMP-SCRIPT_NAME
|
||||
|
||||
# Author: Marek Kuziel (marek@egressive.com)
|
||||
|
||||
# Variables
|
||||
#----------
|
||||
# Directory settings
|
||||
EGALERT_DIR=/etc/egscripts/egalert
|
||||
EGALERT_BIN_DIR=`dirname $0`
|
||||
EGALERT_LOG_DIR=/var/log/egalert
|
||||
EGALERT_STATUS_DIR=$EGALERT_LOG_DIR/status
|
||||
|
||||
# Mail related stuff
|
||||
MAINTAINER="dave@egressive.com"
|
||||
MAIL_CMD=/bin/mail
|
||||
MAIL_TO=""
|
||||
MAIL_CC=""
|
||||
MAIL_BCC="$MAINTAINER"
|
||||
MAIL_SUBJECT="EGAlert"
|
||||
MAIL_CONTENT=$EGALERT_BIN_DIR/tmp.txt
|
||||
|
||||
# *stamp
|
||||
DAYSTAMP=`date '+%Y-%m-%d'`
|
||||
TIMESTAMP=`date '+%Y-%m-%d %H:%M'`
|
||||
TIMESTAMP_FULL=`date '+%Y-%m-%d %H:%M:%S'`
|
||||
|
||||
#Debug
|
||||
EGALERT_DEBUG=1 # To switch on egalert script log for debugging set this to 1
|
||||
EGALERT_DEBUG_LOG=$EGALERT_LOG_DIR/$DAYSTAMP.log # DAYSTAMP is more usefull for debugging 'cos creates just one file
|
||||
EGALERT_DAILY_LOG=$EGALERT_LOG_DIR/egalert-daily-$DAYSTAMP.log
|
||||
|
||||
if [ 1 == $EGALERT_DEBUG ]
|
||||
then
|
||||
exec 10>> $EGALERT_DEBUG_LOG
|
||||
exec 2>&10
|
||||
exec 1>&10
|
||||
else
|
||||
exec 10>> /dev/null
|
||||
exec 2>&10
|
||||
exec 1>&10
|
||||
fi
|
||||
|
||||
# Functions
|
||||
#----------
|
||||
# Check if log dirs exist
|
||||
dirs_exist()
|
||||
{
|
||||
if [ ! -d "$EGALERT_LOG_DIR" ]
|
||||
then
|
||||
# Log dir doesn't exist. We make it now.
|
||||
mkdir $EGALERT_LOG_DIR
|
||||
else
|
||||
if [ ! -d "$EGALERT_STATUS_DIR" ]
|
||||
then
|
||||
mkdir $EGALERT_STATUS_DIR
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Creates egalert log file
|
||||
egalert_log()
|
||||
{
|
||||
# Create log file if it doesn't exist yet
|
||||
if [ ! -f "$EGALERT_DAILY_LOG" ]
|
||||
then
|
||||
touch $EGALERT_DAILY_LOG
|
||||
fi
|
||||
|
||||
echo "$TIMESTAMP_FULL $@" >> $EGALERT_DAILY_LOG
|
||||
}
|
||||
|
||||
# Sends email. Content of email is in first parameter of this function
|
||||
send_email()
|
||||
{
|
||||
$MAIL_CMD -s "$MAIL_SUBJECT" -c "$MAIL_CC" -b "$MAIL_BCC" "$MAIL_TO" < $MAIL_CONTENT
|
||||
rm $MAIL_CONTENT
|
||||
}
|
||||
|
||||
send_log()
|
||||
{
|
||||
egalert_log "INFO: sendlog"
|
||||
cat $EGALERT_DAILY_LOG > $MAIL_CONTENT
|
||||
MAIL_SUBJECT="$MAIL_SUBJECT: Infolog"
|
||||
send_email
|
||||
}
|
||||
|
||||
# EGAlert
|
||||
#--------
|
||||
dirs_exist
|
||||
|
||||
cd $EGALERT_BIN_DIR
|
||||
|
||||
case "$1" in
|
||||
# EG:script ran. Touch run file for selected script.
|
||||
run)
|
||||
egalert_log "INFO: run ($2)"
|
||||
touch $EGALERT_STATUS_DIR/$2
|
||||
echo "Started at: $TIMESTAMP_FULL" >> $EGALERT_STATUS_DIR/$2
|
||||
exit 0
|
||||
;;
|
||||
# EG:script ran with success. Create success status for selected script.
|
||||
success)
|
||||
egalert_log "INFO: success ($2)"
|
||||
if [ -f $EGALERT_STATUS_DIR/$2 ]
|
||||
then
|
||||
echo "Finished with success at: $TIMESTAMP_FULL" >> $EGALERT_STATUS_DIR/$2
|
||||
else
|
||||
egalert_log "EXCEPTION: Script $2 run successfully but status file hasn't been created!"
|
||||
echo "EXCEPTION: Script $2 run successfully but status file hasn't been created!" > $MAIL_CONTENT
|
||||
MAIL_SUBJECT="$MAIL_SUBJECT: Exception!"
|
||||
send_email
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
# Send daily log to desired users
|
||||
sendlog)
|
||||
send_log
|
||||
exit 0
|
||||
;;
|
||||
# Check status of all scripts they should've ran daily for current day
|
||||
checkdaily)
|
||||
egalert_log "INFO: checkdaily"
|
||||
for file in $(ls $EGALERT_STATUS_DIR | grep $DAYSTAMP)
|
||||
do
|
||||
if [ 1 != `cat $EGALERT_STATUS_DIR/$file | grep success | wc -l` ]
|
||||
then
|
||||
egalert_log "ERROR: Script $file failed!!!"
|
||||
echo "ERROR: Script $file failed!!!" > $MAIL_CONTENT
|
||||
MAIL_SUBJECT="$MAIL_SUBJECT: ERROR!!!"
|
||||
send_email
|
||||
fi
|
||||
done
|
||||
# Check itself. If log file exists (debugging switched on)
|
||||
# and if size of log is greater than zero. If so inform us.
|
||||
# If file is zero remove it.
|
||||
if [ -f $EGALERT_LOG_DIR/$DAYSTAMP.log ]
|
||||
then
|
||||
if [ -s $EGALERT_LOG_DIR/$DAYSTAMP.log ]
|
||||
then
|
||||
egalert_log "WARNING: EGAlert produced errors!!!"
|
||||
echo "WARNING: EGAlert produced errors!!!" > $MAIL_CONTENT
|
||||
MAIL_SUBJECT="$MAIL_SUBJECT: WARNING!"
|
||||
send_email
|
||||
else
|
||||
rm $EGALERT_LOG_DIR/$DAYSTAMP.log
|
||||
fi
|
||||
fi
|
||||
# Send daily log
|
||||
send_log
|
||||
exit 0
|
||||
;;
|
||||
esac
|
8
egapachewatch/egapachewatch-cron
Executable file
8
egapachewatch/egapachewatch-cron
Executable file
|
@ -0,0 +1,8 @@
|
|||
#
|
||||
# egapachewatch, copyright 2007 egressive limited, www.egressive.com
|
||||
#
|
||||
# run system backups
|
||||
#
|
||||
# every 5 minutes
|
||||
*/5 * * * * root /etc/egscripts/egapachewatch/egapachewatch.sh
|
||||
|
139
egapachewatch/egapachewatch.sh
Executable file
139
egapachewatch/egapachewatch.sh
Executable file
|
@ -0,0 +1,139 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# count how many apache processes are running and warn us if it's getting high..
|
||||
SCRIPT=egapachewatch.sh
|
||||
VERSION=0.1
|
||||
#
|
||||
LOG=/var/log/egapachewatch.log
|
||||
TMP_DIR=/tmp
|
||||
DATE=`which date`
|
||||
MAIL=`which mail`
|
||||
RM=`which rm`
|
||||
NUMWARN=40
|
||||
#
|
||||
TODAY=`$DATE '+%Y-%m-%d-%a'`
|
||||
# determine today's date
|
||||
NOW=`$DATE '+%H-%M-%S'`
|
||||
# a timestamp for logging purposes
|
||||
#
|
||||
# function to direct a message...
|
||||
message() {
|
||||
#
|
||||
# a timestamp for logging purposes
|
||||
timestamp
|
||||
if test -w $LOG ; then
|
||||
echo "$SCRIPT: $TIMESTAMP $@" >> $LOG
|
||||
fi
|
||||
if test -w $TMP_EMAIL ; then
|
||||
echo "$SCRIPT: $TIMESTAMP $@" >> $TMP_EMAIL
|
||||
fi
|
||||
verbose "$TIMESTAMP $@"
|
||||
}
|
||||
#
|
||||
# function to direct a message...
|
||||
verbose() {
|
||||
if test $VERBOSE ; then
|
||||
echo "$@"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# insert a blank line into the log and on the console
|
||||
insert_blank() {
|
||||
echo "" >> $TMP_EMAIL
|
||||
verbose ""
|
||||
}
|
||||
#
|
||||
# update date and time info..
|
||||
today() {
|
||||
# determine today's date
|
||||
TODAY=`$DATE '+%Y-%m-%d-%a'`
|
||||
}
|
||||
now() {
|
||||
# determine today's date
|
||||
NOW=`$DATE '+%H-%M-%S'`
|
||||
}
|
||||
timestamp() {
|
||||
# a timestamp for logging purposes
|
||||
TIMESTAMP=`$DATE '+%Y-%m-%d %H:%M.%S'`
|
||||
}
|
||||
#
|
||||
# create the temporary email file
|
||||
create_tmp_email() {
|
||||
if test -d $TMP_DIR ; then
|
||||
if test -w $TMP_DIR ; then
|
||||
touch $TMP_EMAIL 2>&1
|
||||
else
|
||||
error "Email tmp directory $TMP_DIR is not writable"
|
||||
fi
|
||||
else
|
||||
error "Email tmp directory $TMP_DIR does not exist"
|
||||
fi
|
||||
|
||||
if test -w $TMP_EMAIL ; then
|
||||
message "created temporary email $TMP_EMAIL"
|
||||
else
|
||||
error "Failed to create temporary email $TMP_EMAIL"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# send the contents of the temporary file to the
|
||||
# designated report recipient
|
||||
send_email_report() {
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "sending email report to $EMAIL_TO"
|
||||
for EMAIL_ADD in $EMAIL_TO
|
||||
do
|
||||
RES=`$MAIL -s "$EMAIL_SUBJ" $EMAIL_ADD < $TMP_EMAIL`
|
||||
if test -z $RES ; then
|
||||
if test $ERROR_STATUS == 1 ; then
|
||||
message "Error email report successfully sent to $EMAIL_ADD"
|
||||
else
|
||||
message "Email report successfully sent to $EMAIL_ADD"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if test -w $TMP_EMAIL ; then
|
||||
$RM $TMP_EMAIL 2>&1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# modified dave@egressive.com 20071029
|
||||
max_clients() {
|
||||
NUMAVAIL=`grep -A 8 "IfModule prefork.c" /etc/apache2/apache2.conf | grep "^MaxClients" | awk '{print $2;}'`
|
||||
# An email will be sent if the number of processes running is greater than ($NUMAVAIL - $NUMWARN)
|
||||
# As of 20071025, MaxClients was set to 150 this may be outrageously high for the amount
|
||||
# of memory on the server, so NUMWARN is set high too . . .
|
||||
}
|
||||
|
||||
TMP_EMAIL=$TMP_DIR/$SCRIPT"_tmp_email_"$TODAY.$NOW
|
||||
EMAIL_TO="support@egressive.com"
|
||||
NUMPROC=`ps auxwww | grep -c "apache2"`
|
||||
max_clients
|
||||
NUMWARNLEVEL=$[$NUMAVAIL - $NUMWARN]
|
||||
MACHINE_NAME="geprod"
|
||||
ERROR_STATUS=0
|
||||
|
||||
#
|
||||
# set up alert
|
||||
if ! test -f $TMP_EMAIL ; then
|
||||
touch $TMP_EMAIL
|
||||
fi
|
||||
if ! test -f $LOG ; then
|
||||
touch $LOG
|
||||
fi
|
||||
|
||||
message " " # blank line
|
||||
message "running $NOW"
|
||||
#NUMAVAIL=1
|
||||
message "current number of processes $NUMPROC out of $NUMAVAIL"
|
||||
if [ $NUMPROC -ge $NUMWARNLEVEL ] ; then
|
||||
message "sending email alert!"
|
||||
EMAIL_SUBJ="ALERT - $MACHINE_NAME - exceeding num apache processes!"
|
||||
send_email_report
|
||||
fi
|
||||
now
|
||||
message "completed run"
|
||||
|
||||
exit 0
|
||||
|
8
egasterisk/adsi.conf
Normal file
8
egasterisk/adsi.conf
Normal file
|
@ -0,0 +1,8 @@
|
|||
;
|
||||
; Sample ADSI Configuration file
|
||||
;
|
||||
[intro]
|
||||
alignment = center
|
||||
greeting => Welcome to the
|
||||
greeting => Asterisk
|
||||
greeting => Open Source PBX
|
39
egasterisk/adtranvofr.conf
Normal file
39
egasterisk/adtranvofr.conf
Normal file
|
@ -0,0 +1,39 @@
|
|||
;
|
||||
; Voice over Frame Relay (Adtran style)
|
||||
;
|
||||
; Configuration file
|
||||
|
||||
[interfaces]
|
||||
;
|
||||
; Default language
|
||||
;
|
||||
;language=en
|
||||
;
|
||||
; Lines for which we are the user termination. They accept incoming
|
||||
; and outgoing calls. We use the default context on the first 8 lines
|
||||
; used by internal phones.
|
||||
;
|
||||
context=default
|
||||
;user => voice00
|
||||
;user => voice01
|
||||
;user => voice02
|
||||
;user => voice03
|
||||
;user => voice04
|
||||
;user => voice05
|
||||
;user => voice06
|
||||
;user => voice07
|
||||
; Calls on 16 and 17 come from the outside world, so they get
|
||||
; a little bit special treatment
|
||||
context=remote
|
||||
;user => voice16
|
||||
;user => voice17
|
||||
;
|
||||
; Next we have lines which we only accept calls on, and typically
|
||||
; do not send outgoing calls on (i.e. these are where we are the
|
||||
; network termination)
|
||||
;
|
||||
;network => voice08
|
||||
;network => voice09
|
||||
;network => voice10
|
||||
;network => voice11
|
||||
;network => voice12
|
105
egasterisk/agents.conf
Normal file
105
egasterisk/agents.conf
Normal file
|
@ -0,0 +1,105 @@
|
|||
;
|
||||
; Agent configuration
|
||||
;
|
||||
|
||||
[general]
|
||||
;
|
||||
; Define whether callbacklogins should be stored in astdb for
|
||||
; persistence. Persistent logins will be reloaded after
|
||||
; Asterisk restarts.
|
||||
;
|
||||
persistentagents=yes
|
||||
|
||||
; Enable or disable a single extension from logging in as multiple agents.
|
||||
; The default value is "yes".
|
||||
;multiplelogin=yes
|
||||
|
||||
[agents]
|
||||
;
|
||||
; Define maxlogintries to allow agent to try max logins before
|
||||
; failed.
|
||||
; default to 3
|
||||
;
|
||||
;maxlogintries=5
|
||||
;
|
||||
;
|
||||
; Define autologoff times if appropriate. This is how long
|
||||
; the phone has to ring with no answer before the agent is
|
||||
; automatically logged off (in seconds)
|
||||
;
|
||||
;autologoff=15
|
||||
;
|
||||
; Define autologoffunavail to have agents automatically logged
|
||||
; out when the extension that they are at returns a CHANUNAVAIL
|
||||
; status when a call is attempted to be sent there.
|
||||
; Default is "no".
|
||||
;
|
||||
;autologoffunavail=yes
|
||||
;
|
||||
; Define ackcall to require an acknowledgement by '#' when
|
||||
; an agent logs in using agentcallbacklogin. Default is "no".
|
||||
;
|
||||
;ackcall=no
|
||||
;
|
||||
; Define endcall to allow an agent to hangup a call by '*'.
|
||||
; Default is "yes". Set this to "no" to ignore '*'.
|
||||
;
|
||||
;endcall=yes
|
||||
;
|
||||
; Define wrapuptime. This is the minimum amount of time when
|
||||
; after disconnecting before the caller can receive a new call
|
||||
; note this is in milliseconds.
|
||||
;
|
||||
;wrapuptime=5000
|
||||
;
|
||||
; Define the default musiconhold for agents
|
||||
; musiconhold => music_class
|
||||
;
|
||||
;musiconhold => default
|
||||
;
|
||||
; Define the default good bye sound file for agents
|
||||
; default to vm-goodbye
|
||||
;
|
||||
;agentgoodbye => goodbye_file
|
||||
;
|
||||
; Define updatecdr. This is whether or not to change the source
|
||||
; channel in the CDR record for this call to agent/agent_id so
|
||||
; that we know which agent generates the call
|
||||
;
|
||||
;updatecdr=no
|
||||
;
|
||||
; Group memberships for agents (may change in mid-file)
|
||||
;
|
||||
;group=3
|
||||
;group=1,2
|
||||
;group=
|
||||
;
|
||||
; --------------------------------------------------
|
||||
; This section is devoted to recording agent's calls
|
||||
; The keywords are global to the chan_agent channel driver
|
||||
;
|
||||
; Enable recording calls addressed to agents. It's turned off by default.
|
||||
;recordagentcalls=yes
|
||||
;
|
||||
; The format to be used to record the calls: wav, gsm, wav49.
|
||||
; By default its "wav".
|
||||
;recordformat=gsm
|
||||
;
|
||||
; The text to be added to the name of the recording. Allows forming a url link.
|
||||
;urlprefix=http://localhost/calls/
|
||||
;
|
||||
; The optional directory to save the conversations in. The default is
|
||||
; /var/spool/asterisk/monitor
|
||||
;savecallsin=/var/calls
|
||||
;
|
||||
; An optional custom beep sound file to play to always-connected agents.
|
||||
;custom_beep=beep
|
||||
;
|
||||
; --------------------------------------------------
|
||||
;
|
||||
; This section contains the agent definitions, in the form:
|
||||
;
|
||||
; agent => agentid,agentpassword,name
|
||||
;
|
||||
;agent => 1001,4321,Mark Spencer
|
||||
;agent => 1002,4321,Will Meadows
|
80
egasterisk/alarmreceiver.conf
Normal file
80
egasterisk/alarmreceiver.conf
Normal file
|
@ -0,0 +1,80 @@
|
|||
;
|
||||
; alarmreceiver.conf
|
||||
;
|
||||
; Sample configuration file for the Asterisk alarm receiver application.
|
||||
;
|
||||
|
||||
|
||||
[general]
|
||||
|
||||
;
|
||||
; Specify a timestamp format for the metadata section of the event files
|
||||
; Default is %a %b %d, %Y @ %H:%M:%S %Z
|
||||
|
||||
timestampformat = %a %b %d, %Y @ %H:%M:%S %Z
|
||||
|
||||
;
|
||||
; Specify a command to execute when the caller hangs up
|
||||
;
|
||||
; Default is none
|
||||
;
|
||||
|
||||
;eventcmd = yourprogram -yourargs ...
|
||||
|
||||
;
|
||||
; Specify a spool directory for the event files. This setting is required
|
||||
; if you want the app to be useful. Event files written to the spool
|
||||
; directory will be of the template event-XXXXXX, where XXXXXX is a random
|
||||
; and unique alphanumeric string.
|
||||
;
|
||||
; Default is none, and the events will be dropped on the floor.
|
||||
;
|
||||
|
||||
eventspooldir = /tmp
|
||||
|
||||
;
|
||||
; The alarmreceiver app can either log the events one-at-a-time to individual
|
||||
; files in the spool directory, or it can store them until the caller
|
||||
; disconnects and write them all to one file.
|
||||
;
|
||||
; The default setting for logindividualevents is no.
|
||||
;
|
||||
|
||||
logindividualevents = no
|
||||
|
||||
;
|
||||
; The timeout for receiving the first DTMF digit is adjustable from 1000 msec.
|
||||
; to 10000 msec. The default is 2000 msec. Note: if you wish to test the
|
||||
; receiver by entering digits manually, set this to a reasonable time out
|
||||
; like 10000 milliseconds.
|
||||
|
||||
fdtimeout = 2000
|
||||
|
||||
;
|
||||
; The timeout for receiving subsequent DTMF digits is adjustable from
|
||||
; 110 msec. to 4000 msec. The default is 200 msec. Note: if you wish to test
|
||||
; the receiver by entering digits manually, set this to a reasonable time out
|
||||
; like 4000 milliseconds.
|
||||
;
|
||||
|
||||
sdtimeout = 200
|
||||
|
||||
;
|
||||
; The loudness of the ACK and Kissoff tones is adjustable from 100 to 8192.
|
||||
; The default is 8192. This shouldn't need to be messed with, but is included
|
||||
; just in case there are problems with signal levels.
|
||||
;
|
||||
|
||||
loudness = 8192
|
||||
|
||||
;
|
||||
; The db-family setting allows the user to capture statistics on the number of
|
||||
; calls, and the errors the alarm receiver sees. The default is for no
|
||||
; db-family name to be defined and the database logging to be turned off.
|
||||
;
|
||||
|
||||
;db-family = yourfamily:
|
||||
|
||||
;
|
||||
; End of alarmreceiver.conf
|
||||
;
|
62
egasterisk/alsa.conf
Normal file
62
egasterisk/alsa.conf
Normal file
|
@ -0,0 +1,62 @@
|
|||
;
|
||||
; Open Sound System Console Driver Configuration File
|
||||
;
|
||||
[general]
|
||||
;
|
||||
; Automatically answer incoming calls on the console? Choose yes if
|
||||
; for example you want to use this as an intercom.
|
||||
;
|
||||
autoanswer=yes
|
||||
;
|
||||
; Default context (is overridden with @context syntax)
|
||||
;
|
||||
context=local
|
||||
;
|
||||
; Default extension to call
|
||||
;
|
||||
extension=s
|
||||
;
|
||||
; Default language
|
||||
;
|
||||
;language=en
|
||||
;
|
||||
; Default Music on Hold class to use when this channel is placed on hold in
|
||||
; the case that the music class is not set on the channel with
|
||||
; Set(CHANNEL(musicclass)=whatever) in the dialplan and the peer channel
|
||||
; putting this one on hold did not suggest a class to use.
|
||||
;
|
||||
;mohinterpret=default
|
||||
;
|
||||
; Silence suppression can be enabled when sound is over a certain threshold.
|
||||
; The value for the threshold should probably be between 500 and 2000 or so,
|
||||
; but your mileage may vary. Use the echo test to evaluate the best setting.
|
||||
;silencesuppression = yes
|
||||
;silencethreshold = 1000
|
||||
;
|
||||
; To set which ALSA device to use, change this parameter
|
||||
;input_device=hw:0,0
|
||||
;output_device=hw:0,0
|
||||
|
||||
;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
|
||||
; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of an
|
||||
; ALSA channel. Defaults to "no". An enabled jitterbuffer will
|
||||
; be used only if the sending side can create and the receiving
|
||||
; side can not accept jitter. The ALSA channel can't accept jitter,
|
||||
; thus an enabled jitterbuffer on the receive ALSA side will always
|
||||
; be used if the sending side can create jitter.
|
||||
|
||||
; jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds.
|
||||
|
||||
; jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is
|
||||
; resynchronized. Useful to improve the quality of the voice, with
|
||||
; big jumps in/broken timestamps, usually sent from exotic devices
|
||||
; and programs. Defaults to 1000.
|
||||
|
||||
; jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a SIP
|
||||
; channel. Two implementations are currently available - "fixed"
|
||||
; (with size always equals to jbmax-size) and "adaptive" (with
|
||||
; variable size, actually the new jb of IAX2). Defaults to fixed.
|
||||
|
||||
; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no".
|
||||
;-----------------------------------------------------------------------------------
|
||||
|
18
egasterisk/amd.conf
Normal file
18
egasterisk/amd.conf
Normal file
|
@ -0,0 +1,18 @@
|
|||
;
|
||||
; Answering Machine Detection Configuration
|
||||
;
|
||||
|
||||
[general]
|
||||
initial_silence = 2500 ; Maximum silence duration before the greeting.
|
||||
; If exceeded then MACHINE.
|
||||
greeting = 1500 ; Maximum length of a greeting. If exceeded then MACHINE.
|
||||
after_greeting_silence = 800 ; Silence after detecting a greeting.
|
||||
; If exceeded then HUMAN
|
||||
total_analysis_time = 5000 ; Maximum time allowed for the algorithm to decide
|
||||
; on a HUMAN or MACHINE
|
||||
min_word_length = 100 ; Minimum duration of Voice to considered as a word
|
||||
between_words_silence = 50 ; Minimum duration of silence after a word to consider
|
||||
; the audio what follows as a new word
|
||||
maximum_number_of_words = 3 ; Maximum number of words in the greeting.
|
||||
; If exceeded then MACHINE
|
||||
silence_threshold = 256
|
0
egasterisk/applymisdn.conf
Normal file
0
egasterisk/applymisdn.conf
Normal file
12
egasterisk/applyzap.conf
Normal file
12
egasterisk/applyzap.conf
Normal file
|
@ -0,0 +1,12 @@
|
|||
;!
|
||||
;! Automatically generated configuration file
|
||||
;! Filename: applyzap.conf (/etc/asterisk/applyzap.conf)
|
||||
;! Generator: Manager
|
||||
;! Creation Date: Wed Jul 23 18:50:55 2008
|
||||
;!
|
||||
|
||||
[general]
|
||||
fxsks = 2,3
|
||||
fxoks = 1
|
||||
loadzone = nz
|
||||
defaultzone = nz
|
159
egasterisk/asterisk.adsi
Normal file
159
egasterisk/asterisk.adsi
Normal file
|
@ -0,0 +1,159 @@
|
|||
;
|
||||
; Asterisk default ADSI script
|
||||
;
|
||||
;
|
||||
; Begin with the preamble requirements
|
||||
;
|
||||
DESCRIPTION "Asterisk PBX" ; Name of vendor
|
||||
VERSION 0x00 ; Version of stuff
|
||||
;SECURITY "_AST" ; Security code
|
||||
SECURITY 0X9BDBF7AC ; Security code
|
||||
FDN 0x0000000F ; Descriptor number
|
||||
|
||||
;
|
||||
; Flags
|
||||
;
|
||||
FLAG "nocallwaiting"
|
||||
|
||||
;
|
||||
; Predefined strings
|
||||
;
|
||||
DISPLAY "titles" IS "** Asterisk PBX **"
|
||||
DISPLAY "talkingto" IS "Call active." JUSTIFY LEFT
|
||||
DISPLAY "callname" IS "$Call1p" JUSTIFY LEFT
|
||||
DISPLAY "callnum" IS "$Call1s" JUSTIFY LEFT
|
||||
DISPLAY "incoming" IS "Incoming call!" JUSTIFY LEFT
|
||||
DISPLAY "ringing" IS "Calling... " JUSTIFY LEFT
|
||||
DISPLAY "callended" IS "Call ended." JUSTIFY LEFT
|
||||
DISPLAY "missedcall" IS "Missed call." JUSTIFY LEFT
|
||||
DISPLAY "busy" IS "Busy." JUSTIFY LEFT
|
||||
DISPLAY "reorder" IS "Reorder." JUSTIFY LEFT
|
||||
DISPLAY "cwdisabled" IS "Callwait disabled"
|
||||
DISPLAY "empty" IS "asdf"
|
||||
|
||||
;
|
||||
; Begin soft key definitions
|
||||
;
|
||||
KEY "callfwd" IS "CallFwd" OR "Call Forward"
|
||||
OFFHOOK
|
||||
VOICEMODE
|
||||
WAITDIALTONE
|
||||
SENDDTMF "*60"
|
||||
GOTO "offHook"
|
||||
ENDKEY
|
||||
|
||||
KEY "vmail_OH" IS "VMail" OR "Voicemail"
|
||||
OFFHOOK
|
||||
VOICEMODE
|
||||
WAITDIALTONE
|
||||
SENDDTMF "8500"
|
||||
ENDKEY
|
||||
|
||||
KEY "vmail" IS "VMail" OR "Voicemail"
|
||||
SENDDTMF "8500"
|
||||
ENDKEY
|
||||
|
||||
KEY "backspace" IS "BackSpc" OR "Backspace"
|
||||
BACKSPACE
|
||||
ENDKEY
|
||||
|
||||
KEY "cwdisable" IS "CWDsble" OR "Disable Call Wait"
|
||||
SENDDTMF "*70"
|
||||
SETFLAG "nocallwaiting"
|
||||
SHOWDISPLAY "cwdisabled" AT 4
|
||||
TIMERCLEAR
|
||||
TIMERSTART 1
|
||||
ENDKEY
|
||||
|
||||
KEY "cidblock" IS "CIDBlk" OR "Block Callerid"
|
||||
SENDDTMF "*67"
|
||||
SETFLAG "nocallwaiting"
|
||||
ENDKEY
|
||||
|
||||
;
|
||||
; Begin main subroutine
|
||||
;
|
||||
|
||||
SUB "main" IS
|
||||
IFEVENT NEARANSWER THEN
|
||||
CLEAR
|
||||
SHOWDISPLAY "titles" AT 1 NOUPDATE
|
||||
SHOWDISPLAY "talkingto" AT 2 NOUPDATE
|
||||
SHOWDISPLAY "callname" AT 3
|
||||
SHOWDISPLAY "callnum" AT 4
|
||||
GOTO "stableCall"
|
||||
ENDIF
|
||||
IFEVENT OFFHOOK THEN
|
||||
CLEAR
|
||||
CLEARFLAG "nocallwaiting"
|
||||
CLEARDISPLAY
|
||||
SHOWDISPLAY "titles" AT 1
|
||||
SHOWKEYS "vmail"
|
||||
SHOWKEYS "cidblock"
|
||||
SHOWKEYS "cwdisable" UNLESS "nocallwaiting"
|
||||
GOTO "offHook"
|
||||
ENDIF
|
||||
IFEVENT IDLE THEN
|
||||
CLEAR
|
||||
SHOWDISPLAY "titles" AT 1
|
||||
SHOWKEYS "vmail_OH"
|
||||
ENDIF
|
||||
IFEVENT CALLERID THEN
|
||||
CLEAR
|
||||
; SHOWDISPLAY "titles" AT 1 NOUPDATE
|
||||
; SHOWDISPLAY "incoming" AT 2 NOUPDATE
|
||||
SHOWDISPLAY "callname" AT 3 NOUPDATE
|
||||
SHOWDISPLAY "callnum" AT 4
|
||||
ENDIF
|
||||
IFEVENT RING THEN
|
||||
CLEAR
|
||||
SHOWDISPLAY "titles" AT 1 NOUPDATE
|
||||
SHOWDISPLAY "incoming" AT 2
|
||||
ENDIF
|
||||
IFEVENT ENDOFRING THEN
|
||||
SHOWDISPLAY "missedcall" AT 2
|
||||
CLEAR
|
||||
SHOWDISPLAY "titles" AT 1
|
||||
SHOWKEYS "vmail_OH"
|
||||
ENDIF
|
||||
IFEVENT TIMER THEN
|
||||
CLEAR
|
||||
SHOWDISPLAY "empty" AT 4
|
||||
ENDIF
|
||||
ENDSUB
|
||||
|
||||
SUB "offHook" IS
|
||||
IFEVENT FARRING THEN
|
||||
CLEAR
|
||||
SHOWDISPLAY "titles" AT 1 NOUPDATE
|
||||
SHOWDISPLAY "ringing" AT 2 NOUPDATE
|
||||
SHOWDISPLAY "callname" at 3 NOUPDATE
|
||||
SHOWDISPLAY "callnum" at 4
|
||||
ENDIF
|
||||
IFEVENT FARANSWER THEN
|
||||
CLEAR
|
||||
SHOWDISPLAY "talkingto" AT 2
|
||||
GOTO "stableCall"
|
||||
ENDIF
|
||||
IFEVENT BUSY THEN
|
||||
CLEAR
|
||||
SHOWDISPLAY "titles" AT 1 NOUPDATE
|
||||
SHOWDISPLAY "busy" AT 2 NOUPDATE
|
||||
SHOWDISPLAY "callname" at 3 NOUPDATE
|
||||
SHOWDISPLAY "callnum" at 4
|
||||
ENDIF
|
||||
IFEVENT REORDER THEN
|
||||
CLEAR
|
||||
SHOWDISPLAY "titles" AT 1 NOUPDATE
|
||||
SHOWDISPLAY "reorder" AT 2 NOUPDATE
|
||||
SHOWDISPLAY "callname" at 3 NOUPDATE
|
||||
SHOWDISPLAY "callnum" at 4
|
||||
ENDIF
|
||||
ENDSUB
|
||||
|
||||
SUB "stableCall" IS
|
||||
IFEVENT REORDER THEN
|
||||
SHOWDISPLAY "callended" AT 2
|
||||
ENDIF
|
||||
ENDSUB
|
||||
|
43
egasterisk/asterisk.conf
Normal file
43
egasterisk/asterisk.conf
Normal file
|
@ -0,0 +1,43 @@
|
|||
[directories]
|
||||
astetcdir => /etc/asterisk
|
||||
astmoddir => /usr/lib/asterisk/modules
|
||||
astvarlibdir => /var/lib/asterisk
|
||||
astdatadir => /var/lib/asterisk
|
||||
astagidir => /var/lib/asterisk/agi-bin
|
||||
astspooldir => /var/spool/asterisk
|
||||
astrundir => /var/run
|
||||
astlogdir => /var/log/asterisk
|
||||
|
||||
;[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
|
||||
;maxcalls = 10 ; Maximum amount of calls allowed
|
||||
;maxload = 0.9 ; Asterisk stops accepting new calls if the load average exceed this limit
|
||||
;cache_record_files = yes ; Cache recorded sound files to another directory during recording
|
||||
;record_cache_dir = /tmp ; Specify cache directory (used in cnjunction with cache_record_files)
|
||||
;transmit_silence_during_record = yes ; Transmit SLINEAR silence while a channel is being recorded
|
||||
;transmit_silence = yes ; Transmit SLINEAR silence while a channel is being recorded or DTMF is being generated
|
||||
;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
|
||||
|
||||
; Changing the following lines may compromise your security.
|
||||
;[files]
|
||||
;astctlpermissions = 0660
|
||||
;astctlowner = root
|
||||
;astctlgroup = apache
|
||||
;astctl = asterisk.ctl
|
148
egasterisk/cdr.conf
Normal file
148
egasterisk/cdr.conf
Normal file
|
@ -0,0 +1,148 @@
|
|||
;
|
||||
; Asterisk Call Detail Record engine configuration
|
||||
;
|
||||
; CDR is Call Detail Record, which provides logging services via a variety of
|
||||
; pluggable backend modules. Detailed call information can be recorded to
|
||||
; databases, files, etc. Useful for billing, fraud prevention, compliance with
|
||||
; Sarbanes-Oxley aka The Enron Act, QOS evaluations, and more.
|
||||
;
|
||||
|
||||
[general]
|
||||
|
||||
; Define whether or not to use CDR logging. Setting this to "no" will override
|
||||
; any loading of backend CDR modules. Default is "yes".
|
||||
;enable=yes
|
||||
|
||||
; Define whether or not to log unanswered calls. Setting this to "yes" will
|
||||
; report every attempt to ring a phone in dialing attempts, when it was not
|
||||
; answered. For example, if you try to dial 3 extensions, and this option is "yes",
|
||||
; you will get 3 CDR's, one for each phone that was rung. Default is "no". Some
|
||||
; find this information horribly useless. Others find it very valuable. Note, in "yes"
|
||||
; mode, you will see one CDR, with one of the call targets on one side, and the originating
|
||||
; channel on the other, and then one CDR for each channel attempted. This may seem
|
||||
; redundant, but cannot be helped.
|
||||
;unanswered = no
|
||||
|
||||
; Define the CDR batch mode, where instead of posting the CDR at the end of
|
||||
; every call, the data will be stored in a buffer to help alleviate load on the
|
||||
; asterisk server. Default is "no".
|
||||
;
|
||||
; WARNING WARNING WARNING
|
||||
; Use of batch mode may result in data loss after unsafe asterisk termination
|
||||
; ie. software crash, power failure, kill -9, etc.
|
||||
; WARNING WARNING WARNING
|
||||
;
|
||||
;batch=no
|
||||
|
||||
; Define the maximum number of CDRs to accumulate in the buffer before posting
|
||||
; them to the backend engines. 'batch' must be set to 'yes'. Default is 100.
|
||||
;size=100
|
||||
|
||||
; Define the maximum time to accumulate CDRs in the buffer before posting them
|
||||
; to the backend engines. If this time limit is reached, then it will post the
|
||||
; records, regardless of the value defined for 'size'. 'batch' must be set to
|
||||
; 'yes'. Note that time is in seconds. Default is 300 (5 minutes).
|
||||
;time=300
|
||||
|
||||
; The CDR engine uses the internal asterisk scheduler to determine when to post
|
||||
; records. Posting can either occur inside the scheduler thread, or a new
|
||||
; thread can be spawned for the submission of every batch. For small batches,
|
||||
; it might be acceptable to just use the scheduler thread, so set this to "yes".
|
||||
; For large batches, say anything over size=10, a new thread is recommended, so
|
||||
; set this to "no". Default is "no".
|
||||
;scheduleronly=no
|
||||
|
||||
; When shutting down asterisk, you can block until the CDRs are submitted. If
|
||||
; you don't, then data will likely be lost. You can always check the size of
|
||||
; the CDR batch buffer with the CLI "cdr status" command. To enable blocking on
|
||||
; submission of CDR data during asterisk shutdown, set this to "yes". Default
|
||||
; is "yes".
|
||||
;safeshutdown=yes
|
||||
|
||||
; Normally, CDR's are not closed out until after all extensions are finished
|
||||
; executing. By enabling this option, the CDR will be ended before executing
|
||||
; the "h" extension so that CDR values such as "end" and "billsec" may be
|
||||
; retrieved inside of of this extension.
|
||||
;endbeforehexten=no
|
||||
|
||||
;
|
||||
;
|
||||
; CHOOSING A CDR "BACKEND" (what kind of output to generate)
|
||||
;
|
||||
; To choose a backend, you have to make sure either the right category is
|
||||
; defined in this file, or that the appropriate config file exists, and has the
|
||||
; proper definitions in it. If there are any problems, usually, the entry will
|
||||
; silently ignored, and you get no output.
|
||||
;
|
||||
; Also, please note that you can generate CDR records in as many formats as you
|
||||
; wish. If you configure 5 different CDR formats, then each event will be logged
|
||||
; in 5 different places! In the example config files, all formats are commented
|
||||
; out except for the cdr-csv format.
|
||||
;
|
||||
; Here are all the possible back ends:
|
||||
;
|
||||
; csv, custom, manager, odbc, pgsql, radius, sqlite, tds
|
||||
; (also, mysql is available via the asterisk-addons, due to licensing
|
||||
; requirements)
|
||||
; (please note, also, that other backends can be created, by creating
|
||||
; a new backend module in the source cdr/ directory!)
|
||||
;
|
||||
; Some of the modules required to provide these backends will not build or install
|
||||
; unless some dependency requirements are met. Examples of this are pgsql, odbc,
|
||||
; etc. If you are not getting output as you would expect, the first thing to do
|
||||
; is to run the command "make menuselect", and check what modules are available,
|
||||
; by looking in the "2. Call Detail Recording" option in the main menu. If your
|
||||
; backend is marked with XXX, you know that the "configure" command could not find
|
||||
; the required libraries for that option.
|
||||
;
|
||||
; To get CDRs to be logged to the plain-jane /var/log/asterisk/cdr-csv/Master.csv
|
||||
; file, define the [csv] category in this file. No database necessary. The example
|
||||
; config files are set up to provide this kind of output by default.
|
||||
;
|
||||
; To get custom csv CDR records, make sure the cdr_custom.conf file
|
||||
; is present, and contains the proper [mappings] section. The advantage to
|
||||
; using this backend, is that you can define which fields to output, and in
|
||||
; what order. By default, the example configs are set up to mimic the cdr-csv
|
||||
; output. If you don't make any changes to the mappings, you are basically generating
|
||||
; the same thing as cdr-csv, but expending more CPU cycles to do so!
|
||||
;
|
||||
; To get manager events generated, make sure the cdr_manager.conf file exists,
|
||||
; and the [general] section is defined, with the single variable 'enabled = yes'.
|
||||
;
|
||||
; For odbc, make sure all the proper libs are installed, that "make menuselect"
|
||||
; shows that the modules are available, and the cdr_odbc.conf file exists, and
|
||||
; has a [global] section with the proper variables defined.
|
||||
;
|
||||
; For pgsql, make sure all the proper libs are installed, that "make menuselect"
|
||||
; shows that the modules are available, and the cdr_pgsql.conf file exists, and
|
||||
; has a [global] section with the proper variables defined.
|
||||
;
|
||||
; For logging to radius databases, make sure all the proper libs are installed, that
|
||||
; "make menuselect" shows that the modules are available, and the [radius]
|
||||
; category is defined in this file, and in that section, make sure the 'radiuscfg'
|
||||
; variable is properly pointing to an existing radiusclient.conf file.
|
||||
;
|
||||
; For logging to sqlite databases, make sure the 'cdr.db' file exists in the log directory,
|
||||
; which is usually /var/log/asterisk. Of course, the proper libraries should be available
|
||||
; during the 'configure' operation.
|
||||
;
|
||||
; For tds logging, make sure the proper libraries are available during the 'configure'
|
||||
; phase, and that cdr_tds.conf exists and is properly set up with a [global] category.
|
||||
;
|
||||
; Also, remember, that if you wish to log CDR info to a database, you will have to define
|
||||
; a specific table in that databse to make things work! See the doc directory for more details
|
||||
; on how to create this table in each database.
|
||||
;
|
||||
|
||||
[csv]
|
||||
usegmtime=yes ; log date/time in GMT. Default is "no"
|
||||
loguniqueid=yes ; log uniqueid. Default is "no"
|
||||
loguserfield=yes ; log user field. Default is "no"
|
||||
|
||||
;[radius]
|
||||
;usegmtime=yes ; log date/time in GMT
|
||||
;loguniqueid=yes ; log uniqueid
|
||||
;loguserfield=yes ; log user field
|
||||
; Set this to the location of the radiusclient-ng configuration file
|
||||
; The default is /etc/radiusclient-ng/radiusclient.conf
|
||||
;radiuscfg => /usr/local/etc/radiusclient-ng/radiusclient.conf
|
10
egasterisk/cdr_custom.conf
Normal file
10
egasterisk/cdr_custom.conf
Normal file
|
@ -0,0 +1,10 @@
|
|||
;
|
||||
; Mappings for custom config file
|
||||
;
|
||||
; to get your csv output in a format tailored to your liking, uncomment the following
|
||||
; and look for the output in the cdr-custom/Master.csv file (usually in /var/log/asterisk).
|
||||
;
|
||||
;
|
||||
;[mappings]
|
||||
;Master.csv => "${CDR(clid)}","${CDR(src)}","${CDR(dst)}","${CDR(dcontext)}","${CDR(channel)}","${CDR(dstchannel)}","${CDR(lastapp)}","${CDR(lastdata)}","${CDR(start)}","${CDR(answer)}","${CDR(end)}","${CDR(duration)}","${CDR(billsec)}","${CDR(disposition)}","${CDR(amaflags)}","${CDR(accountcode)}","${CDR(uniqueid)}","${CDR(userfield)}"
|
||||
|
6
egasterisk/cdr_manager.conf
Normal file
6
egasterisk/cdr_manager.conf
Normal file
|
@ -0,0 +1,6 @@
|
|||
;
|
||||
; Asterisk Call Management CDR
|
||||
;
|
||||
[general]
|
||||
enabled = no
|
||||
|
12
egasterisk/cdr_odbc.conf
Normal file
12
egasterisk/cdr_odbc.conf
Normal file
|
@ -0,0 +1,12 @@
|
|||
;
|
||||
; cdr_odbc.conf
|
||||
;
|
||||
|
||||
;[global]
|
||||
;dsn=MySQL-test
|
||||
;username=username
|
||||
;password=password
|
||||
;loguniqueid=yes
|
||||
;dispositionstring=yes
|
||||
;table=cdr ;"cdr" is default table name
|
||||
;usegmtime=no ; set to "yes" to log in GMT
|
9
egasterisk/cdr_pgsql.conf
Normal file
9
egasterisk/cdr_pgsql.conf
Normal file
|
@ -0,0 +1,9 @@
|
|||
; Sample Asterisk config file for CDR logging to PostgresSQL
|
||||
|
||||
[global]
|
||||
;hostname=localhost
|
||||
;port=5432
|
||||
;dbname=asterisk
|
||||
;password=password
|
||||
;user=postgres
|
||||
;table=cdr ;SQL table where CDRs will be inserted
|
11
egasterisk/cdr_tds.conf
Normal file
11
egasterisk/cdr_tds.conf
Normal file
|
@ -0,0 +1,11 @@
|
|||
; Sample Asterisk config file for CDR logging to FreeTDS
|
||||
|
||||
;[global]
|
||||
;hostname=fs.malico.loc
|
||||
;port=1433
|
||||
;dbname=MalicoHN
|
||||
;user=mangUsr
|
||||
;password=
|
||||
;charset=BIG5
|
||||
;table=cdr
|
||||
|
65
egasterisk/codecs.conf
Normal file
65
egasterisk/codecs.conf
Normal file
|
@ -0,0 +1,65 @@
|
|||
[speex]
|
||||
; CBR encoding quality [0..10]
|
||||
; used only when vbr = false
|
||||
quality => 3
|
||||
|
||||
; codec complexity [0..10]
|
||||
; tradeoff between cpu/quality
|
||||
complexity => 2
|
||||
|
||||
; perceptual enhancement [true / false]
|
||||
; improves clarity of decoded speech
|
||||
enhancement => true
|
||||
|
||||
; voice activity detection [true / false]
|
||||
; reduces bitrate when no voice detected, used only for CBR
|
||||
; (implicit in VBR/ABR)
|
||||
vad => true
|
||||
|
||||
; variable bit rate [true / false]
|
||||
; uses bit rate proportionate to voice complexity
|
||||
vbr => true
|
||||
|
||||
; available bit rate [bps, 0 = off]
|
||||
; encoding quality modulated to match this target bit rate
|
||||
; not recommended with dtx or pp_vad - may cause bandwidth spikes
|
||||
abr => 0
|
||||
|
||||
; VBR encoding quality [0-10]
|
||||
; floating-point values allowed
|
||||
vbr_quality => 4
|
||||
|
||||
; discontinuous transmission [true / false]
|
||||
; stops transmitting completely when silence is detected
|
||||
; pp_vad is far more effective but more CPU intensive
|
||||
dtx => false
|
||||
|
||||
; preprocessor configuration
|
||||
; these options only affect Speex v1.1.8 or newer
|
||||
|
||||
; enable preprocessor [true / false]
|
||||
; allows dsp functionality below but incurs CPU overhead
|
||||
preprocess => false
|
||||
|
||||
; preproc voice activity detection [true / false]
|
||||
; more advanced equivalent of DTX, based on voice frequencies
|
||||
pp_vad => false
|
||||
|
||||
; preproc automatic gain control [true / false]
|
||||
pp_agc => false
|
||||
pp_agc_level => 8000
|
||||
|
||||
; preproc denoiser [true / false]
|
||||
pp_denoise => false
|
||||
|
||||
; preproc dereverb [true / false]
|
||||
pp_dereverb => false
|
||||
pp_dereverb_decay => 0.4
|
||||
pp_dereverb_level => 0.3
|
||||
|
||||
|
||||
[plc]
|
||||
; for all codecs which do not support native PLC
|
||||
; this determines whether to perform generic PLC
|
||||
; there is a minor performance penalty for this
|
||||
genericplc => true
|
5
egasterisk/dnsmgr.conf
Normal file
5
egasterisk/dnsmgr.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
[general]
|
||||
;enable=yes ; enable creation of managed DNS lookups
|
||||
; default is 'no'
|
||||
;refreshinterval=1200 ; refresh managed DNS lookups every <n> seconds
|
||||
; default is 300 (5 minutes)
|
239
egasterisk/dundi.conf
Normal file
239
egasterisk/dundi.conf
Normal file
|
@ -0,0 +1,239 @@
|
|||
;
|
||||
; DUNDi configuration file
|
||||
;
|
||||
; For more information about DUNDi, see http://www.dundi.com
|
||||
;
|
||||
;
|
||||
[general]
|
||||
;
|
||||
; The "general" section contains general parameters relating
|
||||
; to the operation of the dundi client and server.
|
||||
;
|
||||
; The first part should be your complete contact information
|
||||
; should someone else in your peer group need to contact you.
|
||||
;
|
||||
;department=Your Department
|
||||
;organization=Your Company, Inc.
|
||||
;locality=Your City
|
||||
;stateprov=ST
|
||||
;country=US
|
||||
;email=your@email.com
|
||||
;phone=+12565551212
|
||||
;
|
||||
;
|
||||
; Specify bind address and port number. Default is
|
||||
; 4520
|
||||
;
|
||||
;bindaddr=0.0.0.0
|
||||
;port=4520
|
||||
;
|
||||
; Our entity identifier (Should generally be the MAC address of the
|
||||
; machine it's running on. Defaults to the first eth address, but you
|
||||
; can override it here, as long as you set it to the MAC of *something*
|
||||
; you own!)
|
||||
;
|
||||
;entityid=00:07:E9:3B:76:60
|
||||
;
|
||||
; Peers shall cache our query responses for the specified time,
|
||||
; given in seconds. Default is 3600.
|
||||
;
|
||||
;cachetime=3600
|
||||
;
|
||||
; This defines the max depth in which to search the DUNDi system.
|
||||
; Note that the maximum time that we will wait for a response is
|
||||
; (2000 + 200 * ttl) ms.
|
||||
;
|
||||
ttl=32
|
||||
;
|
||||
; If we don't get ACK to our DPDISCOVER within 2000ms, and autokill is set
|
||||
; to yes, then we cancel the whole thing (that's enough time for one
|
||||
; retransmission only). This is used to keep things from stalling for a long
|
||||
; time for a host that is not available, but would be ill advised for bad
|
||||
; connections. In addition to 'yes' or 'no' you can also specify a number
|
||||
; of milliseconds. See 'qualify' for individual peers to turn on for just
|
||||
; a specific peer.
|
||||
;
|
||||
autokill=yes
|
||||
;
|
||||
; pbx_dundi creates a rotating key called "secret", under the family
|
||||
; 'secretpath'. The default family is dundi (resulting in
|
||||
; the key being held at dundi/secret).
|
||||
;
|
||||
;secretpath=dundi
|
||||
;
|
||||
; The 'storehistory' option (also changeable at runtime with
|
||||
; 'dundi store history' and 'dundi no store history') will
|
||||
; cause the DUNDi engine to keep track of the last several
|
||||
; queries and the amount of time each query took to execute
|
||||
; for the purpose of tracking slow nodes. This option is
|
||||
; off by default due to performance impacts.
|
||||
;
|
||||
;storehistory=yes
|
||||
|
||||
[mappings]
|
||||
;
|
||||
; The "mappings" section maps DUNDi contexts
|
||||
; to contexts on the local asterisk system. Remember
|
||||
; that numbers that are made available under the e164
|
||||
; DUNDi context are regulated by the DUNDi General Peering
|
||||
; Agreement (GPA) if you are a member of the DUNDi E.164
|
||||
; Peering System.
|
||||
;
|
||||
; dundi_context => local_context,weight,tech,dest[,options]]
|
||||
;
|
||||
; 'dundi_context' is the name of the context being requested
|
||||
; within the DUNDi request
|
||||
;
|
||||
; 'local_context' is the name of the context on the local system
|
||||
; in which numbers can be looked up for which responses shall be given.
|
||||
;
|
||||
; 'weight' is the weight to use for the responses provided from this
|
||||
; mapping. The number must be >= 0 and < 60000. Since it is totally
|
||||
; valid to receive multiple responses to a query, responses received
|
||||
; with a lower weight are tried first. Note that the weight has a
|
||||
; special meaning in the e164 context - see the GPA for more details.
|
||||
;
|
||||
; 'tech' is the technology to use (IAX, SIP, H323)
|
||||
;
|
||||
; 'dest' is the destination to supply for reaching that number. The
|
||||
; following variables can be used in the destination string and will
|
||||
; be automatically substituted:
|
||||
; ${NUMBER}: The number being requested
|
||||
; ${IPADDR}: The IP address to connect to
|
||||
; ${SECRET}: The current rotating secret key to be used
|
||||
;
|
||||
; Further options may include:
|
||||
;
|
||||
; nounsolicited: No unsolicited calls of any type permitted via this
|
||||
; route
|
||||
; nocomunsolicit: No commercial unsolicited calls permitted via
|
||||
; this route
|
||||
; residential: This number is known to be a residence
|
||||
; commercial: This number is known to be a business
|
||||
; mobile: This number is known to be a mobile phone
|
||||
; nocomunsolicit: No commercial unsolicited calls permitted via
|
||||
; this route
|
||||
; nopartial: Do not search for partial matches
|
||||
;
|
||||
; There *must* exist an entry in mappings for DUNDi to respond
|
||||
; to any request, although it may be empty.
|
||||
;
|
||||
;e164 => dundi-e164-canonical,0,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial
|
||||
;e164 => dundi-e164-customers,100,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial
|
||||
;e164 => dundi-e164-via-pstn,400,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial
|
||||
|
||||
;digexten => default,0,IAX2,guest@lappy/${NUMBER}
|
||||
;asdf =>
|
||||
|
||||
|
||||
;
|
||||
;
|
||||
; The remaining sections represent the peers
|
||||
; that we fundamentally trust. The section name
|
||||
; represents the name and optionally at a specific
|
||||
; DUNDi context if you want the trust to be established
|
||||
; for only a specific DUNDi context.
|
||||
;
|
||||
; inkey - What key they will be authenticating to us with
|
||||
;
|
||||
; outkey - What key we use to authenticate to them
|
||||
;
|
||||
; host - What their host is
|
||||
;
|
||||
; order - What search order to use. May be 'primary', 'secondary',
|
||||
; 'tertiary' or 'quartiary'. In large systems, it is beneficial
|
||||
; to only query one up-stream host in order to maximize caching
|
||||
; value. Adding one with primary and one with secondary gives you
|
||||
; redundancy without sacrificing performance.
|
||||
;
|
||||
; include - Includes this peer when searching a particular context
|
||||
; for lookup (set "all" to perform all lookups with that
|
||||
; host. This is also the context in which peers are permitted
|
||||
; to precache.
|
||||
;
|
||||
; noinclude - Disincludes this peer when searching a particular context
|
||||
; for lookup (set "all" to perform no lookups with that
|
||||
; host.
|
||||
;
|
||||
; permit - Permits this peer to search a given DUNDi context on
|
||||
; the local system. Set "all" to permit this host to
|
||||
; lookup all contexts. This is also a context for which
|
||||
; we will create/forward PRECACHE commands.
|
||||
;
|
||||
; deny - Denies this peer to search a given DUNDi context on
|
||||
; the local system. Set "all" to deny this host to
|
||||
; lookup all contexts.
|
||||
;
|
||||
; model - inbound, outbound, or symmetric for whether we receive
|
||||
; requests only, transmit requests only, or do both.
|
||||
;
|
||||
; precache - Utilize/Permit precaching with this peer (to pre
|
||||
; cache means to provide an answer when no request
|
||||
; was made and is used so that machines with few
|
||||
; routes can push those routes up a to a higher level).
|
||||
; outgoing means we send precache routes to this peer,
|
||||
; incoming means we permit this peer to send us
|
||||
; precache routes. symmetric means we do both.
|
||||
;
|
||||
; Note: You cannot mix symmetric/outbound model with symmetric/inbound
|
||||
; precache, nor can you mix symmetric/inbound model with symmetric/outbound
|
||||
; precache.
|
||||
;
|
||||
;
|
||||
; The '*' peer is special and matches an unspecified entity
|
||||
;
|
||||
|
||||
;
|
||||
; Sample Primary e164 DUNDi peer
|
||||
;
|
||||
;[00:50:8B:F3:75:BB]
|
||||
;model = symmetric
|
||||
;host = 64.215.96.114
|
||||
;inkey = digium
|
||||
;outkey = misery
|
||||
;include = e164
|
||||
;permit = e164
|
||||
;qualify = yes
|
||||
|
||||
;
|
||||
; Sample Secondary e164 DUNDi peer
|
||||
;
|
||||
;[00:A0:C9:96:92:84]
|
||||
;model = symmetric
|
||||
;host = misery.digium.com
|
||||
;inkey = misery
|
||||
;outkey = ourkey
|
||||
;include = e164
|
||||
;permit = e164
|
||||
;qualify = yes
|
||||
;order = secondary
|
||||
|
||||
;
|
||||
; Sample "push mode" downstream host
|
||||
;
|
||||
;[00:0C:76:96:75:28]
|
||||
;model = inbound
|
||||
;host = dynamic
|
||||
;precache = inbound
|
||||
;inkey = littleguy
|
||||
;outkey = ourkey
|
||||
;include = e164 ; In this case used only for precaching
|
||||
;permit = e164
|
||||
;qualify = yes
|
||||
|
||||
;
|
||||
; Sample "push mode" upstream host
|
||||
;
|
||||
;[00:07:E9:3B:76:60]
|
||||
;model = outbound
|
||||
;precache = outbound
|
||||
;host = 216.207.245.34
|
||||
;register = yes
|
||||
;inkey = dhcp34
|
||||
;permit = all ; In this case used only for precaching
|
||||
;include = all
|
||||
;qualify = yes
|
||||
;outkey=foo
|
||||
|
||||
;[*]
|
||||
;
|
22
egasterisk/enum.conf
Normal file
22
egasterisk/enum.conf
Normal file
|
@ -0,0 +1,22 @@
|
|||
;
|
||||
; ENUM Configuration for resolving phone numbers over DNS
|
||||
;
|
||||
; Sample config for Asterisk
|
||||
; This file is reloaded at "module reload enum" in the CLI
|
||||
;
|
||||
[general]
|
||||
;
|
||||
; The search list for domains may be customized. Domains are searched
|
||||
; in the order they are listed here.
|
||||
;
|
||||
search => e164.arpa
|
||||
;
|
||||
; If you'd like to use the E.164.org public ENUM registry in addition
|
||||
; to the official e164.arpa one, uncomment the following line
|
||||
;
|
||||
;search => e164.org
|
||||
;
|
||||
; As there are more H323 drivers available you have to select to which
|
||||
; drive a H323 URI will map. Default is "H323".
|
||||
;
|
||||
h323driver => H323
|
58
egasterisk/extconfig.conf
Normal file
58
egasterisk/extconfig.conf
Normal file
|
@ -0,0 +1,58 @@
|
|||
;
|
||||
; Static and realtime external configuration
|
||||
; engine configuration
|
||||
;
|
||||
; Please read doc/extconfig.txt for basic table
|
||||
; formatting information.
|
||||
;
|
||||
[settings]
|
||||
;
|
||||
; Static configuration files:
|
||||
;
|
||||
; file.conf => driver,database[,table]
|
||||
;
|
||||
; maps a particular configuration file to the given
|
||||
; database driver, database and table (or uses the
|
||||
; name of the file as the table if not specified)
|
||||
;
|
||||
;uncomment to load queues.conf via the odbc engine.
|
||||
;
|
||||
;queues.conf => odbc,asterisk,ast_config
|
||||
;
|
||||
; The following files CANNOT be loaded from Realtime storage:
|
||||
; asterisk.conf
|
||||
; extconfig.conf (this file)
|
||||
; logger.conf
|
||||
;
|
||||
; Additionally, the following files cannot be loaded from
|
||||
; Realtime storage unless the storage driver is loaded
|
||||
; early using 'preload' statements in modules.conf:
|
||||
; manager.conf
|
||||
; cdr.conf
|
||||
; rtp.conf
|
||||
;
|
||||
;
|
||||
; Realtime configuration engine
|
||||
;
|
||||
; maps a particular family of realtime
|
||||
; configuration to a given database driver,
|
||||
; database and table (or uses the name of
|
||||
; the family if the table is not specified
|
||||
;
|
||||
;example => odbc,asterisk,alttable
|
||||
;
|
||||
; "odbc" is shown in the examples below, but is not the only valid realtime
|
||||
; engine. There is:
|
||||
; odbc ... res_config_odbc
|
||||
; pgsql ... res_config_pgsql
|
||||
; mysql ... res_config_mysql (available from asterisk-addons)
|
||||
;
|
||||
;iaxusers => odbc,asterisk
|
||||
;iaxpeers => odbc,asterisk
|
||||
;sipusers => odbc,asterisk
|
||||
;sippeers => odbc,asterisk
|
||||
;voicemail => odbc,asterisk
|
||||
;extensions => odbc,asterisk
|
||||
;queues => odbc,asterisk
|
||||
;queue_members => odbc,asterisk
|
||||
|
448
egasterisk/extensions.ael
Normal file
448
egasterisk/extensions.ael
Normal file
|
@ -0,0 +1,448 @@
|
|||
//
|
||||
// Example AEL config file
|
||||
//
|
||||
//
|
||||
// Static extension configuration file, used by
|
||||
// the pbx_ael module. This is where you configure all your
|
||||
// inbound and outbound calls in Asterisk.
|
||||
//
|
||||
// This configuration file is reloaded
|
||||
// - With the "ael reload" command in the CLI
|
||||
// - With the "reload" command (that reloads everything) in the CLI
|
||||
|
||||
// The "Globals" category contains global variables that can be referenced
|
||||
// in the dialplan by using the GLOBAL dialplan function:
|
||||
// ${GLOBAL(VARIABLE)}
|
||||
// ${${GLOBAL(VARIABLE)}} or ${text${GLOBAL(VARIABLE)}} or any hybrid
|
||||
// Unix/Linux environmental variables are reached with the ENV dialplan
|
||||
// function: ${ENV(VARIABLE)}
|
||||
//
|
||||
|
||||
globals {
|
||||
CONSOLE="Console/dsp"; // Console interface for demo
|
||||
//CONSOLE=Zap/1
|
||||
//CONSOLE=Phone/phone0
|
||||
IAXINFO=guest; // IAXtel username/password
|
||||
//IAXINFO="myuser:mypass";
|
||||
TRUNK="Zap/g2"; // Trunk interface
|
||||
//
|
||||
// Note the 'g2' in the TRUNK variable above. It specifies which group (defined
|
||||
// in zapata.conf) to dial, i.e. group 2, and how to choose a channel to use in
|
||||
// the specified group. The four possible options are:
|
||||
//
|
||||
// g: select the lowest-numbered non-busy Zap channel
|
||||
// (aka. ascending sequential hunt group).
|
||||
// G: select the highest-numbered non-busy Zap channel
|
||||
// (aka. descending sequential hunt group).
|
||||
// r: use a round-robin search, starting at the next highest channel than last
|
||||
// time (aka. ascending rotary hunt group).
|
||||
// R: use a round-robin search, starting at the next lowest channel than last
|
||||
// time (aka. descending rotary hunt group).
|
||||
//
|
||||
TRUNKMSD=1; // MSD digits to strip (usually 1 or 0)
|
||||
//TRUNK=IAX2/user:pass@provider
|
||||
};
|
||||
|
||||
//
|
||||
// Any category other than "General" and "Globals" represent
|
||||
// extension contexts, which are collections of extensions.
|
||||
//
|
||||
// Extension names may be numbers, letters, or combinations
|
||||
// thereof. If an extension name is prefixed by a '_'
|
||||
// character, it is interpreted as a pattern rather than a
|
||||
// literal. In patterns, some characters have special meanings:
|
||||
//
|
||||
// X - any digit from 0-9
|
||||
// Z - any digit from 1-9
|
||||
// N - any digit from 2-9
|
||||
// [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9)
|
||||
// . - wildcard, matches anything remaining (e.g. _9011. matches
|
||||
// anything starting with 9011 excluding 9011 itself)
|
||||
// ! - wildcard, causes the matching process to complete as soon as
|
||||
// it can unambiguously determine that no other matches are possible
|
||||
//
|
||||
// For example the extension _NXXXXXX would match normal 7 digit dialings,
|
||||
// while _1NXXNXXXXXX would represent an area code plus phone number
|
||||
// preceded by a one.
|
||||
//
|
||||
// Each step of an extension is ordered by priority, which must
|
||||
// always start with 1 to be considered a valid extension. The priority
|
||||
// "next" or "n" means the previous priority plus one, regardless of whether
|
||||
// the previous priority was associated with the current extension or not.
|
||||
// The priority "same" or "s" means the same as the previously specified
|
||||
// priority, again regardless of whether the previous entry was for the
|
||||
// same extension. Priorities may be immediately followed by a plus sign
|
||||
// and another integer to add that amount (most useful with 's' or 'n').
|
||||
// Priorities may then also have an alias, or label, in
|
||||
// parenthesis after their name which can be used in goto situations
|
||||
//
|
||||
// Contexts contain several lines, one for each step of each
|
||||
// extension, which can take one of two forms as listed below,
|
||||
// with the first form being preferred. One may include another
|
||||
// context in the current one as well, optionally with a
|
||||
// date and time. Included contexts are included in the order
|
||||
// they are listed.
|
||||
//
|
||||
//context name {
|
||||
// exten-name => {
|
||||
// application(arg1,arg2,...);
|
||||
//
|
||||
// Timing list for includes is
|
||||
//
|
||||
// <time range>|<days of week>|<days of month>|<months>
|
||||
//
|
||||
// includes {
|
||||
// daytime|9:00-17:00|mon-fri|*|*;
|
||||
// };
|
||||
//
|
||||
// ignorepat can be used to instruct drivers to not cancel dialtone upon
|
||||
// receipt of a particular pattern. The most commonly used example is
|
||||
// of course '9' like this:
|
||||
//
|
||||
// ignorepat => 9;
|
||||
//
|
||||
// so that dialtone remains even after dialing a 9.
|
||||
//};
|
||||
|
||||
|
||||
//
|
||||
// Sample entries for extensions.conf
|
||||
//
|
||||
//
|
||||
context ael-dundi-e164-canonical {
|
||||
//
|
||||
// List canonical entries here
|
||||
//
|
||||
// 12564286000 => &ael-std-exten(6000,IAX2/foo);
|
||||
// _125642860XX => Dial(IAX2/otherbox/${EXTEN:7});
|
||||
};
|
||||
|
||||
context ael-dundi-e164-customers {
|
||||
//
|
||||
// If you are an ITSP or Reseller, list your customers here.
|
||||
//
|
||||
//_12564286000 => Dial(SIP/customer1);
|
||||
//_12564286001 => Dial(IAX2/customer2);
|
||||
};
|
||||
|
||||
context ael-dundi-e164-via-pstn {
|
||||
//
|
||||
// If you are freely delivering calls to the PSTN, list them here
|
||||
//
|
||||
//_1256428XXXX => Dial(Zap/g2/${EXTEN:7}); // Expose all of 256-428
|
||||
//_1256325XXXX => Dial(Zap/g2/${EXTEN:7}); // Ditto for 256-325
|
||||
};
|
||||
|
||||
context ael-dundi-e164-local {
|
||||
//
|
||||
// Context to put your dundi IAX2 or SIP user in for
|
||||
// full access
|
||||
//
|
||||
includes {
|
||||
ael-dundi-e164-canonical;
|
||||
ael-dundi-e164-customers;
|
||||
ael-dundi-e164-via-pstn;
|
||||
};
|
||||
};
|
||||
|
||||
context ael-dundi-e164-switch {
|
||||
//
|
||||
// Just a wrapper for the switch
|
||||
//
|
||||
|
||||
switches {
|
||||
DUNDi/e164;
|
||||
};
|
||||
};
|
||||
|
||||
context ael-dundi-e164-lookup {
|
||||
//
|
||||
// Locally to lookup, try looking for a local E.164 solution
|
||||
// then try DUNDi if we don't have one.
|
||||
//
|
||||
includes {
|
||||
ael-dundi-e164-local;
|
||||
ael-dundi-e164-switch;
|
||||
};
|
||||
//
|
||||
};
|
||||
|
||||
//
|
||||
// DUNDi can also be implemented as a Macro instead of using
|
||||
// the Local channel driver.
|
||||
//
|
||||
macro ael-dundi-e164(exten) {
|
||||
//
|
||||
// ARG1 is the extension to Dial
|
||||
//
|
||||
goto ${exten}|1;
|
||||
return;
|
||||
};
|
||||
|
||||
//
|
||||
// Here are the entries you need to participate in the IAXTEL
|
||||
// call routing system. Most IAXTEL numbers begin with 1-700, but
|
||||
// there are exceptions. For more information, and to sign
|
||||
// up, please go to www.gnophone.com or www.iaxtel.com
|
||||
//
|
||||
context ael-iaxtel700 {
|
||||
_91700XXXXXXX => Dial(IAX2/${IAXINFO}@iaxtel.com/${EXTEN:1}@iaxtel);
|
||||
};
|
||||
|
||||
//
|
||||
// The SWITCH statement permits a server to share the dialplan with
|
||||
// another server. Use with care: Reciprocal switch statements are not
|
||||
// allowed (e.g. both A -> B and B -> A), and the switched server needs
|
||||
// to be on-line or else dialing can be severly delayed.
|
||||
//
|
||||
context ael-iaxprovider {
|
||||
switches {
|
||||
// IAX2/user:[key]@myserver/mycontext;
|
||||
};
|
||||
};
|
||||
|
||||
context ael-trunkint {
|
||||
//
|
||||
// International long distance through trunk
|
||||
//
|
||||
includes {
|
||||
ael-dundi-e164-lookup;
|
||||
};
|
||||
_9011. => {
|
||||
&ael-dundi-e164(${EXTEN:4});
|
||||
Dial(${TRUNK}/${EXTEN:${TRUNKMSD}});
|
||||
};
|
||||
};
|
||||
|
||||
context ael-trunkld {
|
||||
//
|
||||
// Long distance context accessed through trunk
|
||||
//
|
||||
includes {
|
||||
ael-dundi-e164-lookup;
|
||||
};
|
||||
_91NXXNXXXXXX => {
|
||||
&ael-dundi-e164(${EXTEN:1});
|
||||
Dial(${TRUNK}/${EXTEN:${TRUNKMSD}});
|
||||
};
|
||||
};
|
||||
|
||||
context ael-trunklocal {
|
||||
//
|
||||
// Local seven-digit dialing accessed through trunk interface
|
||||
//
|
||||
_9NXXXXXX => {
|
||||
Dial(${TRUNK}/${EXTEN:${TRUNKMSD}});
|
||||
};
|
||||
};
|
||||
|
||||
context ael-trunktollfree {
|
||||
//
|
||||
// Long distance context accessed through trunk interface
|
||||
//
|
||||
|
||||
_91800NXXXXXX => Dial(${TRUNK}/${EXTEN:${TRUNKMSD}});
|
||||
_91888NXXXXXX => Dial(${TRUNK}/${EXTEN:${TRUNKMSD}});
|
||||
_91877NXXXXXX => Dial(${TRUNK}/${EXTEN:${TRUNKMSD}});
|
||||
_91866NXXXXXX => Dial(${TRUNK}/${EXTEN:${TRUNKMSD}});
|
||||
};
|
||||
|
||||
context ael-international {
|
||||
//
|
||||
// Master context for international long distance
|
||||
//
|
||||
ignorepat => 9;
|
||||
includes {
|
||||
ael-longdistance;
|
||||
ael-trunkint;
|
||||
};
|
||||
};
|
||||
|
||||
context ael-longdistance {
|
||||
//
|
||||
// Master context for long distance
|
||||
//
|
||||
ignorepat => 9;
|
||||
includes {
|
||||
ael-local;
|
||||
ael-trunkld;
|
||||
};
|
||||
};
|
||||
|
||||
context ael-local {
|
||||
//
|
||||
// Master context for local, toll-free, and iaxtel calls only
|
||||
//
|
||||
ignorepat => 9;
|
||||
includes {
|
||||
ael-default;
|
||||
ael-trunklocal;
|
||||
ael-iaxtel700;
|
||||
ael-trunktollfree;
|
||||
ael-iaxprovider;
|
||||
};
|
||||
};
|
||||
|
||||
//
|
||||
// You can use an alternative switch type as well, to resolve
|
||||
// extensions that are not known here, for example with remote
|
||||
// IAX switching you transparently get access to the remote
|
||||
// Asterisk PBX
|
||||
//
|
||||
// switch => IAX2/user:password@bigserver/local
|
||||
//
|
||||
// An "lswitch" is like a switch but is literal, in that
|
||||
// variable substitution is not performed at load time
|
||||
// but is passed to the switch directly (presumably to
|
||||
// be substituted in the switch routine itself)
|
||||
//
|
||||
// lswitch => Loopback/12${EXTEN}@othercontext
|
||||
//
|
||||
// An "eswitch" is like a switch but the evaluation of
|
||||
// variable substitution is performed at runtime before
|
||||
// being passed to the switch routine.
|
||||
//
|
||||
// eswitch => IAX2/context@${CURSERVER}
|
||||
|
||||
|
||||
macro ael-std-exten-ael( ext , dev ) {
|
||||
Dial(${dev}/${ext},20);
|
||||
switch(${DIALSTATUS}) {
|
||||
case BUSY:
|
||||
Voicemail(${ext},b);
|
||||
break;
|
||||
default:
|
||||
Voicemail(${ext},u);
|
||||
};
|
||||
catch a {
|
||||
VoiceMailMain(${ext});
|
||||
return;
|
||||
};
|
||||
return;
|
||||
};
|
||||
|
||||
context ael-demo {
|
||||
s => {
|
||||
Wait(1);
|
||||
Answer();
|
||||
Set(TIMEOUT(digit)=5);
|
||||
Set(TIMEOUT(response)=10);
|
||||
restart:
|
||||
Background(demo-congrats);
|
||||
instructions:
|
||||
for (x=0; ${x} < 3; x=${x} + 1) {
|
||||
Background(demo-instruct);
|
||||
WaitExten();
|
||||
};
|
||||
};
|
||||
2 => {
|
||||
Background(demo-moreinfo);
|
||||
goto s|instructions;
|
||||
};
|
||||
3 => {
|
||||
Set(LANGUAGE()=fr);
|
||||
goto s|restart;
|
||||
};
|
||||
1000 => {
|
||||
goto ael-default|s|1;
|
||||
};
|
||||
500 => {
|
||||
Playback(demo-abouttotry);
|
||||
Dial(IAX2/guest@misery.digium.com/s@default);
|
||||
Playback(demo-nogo);
|
||||
goto s|instructions;
|
||||
};
|
||||
600 => {
|
||||
Playback(demo-echotest);
|
||||
Echo();
|
||||
Playback(demo-echodone);
|
||||
goto s|instructions;
|
||||
};
|
||||
_1234 => &ael-std-exten-ael(${EXTEN}, "IAX2");
|
||||
8500 => {
|
||||
VoicemailMain();
|
||||
goto s|instructions;
|
||||
};
|
||||
# => {
|
||||
Playback(demo-thanks);
|
||||
Hangup();
|
||||
};
|
||||
t => goto #|1;
|
||||
i => Playback(invalid);
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// If you wish to use AEL for your default context, remove it
|
||||
// from extensions.conf (or change its name or comment it out)
|
||||
// and then uncomment the one here.
|
||||
//
|
||||
|
||||
context ael-default {
|
||||
|
||||
// By default we include the demo. In a production system, you
|
||||
// probably don't want to have the demo there.
|
||||
|
||||
includes {
|
||||
ael-demo;
|
||||
};
|
||||
//
|
||||
// Extensions like the two below can be used for FWD, Nikotel, sipgate etc.
|
||||
// Note that you must have a [sipprovider] section in sip.conf whereas
|
||||
// the otherprovider.net example does not require such a peer definition
|
||||
//
|
||||
//_41X. => Dial(SIP/${EXTEN:2}@sipprovider,,r);
|
||||
//_42X. => Dial(SIP/user:passwd@${EXTEN:2}@otherprovider.net,30,rT);
|
||||
|
||||
// Real extensions would go here. Generally you want real extensions to be
|
||||
// 4 or 5 digits long (although there is no such requirement) and start with a
|
||||
// single digit that is fairly large (like 6 or 7) so that you have plenty of
|
||||
// room to overlap extensions and menu options without conflict. You can alias
|
||||
// them with names, too, and use global variables
|
||||
|
||||
// 6245 => {
|
||||
// hint(SIP/Grandstream1&SIP/Xlite1,Joe Schmoe); // Channel hints for presence
|
||||
// Dial(SIP/Grandstream1,20,rt); // permit transfer
|
||||
// Dial(${HINT}/5245},20,rtT); // Use hint as listed
|
||||
// switch(${DIALSTATUS}) {
|
||||
// case BUSY:
|
||||
// Voicemail(6245,b);
|
||||
// return;
|
||||
// default:
|
||||
// Voicemail(6245,u);
|
||||
// return;
|
||||
// };
|
||||
// };
|
||||
|
||||
// 6361 => Dial(IAX2/JaneDoe,,rm); // ring without time limit
|
||||
// 6389 => Dial(MGCP/aaln/1@192.168.0.14);
|
||||
// 6394 => Dial(Local/6275/n); // this will dial ${MARK}
|
||||
|
||||
// 6275 => &ael-stdexten(6275,${MARK}); // assuming ${MARK} is something like Zap/2
|
||||
// mark => goto 6275|1; // alias mark to 6275
|
||||
// 6536 => &ael-stdexten(6236,${WIL}); // Ditto for wil
|
||||
// wil => goto 6236|1;
|
||||
//
|
||||
// Some other handy things are an extension for checking voicemail via
|
||||
// voicemailmain
|
||||
//
|
||||
// 8500 => {
|
||||
// VoicemailMain();
|
||||
// Hangup();
|
||||
// };
|
||||
//
|
||||
// Or a conference room (you'll need to edit meetme.conf to enable this room)
|
||||
//
|
||||
// 8600 => Meetme(1234);
|
||||
//
|
||||
// Or playing an announcement to the called party, as soon it answers
|
||||
//
|
||||
// 8700 => Dial(${MARK},30,A(/path/to/my/announcemsg))
|
||||
//
|
||||
// For more information on applications, just type "show applications" at your
|
||||
// friendly Asterisk CLI prompt.
|
||||
//
|
||||
// 'show application <command>' will show details of how you
|
||||
// use that particular application in this file, the dial plan.
|
||||
//
|
||||
}
|
560
egasterisk/extensions.conf
Normal file
560
egasterisk/extensions.conf
Normal file
|
@ -0,0 +1,560 @@
|
|||
;!
|
||||
;! Automatically generated configuration file
|
||||
;! Filename: extensions.conf (/etc/asterisk/extensions.conf)
|
||||
;! Generator: Manager
|
||||
;! Creation Date: Fri Aug 1 15:09:40 2008
|
||||
;!
|
||||
[general]
|
||||
;
|
||||
; If static is set to no, or omitted, then the pbx_config will rewrite
|
||||
; this file when extensions are modified. Remember that all comments
|
||||
; made in the file will be lost when that happens.
|
||||
;
|
||||
; XXX Not yet implemented XXX
|
||||
;
|
||||
static = yes
|
||||
;
|
||||
; if static=yes and writeprotect=no, you can save dialplan by
|
||||
; CLI command "dialplan save" too
|
||||
;
|
||||
writeprotect = no
|
||||
;
|
||||
; If autofallthrough is set, then if an extension runs out of
|
||||
; things to do, it will terminate the call with BUSY, CONGESTION
|
||||
; or HANGUP depending on Asterisk's best guess. This is the default.
|
||||
;
|
||||
; If autofallthrough is not set, then if an extension runs out of
|
||||
; things to do, Asterisk will wait for a new extension to be dialed
|
||||
; (this is the original behavior of Asterisk 1.0 and earlier).
|
||||
;
|
||||
;autofallthrough=no
|
||||
;
|
||||
; If clearglobalvars is set, global variables will be cleared
|
||||
; and reparsed on an extensions reload, or Asterisk reload.
|
||||
;
|
||||
; If clearglobalvars is not set, then global variables will persist
|
||||
; through reloads, and even if deleted from the extensions.conf or
|
||||
; one of its included files, will remain set to the previous value.
|
||||
;
|
||||
; NOTE: A complication sets in, if you put your global variables into
|
||||
; the AEL file, instead of the extensions.conf file. With clearglobalvars
|
||||
; set, a "reload" will often leave the globals vars cleared, because it
|
||||
; is not unusual to have extensions.conf (which will have no globals)
|
||||
; load after the extensions.ael file (where the global vars are stored).
|
||||
; So, with "reload" in this particular situation, first the AEL file will
|
||||
; clear and then set all the global vars, then, later, when the extensions.conf
|
||||
; file is loaded, the global vars are all cleared, and then not set, because
|
||||
; they are not stored in the extensions.conf file.
|
||||
;
|
||||
clearglobalvars = no
|
||||
;
|
||||
; If priorityjumping is set to 'yes', then applications that support
|
||||
; 'jumping' to a different priority based on the result of their operations
|
||||
; will do so (this is backwards compatible behavior with pre-1.2 releases
|
||||
; of Asterisk). Individual applications can also be requested to do this
|
||||
; by passing a 'j' option in their arguments.
|
||||
;
|
||||
;priorityjumping=yes
|
||||
;
|
||||
; User context is where entries from users.conf are registered. The
|
||||
; default value is 'default'
|
||||
;
|
||||
;userscontext=default
|
||||
;
|
||||
; You can include other config files, use the #include command
|
||||
; (without the ';'). Note that this is different from the "include" command
|
||||
; that includes contexts within other contexts. The #include command works
|
||||
; in all asterisk configuration files.
|
||||
;#include "filename.conf"
|
||||
; The "Globals" category contains global variables that can be referenced
|
||||
; in the dialplan with the GLOBAL dialplan function:
|
||||
; ${GLOBAL(VARIABLE)}
|
||||
; ${${GLOBAL(VARIABLE)}} or ${text${GLOBAL(VARIABLE)}} or any hybrid
|
||||
; Unix/Linux environmental variables can be reached with the ENV dialplan
|
||||
; function: ${ENV(VARIABLE)}
|
||||
;
|
||||
[globals]
|
||||
CONSOLE = Console/dsp ; Console interface for demo
|
||||
;CONSOLE=Zap/1
|
||||
;CONSOLE=Phone/phone0
|
||||
IAXINFO = guest ; IAXtel username/password
|
||||
;IAXINFO=myuser:mypass
|
||||
TRUNK = Zap/G2 ; Trunk interface
|
||||
;
|
||||
; Note the 'G2' in the TRUNK variable above. It specifies which group (defined
|
||||
; in zapata.conf) to dial, i.e. group 2, and how to choose a channel to use in
|
||||
; the specified group. The four possible options are:
|
||||
;
|
||||
; g: select the lowest-numbered non-busy Zap channel
|
||||
; (aka. ascending sequential hunt group).
|
||||
; G: select the highest-numbered non-busy Zap channel
|
||||
; (aka. descending sequential hunt group).
|
||||
; r: use a round-robin search, starting at the next highest channel than last
|
||||
; time (aka. ascending rotary hunt group).
|
||||
; R: use a round-robin search, starting at the next lowest channel than last
|
||||
; time (aka. descending rotary hunt group).
|
||||
;
|
||||
TRUNKMSD = 1 ; MSD digits to strip (usually 1 or 0)
|
||||
trunk_1_cid = asreceived
|
||||
trunk_1 = Zap/g2
|
||||
trunk_2_cid = unknown
|
||||
trunk_2 = SIP/trunk_2
|
||||
;TRUNK=IAX2/user:pass@provider
|
||||
;
|
||||
; Any category other than "General" and "Globals" represent
|
||||
; extension contexts, which are collections of extensions.
|
||||
;
|
||||
; Extension names may be numbers, letters, or combinations
|
||||
; thereof. If an extension name is prefixed by a '_'
|
||||
; character, it is interpreted as a pattern rather than a
|
||||
; literal. In patterns, some characters have special meanings:
|
||||
;
|
||||
; X - any digit from 0-9
|
||||
; Z - any digit from 1-9
|
||||
; N - any digit from 2-9
|
||||
; [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9)
|
||||
; . - wildcard, matches anything remaining (e.g. _9011. matches
|
||||
; anything starting with 9011 excluding 9011 itself)
|
||||
; ! - wildcard, causes the matching process to complete as soon as
|
||||
; it can unambiguously determine that no other matches are possible
|
||||
;
|
||||
; For example the extension _NXXXXXX would match normal 7 digit dialings,
|
||||
; while _1NXXNXXXXXX would represent an area code plus phone number
|
||||
; preceded by a one.
|
||||
;
|
||||
; Each step of an extension is ordered by priority, which must
|
||||
; always start with 1 to be considered a valid extension. The priority
|
||||
; "next" or "n" means the previous priority plus one, regardless of whether
|
||||
; the previous priority was associated with the current extension or not.
|
||||
; The priority "same" or "s" means the same as the previously specified
|
||||
; priority, again regardless of whether the previous entry was for the
|
||||
; same extension. Priorities may be immediately followed by a plus sign
|
||||
; and another integer to add that amount (most useful with 's' or 'n').
|
||||
; Priorities may then also have an alias, or label, in
|
||||
; parenthesis after their name which can be used in goto situations
|
||||
;
|
||||
; Contexts contain several lines, one for each step of each
|
||||
; extension, which can take one of two forms as listed below,
|
||||
; with the first form being preferred.
|
||||
;
|
||||
;[context]
|
||||
;exten => someexten,{priority|label{+|-}offset}[(alias)],application(arg1,arg2,...)
|
||||
;exten => someexten,{priority|label{+|-}offset}[(alias)],application,arg1|arg2...
|
||||
;
|
||||
; Included Contexts
|
||||
;
|
||||
; One may include another context in the current one as well, optionally with a
|
||||
; date and time. Included contexts are included in the order
|
||||
; they are listed.
|
||||
; The reason a context would include other contexts is for their
|
||||
; extensions.
|
||||
; The algorithm to find an extension is recursive, and works in this
|
||||
; fashion:
|
||||
; first, given a stack on which to store context references,
|
||||
; push the context to find the extension onto the stack...
|
||||
; a) Try to find a matching extension in the context at the top of
|
||||
; the stack, and, if found, begin executing the priorities
|
||||
; there in sequence.
|
||||
; b) If not found, Search the switches, if any declared, in
|
||||
; sequence.
|
||||
; c) If still not found, for each include, push that context onto
|
||||
; the top of the context stack, and recurse to a).
|
||||
; d) If still not found, pop the entry from the top of the stack;
|
||||
; if the stack is empty, the search has failed. If it's not,
|
||||
; continue with the next context in c).
|
||||
; This is a depth-first traversal, and stops with the first context
|
||||
; that provides a matching extension. As usual, if more than one
|
||||
; pattern in a context will match, the 'best' match will win.
|
||||
; Please note that that extensions found in an included context are
|
||||
; treated as if they were in the context from which the search began.
|
||||
; The PBX's notion of the "current context" is not changed.
|
||||
; Please note that in a context, it does not matter where an include
|
||||
; directive occurs. Whether at the top, or near the bottom, the effect
|
||||
; will be the same. The only thing that matters is that if there is
|
||||
; more than one include directive, they will be searched for extensions
|
||||
; in order, first to last.
|
||||
; Also please note that pattern matches (like _9XX) are not treated
|
||||
; any differently than exact matches (like 987). Also note that the
|
||||
; order of extensions in a context have no affect on the outcome.
|
||||
;
|
||||
; Timing list for includes is
|
||||
;
|
||||
; <time range>|<days of week>|<days of month>|<months>
|
||||
;
|
||||
; Note that ranges may be specified to wrap around the ends. Also, minutes are
|
||||
; fine-grained only down to the closest even minute.
|
||||
;
|
||||
;include => daytime|9:00-17:00|mon-fri|*|*
|
||||
;include => weekend|*|sat-sun|*|*
|
||||
;include => weeknights|17:02-8:58|mon-fri|*|*
|
||||
;
|
||||
; ignorepat can be used to instruct drivers to not cancel dialtone upon
|
||||
; receipt of a particular pattern. The most commonly used example is
|
||||
; of course '9' like this:
|
||||
;
|
||||
;ignorepat => 9
|
||||
;
|
||||
; so that dialtone remains even after dialing a 9.
|
||||
;
|
||||
;
|
||||
; Sample entries for extensions.conf
|
||||
;
|
||||
;
|
||||
[dundi-e164-canonical]
|
||||
;
|
||||
; List canonical entries here
|
||||
;
|
||||
;exten => 12564286000,1,Macro(stdexten,6000,IAX2/foo)
|
||||
;exten => _125642860XX,1,Dial(IAX2/otherbox/${EXTEN:7})
|
||||
[dundi-e164-customers]
|
||||
;
|
||||
; If you are an ITSP or Reseller, list your customers here.
|
||||
;
|
||||
;exten => _12564286000,1,Dial(SIP/customer1)
|
||||
;exten => _12564286001,1,Dial(IAX2/customer2)
|
||||
[dundi-e164-via-pstn]
|
||||
;
|
||||
; If you are freely delivering calls to the PSTN, list them here
|
||||
;
|
||||
;exten => _1256428XXXX,1,Dial(Zap/G2/${EXTEN:7}) ; Expose all of 256-428
|
||||
;exten => _1256325XXXX,1,Dial(Zap/G2/${EXTEN:7}) ; Ditto for 256-325
|
||||
[dundi-e164-local]
|
||||
;
|
||||
; Context to put your dundi IAX2 or SIP user in for
|
||||
; full access
|
||||
;
|
||||
include => dundi-e164-canonical
|
||||
include => dundi-e164-customers
|
||||
include => dundi-e164-via-pstn
|
||||
|
||||
[dundi-e164-switch]
|
||||
;
|
||||
; Just a wrapper for the switch
|
||||
;
|
||||
switch => DUNDi/e164
|
||||
|
||||
[dundi-e164-lookup]
|
||||
;
|
||||
; Locally to lookup, try looking for a local E.164 solution
|
||||
; then try DUNDi if we don't have one.
|
||||
;
|
||||
include => dundi-e164-local
|
||||
include => dundi-e164-switch
|
||||
;
|
||||
; DUNDi can also be implemented as a Macro instead of using
|
||||
; the Local channel driver.
|
||||
;
|
||||
[macro-dundi-e164]
|
||||
;
|
||||
; ARG1 is the extension to Dial
|
||||
;
|
||||
; Extension "s" is not a wildcard extension that matches "anything".
|
||||
; In macros, it is the start extension. In most other cases,
|
||||
; you have to goto "s" to execute that extension.
|
||||
;
|
||||
; For wildcard matches, see above - all pattern matches start with
|
||||
; an underscore.
|
||||
exten => s,1,Goto(${ARG1},1)
|
||||
include => dundi-e164-lookup
|
||||
;
|
||||
; Here are the entries you need to participate in the IAXTEL
|
||||
; call routing system. Most IAXTEL numbers begin with 1-700, but
|
||||
; there are exceptions. For more information, and to sign
|
||||
; up, please go to www.gnophone.com or www.iaxtel.com
|
||||
;
|
||||
[iaxtel700]
|
||||
exten => _91700XXXXXXX,1,Dial(IAX2/${GLOBAL(IAXINFO)}@iaxtel.com/${EXTEN:1}@iaxtel)
|
||||
;
|
||||
; The SWITCH statement permits a server to share the dialplan with
|
||||
; another server. Use with care: Reciprocal switch statements are not
|
||||
; allowed (e.g. both A -> B and B -> A), and the switched server needs
|
||||
; to be on-line or else dialing can be severly delayed.
|
||||
;
|
||||
[iaxprovider]
|
||||
;switch => IAX2/user:[key]@myserver/mycontext
|
||||
[trunkint]
|
||||
;
|
||||
; International long distance through trunk
|
||||
;
|
||||
exten => _9011.,1,Macro(dundi-e164,${EXTEN:4})
|
||||
exten => _9011.,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
|
||||
;[2talkcalls]
|
||||
;exten => _9X.,1,Dial(SIP/2talk/${EXTEN:1},,T)
|
||||
[trunkld]
|
||||
;
|
||||
; Long distance context accessed through trunk
|
||||
;
|
||||
exten => _91NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN:1})
|
||||
exten => _91NXXNXXXXXX,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
|
||||
|
||||
[trunklocal]
|
||||
;
|
||||
; Local seven-digit dialing accessed through trunk interface
|
||||
;
|
||||
exten => _9NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
|
||||
|
||||
[trunktollfree]
|
||||
;
|
||||
; Long distance context accessed through trunk interface
|
||||
;
|
||||
exten => _91800NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
|
||||
exten => _91888NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
|
||||
exten => _91877NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
|
||||
exten => _91866NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
|
||||
|
||||
[international]
|
||||
;
|
||||
; Master context for international long distance
|
||||
;
|
||||
ignorepat => 9
|
||||
include => longdistance
|
||||
include => trunkint
|
||||
|
||||
[longdistance]
|
||||
;
|
||||
; Master context for long distance
|
||||
;
|
||||
ignorepat => 9
|
||||
include => local
|
||||
include => trunkld
|
||||
|
||||
[local]
|
||||
;
|
||||
; Master context for local, toll-free, and iaxtel calls only
|
||||
;
|
||||
ignorepat => 9
|
||||
include => default
|
||||
include => trunklocal
|
||||
include => iaxtel700
|
||||
include => trunktollfree
|
||||
include => iaxprovider
|
||||
;Include parkedcalls (or the context you define in features conf)
|
||||
;to enable call parking.
|
||||
include => parkedcalls
|
||||
|
||||
[macro-stdPrivacyexten];
|
||||
;
|
||||
; Standard extension macro:
|
||||
; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well
|
||||
; ${ARG2} - Device(s) to ring
|
||||
; ${ARG3} - Optional DONTCALL context name to jump to (assumes the s,1 extension-priority)
|
||||
; ${ARG4} - Optional TORTURE context name to jump to (assumes the s,1 extension-priority)`
|
||||
;
|
||||
exten => s,1,Dial(${ARG2},20|p) ; Ring the interface, 20 seconds maximum, call screening
|
||||
; option (or use P for databased call screening)
|
||||
exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
|
||||
exten => s-NOANSWER,1,Voicemail(${ARG1},u) ; If unavailable, send to voicemail w/ unavail announce
|
||||
exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start
|
||||
exten => s-BUSY,1,Voicemail(${ARG1},b) ; If busy, send to voicemail w/ busy announce
|
||||
exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start
|
||||
exten => s-DONTCALL,1,Goto(${ARG3},s,1) ; Callee chose to send this call to a polite "Don't call again" script.
|
||||
exten => s-TORTURE,1,Goto(${ARG4},s,1) ; Callee chose to send this call to a telemarketer torture script.
|
||||
exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer
|
||||
exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain
|
||||
|
||||
[macro-page];
|
||||
;
|
||||
; Paging macro:
|
||||
;
|
||||
; Check to see if SIP device is in use and DO NOT PAGE if they are
|
||||
;
|
||||
; ${ARG1} - Device to page
|
||||
exten => s,1,ChanIsAvail(${ARG1}|js) ; j is for Jump and s is for ANY call
|
||||
exten => s,n,GoToIf([${AVAILSTATUS} = "1"]?autoanswer:fail)
|
||||
exten => s,n(autoanswer),Set(_ALERT_INFO="RA") ; This is for the PolyComs
|
||||
exten => s,n,SIPAddHeader(Call-Info: Answer-After=0) ; This is for the Grandstream, Snoms, and Others
|
||||
exten => s,n,NoOp() ; Add others here and Post on the Wiki!!!!
|
||||
exten => s,n,Dial(${ARG1}||)
|
||||
exten => s,n(fail),Hangup
|
||||
|
||||
[demo]
|
||||
;
|
||||
; We start with what to do when a call first comes in.
|
||||
;
|
||||
exten => s,1,Wait(1) ; Wait a second, just for fun
|
||||
exten => s,n,Answer ; Answer the line
|
||||
exten => s,n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds
|
||||
exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds
|
||||
exten => s,n(restart),BackGround(demo-congrats) ; Play a congratulatory message
|
||||
exten => s,n(instruct),BackGround(demo-instruct) ; Play some instructions
|
||||
exten => s,n,WaitExten ; Wait for an extension to be dialed.
|
||||
exten => 2,1,BackGround(demo-moreinfo) ; Give some more information.
|
||||
exten => 2,n,Goto(s,instruct)
|
||||
exten => 3,1,Set(LANGUAGE()=fr) ; Set language to french
|
||||
exten => 3,n,Goto(s,restart) ; Start with the congratulations
|
||||
exten => 1000,1,Goto(default,s,1)
|
||||
;
|
||||
; We also create an example user, 1234, who is on the console and has
|
||||
; voicemail, etc.
|
||||
;
|
||||
exten => 1234,1,Playback(transfer,skip) ; "Please hold while..."
|
||||
; (but skip if channel is not up)
|
||||
exten => 1234,n,Macro(stdexten,1234,${GLOBAL(CONSOLE)})
|
||||
exten => 1235,1,Voicemail(1234,u) ; Right to voicemail
|
||||
exten => 1236,1,Dial(Console/dsp) ; Ring forever
|
||||
exten => 1236,n,Voicemail(1234,b) ; Unless busy
|
||||
;
|
||||
; # for when they're done with the demo
|
||||
;
|
||||
exten => #,1,Playback(demo-thanks) ; "Thanks for trying the demo"
|
||||
exten => #,n,Hangup ; Hang them up.
|
||||
;
|
||||
; A timeout and "invalid extension rule"
|
||||
;
|
||||
exten => t,1,Goto(#,1) ; If they take too long, give up
|
||||
exten => i,1,Playback(invalid) ; "That's not valid, try again"
|
||||
;
|
||||
; Create an extension, 500, for dialing the
|
||||
; Asterisk demo.
|
||||
;
|
||||
exten => 500,1,Playback(demo-abouttotry) ; Let them know what's going on
|
||||
exten => 500,n,Dial(IAX2/guest@pbx.digium.com/s@default) ; Call the Asterisk demo
|
||||
exten => 500,n,Playback(demo-nogo) ; Couldn't connect to the demo site
|
||||
exten => 500,n,Goto(s,6) ; Return to the start over message.
|
||||
;
|
||||
; Create an extension, 600, for evaluating echo latency.
|
||||
;
|
||||
exten => 600,1,Playback(demo-echotest) ; Let them know what's going on
|
||||
exten => 600,n,Echo ; Do the echo test
|
||||
exten => 600,n,Playback(demo-echodone) ; Let them know it's over
|
||||
exten => 600,n,Goto(s,6) ; Start over
|
||||
;
|
||||
; You can use the Macro Page to intercom a individual user
|
||||
exten => 76245,1,Macro(page,SIP/Grandstream1)
|
||||
; or if your peernames are the same as extensions
|
||||
exten => _7XXX,1,Macro(page,SIP/${EXTEN})
|
||||
;
|
||||
;
|
||||
; System Wide Page at extension 7999
|
||||
;
|
||||
exten => 7999,1,Set(TIMEOUT(absolute)=60)
|
||||
exten => 7999,2,Page(Local/Grandstream1@page&Local/Xlite1@page&Local/1234@page/n|d)
|
||||
; Give voicemail at extension 8500
|
||||
;
|
||||
exten => 8500,1,VoicemailMain
|
||||
exten => 8500,n,Goto(s,6)
|
||||
;
|
||||
; Here's what a phone entry would look like (IXJ for example)
|
||||
;
|
||||
;exten => 1265,1,Dial(Phone/phone0,15)
|
||||
;exten => 1265,n,Goto(s,5)
|
||||
;
|
||||
; The page context calls up the page macro that sets variables needed for auto-answer
|
||||
; It is in is own context to make calling it from the Page() application as simple as
|
||||
; Local/{peername}@page
|
||||
;
|
||||
[page]
|
||||
exten => _X.,1,Macro(page,SIP/${EXTEN})
|
||||
;[mainmenu]
|
||||
;
|
||||
; Example "main menu" context with submenu
|
||||
;
|
||||
;exten => s,1,Answer
|
||||
;exten => s,n,Background(thanks) ; "Thanks for calling press 1 for sales, 2 for support, ..."
|
||||
;exten => s,n,WaitExten
|
||||
;exten => 1,1,Goto(submenu,s,1)
|
||||
;exten => 2,1,Hangup
|
||||
;include => default
|
||||
;
|
||||
;[submenu]
|
||||
;exten => s,1,Ringing ; Make them comfortable with 2 seconds of ringback
|
||||
;exten => s,n,Wait,2
|
||||
;exten => s,n,Background(submenuopts) ; "Thanks for calling the sales department. Press 1 for steve, 2 for..."
|
||||
;exten => s,n,WaitExten
|
||||
;exten => 1,1,Goto(default,steve,1)
|
||||
;exten => 2,1,Goto(default,mark,2)
|
||||
[default]
|
||||
;
|
||||
; By default we include the demo. In a production system, you
|
||||
; probably don't want to have the demo there.
|
||||
;
|
||||
;include => demo
|
||||
exten => 899,1,VoiceMailMain
|
||||
exten = o,1,Goto(default,802,1)
|
||||
exten => 880,1,MeetMe(${EXTEN}|MI)
|
||||
|
||||
[macro-trunkdial]
|
||||
exten = s,1,set(CALLERID(all)=${IF($[${LEN(${CALLERID(num)})} > 6]?${CALLERID(all)}:${ARG2})})
|
||||
exten = s,n,Dial(${ARG1})
|
||||
exten = s,n,Goto(s-${DIALSTATUS},1)
|
||||
exten = s-NOANSWER,1,Hangup
|
||||
exten = s-BUSY,1,Hangup
|
||||
exten = _s-.,1,NoOp
|
||||
|
||||
[asterisk_guitools]
|
||||
exten = executecommand,1,System(${command})
|
||||
exten = executecommand,n,Hangup()
|
||||
exten = record_vmenu,1,Answer
|
||||
exten = record_vmenu,n,Playback(vm-intro)
|
||||
exten = record_vmenu,n,Record(${var1})
|
||||
exten = record_vmenu,n,Playback(vm-saved)
|
||||
exten = record_vmenu,n,Playback(vm-goodbye)
|
||||
exten = record_vmenu,n,Hangup
|
||||
exten = play_file,1,Answer
|
||||
exten = play_file,n,Playback(${var1})
|
||||
exten = play_file,n,Hangup
|
||||
|
||||
[voicemenu-custom-1]
|
||||
comment = EgOfficeHours
|
||||
alias_exten =
|
||||
exten = s,1,Answer
|
||||
exten = 0,1,Goto(default|o|1)
|
||||
exten = 1,1,Goto(default|801|1)
|
||||
exten = 2,1,Goto(default|802|1)
|
||||
exten = 3,1,Goto(default|803|1)
|
||||
exten = 4,1,Goto(default|804|1)
|
||||
exten = 5,1,Goto(default|805|1)
|
||||
exten = s,2,Background(autorecp-dir)
|
||||
exten = s,3,WaitExten(10)
|
||||
exten = s,4,Goto(ringroups-custom-1,s,1)
|
||||
|
||||
[macro-stdexten]
|
||||
exten = s,1,Dial(${ARG2},10)
|
||||
exten = s,2,Goto(s-${DIALSTATUS},1)
|
||||
exten = s-NOANSWER,1,Voicemail(${ARG1},u)
|
||||
exten = s-NOANSWER,2,Goto(default,s,1)
|
||||
exten = s-BUSY,1,Voicemail(${ARG1},b)
|
||||
exten = s-BUSY,2,Goto(default,s,1)
|
||||
exten = _s-.,1,Goto(s-NOANSWER,1)
|
||||
exten = a,1,VoicemailMain(${ARG1})
|
||||
|
||||
[DID_trunk_1]
|
||||
include = default
|
||||
exten = _X.,1,Goto(ringroups-custom-1,s,1)
|
||||
exten = s,1,ExecIf($[ "${CALLERID(num)}"="" ],SetCallerPres,unavailable)
|
||||
exten = s,2,ExecIf($[ "${CALLERID(num)}"="" ],Set,CALLERID(all)=unknown <0000000>)
|
||||
exten = s,3,Goto(ringroups-custom-1,s,1)
|
||||
|
||||
[DID_trunk_2]
|
||||
include = default
|
||||
exten = _X.,1,Goto(ringroups-custom-1,s,1)
|
||||
exten = s,1,ExecIf($[ "${CALLERID(num)}"="" ],SetCallerPres,unavailable)
|
||||
exten = s,2,ExecIf($[ "${CALLERID(num)}"="" ],Set,CALLERID(all)=unknown <0000000>)
|
||||
exten = s,3,Goto(ringroups-custom-1,s,1)
|
||||
|
||||
[numberplan-custom-1]
|
||||
plancomment = Default DialPlan
|
||||
include = default
|
||||
include = parkedcalls
|
||||
exten = _36,1,Macro(trunkdial,${trunk_1}/${EXTEN:0},${trunk_1_cid})
|
||||
comment = _36,1,36,standard
|
||||
exten = _1028X.,1,Macro(trunkdial,${trunk_2}/${EXTEN:1},${trunk_2_cid})
|
||||
comment = _1028X.,1,2Talk,custom
|
||||
exten = _102X.,1,Macro(trunkdial,${trunk_1}/${EXTEN:0},${trunk_1_cid})
|
||||
comment = _102X.,1,OutgoingMobile,custom
|
||||
exten = __1111,1,Macro(trunkdial,${trunk_1}/${EXTEN:0},${trunk_1_cid})
|
||||
comment = __1111,1,OutgoingEmergency,standard
|
||||
exten = __111,1,Macro(trunkdial,${trunk_1}/1${EXTEN:0},${trunk_1_cid})
|
||||
comment = __111,1,OutgoingEmergency,standard
|
||||
exten = _1X.,1,Macro(trunkdial,${trunk_2}/${EXTEN:1},${trunk_2_cid})
|
||||
comment = _1X.,1,DefaultOutgoing,custom
|
||||
exten = _10800X.,1,Macro(trunkdial,${trunk_1}/${EXTEN:0},${trunk_1_cid})
|
||||
comment = _10800X.,1,0800,custom
|
||||
exten = _1NX.,1,Macro(trunkdial,${trunk_2}/03${EXTEN:1},${trunk_2_cid})
|
||||
comment = _1NX.,1,03 Calls,custom
|
||||
|
||||
[ringroups-custom-1]
|
||||
gui_ring_groupname = Reception
|
||||
exten = s,1,NoOp(RINGGROUP)
|
||||
exten = s,n,Dial(Zap/1&SIP/802&SIP/805,10)
|
||||
exten = s,n,Voicemail(890,b)
|
98
egasterisk/features.conf
Normal file
98
egasterisk/features.conf
Normal file
|
@ -0,0 +1,98 @@
|
|||
;
|
||||
; Sample Call Features (parking, transfer, etc) configuration
|
||||
;
|
||||
|
||||
[general]
|
||||
parkext => 700 ; What extension to dial to park
|
||||
parkpos => 701-720 ; What extensions to park calls on. These needs to be
|
||||
; numeric, as Asterisk starts from the start position
|
||||
; and increments with one for the next parked call.
|
||||
context => parkedcalls ; Which context parked calls are in
|
||||
;parkingtime => 45 ; Number of seconds a call can be parked for
|
||||
; (default is 45 seconds)
|
||||
;courtesytone = beep ; Sound file to play to the parked caller
|
||||
; when someone dials a parked call
|
||||
; or the Touch Monitor is activated/deactivated.
|
||||
;parkedplay = caller ; Who to play the courtesy tone to when picking up a parked call
|
||||
; one of: parked, caller, both (default is caller)
|
||||
;adsipark = yes ; if you want ADSI parking announcements
|
||||
;findslot => next ; Continue to the 'next' free parking space.
|
||||
; Defaults to 'first' available
|
||||
;parkedmusicclass=default ; This is the MOH class to use for the parked channel
|
||||
; as long as the class is not set on the channel directly
|
||||
; using Set(CHANNEL(musicclass)=whatever) in the dialplan
|
||||
|
||||
;transferdigittimeout => 3 ; Number of seconds to wait between digits when transferring a call
|
||||
; (default is 3 seconds)
|
||||
xfersound = beep ; to indicate an attended transfer is complete
|
||||
xferfailsound = beeperr ; to indicate a failed transfer
|
||||
pickupexten = *75 ; Configure the pickup extension. (default is *8)
|
||||
;featuredigittimeout = 500 ; Max time (ms) between digits for
|
||||
; feature activation (default is 500 ms)
|
||||
;atxfernoanswertimeout = 15 ; Timeout for answer on attended transfer default is 15 seconds.
|
||||
|
||||
; Note that the DTMF features listed below only work when two channels have answered and are bridged together.
|
||||
; They can not be used while the remote party is ringing or in progress. If you require this feature you can use
|
||||
; chan_local in combination with Answer to accomplish it.
|
||||
|
||||
[featuremap]
|
||||
;blindxfer => #1 ; Blind transfer (default is #)
|
||||
;disconnect => *0 ; Disconnect (default is *)
|
||||
;automon => *1 ; One Touch Record a.k.a. Touch Monitor
|
||||
;atxfer => *2 ; Attended transfer
|
||||
;parkcall => #72 ; Park call (one step parking)
|
||||
|
||||
[applicationmap]
|
||||
; Note that the DYNAMIC_FEATURES channel variable must be set to use the features
|
||||
; defined here. The value of DYNAMIC_FEATURES should be the names of the features
|
||||
; to allow the channel to use separated by '#'. For example:
|
||||
;
|
||||
; Set(__DYNAMIC_FEATURES=myfeature1#myfeature2#myfeature3)
|
||||
;
|
||||
; (Note: The two leading underscores allow these feature settings to be set on
|
||||
; on the outbound channels, as well. Otherwise, only the original channel
|
||||
; will have access to these features.)
|
||||
;
|
||||
; The syntax for declaring a dynamic feature is the following:
|
||||
;
|
||||
;<FeatureName> => <DTMF_sequence>,<ActivateOn>[/<ActivatedBy>],<Application>[,<AppArguments>[,MOH_Class]]
|
||||
;
|
||||
; FeatureName -> This is the name of the feature used in when setting the
|
||||
; DYNAMIC_FEATURES variable to enable usage of this feature.
|
||||
; DTMF_sequence -> This is the key sequence used to activate this feature.
|
||||
; ActivateOn -> This is the channel of the call that the application will be executed
|
||||
; on. Valid values are "self" and "peer". "self" means run the
|
||||
; application on the same channel that activated the feature. "peer"
|
||||
; means run the application on the opposite channel from the one that
|
||||
; has activated the feature.
|
||||
; ActivatedBy -> This is which channel is allowed to activate this feature. Valid
|
||||
; values are "caller", "callee", and "both". "both" is the default.
|
||||
; The "caller" is the channel that executed the Dial application, while
|
||||
; the "callee" is the channel called by the Dial application.
|
||||
; Application -> This is the application to execute.
|
||||
; AppArguments -> These are the arguments to be passed into the application.
|
||||
; MOH_Class -> This is the music on hold class to play while the idle
|
||||
; channel waits for the feature to complete. If left blank,
|
||||
; no music will be played.
|
||||
;
|
||||
;
|
||||
; IMPORTANT NOTE: The applicationmap is not intended to be used for all Asterisk
|
||||
; applications. When applications are used in extensions.conf, they are executed
|
||||
; by the PBX core. In this case, these applications are executed outside of the
|
||||
; PBX core, so it does *not* make sense to use any application which has any
|
||||
; concept of dialplan flow. Examples of this would be things like Macro, Goto,
|
||||
; Background, WaitExten, and many more.
|
||||
;
|
||||
; Enabling these features means that the PBX needs to stay in the media flow and
|
||||
; media will not be re-directed if DTMF is sent in the media stream.
|
||||
;
|
||||
; Example Usage:
|
||||
;
|
||||
;testfeature => #9,peer,Playback,tt-monkeys ;Allow both the caller and callee to play
|
||||
; ;tt-monkeys to the opposite channel
|
||||
;
|
||||
;pauseMonitor => #1,self/callee,Pausemonitor ;Allow the callee to pause monitoring
|
||||
; ;on their channel
|
||||
;unpauseMonitor => #3,self/callee,UnPauseMonitor ;Allow the callee to unpause monitoring
|
||||
; ;on their channel
|
||||
;
|
35
egasterisk/festival.conf
Normal file
35
egasterisk/festival.conf
Normal file
|
@ -0,0 +1,35 @@
|
|||
;
|
||||
; Festival Configuration
|
||||
;
|
||||
[general]
|
||||
;
|
||||
; Host which runs the festival server (default : localhost);
|
||||
;
|
||||
;host=localhost
|
||||
;
|
||||
; Port on host where the festival server runs (default : 1314)
|
||||
;
|
||||
;port=1314
|
||||
;
|
||||
; Use cache (yes, no - defaults to no)
|
||||
;
|
||||
;usecache=yes
|
||||
;
|
||||
; If usecache=yes, a directory to store waveform cache files.
|
||||
; The cache is never cleared (yet), so you must take care of cleaning it
|
||||
; yourself (just delete any or all files from the cache).
|
||||
; THIS DIRECTORY *MUST* EXIST and must be writable from the asterisk process.
|
||||
; Defaults to /tmp/
|
||||
;
|
||||
;cachedir=/var/lib/asterisk/festivalcache/
|
||||
;
|
||||
; Festival command to send to the server.
|
||||
; Defaults to: (tts_textasterisk "%s" 'file)(quit)\n
|
||||
; %s is replaced by the desired text to say. The command MUST end with a
|
||||
; (quit) directive, or the cache handling mechanism will hang. Do not
|
||||
; forget the \n at the end.
|
||||
;
|
||||
;festivalcommand=(tts_textasterisk "%s" 'file)(quit)\n
|
||||
;
|
||||
;
|
||||
|
86
egasterisk/followme.conf
Normal file
86
egasterisk/followme.conf
Normal file
|
@ -0,0 +1,86 @@
|
|||
; Find-Me / Follow-Me Configuration File
|
||||
[general]
|
||||
;
|
||||
featuredigittimeout=>5000
|
||||
; The number of ms to wait for a digit input for the callee on whether to take the call or
|
||||
; not before we consider them "done" entering digits.
|
||||
;
|
||||
takecall=>1
|
||||
; The global default keypress for the callee to take taking the current call. This can be
|
||||
; a single digit or multiple digits. Default is "1".
|
||||
;
|
||||
declinecall=>2
|
||||
; The global default keypress for the callee to decline taking the current call. This can
|
||||
; be a single digit or multiple digits. Default is "2".
|
||||
;
|
||||
call-from-prompt=>followme/call-from
|
||||
; The global default for the 'Incoming call from' message.
|
||||
;
|
||||
norecording-prompt=>followme/no-recording
|
||||
; The global default for the 'You have an incoming call' message when the caller elects
|
||||
; not to leave their name or the option isn't set for them to do so.
|
||||
;
|
||||
options-prompt=>followme/options
|
||||
; The global default for the 'Press 1 to accept this call or press 2 to decline it' message.
|
||||
;
|
||||
pls-hold-prompt=>followme/pls-hold-while-try
|
||||
; The global default for 'Please hold while we try and connect your call' message.
|
||||
;
|
||||
status-prompt=>followme/status
|
||||
; The global default for 'The party you're calling isn't at their desk' message.
|
||||
;
|
||||
sorry-prompt=>followme/sorry
|
||||
; The global default for 'I'm sorry, but we were unable to locate your party' message.
|
||||
;
|
||||
;
|
||||
[default]
|
||||
musicclass=>default
|
||||
; The moh class that should be used for the caller while they are waiting to be connected.
|
||||
context=>default
|
||||
; The context to dial the numbers from
|
||||
number=>01233456,25
|
||||
; The a follow-me number to call. The format is:
|
||||
; number=> <number to call[&2nd #[&3rd #]]> [, <timeout value in seconds> [, <order in follow-me>] ]
|
||||
; You can specify as many of these numbers as you like. They will be dialed in the
|
||||
; order that you specify them in the config file OR as specified with the order field
|
||||
; on the number prompt. As you can see from the example, forked dialing of multiple
|
||||
; numbers in the same step is supported with this application if you'd like to dial
|
||||
; multiple numbers in the same followme step.
|
||||
; It's also important to note that the timeout value is not the same
|
||||
; as the timeout value you would use in app_dial. This timeout value is the amount of
|
||||
; time allowed between the time the dialing step starts and the callee makes a choice
|
||||
; on whether to take the call or not. That being the case, you may want to account for
|
||||
; this time, and make this timeout longer than a timeout you might specify in app_dial.
|
||||
takecall=>1
|
||||
; The keypress for the callee to take taking the current call. This can be
|
||||
; a single digit or multiple digits. Default is the global default.
|
||||
;
|
||||
declinecall=>2
|
||||
; The keypress for the callee to decline taking the current call. This can
|
||||
; be a single digit or multiple digits. Default is the global default.
|
||||
;
|
||||
call-from-prompt=>followme/call-from
|
||||
; The 'Incoming call from' message prompt. Default is the global default.
|
||||
;
|
||||
followme-norecording-prompt=>followme/no-recording
|
||||
; The 'You have an incoming call' message prompt when the caller elects
|
||||
; not to leave their name or the option isn't set for them to do so. Default
|
||||
; is the global default.
|
||||
;
|
||||
followme-options-prompt=>followme/options
|
||||
; The 'Press 1 to accept this call or press 2 to decline it' message prompt.
|
||||
; Default is the global default.
|
||||
;
|
||||
followme-pls-hold-prompt=>followme/pls-hold-while-try
|
||||
; The 'Please hold while we try and connect your call' message prompt.
|
||||
; Default is the global default.
|
||||
;
|
||||
followme-status-prompt=>followme/status
|
||||
; The 'The party you're calling isn't at their desk' message prompt.
|
||||
; Default is the global default.
|
||||
;
|
||||
followme-sorry-prompt=>followme/sorry
|
||||
; The 'I'm sorry, but we were unable to locate your party' message prompt. Default
|
||||
; is the global default.
|
||||
|
||||
|
41
egasterisk/func_odbc.conf
Normal file
41
egasterisk/func_odbc.conf
Normal file
|
@ -0,0 +1,41 @@
|
|||
;
|
||||
; func_odbc.conf
|
||||
;
|
||||
; Each context is a separately defined function. By convention, all
|
||||
; functions are entirely uppercase, so the defined contexts should also
|
||||
; be all-uppercase, but there is nothing that enforces this. All functions
|
||||
; are case-sensitive, however.
|
||||
;
|
||||
; For substitution, you have ${ARG1}, ${ARG2} ... ${ARGn}
|
||||
; for the arguments to each SQL statement.
|
||||
;
|
||||
; In addition, for write statements, you have ${VAL1}, ${VAL2} ... ${VALn}
|
||||
; parsed, just like arguments, for the values. In addition, if you want the
|
||||
; whole value, never mind the parsing, you can get that with ${VALUE}.
|
||||
;
|
||||
;
|
||||
; If you have data which may potentially contain single ticks, you may wish
|
||||
; to use the dialplan function SQL_ESC() to escape the data prior to its
|
||||
; inclusion in the SQL statement.
|
||||
|
||||
|
||||
; ODBC_SQL - Allow an SQL statement to be built entirely in the dialplan
|
||||
[SQL]
|
||||
dsn=mysql1
|
||||
read=${ARG1}
|
||||
|
||||
; ODBC_ANTIGF - A blacklist.
|
||||
[ANTIGF]
|
||||
dsn=mysql1
|
||||
read=SELECT COUNT(*) FROM exgirlfriends WHERE callerid='${SQL_ESC(${ARG1})}'
|
||||
|
||||
; ODBC_PRESENCE - Retrieve and update presence
|
||||
[PRESENCE]
|
||||
dsn=mysql1
|
||||
read=SELECT location FROM presence WHERE id='${SQL_ESC(${ARG1})}'
|
||||
write=UPDATE presence SET location='${SQL_ESC(${VAL1})}' WHERE id='${SQL_ESC(${ARG1})}'
|
||||
;prefix=OFFICE ; Changes this function from ODBC_PRESENCE to OFFICE_PRESENCE
|
||||
;escapecommas=no ; Normally, commas within a field are escaped such that each
|
||||
; field may be separated into individual variables with ARRAY.
|
||||
; This option turns that behavior off [default=yes].
|
||||
|
19
egasterisk/gtalk.conf
Normal file
19
egasterisk/gtalk.conf
Normal file
|
@ -0,0 +1,19 @@
|
|||
;[general]
|
||||
;context=default ;;Context to dump call into
|
||||
;allowguest=yes ;;Allow calls from people not in
|
||||
;;list of peers
|
||||
;
|
||||
;[guest] ;;special account for options on guest account
|
||||
;disallow=all
|
||||
;allow=ulaw
|
||||
;context=guest
|
||||
;
|
||||
;[ogorman]
|
||||
;username=ogorman@gmail.com ;;username of the peer your
|
||||
;;calling or accepting calls from
|
||||
;disallow=all
|
||||
;allow=ulaw
|
||||
;context=default
|
||||
;connection=asterisk ;;client or component in jabber.conf
|
||||
;;for the call to leave on.
|
||||
;
|
15
egasterisk/gui_confighw.conf
Normal file
15
egasterisk/gui_confighw.conf
Normal file
|
@ -0,0 +1,15 @@
|
|||
;!
|
||||
;! Automatically generated configuration file
|
||||
;! Filename: gui_confighw.conf (/etc/asterisk/gui_confighw.conf)
|
||||
;! Generator: Manager
|
||||
;! Creation Date: Wed Jul 23 18:50:56 2008
|
||||
;!
|
||||
|
||||
[PCI Bus 00 Slot 15]
|
||||
device = Wildcard TDM400P REV I
|
||||
basechan = 1
|
||||
type = analog
|
||||
|
||||
[ANALOGPORTS]
|
||||
FXS = 1
|
||||
FXO = 2,3
|
0
egasterisk/gui_custommenus.conf
Normal file
0
egasterisk/gui_custommenus.conf
Normal file
193
egasterisk/h323.conf
Normal file
193
egasterisk/h323.conf
Normal file
|
@ -0,0 +1,193 @@
|
|||
; The NuFone Network's
|
||||
; Open H.323 driver configuration
|
||||
;
|
||||
[general]
|
||||
port = 1720
|
||||
;bindaddr = 1.2.3.4 ; this SHALL contain a single, valid IP address for this machine
|
||||
;tos=lowdelay
|
||||
;
|
||||
; You may specify a global default AMA flag for iaxtel calls. It must be
|
||||
; one of 'default', 'omit', 'billing', or 'documentation'. These flags
|
||||
; are used in the generation of call detail records.
|
||||
;
|
||||
;amaflags = default
|
||||
;
|
||||
; You may specify a default account for Call Detail Records in addition
|
||||
; to specifying on a per-user basis
|
||||
;
|
||||
;accountcode=lss0101
|
||||
;
|
||||
; You can fine tune codecs here using "allow" and "disallow" clauses
|
||||
; with specific codecs. Use "all" to represent all formats.
|
||||
;
|
||||
;disallow=all
|
||||
;allow=all ; turns on all installed codecs
|
||||
;disallow=g723.1 ; Hm... Proprietary, don't use it...
|
||||
;allow=gsm ; Always allow GSM, it's cool :)
|
||||
;allow=ulaw ; see doc/rtp-packetization for framing options
|
||||
;
|
||||
; User-Input Mode (DTMF)
|
||||
;
|
||||
; valid entries are: rfc2833, inband
|
||||
; default is rfc2833
|
||||
;dtmfmode=rfc2833
|
||||
;
|
||||
; Default RTP Payload to send RFC2833 DTMF on. This is used to
|
||||
; interoperate with broken gateways which cannot successfully
|
||||
; negotiate a RFC2833 payload type in the TerminalCapabilitySet.
|
||||
;
|
||||
; You may also specify on either a per-peer or per-user basis below.
|
||||
;dtmfcodec=101
|
||||
;
|
||||
; Set the gatekeeper
|
||||
; DISCOVER - Find the Gk address using multicast
|
||||
; DISABLE - Disable the use of a GK
|
||||
; <IP address> or <Host name> - The acutal IP address or hostname of your GK
|
||||
;gatekeeper = DISABLE
|
||||
;
|
||||
;
|
||||
; Tell Asterisk whether or not to accept Gatekeeper
|
||||
; routed calls or not. Normally this should always
|
||||
; be set to yes, unless you want to have finer control
|
||||
; over which users are allowed access to Asterisk.
|
||||
; Default: YES
|
||||
;
|
||||
;AllowGKRouted = yes
|
||||
;
|
||||
; When the channel works without gatekeeper, there is possible to
|
||||
; reject calls from anonymous (not listed in users) callers.
|
||||
; Default is to allow anonymous calls.
|
||||
;
|
||||
;AcceptAnonymous = yes
|
||||
;
|
||||
; Optionally you can determine a user by Source IP versus its H.323 alias.
|
||||
; Default behavour is to determine user by H.323 alias.
|
||||
;
|
||||
;UserByAlias=no
|
||||
;
|
||||
; Default context gets used in siutations where you are using
|
||||
; the GK routed model or no type=user was found. This gives you
|
||||
; the ability to either play an invalid message or to simply not
|
||||
; use user authentication at all.
|
||||
;
|
||||
;context=default
|
||||
;
|
||||
; Use this option to help Cisco (or other) gateways to setup backward voice
|
||||
; path to pass inband tones to calling user (see, for example,
|
||||
; http://www.cisco.com/warp/public/788/voip/ringback.html)
|
||||
;
|
||||
; Add PROGRESS information element to SETUP message sent on outbound calls
|
||||
; to notify about required backward voice path. Valid values are:
|
||||
; 0 - don't add PROGRESS information element (default);
|
||||
; 1 - call is not end-end ISDN, further call progress information can
|
||||
; possibly be available in-band;
|
||||
; 3 - origination address is non-ISDN (Cisco accepts this value only);
|
||||
; 8 - in-band information or an appropriate pattern is now available;
|
||||
;progress_setup = 3
|
||||
;
|
||||
; Add PROGRESS information element (IE) to ALERT message sent on incoming
|
||||
; calls to notify about required backwared voice path. Valid values are:
|
||||
; 0 - don't add PROGRESS IE (default);
|
||||
; 8 - in-band information or an appropriate pattern is now available;
|
||||
;progress_alert = 8
|
||||
;
|
||||
; Generate PROGRESS message when H.323 audio path has established to create
|
||||
; backward audio path at other end of a call.
|
||||
;progress_audio = yes
|
||||
;
|
||||
; Specify how to inject non-standard information into H.323 messages. When
|
||||
; the channel receives messages with tunneled information, it automatically
|
||||
; enables the same option for all further outgoing messages independedly on
|
||||
; options has been set by the configuration. This behavior is required, for
|
||||
; example, for Cisco CallManager when Q.SIG tunneling is enabled for a
|
||||
; gateway where Asterisk lives.
|
||||
; The option can be used multiple times, one option per line.
|
||||
;tunneling=none ; Totally disable tunneling (default)
|
||||
;tunneling=cisco ; Enable Cisco-specific tunneling
|
||||
;tunneling=qsig ; Enable tunneling via Q.SIG messages
|
||||
;
|
||||
;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
|
||||
; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a
|
||||
; H323 channel. Defaults to "no". An enabled jitterbuffer will
|
||||
; be used only if the sending side can create and the receiving
|
||||
; side can not accept jitter. The H323 channel can accept jitter,
|
||||
; thus an enabled jitterbuffer on the receive H323 side will only
|
||||
; be used if the sending side can create jitter and jbforce is
|
||||
; also set to yes.
|
||||
|
||||
; jbforce = no ; Forces the use of a jitterbuffer on the receive side of a H323
|
||||
; channel. Defaults to "no".
|
||||
|
||||
; jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds.
|
||||
|
||||
; jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is
|
||||
; resynchronized. Useful to improve the quality of the voice, with
|
||||
; big jumps in/broken timestamps, usualy sent from exotic devices
|
||||
; and programs. Defaults to 1000.
|
||||
|
||||
; jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a H323
|
||||
; channel. Two implementations are currenlty available - "fixed"
|
||||
; (with size always equals to jbmax-size) and "adaptive" (with
|
||||
; variable size, actually the new jb of IAX2). Defaults to fixed.
|
||||
|
||||
; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no".
|
||||
;-----------------------------------------------------------------------------------
|
||||
;
|
||||
; H.323 Alias definitions
|
||||
;
|
||||
; Type 'h323' will register aliases to the endpoint
|
||||
; and Gatekeeper, if there is one.
|
||||
;
|
||||
; Example: if someone calls time@your.asterisk.box.com
|
||||
; Asterisk will send the call to the extension 'time'
|
||||
; in the context default
|
||||
;
|
||||
; [default]
|
||||
; exten => time,1,Answer
|
||||
; exten => time,2,Playback,current-time
|
||||
;
|
||||
; Keyword's 'prefix' and 'e164' are only make sense when
|
||||
; used with a gatekeeper. You can specify either a prefix
|
||||
; or E.164 this endpoint is responsible for terminating.
|
||||
;
|
||||
; Example: The H.323 alias 'det-gw' will tell the gatekeeper
|
||||
; to route any call with the prefix 1248 to this alias. Keyword
|
||||
; e164 is used when you want to specifiy a full telephone
|
||||
; number. So a call to the number 18102341212 would be
|
||||
; routed to the H.323 alias 'time'.
|
||||
;
|
||||
;[time]
|
||||
;type=h323
|
||||
;e164=18102341212
|
||||
;context=default
|
||||
;
|
||||
;[det-gw]
|
||||
;type=h323
|
||||
;prefix=1248,1313
|
||||
;context=detroit
|
||||
;
|
||||
;
|
||||
; Inbound H.323 calls from BillyBob would land in the incoming
|
||||
; context with a maximum of 4 concurrent incoming calls
|
||||
;
|
||||
;
|
||||
; Note: If keyword 'incominglimit' are omitted Asterisk will not
|
||||
; enforce any maximum number of concurrent calls.
|
||||
;
|
||||
;[BillyBob]
|
||||
;type=user
|
||||
;host=192.168.1.1
|
||||
;context=incoming
|
||||
;incominglimit=4
|
||||
;h245Tunneling=no
|
||||
;
|
||||
;
|
||||
; Outbound H.323 call to Larry using SlowStart
|
||||
;
|
||||
;[Larry]
|
||||
;type=peer
|
||||
;host=192.168.2.1
|
||||
;fastStart=no
|
||||
|
||||
|
||||
|
24
egasterisk/http.conf
Normal file
24
egasterisk/http.conf
Normal file
|
@ -0,0 +1,24 @@
|
|||
;!
|
||||
;! Automatically generated configuration file
|
||||
;! Filename: http.conf (/etc/asterisk/http.conf)
|
||||
;! Generator: Manager
|
||||
;! Creation Date: Fri Aug 1 09:54:50 2008
|
||||
;!
|
||||
[general]
|
||||
;
|
||||
; Whether HTTP interface is enabled or not. Default is no.
|
||||
;
|
||||
enabled = yes
|
||||
;
|
||||
; Whether Asterisk should serve static content from http-static
|
||||
; Default is no.
|
||||
;
|
||||
enablestatic = yes
|
||||
;
|
||||
; Address to bind to. Default is 0.0.0.0
|
||||
;
|
||||
bindaddr = 0.0.0.0
|
||||
;
|
||||
; Port to bind to (default is 8088)
|
||||
;
|
||||
bindport = 8088
|
406
egasterisk/iax.conf
Normal file
406
egasterisk/iax.conf
Normal file
|
@ -0,0 +1,406 @@
|
|||
|
||||
; Inter-Asterisk eXchange driver definition
|
||||
;
|
||||
; This configuration is re-read at reload
|
||||
; or with the CLI command
|
||||
; reload chan_iax2.so
|
||||
;
|
||||
; General settings, like port number to bind to, and
|
||||
; an option address (the default is to bind to all
|
||||
; local addresses).
|
||||
;
|
||||
[general]
|
||||
;bindport=4569 ; bindport and bindaddr may be specified
|
||||
; ; NOTE: bindport must be specified BEFORE
|
||||
; bindaddr or may be specified on a specific
|
||||
; bindaddr if followed by colon and port
|
||||
; (e.g. bindaddr=192.168.0.1:4569)
|
||||
;bindaddr=192.168.0.1 ; more than once to bind to multiple
|
||||
; ; addresses, but the first will be the
|
||||
; ; default
|
||||
;
|
||||
; Set iaxcompat to yes if you plan to use layered switches or
|
||||
; some other scenario which may cause some delay when doing a
|
||||
; lookup in the dialplan. It incurs a small performance hit to
|
||||
; enable it. This option causes Asterisk to spawn a separate thread
|
||||
; when it receives an IAX DPREQ (Dialplan Request) instead of
|
||||
; blocking while it waits for a response.
|
||||
;
|
||||
;iaxcompat=yes
|
||||
;
|
||||
; Disable UDP checksums (if nochecksums is set, then no checkums will
|
||||
; be calculated/checked on systems supporting this feature)
|
||||
;
|
||||
;nochecksums=no
|
||||
;
|
||||
;
|
||||
; For increased security against brute force password attacks
|
||||
; enable "delayreject" which will delay the sending of authentication
|
||||
; reject for REGREQ or AUTHREP if there is a password.
|
||||
;
|
||||
;delayreject=yes
|
||||
;
|
||||
; You may specify a global default AMA flag for iaxtel calls. It must be
|
||||
; one of 'default', 'omit', 'billing', or 'documentation'. These flags
|
||||
; are used in the generation of call detail records.
|
||||
;
|
||||
;amaflags=default
|
||||
;
|
||||
; ADSI (Analog Display Services Interface) can be enabled if you have
|
||||
; (or may have) ADSI compatible CPE equipment
|
||||
;
|
||||
;adsi=no
|
||||
;
|
||||
; You may specify a default account for Call Detail Records in addition
|
||||
; to specifying on a per-user basis
|
||||
;
|
||||
;accountcode=lss0101
|
||||
;
|
||||
; You may specify a global default language for users.
|
||||
; Can be specified also on a per-user basis
|
||||
; If omitted, will fallback to english
|
||||
;
|
||||
;language=en
|
||||
;
|
||||
; This option specifies a preference for which music on hold class this channel
|
||||
; should listen to when put on hold if the music class has not been set on the
|
||||
; channel with Set(CHANNEL(musicclass)=whatever) in the dialplan, and the peer
|
||||
; channel putting this one on hold did not suggest a music class.
|
||||
;
|
||||
; If this option is set to "passthrough", then the hold message will always be
|
||||
; passed through as signalling instead of generating hold music locally.
|
||||
;
|
||||
; This option may be specified globally, or on a per-user or per-peer basis.
|
||||
;
|
||||
;mohinterpret=default
|
||||
;
|
||||
; This option specifies which music on hold class to suggest to the peer channel
|
||||
; when this channel places the peer on hold. It may be specified globally or on
|
||||
; a per-user or per-peer basis.
|
||||
;
|
||||
;mohsuggest=default
|
||||
;
|
||||
; Specify bandwidth of low, medium, or high to control which codecs are used
|
||||
; in general.
|
||||
;
|
||||
bandwidth=low
|
||||
;
|
||||
; You can also fine tune codecs here using "allow" and "disallow" clauses
|
||||
; with specific codecs. Use "all" to represent all formats.
|
||||
;
|
||||
;allow=all ; same as bandwidth=high
|
||||
;disallow=g723.1 ; Hm... Proprietary, don't use it...
|
||||
disallow=lpc10 ; Icky sound quality... Mr. Roboto.
|
||||
;allow=gsm ; Always allow GSM, it's cool :)
|
||||
;
|
||||
|
||||
; You can adjust several parameters relating to the jitter buffer.
|
||||
; The jitter buffer's function is to compensate for varying
|
||||
; network delay.
|
||||
;
|
||||
; All the jitter buffer settings are in milliseconds.
|
||||
; The jitter buffer works for INCOMING audio - the outbound audio
|
||||
; will be dejittered by the jitter buffer at the other end.
|
||||
;
|
||||
; jitterbuffer=yes|no: global default as to whether you want
|
||||
; the jitter buffer at all.
|
||||
;
|
||||
; forcejitterbuffer=yes|no: in the ideal world, when we bridge VoIP channels
|
||||
; we don't want to do jitterbuffering on the switch, since the endpoints
|
||||
; can each handle this. However, some endpoints may have poor jitterbuffers
|
||||
; themselves, so this option will force * to always jitterbuffer, even in this
|
||||
; case.
|
||||
;
|
||||
; maxjitterbuffer: a maximum size for the jitter buffer.
|
||||
; Setting a reasonable maximum here will prevent the call delay
|
||||
; from rising to silly values in extreme situations; you'll hear
|
||||
; SOMETHING, even though it will be jittery.
|
||||
;
|
||||
; resyncthreshold: when the jitterbuffer notices a significant change in delay
|
||||
; that continues over a few frames, it will resync, assuming that the change in
|
||||
; delay was caused by a timestamping mix-up. The threshold for noticing a
|
||||
; change in delay is measured as twice the measured jitter plus this resync
|
||||
; threshold.
|
||||
; Resyncing can be disabled by setting this parameter to -1.
|
||||
;
|
||||
; maxjitterinterps: the maximum number of interpolation frames the jitterbuffer
|
||||
; should return in a row. Since some clients do not send CNG/DTX frames to
|
||||
; indicate silence, the jitterbuffer will assume silence has begun after
|
||||
; returning this many interpolations. This prevents interpolating throughout
|
||||
; a long silence.
|
||||
;
|
||||
|
||||
jitterbuffer=no
|
||||
forcejitterbuffer=no
|
||||
;maxjitterbuffer=1000
|
||||
;maxjitterinterps=10
|
||||
;resyncthreshold=1000
|
||||
|
||||
;trunkfreq=20 ; How frequently to send trunk msgs (in ms)
|
||||
|
||||
; Should we send timestamps for the individual sub-frames within trunk frames?
|
||||
; There is a small bandwidth use for these (less than 1kbps/call), but they
|
||||
; ensure that frame timestamps get sent end-to-end properly. If both ends of
|
||||
; all your trunks go directly to TDM, _and_ your trunkfreq equals the frame
|
||||
; length for your codecs, you can probably suppress these. The receiver must
|
||||
; also support this feature, although they do not also need to have it enabled.
|
||||
;
|
||||
; trunktimestamps=yes
|
||||
;
|
||||
; Minimum and maximum amounts of time that IAX peers can request as
|
||||
; a registration expiration interval (in seconds).
|
||||
; minregexpire = 60
|
||||
; maxregexpire = 60
|
||||
;
|
||||
; IAX helper threads
|
||||
; Establishes the number of iax helper threads to handle I/O.
|
||||
; iaxthreadcount = 10
|
||||
; Establishes the number of extra dynamic threads that may be spawned to handle I/O
|
||||
; iaxmaxthreadcount = 100
|
||||
;
|
||||
; We can register with another IAX server to let him know where we are
|
||||
; in case we have a dynamic IP address for example
|
||||
;
|
||||
; Register with tormenta using username marko and password secretpass
|
||||
;
|
||||
;register => marko:secretpass@tormenta.linux-support.net
|
||||
;
|
||||
; Register joe at remote host with no password
|
||||
;
|
||||
;register => joe@remotehost:5656
|
||||
;
|
||||
; Register marko at tormenta.linux-support.net using RSA key "torkey"
|
||||
;
|
||||
;register => marko:[torkey]@tormenta.linux-support.net
|
||||
;
|
||||
; Sample Registration for iaxtel
|
||||
;
|
||||
; Visit http://www.iaxtel.com to register with iaxtel. Replace "user"
|
||||
; and "pass" with your username and password for iaxtel. Incoming
|
||||
; calls arrive at the "s" extension of "default" context.
|
||||
;
|
||||
;register => user:pass@iaxtel.com
|
||||
;
|
||||
; Sample Registration for IAX + FWD
|
||||
;
|
||||
; To register using IAX with FWD, it must be enabled by visiting the URL
|
||||
; http://www.fwdnet.net/index.php?section_id=112
|
||||
;
|
||||
; Note that you need an extension in you default context which matches
|
||||
; your free world dialup number. Please replace "FWDNumber" with your
|
||||
; FWD number and "passwd" with your password.
|
||||
;
|
||||
;register => FWDNumber:passwd@iax.fwdnet.net
|
||||
;
|
||||
;
|
||||
; You can disable authentication debugging to reduce the amount of
|
||||
; debugging traffic.
|
||||
;
|
||||
;authdebug=no
|
||||
;
|
||||
; See doc/ip-tos.txt for a description of the tos parameters.
|
||||
;tos=ef
|
||||
;
|
||||
; If regcontext is specified, Asterisk will dynamically create and destroy
|
||||
; a NoOp priority 1 extension for a given peer who registers or unregisters
|
||||
; with us. The actual extension is the 'regexten' parameter of the registering
|
||||
; peer or its name if 'regexten' is not provided. More than one regexten
|
||||
; may be supplied if they are separated by '&'. Patterns may be used in
|
||||
; regexten.
|
||||
;
|
||||
;regcontext=iaxregistrations
|
||||
;
|
||||
; If we don't get ACK to our NEW within 2000ms, and autokill is set to yes,
|
||||
; then we cancel the whole thing (that's enough time for one retransmission
|
||||
; only). This is used to keep things from stalling for a long time for a host
|
||||
; that is not available, but would be ill advised for bad connections. In
|
||||
; addition to 'yes' or 'no' you can also specify a number of milliseconds.
|
||||
; See 'qualify' for individual peers to turn on for just a specific peer.
|
||||
;
|
||||
autokill=yes
|
||||
;
|
||||
; codecpriority controls the codec negotiation of an inbound IAX call.
|
||||
; This option is inherited to all user entities. It can also be defined
|
||||
; in each user entity separately which will override the setting in general.
|
||||
;
|
||||
; The valid values are:
|
||||
;
|
||||
; caller - Consider the callers preferred order ahead of the host's.
|
||||
; host - Consider the host's preferred order ahead of the caller's.
|
||||
; disabled - Disable the consideration of codec preference altogether.
|
||||
; (this is the original behaviour before preferences were added)
|
||||
; reqonly - Same as disabled, only do not consider capabilities if
|
||||
; the requested format is not available the call will only
|
||||
; be accepted if the requested format is available.
|
||||
;
|
||||
; The default value is 'host'
|
||||
;
|
||||
;codecpriority=host
|
||||
|
||||
;rtcachefriends=yes ; Cache realtime friends by adding them to the internal list
|
||||
; just like friends added from the config file only on a
|
||||
; as-needed basis? (yes|no)
|
||||
|
||||
;rtupdate=yes ; Send registry updates to database using realtime? (yes|no)
|
||||
; If set to yes, when a IAX2 peer registers successfully,
|
||||
; the ip address, the origination port, the registration period,
|
||||
; and the username of the peer will be set to database via realtime.
|
||||
; If not present, defaults to 'yes'.
|
||||
|
||||
;rtautoclear=yes ; Auto-Expire friends created on the fly on the same schedule
|
||||
; as if it had just registered? (yes|no|<seconds>)
|
||||
; If set to yes, when the registration expires, the friend will
|
||||
; vanish from the configuration until requested again.
|
||||
; If set to an integer, friends expire within this number of
|
||||
; seconds instead of the registration interval.
|
||||
|
||||
;rtignoreregexpire=yes ; When reading a peer from Realtime, if the peer's registration
|
||||
; has expired based on its registration interval, used the stored
|
||||
; address information regardless. (yes|no)
|
||||
|
||||
; Guest sections for unauthenticated connection attempts. Just specify an
|
||||
; empty secret, or provide no secret section.
|
||||
;
|
||||
[guest]
|
||||
type=user
|
||||
context=default
|
||||
callerid="Guest IAX User"
|
||||
|
||||
;
|
||||
; Trust Caller*ID Coming from iaxtel.com
|
||||
;
|
||||
[iaxtel]
|
||||
type=user
|
||||
context=default
|
||||
auth=rsa
|
||||
inkeys=iaxtel
|
||||
|
||||
;
|
||||
; Trust Caller*ID Coming from iax.fwdnet.net
|
||||
;
|
||||
[iaxfwd]
|
||||
type=user
|
||||
context=default
|
||||
auth=rsa
|
||||
inkeys=freeworlddialup
|
||||
|
||||
;
|
||||
; Trust callerid delivered over DUNDi/e164
|
||||
;
|
||||
;
|
||||
;[dundi]
|
||||
;type=user
|
||||
;dbsecret=dundi/secret
|
||||
;context=dundi-e164-local
|
||||
|
||||
;
|
||||
; Further user sections may be added, specifying a context and a secret used
|
||||
; for connections with that given authentication name. Limited IP based
|
||||
; access control is allowed by use of "allow" and "deny" keywords. Multiple
|
||||
; rules are permitted. Multiple permitted contexts may be specified, in
|
||||
; which case the first will be the default. You can also override caller*ID
|
||||
; so that when you receive a call you set the Caller*ID to be what you want
|
||||
; instead of trusting what the remote user provides
|
||||
;
|
||||
; There are three authentication methods that are supported: md5, plaintext,
|
||||
; and rsa. The least secure is "plaintext", which sends passwords cleartext
|
||||
; across the net. "md5" uses a challenge/response md5 sum arrangement, but
|
||||
; still requires both ends have plain text access to the secret. "rsa" allows
|
||||
; unidirectional secret knowledge through public/private keys. If "rsa"
|
||||
; authentication is used, "inkeys" is a list of acceptable public keys on the
|
||||
; local system that can be used to authenticate the remote peer, separated by
|
||||
; the ":" character. "outkey" is a single, private key to use to authenticate
|
||||
; to the other side. Public keys are named /var/lib/asterisk/keys/<name>.pub
|
||||
; while private keys are named /var/lib/asterisk/keys/<name>.key. Private
|
||||
; keys should always be 3DES encrypted.
|
||||
;
|
||||
;
|
||||
; NOTE: All hostnames and IP addresses in this file are for example purposes
|
||||
; only; you should not expect any of them to actually be available for
|
||||
; your use.
|
||||
;
|
||||
;
|
||||
;[markster]
|
||||
;type=user
|
||||
;context=default
|
||||
;context=local
|
||||
;auth=md5,plaintext,rsa
|
||||
;secret=markpasswd
|
||||
;setvar=foo=bar
|
||||
;dbsecret=mysecrets/place ; Secrets can be stored in astdb, too
|
||||
;transfer=no ; Disable IAX native transfer
|
||||
;transfer=mediaonly ; When doing IAX native transfers, transfer
|
||||
; only media stream
|
||||
;jitterbuffer=yes ; Override global setting an enable jitter buffer
|
||||
; ; for this user
|
||||
;maxauthreq=10 ; Set maximum number of outstanding AUTHREQs waiting for replies. Any further authentication attempts will be blocked
|
||||
; ; if this limit is reached until they expire or a reply is received.
|
||||
;callerid="Mark Spencer" <(256) 428-6275>
|
||||
;deny=0.0.0.0/0.0.0.0
|
||||
;accountcode=markster0101
|
||||
;permit=209.16.236.73/255.255.255.0
|
||||
;language=en ; Use english as default language
|
||||
;
|
||||
; Peers may also be specified, with a secret and
|
||||
; a remote hostname.
|
||||
;
|
||||
[demo]
|
||||
type=peer
|
||||
username=asterisk
|
||||
secret=supersecret
|
||||
host=216.207.245.47
|
||||
;sendani=no
|
||||
;host=asterisk.linux-support.net
|
||||
;port=5036
|
||||
;mask=255.255.255.255
|
||||
;qualify=yes ; Make sure this peer is alive
|
||||
;qualifysmoothing = yes ; use an average of the last two PONG
|
||||
; results to reduce falsely detected LAGGED hosts
|
||||
; Default: Off
|
||||
;qualifyfreqok = 60000 ; how frequently to ping the peer when
|
||||
; everything seems to be ok, in milliseconds
|
||||
;qualifyfreqnotok = 10000 ; how frequently to ping the peer when it's
|
||||
; either LAGGED or UNAVAILABLE, in milliseconds
|
||||
;jitterbuffer=no ; Turn off jitter buffer for this peer
|
||||
|
||||
;
|
||||
; Peers can remotely register as well, so that they can be mobile. Default
|
||||
; IP's can also optionally be given but are not required. Caller*ID can be
|
||||
; suggested to the other side as well if it is for example a phone instead of
|
||||
; another PBX.
|
||||
;
|
||||
|
||||
;[dynamichost]
|
||||
;host=dynamic
|
||||
;secret=mysecret
|
||||
;mailbox=1234 ; Notify about mailbox 1234
|
||||
;inkeys=key1:key2
|
||||
;peercontext=local ; Default context to request for calls to peer
|
||||
;defaultip=216.207.245.34
|
||||
;callerid="Some Host" <(256) 428-6011>
|
||||
;
|
||||
|
||||
;
|
||||
;[biggateway]
|
||||
;type=peer
|
||||
;host=192.168.0.1
|
||||
;context=*
|
||||
;secret=myscret
|
||||
;trunk=yes ; Use IAX2 trunking with this host
|
||||
;timezone=America/New_York ; Set a timezone for the date/time IE
|
||||
;
|
||||
|
||||
;
|
||||
; Friends are a short cut for creating a user and
|
||||
; a peer with the same values.
|
||||
;
|
||||
;[marko]
|
||||
;type=friend
|
||||
;host=dynamic
|
||||
;regexten=1234
|
||||
;secret=moofoo ; Multiple secrets may be specified. For a "user", all
|
||||
;secret=foomoo ; specified entries will be accepted as valid. For a "peer",
|
||||
;secret=shazbot ; only the last specified secret will be used.
|
||||
;context=default
|
||||
;permit=0.0.0.0/0.0.0.0
|
||||
|
81
egasterisk/iaxprov.conf
Normal file
81
egasterisk/iaxprov.conf
Normal file
|
@ -0,0 +1,81 @@
|
|||
;
|
||||
; IAX2 Provisioning Information
|
||||
;
|
||||
; Contains provisioning information for templates and for specific service
|
||||
; entries.
|
||||
;
|
||||
; Templates provide a group of settings from which provisioning takes place.
|
||||
; A template may be based upon any template that has been specified before
|
||||
; it. If the template that an entry is based on is not specified then it is
|
||||
; presumed to be 'default' (unless it is the first of course).
|
||||
;
|
||||
; Templates which begin with 'si-' are used for provisioning units with
|
||||
; specific service identifiers. For example the entry "si-000364000126"
|
||||
; would be used when the device with the corresponding service identifier of
|
||||
; "000364000126" attempts to register or make a call.
|
||||
;
|
||||
[default]
|
||||
;
|
||||
; The port number the device should use to bind to. The default is 4569.
|
||||
;
|
||||
;port=4569
|
||||
;
|
||||
; server is our PRIMARY server for registration and placing calls
|
||||
;
|
||||
;server=192.168.69.3
|
||||
;
|
||||
; altserver is the BACKUP server for registration and placing calls in the
|
||||
; event the primary server is unavailable.
|
||||
;
|
||||
;altserver=192.168.69.4
|
||||
;
|
||||
; port is the port number to use for IAX2 outbound. The connections to the
|
||||
; server and altserver -- default is of course 4569.
|
||||
;serverport=4569
|
||||
;
|
||||
; language is the preferred language for the device
|
||||
;
|
||||
;language=en
|
||||
;
|
||||
; codec is the requested codec. The iaxy supports ulaw and adpcm
|
||||
;
|
||||
codec=ulaw
|
||||
;
|
||||
; flags is a comma separated list of flags which the device should
|
||||
; use and may contain any of the following keywords:
|
||||
;
|
||||
; "register" - Register with server
|
||||
; "secure" - Do not accept calls / provisioning not originated by the server
|
||||
; "heartbeat" - Generate status packets on port 9999 sent to 255.255.255.255
|
||||
; "debug" - Output extra debugging to port 9999
|
||||
;
|
||||
; Note that use can use += and -= to adjust parameters
|
||||
;
|
||||
flags=register,heartbeat
|
||||
;
|
||||
; See doc/ip-tos.txt for a description of this parameter.
|
||||
;tos=ef
|
||||
;
|
||||
; Example iaxy provisioning
|
||||
;
|
||||
;[si-000364000126]
|
||||
;user=iaxy
|
||||
;pass=bitsy
|
||||
;flags += debug
|
||||
|
||||
;[si-000364000127]
|
||||
;user=iaxy2
|
||||
;pass=bitsy2
|
||||
;template=si-000364000126
|
||||
;flags += debug
|
||||
|
||||
;
|
||||
;[*]
|
||||
;
|
||||
; If specified, the '*' provisioning is used for all devices which do not
|
||||
; have another provisioning entry within the file. If unspecified, no
|
||||
; provisioning will take place for devices which have no entry. DO NOT
|
||||
; USE A '*' PROVISIONING ENTRY UNLESS YOU KNOW WHAT YOU'RE DOING.
|
||||
;
|
||||
;template=default
|
||||
|
733
egasterisk/indications.conf
Normal file
733
egasterisk/indications.conf
Normal file
|
@ -0,0 +1,733 @@
|
|||
; indications.conf
|
||||
; Configuration file for location specific tone indications
|
||||
; used by the pbx_indications module.
|
||||
;
|
||||
; NOTE:
|
||||
; When adding countries to this file, please keep them in alphabetical
|
||||
; order according to the 2-character country codes!
|
||||
;
|
||||
; The [general] category is for certain global variables.
|
||||
; All other categories are interpreted as location specific indications
|
||||
;
|
||||
;
|
||||
[general]
|
||||
country=nz ; default location
|
||||
|
||||
|
||||
; [example]
|
||||
; description = string
|
||||
; The full name of your country, in English.
|
||||
; alias = iso[,iso]*
|
||||
; List of other countries 2-letter iso codes, which have the same
|
||||
; tone indications.
|
||||
; ringcadence = num[,num]*
|
||||
; List of durations the physical bell rings.
|
||||
; dial = tonelist
|
||||
; Set of tones to be played when one picks up the hook.
|
||||
; busy = tonelist
|
||||
; Set of tones played when the receiving end is busy.
|
||||
; congestion = tonelist
|
||||
; Set of tones played when there is some congestion (on the network?)
|
||||
; callwaiting = tonelist
|
||||
; Set of tones played when there is a call waiting in the background.
|
||||
; dialrecall = tonelist
|
||||
; Not well defined; many phone systems play a recall dial tone after hook
|
||||
; flash.
|
||||
; record = tonelist
|
||||
; Set of tones played when call recording is in progress.
|
||||
; info = tonelist
|
||||
; Set of tones played with special information messages (e.g., "number is
|
||||
; out of service")
|
||||
; 'name' = tonelist
|
||||
; Every other variable will be available as a shortcut for the "PlayList" command
|
||||
; but will not be used automatically by Asterisk.
|
||||
;
|
||||
;
|
||||
; The tonelist itself is defined by a comma-separated sequence of elements.
|
||||
; Each element consist of a frequency (f) with an optional duration (in ms)
|
||||
; attached to it (f/duration). The frequency component may be a mixture of two
|
||||
; frequencies (f1+f2) or a frequency modulated by another frequency (f1*f2).
|
||||
; The implicit modulation depth is fixed at 90%, though.
|
||||
; If the list element starts with a !, that element is NOT repeated,
|
||||
; therefore, only if all elements start with !, the tonelist is time-limited,
|
||||
; all others will repeat indefinitely.
|
||||
;
|
||||
; concisely:
|
||||
; element = [!]freq[+|*freq2][/duration]
|
||||
; tonelist = element[,element]*
|
||||
;
|
||||
; Please note that SPACES ARE NOT ALLOWED in tone lists!
|
||||
;
|
||||
|
||||
[at]
|
||||
description = Austria
|
||||
ringcadence = 1000,5000
|
||||
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
|
||||
dial = 420
|
||||
busy = 420/400,0/400
|
||||
ring = 420/1000,0/5000
|
||||
congestion = 420/200,0/200
|
||||
callwaiting = 420/40,0/1960
|
||||
dialrecall = 420
|
||||
; RECORDTONE - not specified
|
||||
record = 1400/80,0/14920
|
||||
info = 950/330,1450/330,1850/330,0/1000
|
||||
stutter = 380+420
|
||||
|
||||
[au]
|
||||
description = Australia
|
||||
; Reference http://www.acif.org.au/__data/page/3303/S002_2001.pdf
|
||||
; Normal Ring
|
||||
ringcadence = 400,200,400,2000
|
||||
; Distinctive Ring 1 - Forwarded Calls
|
||||
; 400,400,200,200,400,1400
|
||||
; Distinctive Ring 2 - Selective Ring 2 + Operator + Recall
|
||||
; 400,400,200,2000
|
||||
; Distinctive Ring 3 - Multiple Subscriber Number 1
|
||||
; 200,200,400,2200
|
||||
; Distinctive Ring 4 - Selective Ring 1 + Centrex
|
||||
; 400,2600
|
||||
; Distinctive Ring 5 - Selective Ring 3
|
||||
; 400,400,200,400,200,1400
|
||||
; Distinctive Ring 6 - Multiple Subscriber Number 2
|
||||
; 200,400,200,200,400,1600
|
||||
; Distinctive Ring 7 - Multiple Subscriber Number 3 + Data Privacy
|
||||
; 200,400,200,400,200,1600
|
||||
; Tones
|
||||
dial = 413+438
|
||||
busy = 425/375,0/375
|
||||
ring = 413+438/400,0/200,413+438/400,0/2000
|
||||
; XXX Congestion: Should reduce by 10 db every other cadence XXX
|
||||
congestion = 425/375,0/375,420/375,0/375
|
||||
callwaiting = 425/200,0/200,425/200,0/4400
|
||||
dialrecall = 413+438
|
||||
; Record tone used for Call Intrusion/Recording or Conference
|
||||
record = !425/1000,!0/15000,425/360,0/15000
|
||||
info = 425/2500,0/500
|
||||
; Other Australian Tones
|
||||
; The STD "pips" indicate the call is not an untimed local call
|
||||
std = !525/100,!0/100,!525/100,!0/100,!525/100,!0/100,!525/100,!0/100,!525/100
|
||||
; Facility confirmation tone (eg. Call Forward Activated)
|
||||
facility = 425
|
||||
; Message Waiting "stutter" dialtone
|
||||
stutter = 413+438/100,0/40
|
||||
; Ringtone for calls to Telstra mobiles
|
||||
ringmobile = 400+450/400,0/200,400+450/400,0/2000
|
||||
|
||||
[bg]
|
||||
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
|
||||
description = Bulgaria
|
||||
ringdance = 1000,4000
|
||||
;
|
||||
dial = 425
|
||||
busy = 425/500,0/500
|
||||
ring = 425/1000,0/4000
|
||||
congestion = 425/250,0/250
|
||||
callwaiting = 425/150,0/150,425/150,0/4000
|
||||
dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
|
||||
record = 1400/425,0/15000
|
||||
info = 950/330,1400/330,1800/330,0/1000
|
||||
stutter = 425/1500,0/100
|
||||
|
||||
[br]
|
||||
description = Brazil
|
||||
ringcadence = 1000,4000
|
||||
dial = 425
|
||||
busy = 425/250,0/250
|
||||
ring = 425/1000,0/4000
|
||||
congestion = 425/250,0/250,425/750,0/250
|
||||
callwaiting = 425/50,0/1000
|
||||
; Dialrecall not used in Brazil standard (using UK standard)
|
||||
dialrecall = 350+440
|
||||
; Record tone is not used in Brazil, use busy tone
|
||||
record = 425/250,0/250
|
||||
; Info not used in Brazil standard (using UK standard)
|
||||
info = 950/330,1400/330,1800/330
|
||||
stutter = 350+440
|
||||
|
||||
[be]
|
||||
description = Belgium
|
||||
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
|
||||
ringcadence = 1000,3000
|
||||
dial = 425
|
||||
busy = 425/500,0/500
|
||||
ring = 425/1000,0/3000
|
||||
congestion = 425/167,0/167
|
||||
callwaiting = 1400/175,0/175,1400/175,0/3500
|
||||
; DIALRECALL - not specified
|
||||
dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
|
||||
; RECORDTONE - not specified
|
||||
record = 1400/500,0/15000
|
||||
info = 900/330,1400/330,1800/330,0/1000
|
||||
stutter = 425/1000,0/250
|
||||
|
||||
[ch]
|
||||
description = Switzerland
|
||||
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
|
||||
ringcadence = 1000,4000
|
||||
dial = 425
|
||||
busy = 425/500,0/500
|
||||
ring = 425/1000,0/4000
|
||||
congestion = 425/200,0/200
|
||||
callwaiting = 425/200,0/200,425/200,0/4000
|
||||
; DIALRECALL - not specified
|
||||
dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
|
||||
; RECORDTONE - not specified
|
||||
record = 1400/80,0/15000
|
||||
info = 950/330,1400/330,1800/330,0/1000
|
||||
stutter = 425+340/1100,0/1100
|
||||
|
||||
[cl]
|
||||
description = Chile
|
||||
; According to specs from Telefonica CTC Chile
|
||||
ringcadence = 1000,3000
|
||||
dial = 400
|
||||
busy = 400/500,0/500
|
||||
ring = 400/1000,0/3000
|
||||
congestion = 400/200,0/200
|
||||
callwaiting = 400/250,0/8750
|
||||
dialrecall = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400
|
||||
record = 1400/500,0/15000
|
||||
info = 950/333,1400/333,1800/333,0/1000
|
||||
stutter = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400
|
||||
|
||||
[cn]
|
||||
description = China
|
||||
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
|
||||
ringcadence = 1000,4000
|
||||
dial = 450
|
||||
busy = 450/350,0/350
|
||||
ring = 450/1000,0/4000
|
||||
congestion = 450/700,0/700
|
||||
callwaiting = 450/400,0/4000
|
||||
dialrecall = 450
|
||||
record = 950/400,0/10000
|
||||
info = 450/100,0/100,450/100,0/100,450/100,0/100,450/400,0/400
|
||||
; STUTTER - not specified
|
||||
stutter = 450+425
|
||||
|
||||
[cz]
|
||||
description = Czech Republic
|
||||
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
|
||||
ringcadence = 1000,4000
|
||||
dial = 425/330,0/330,425/660,0/660
|
||||
busy = 425/330,0/330
|
||||
ring = 425/1000,0/4000
|
||||
congestion = 425/165,0/165
|
||||
callwaiting = 425/330,0/9000
|
||||
; DIALRECALL - not specified
|
||||
dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425/330,0/330,425/660,0/660
|
||||
; RECORDTONE - not specified
|
||||
record = 1400/500,0/14000
|
||||
info = 950/330,0/30,1400/330,0/30,1800/330,0/1000
|
||||
; STUTTER - not specified
|
||||
stutter = 425/450,0/50
|
||||
|
||||
[de]
|
||||
description = Germany
|
||||
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
|
||||
ringcadence = 1000,4000
|
||||
dial = 425
|
||||
busy = 425/480,0/480
|
||||
ring = 425/1000,0/4000
|
||||
congestion = 425/240,0/240
|
||||
callwaiting = !425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,0
|
||||
; DIALRECALL - not specified
|
||||
dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
|
||||
; RECORDTONE - not specified
|
||||
record = 1400/80,0/15000
|
||||
info = 950/330,1400/330,1800/330,0/1000
|
||||
stutter = 425+400
|
||||
|
||||
[dk]
|
||||
description = Denmark
|
||||
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
|
||||
ringcadence = 1000,4000
|
||||
dial = 425
|
||||
busy = 425/500,0/500
|
||||
ring = 425/1000,0/4000
|
||||
congestion = 425/200,0/200
|
||||
callwaiting = !425/200,!0/600,!425/200,!0/3000,!425/200,!0/200,!425/200,0
|
||||
; DIALRECALL - not specified
|
||||
dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
|
||||
; RECORDTONE - not specified
|
||||
record = 1400/80,0/15000
|
||||
info = 950/330,1400/330,1800/330,0/1000
|
||||
; STUTTER - not specified
|
||||
stutter = 425/450,0/50
|
||||
|
||||
[ee]
|
||||
description = Estonia
|
||||
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
|
||||
ringcadence = 1000,4000
|
||||
dial = 425
|
||||
busy = 425/300,0/300
|
||||
ring = 425/1000,0/4000
|
||||
congestion = 425/200,0/200
|
||||
; CALLWAIT not in accordance to ITU
|
||||
callwaiting = 950/650,0/325,950/325,0/30,1400/1300,0/2600
|
||||
; DIALRECALL - not specified
|
||||
dialrecall = 425/650,0/25
|
||||
; RECORDTONE - not specified
|
||||
record = 1400/500,0/15000
|
||||
; INFO not in accordance to ITU
|
||||
info = 950/650,0/325,950/325,0/30,1400/1300,0/2600
|
||||
; STUTTER not specified
|
||||
stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
|
||||
|
||||
[es]
|
||||
description = Spain
|
||||
ringcadence = 1500,3000
|
||||
dial = 425
|
||||
busy = 425/200,0/200
|
||||
ring = 425/1500,0/3000
|
||||
congestion = 425/200,0/200,425/200,0/200,425/200,0/600
|
||||
callwaiting = 425/175,0/175,425/175,0/3500
|
||||
dialrecall = !425/200,!0/200,!425/200,!0/200,!425/200,!0/200,425
|
||||
record = 1400/500,0/15000
|
||||
info = 950/330,0/1000
|
||||
dialout = 500
|
||||
|
||||
|
||||
[fi]
|
||||
description = Finland
|
||||
ringcadence = 1000,4000
|
||||
dial = 425
|
||||
busy = 425/300,0/300
|
||||
ring = 425/1000,0/4000
|
||||
congestion = 425/200,0/200
|
||||
callwaiting = 425/150,0/150,425/150,0/8000
|
||||
dialrecall = 425/650,0/25
|
||||
record = 1400/500,0/15000
|
||||
info = 950/650,0/325,950/325,0/30,1400/1300,0/2600
|
||||
stutter = 425/650,0/25
|
||||
|
||||
[fr]
|
||||
description = France
|
||||
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
|
||||
ringcadence = 1500,3500
|
||||
; Dialtone can also be 440+330
|
||||
dial = 440
|
||||
busy = 440/500,0/500
|
||||
ring = 440/1500,0/3500
|
||||
; CONGESTION - not specified
|
||||
congestion = 440/250,0/250
|
||||
callwait = 440/300,0/10000
|
||||
; DIALRECALL - not specified
|
||||
dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
|
||||
; RECORDTONE - not specified
|
||||
record = 1400/500,0/15000
|
||||
info = !950/330,!1400/330,!1800/330
|
||||
stutter = !440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,440
|
||||
|
||||
[gr]
|
||||
description = Greece
|
||||
ringcadence = 1000,4000
|
||||
dial = 425/200,0/300,425/700,0/800
|
||||
busy = 425/300,0/300
|
||||
ring = 425/1000,0/4000
|
||||
congestion = 425/200,0/200
|
||||
callwaiting = 425/150,0/150,425/150,0/8000
|
||||
dialrecall = 425/650,0/25
|
||||
record = 1400/400,0/15000
|
||||
info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0
|
||||
stutter = 425/650,0/25
|
||||
|
||||
[hu]
|
||||
description = Hungary
|
||||
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
|
||||
ringcadence = 1250,3750
|
||||
dial = 425
|
||||
busy = 425/300,0/300
|
||||
ring = 425/1250,0/3750
|
||||
congestion = 425/300,0/300
|
||||
callwaiting = 425/40,0/1960
|
||||
dialrecall = 425+450
|
||||
; RECORDTONE - not specified
|
||||
record = 1400/400,0/15000
|
||||
info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0
|
||||
stutter = 350+375+400
|
||||
|
||||
[il]
|
||||
description = Israel
|
||||
ringcadence = 1000,3000
|
||||
dial = 414
|
||||
busy = 414/500,0/500
|
||||
ring = 414/1000,0/3000
|
||||
congestion = 414/250,0/250
|
||||
callwaiting = 414/100,0/100,414/100,0/100,414/600,0/3000
|
||||
dialrecall = !414/100,!0/100,!414/100,!0/100,!414/100,!0/100,414
|
||||
record = 1400/500,0/15000
|
||||
info = 1000/330,1400/330,1800/330,0/1000
|
||||
stutter = !414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,414
|
||||
|
||||
|
||||
[in]
|
||||
description = India
|
||||
ringcadence = 400,200,400,2000
|
||||
dial = 400*25
|
||||
busy = 400/750,0/750
|
||||
ring = 400*25/400,0/200,400*25/400,0/2000
|
||||
congestion = 400/250,0/250
|
||||
callwaiting = 400/200,0/100,400/200,0/7500
|
||||
dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
|
||||
record = 1400/500,0/15000
|
||||
info = !950/330,!1400/330,!1800/330,0/1000
|
||||
stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
|
||||
|
||||
[it]
|
||||
description = Italy
|
||||
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
|
||||
ringcadence = 1000,4000
|
||||
dial = 425/200,0/200,425/600,0/1000
|
||||
busy = 425/500,0/500
|
||||
ring = 425/1000,0/4000
|
||||
congestion = 425/200,0/200
|
||||
callwaiting = 425/400,0/100,425/250,0/100,425/150,0/14000
|
||||
dialrecall = 470/400,425/400
|
||||
record = 1400/400,0/15000
|
||||
info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0
|
||||
stutter = 470/400,425/400
|
||||
|
||||
[lt]
|
||||
description = Lithuania
|
||||
ringcadence = 1000,4000
|
||||
dial = 425
|
||||
busy = 425/350,0/350
|
||||
ring = 425/1000,0/4000
|
||||
congestion = 425/200,0/200
|
||||
callwaiting = 425/150,0/150,425/150,0/4000
|
||||
; DIALRECALL - not specified
|
||||
dialrecall = 425/500,0/50
|
||||
; RECORDTONE - not specified
|
||||
record = 1400/500,0/15000
|
||||
info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0
|
||||
; STUTTER - not specified
|
||||
stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
|
||||
|
||||
[jp]
|
||||
description = Japan
|
||||
ringcadence = 1000,2000
|
||||
dial = 400
|
||||
busy = 400/500,0/500
|
||||
ring = 400+15/1000,0/2000
|
||||
congestion = 400/500,0/500
|
||||
callwaiting = 400+16/500,0/8000
|
||||
dialrecall = !400/200,!0/200,!400/200,!0/200,!400/200,!0/200,400
|
||||
record = 1400/500,0/15000
|
||||
info = !950/330,!1400/330,!1800/330,0
|
||||
stutter = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400
|
||||
|
||||
[mx]
|
||||
description = Mexico
|
||||
ringcadence = 2000,4000
|
||||
dial = 425
|
||||
busy = 425/250,0/250
|
||||
ring = 425/1000,0/4000
|
||||
congestion = 425/250,0/250
|
||||
callwaiting = 425/200,0/600,425/200,0/10000
|
||||
dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
|
||||
record = 1400/500,0/15000
|
||||
info = 950/330,0/30,1400/330,0/30,1800/330,0/1000
|
||||
stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
|
||||
|
||||
[my]
|
||||
description = Malaysia
|
||||
ringcadence = 2000,4000
|
||||
dial = 425
|
||||
busy = 425/500,0/500
|
||||
ring = 425/400,0/200
|
||||
congestion = 425/500,0/500
|
||||
|
||||
[nl]
|
||||
description = Netherlands
|
||||
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
|
||||
ringcadence = 1000,4000
|
||||
; Most of these 425's can also be 450's
|
||||
dial = 425
|
||||
busy = 425/500,0/500
|
||||
ring = 425/1000,0/4000
|
||||
congestion = 425/250,0/250
|
||||
callwaiting = 425/500,0/9500
|
||||
; DIALRECALL - not specified
|
||||
dialrecall = 425/500,0/50
|
||||
; RECORDTONE - not specified
|
||||
record = 1400/500,0/15000
|
||||
info = 950/330,1400/330,1800/330,0/1000
|
||||
stutter = 425/500,0/50
|
||||
|
||||
[no]
|
||||
description = Norway
|
||||
ringcadence = 1000,4000
|
||||
dial = 425
|
||||
busy = 425/500,0/500
|
||||
ring = 425/1000,0/4000
|
||||
congestion = 425/200,0/200
|
||||
callwaiting = 425/200,0/600,425/200,0/10000
|
||||
dialrecall = 470/400,425/400
|
||||
record = 1400/400,0/15000
|
||||
info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0
|
||||
stutter = 470/400,425/400
|
||||
|
||||
[nz]
|
||||
description = New Zealand
|
||||
;NOTE - the ITU has different tonesets for NZ, but according to some residents there,
|
||||
; this is, indeed, the correct way to do it.
|
||||
ringcadence = 400,200,400,2000
|
||||
dial = 400
|
||||
busy = 400/250,0/250
|
||||
ring = 400+450/400,0/200,400+450/400,0/2000
|
||||
congestion = 400/375,0/375
|
||||
callwaiting = !400/200,!0/3000,!400/200,!0/3000,!400/200,!0/3000,!400/200
|
||||
dialrecall = !400/100!0/100,!400/100,!0/100,!400/100,!0/100,400
|
||||
record = 1400/425,0/15000
|
||||
info = 400/750,0/100,400/750,0/100,400/750,0/100,400/750,0/400
|
||||
stutter = !400/100!0/100,!400/100,!0/100,!400/100,!0/100,!400/100!0/100,!400/100,!0/100,!400/100,!0/100,400
|
||||
unobtainable = 400/75,0/100,400/75,0/100,400/75,0/100,400/75,0/400
|
||||
|
||||
[ph]
|
||||
|
||||
; reference http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
|
||||
|
||||
description = Philippines
|
||||
ringcadence = 1000,4000
|
||||
dial = 425
|
||||
busy = 480+620/500,0/500
|
||||
ring = 425+480/1000,0/4000
|
||||
congestion = 480+620/250,0/250
|
||||
callwaiting = 440/300,0/10000
|
||||
; DIALRECALL - not specified
|
||||
dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
|
||||
; RECORDTONE - not specified
|
||||
record = 1400/500,0/15000
|
||||
; INFO - not specified
|
||||
info = !950/330,!1400/330,!1800/330,0
|
||||
; STUTTER - not specified
|
||||
stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
|
||||
|
||||
|
||||
[pl]
|
||||
description = Poland
|
||||
ringcadence = 1000,4000
|
||||
dial = 425
|
||||
busy = 425/500,0/500
|
||||
ring = 425/1000,0/4000
|
||||
congestion = 425/500,0/500
|
||||
callwaiting = 425/150,0/150,425/150,0/4000
|
||||
; DIALRECALL - not specified
|
||||
dialrecall = 425/500,0/50
|
||||
; RECORDTONE - not specified
|
||||
record = 1400/500,0/15000
|
||||
; 950/1400/1800 3x0.33 on 1.0 off repeated 3 times
|
||||
info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000
|
||||
; STUTTER - not specified
|
||||
stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
|
||||
|
||||
[pt]
|
||||
description = Portugal
|
||||
ringcadence = 1000,5000
|
||||
dial = 425
|
||||
busy = 425/500,0/500
|
||||
ring = 425/1000,0/5000
|
||||
congestion = 425/200,0/200
|
||||
callwaiting = 440/300,0/10000
|
||||
dialrecall = 425/1000,0/200
|
||||
record = 1400/500,0/15000
|
||||
info = 950/330,1400/330,1800/330,0/1000
|
||||
stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
|
||||
|
||||
[ru]
|
||||
; References:
|
||||
; http://www.minsvyaz.ru/site.shtml?id=1806
|
||||
; http://www.aboutphone.info/lib/gost/45-223-2001.html
|
||||
description = Russian Federation / ex Soviet Union
|
||||
ringcadence = 1000,4000
|
||||
dial = 425
|
||||
busy = 425/350,0/350
|
||||
ring = 425/1000,0/4000
|
||||
congestion = 425/175,0/175
|
||||
callwaiting = 425/200,0/5000
|
||||
record = 1400/400,0/15000
|
||||
info = 950/330,1400/330,1800/330,0/1000
|
||||
dialrecall = 425/400,0/40
|
||||
stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
|
||||
|
||||
[se]
|
||||
description = Sweden
|
||||
ringcadence = 1000,5000
|
||||
dial = 425
|
||||
busy = 425/250,0/250
|
||||
ring = 425/1000,0/5000
|
||||
congestion = 425/250,0/750
|
||||
callwaiting = 425/200,0/500,425/200,0/9100
|
||||
dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
|
||||
record = 1400/500,0/15000
|
||||
info = !950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,0
|
||||
stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425
|
||||
; stutter = 425/320,0/20 ; Real swedish standard, not used for now
|
||||
|
||||
[sg]
|
||||
description = Singapore
|
||||
; Singapore
|
||||
; Reference: http://www.ida.gov.sg/idaweb/doc/download/I397/ida_ts_pstn1_i4r2.pdf
|
||||
; Frequency specs are: 425 Hz +/- 20Hz; 24 Hz +/- 2Hz; modulation depth 100%; SIT +/- 50Hz
|
||||
ringcadence = 400,200,400,2000
|
||||
dial = 425
|
||||
ring = 425*24/400,0/200,425*24/400,0/2000 ; modulation should be 100%, not 90%
|
||||
busy = 425/750,0/750
|
||||
congestion = 425/250,0/250
|
||||
callwaiting = 425*24/300,0/200,425*24/300,0/3200
|
||||
stutter = !425/200,!0/200,!425/600,!0/200,!425/200,!0/200,!425/600,!0/200,!425/200,!0/200,!425/600,!0/200,!425/200,!0/200,!425/600,!0/200,425
|
||||
info = 950/330,1400/330,1800/330,0/1000 ; not currently in use acc. to reference
|
||||
dialrecall = 425*24/500,0/500,425/500,0/2500 ; unspecified in IDA reference, use repeating Holding Tone A,B
|
||||
record = 1400/500,0/15000 ; unspecified in IDA reference, use 0.5s tone every 15s
|
||||
; additionally defined in reference
|
||||
nutone = 425/2500,0/500
|
||||
intrusion = 425/250,0/2000
|
||||
warning = 425/624,0/4376 ; end of period tone, warning
|
||||
acceptance = 425/125,0/125
|
||||
holdinga = !425*24/500,!0/500 ; followed by holdingb
|
||||
holdingb = !425/500,!0/2500
|
||||
|
||||
[th]
|
||||
description = Thailand
|
||||
ringcadence = 1000,4000
|
||||
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
|
||||
dial = 400*50
|
||||
busy = 400/500,0/500
|
||||
ring = 420/1000,0/5000
|
||||
congestion = 400/300,0/300
|
||||
callwaiting = 1000/400,10000/400,1000/400
|
||||
; DIALRECALL - not specified - use special dial tone instead.
|
||||
dialrecall = 400*50/400,0/100,400*50/400,0/100
|
||||
; RECORDTONE - not specified
|
||||
record = 1400/500,0/15000
|
||||
; INFO - specified as an announcement - use special information tones instead
|
||||
info = 950/330,1400/330,1800/330
|
||||
; STUTTER - not specified
|
||||
stutter = !400/200,!0/200,!400/600,!0/200,!400/200,!0/200,!400/600,!0/200,!400/200,!0/200,!400/600,!0/200,!400/200,!0/200,!400/600,!0/200,400
|
||||
|
||||
[uk]
|
||||
description = United Kingdom
|
||||
ringcadence = 400,200,400,2000
|
||||
; These are the official tones taken from BT SIN350. The actual tones
|
||||
; used by BT include some volume differences so sound slightly different
|
||||
; from Asterisk-generated ones.
|
||||
dial = 350+440
|
||||
; Special dial is the intermittent dial tone heard when, for example,
|
||||
; you have a divert active on the line
|
||||
specialdial = 350+440/750,440/750
|
||||
; Busy is also called "Engaged"
|
||||
busy = 400/375,0/375
|
||||
; "Congestion" is the Beep-bip engaged tone
|
||||
congestion = 400/400,0/350,400/225,0/525
|
||||
; "Special Congestion" is not used by BT very often if at all
|
||||
specialcongestion = 400/200,1004/300
|
||||
unobtainable = 400
|
||||
ring = 400+450/400,0/200,400+450/400,0/2000
|
||||
callwaiting = 400/100,0/4000
|
||||
; BT seem to use "Special Call Waiting" rather than just "Call Waiting" tones
|
||||
specialcallwaiting = 400/250,0/250,400/250,0/250,400/250,0/5000
|
||||
; "Pips" used by BT on payphones. (Sounds wrong, but this is what BT claim it
|
||||
; is and I've not used a payphone for years)
|
||||
creditexpired = 400/125,0/125
|
||||
; These two are used to confirm/reject service requests on exchanges that
|
||||
; don't do voice announcements.
|
||||
confirm = 1400
|
||||
switching = 400/200,0/400,400/2000,0/400
|
||||
; This is the three rising tones Doo-dah-dee "Special Information Tone",
|
||||
; usually followed by the BT woman saying an appropriate message.
|
||||
info = 950/330,0/15,1400/330,0/15,1800/330,0/1000
|
||||
; Not listed in SIN350
|
||||
record = 1400/500,0/60000
|
||||
stutter = 350+440/750,440/750
|
||||
|
||||
[us]
|
||||
description = United States / North America
|
||||
ringcadence = 2000,4000
|
||||
dial = 350+440
|
||||
busy = 480+620/500,0/500
|
||||
ring = 440+480/2000,0/4000
|
||||
congestion = 480+620/250,0/250
|
||||
callwaiting = 440/300,0/10000
|
||||
dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
|
||||
record = 1400/500,0/15000
|
||||
info = !950/330,!1400/330,!1800/330,0
|
||||
stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
|
||||
|
||||
[us-old]
|
||||
description = United States Circa 1950/ North America
|
||||
ringcadence = 2000,4000
|
||||
dial = 600*120
|
||||
busy = 500*100/500,0/500
|
||||
ring = 420*40/2000,0/4000
|
||||
congestion = 500*100/250,0/250
|
||||
callwaiting = 440/300,0/10000
|
||||
dialrecall = !600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,600*120
|
||||
record = 1400/500,0/15000
|
||||
info = !950/330,!1400/330,!1800/330,0
|
||||
stutter = !600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,600*120
|
||||
|
||||
[tw]
|
||||
description = Taiwan
|
||||
; http://nemesis.lonestar.org/reference/telecom/signaling/dialtone.html
|
||||
; http://nemesis.lonestar.org/reference/telecom/signaling/busy.html
|
||||
; http://www.iproducts.com.tw/ee/kylink/06ky-1000a.htm
|
||||
; http://www.pbx-manufacturer.com/ky120dx.htm
|
||||
; http://www.nettwerked.net/tones.txt
|
||||
; http://www.cisco.com/univercd/cc/td/doc/product/tel_pswt/vco_prod/taiw_sup/taiw2.htm
|
||||
;
|
||||
; busy tone 480+620Hz 0.5 sec. on ,0.5 sec. off
|
||||
; reorder tone 480+620Hz 0.25 sec. on,0.25 sec. off
|
||||
; ringing tone 440+480Hz 1 sec. on ,2 sec. off
|
||||
;
|
||||
ringcadence = 1000,4000
|
||||
dial = 350+440
|
||||
busy = 480+620/500,0/500
|
||||
ring = 440+480/1000,0/2000
|
||||
congestion = 480+620/250,0/250
|
||||
callwaiting = 350+440/250,0/250,350+440/250,0/3250
|
||||
dialrecall = 300/1500,0/500
|
||||
record = 1400/500,0/15000
|
||||
info = !950/330,!1400/330,!1800/330,0
|
||||
stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
|
||||
|
||||
[ve]
|
||||
; Tone definition source for ve found on
|
||||
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
|
||||
description = Venezuela / South America
|
||||
ringcadence = 1000,4000
|
||||
dial = 425
|
||||
busy = 425/500,0/500
|
||||
ring = 425/1000,0/4000
|
||||
congestion = 425/250,0/250
|
||||
callwaiting = 400+450/300,0/6000
|
||||
dialrecall = 425
|
||||
record = 1400/500,0/15000
|
||||
info = !950/330,!1440/330,!1800/330,0/1000
|
||||
|
||||
|
||||
[za]
|
||||
description = South Africa
|
||||
; http://www.cisco.com/univercd/cc/td/doc/product/tel_pswt/vco_prod/safr_sup/saf02.htm
|
||||
; (definitions for other countries can also be found there)
|
||||
; Note, though, that South Africa uses two switch types in their network --
|
||||
; Alcatel switches -- mainly in the Western Cape, and Siemens elsewhere.
|
||||
; The former use 383+417 in dial, ringback etc. The latter use 400*33
|
||||
; I've provided both, uncomment the ones you prefer
|
||||
ringcadence = 400,200,400,2000
|
||||
; dial/ring/callwaiting for the Siemens switches:
|
||||
dial = 400*33
|
||||
ring = 400*33/400,0/200,400*33/400,0/2000
|
||||
callwaiting = 400*33/250,0/250,400*33/250,0/250,400*33/250,0/250,400*33/250,0/250
|
||||
; dial/ring/callwaiting for the Alcatel switches:
|
||||
; dial = 383+417
|
||||
; ring = 383+417/400,0/200,383+417/400,0/2000
|
||||
; callwaiting = 383+417/250,0/250,383+417/250,0/250,383+417/250,0/250,383+417/250,0/250
|
||||
congestion = 400/250,0/250
|
||||
busy = 400/500,0/500
|
||||
dialrecall = 350+440
|
||||
; XXX Not sure about the RECORDTONE
|
||||
record = 1400/500,0/10000
|
||||
info = 950/330,1400/330,1800/330,0/330
|
||||
stutter = !400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,400*33
|
18
egasterisk/jabber.conf
Normal file
18
egasterisk/jabber.conf
Normal file
|
@ -0,0 +1,18 @@
|
|||
[general]
|
||||
;debug=yes ;;Turn on debugging by default.
|
||||
;autoprune=yes ;;Auto remove users from buddy list.
|
||||
;autoregister=yes ;;Auto register users from buddy list.
|
||||
|
||||
;[asterisk] ;;label
|
||||
;type=client ;;Client or Component connection
|
||||
;serverhost=astjab.org ;;Route to server for example,
|
||||
;; talk.google.com
|
||||
;username=asterisk@astjab.org/asterisk ;;Username with optional roster.
|
||||
;secret=blah ;;Password
|
||||
;port=5222 ;;Port to use defaults to 5222
|
||||
;usetls=yes ;;Use tls or not
|
||||
;usesasl=yes ;;Use sasl or not
|
||||
;buddy=mogorman@astjab.org ;;Manual addition of buddy to list.
|
||||
;statusmessage="I am available" ;;Have custom status message for
|
||||
;;Asterisk.
|
||||
;timeout=100 ;;Timeout on the message stack.
|
69
egasterisk/logger.conf
Normal file
69
egasterisk/logger.conf
Normal file
|
@ -0,0 +1,69 @@
|
|||
;
|
||||
; Logging Configuration
|
||||
;
|
||||
; In this file, you configure logging to files or to
|
||||
; the syslog system.
|
||||
;
|
||||
; "logger reload" at the CLI will reload configuration
|
||||
; of the logging system.
|
||||
|
||||
[general]
|
||||
; Customize the display of debug message time stamps
|
||||
; this example is the ISO 8601 date format (yyyy-mm-dd HH:MM:SS)
|
||||
; see strftime(3) Linux manual for format specifiers
|
||||
;dateformat=%F %T
|
||||
;
|
||||
; This appends the hostname to the name of the log files.
|
||||
;appendhostname = yes
|
||||
;
|
||||
; This determines whether or not we log queue events to a file
|
||||
; (defaults to yes).
|
||||
;queue_log = no
|
||||
;
|
||||
; This determines whether or not we log generic events to a file
|
||||
; (defaults to yes).
|
||||
;event_log = no
|
||||
;
|
||||
;
|
||||
; For each file, specify what to log.
|
||||
;
|
||||
; For console logging, you set options at start of
|
||||
; Asterisk with -v for verbose and -d for debug
|
||||
; See 'asterisk -h' for more information.
|
||||
;
|
||||
; Directory for log files is configures in asterisk.conf
|
||||
; option astlogdir
|
||||
;
|
||||
[logfiles]
|
||||
;
|
||||
; Format is "filename" and then "levels" of debugging to be included:
|
||||
; debug
|
||||
; notice
|
||||
; warning
|
||||
; error
|
||||
; verbose
|
||||
; dtmf
|
||||
;
|
||||
; Special filename "console" represents the system console
|
||||
;
|
||||
; We highly recommend that you DO NOT turn on debug mode if you are simply
|
||||
; running a production system. Debug mode turns on a LOT of extra messages,
|
||||
; most of which you are unlikely to understand without an understanding of
|
||||
; the underlying code. Do NOT report debug messages as code issues, unless
|
||||
; you have a specific issue that you are attempting to debug. They are
|
||||
; messages for just that -- debugging -- and do not rise to the level of
|
||||
; something that merit your attention as an Asterisk administrator. Debug
|
||||
; messages are also very verbose and can and do fill up logfiles quickly;
|
||||
; this is another reason not to have debug mode on a production system unless
|
||||
; you are in the process of debugging a specific issue.
|
||||
;
|
||||
;debug => debug
|
||||
console => notice,warning,error
|
||||
;console => notice,warning,error,debug
|
||||
messages => notice,warning,error
|
||||
;full => notice,warning,error,debug,verbose
|
||||
|
||||
;syslog keyword : This special keyword logs to syslog facility
|
||||
;
|
||||
;syslog.local0 => notice,warning,error
|
||||
;
|
56
egasterisk/manager.conf
Normal file
56
egasterisk/manager.conf
Normal file
|
@ -0,0 +1,56 @@
|
|||
;
|
||||
; AMI - The Asterisk Manager Interface
|
||||
;
|
||||
; Third party application call management support and PBX event supervision
|
||||
;
|
||||
; This configuration file is read every time someone logs in
|
||||
;
|
||||
; Use the "manager list commands" at the CLI to list available manager commands
|
||||
; and their authorization levels.
|
||||
;
|
||||
; "manager show command <command>" will show a help text.
|
||||
;
|
||||
; ---------------------------- SECURITY NOTE -------------------------------
|
||||
; Note that you should not enable the AMI on a public IP address. If needed,
|
||||
; block this TCP port with iptables (or another FW software) and reach it
|
||||
; with IPsec, SSH, or SSL vpn tunnel. You can also make the manager
|
||||
; interface available over http if Asterisk's http server is enabled in
|
||||
; http.conf and if both "enabled" and "webenabled" are set to yes in
|
||||
; this file. Both default to no. httptimeout provides the maximum
|
||||
; timeout in seconds before a web based session is discarded. The
|
||||
; default is 60 seconds.
|
||||
;
|
||||
[general]
|
||||
displaysystemname = yes
|
||||
enabled = yes
|
||||
webenabled = yes
|
||||
port = 5038
|
||||
|
||||
;httptimeout = 60
|
||||
; a) httptimeout sets the Max-Age of the http cookie
|
||||
; b) httptimeout is the amount of time the webserver waits
|
||||
; on a action=waitevent request (actually its httptimeout-10)
|
||||
; c) httptimeout is also the amount of time the webserver keeps
|
||||
; a http session alive after completing a successful action
|
||||
|
||||
bindaddr = 0.0.0.0
|
||||
;displayconnects = yes
|
||||
;
|
||||
; Add a Unix epoch timestamp to events (not action responses)
|
||||
;
|
||||
;timestampevents = yes
|
||||
|
||||
[egressive]
|
||||
secret = eepGur
|
||||
;deny=0.0.0.0/0.0.0.0
|
||||
;permit=209.16.236.73/255.255.255.0
|
||||
;
|
||||
; If the device connected via this user accepts input slowly,
|
||||
; the timeout for writes to it can be increased to keep it
|
||||
; from being disconnected (value is in milliseconds)
|
||||
;
|
||||
; writetimeout = 100
|
||||
;
|
||||
; Authorization for various classes
|
||||
read = system,call,log,verbose,command,agent,user,config
|
||||
write = system,call,log,verbose,command,agent,user,config
|
22
egasterisk/meetme.conf
Normal file
22
egasterisk/meetme.conf
Normal file
|
@ -0,0 +1,22 @@
|
|||
;!
|
||||
;! Automatically generated configuration file
|
||||
;! Filename: meetme.conf (/etc/asterisk/meetme.conf)
|
||||
;! Generator: Manager
|
||||
;! Creation Date: Sun Jul 20 00:51:50 2008
|
||||
;!
|
||||
;
|
||||
; Configuration file for MeetMe simple conference rooms for Asterisk of course.
|
||||
;
|
||||
; This configuration file is read every time you call app meetme()
|
||||
[general]
|
||||
;audiobuffers=32 ; The number of 20ms audio buffers to be used
|
||||
; when feeding audio frames from non-Zap channels
|
||||
; into the conference; larger numbers will allow
|
||||
; for the conference to 'de-jitter' audio that arrives
|
||||
; at different timing than the conference's timing
|
||||
; source, but can also allow for latency in hearing
|
||||
; the audio from the speaker. Minimum value is 2,
|
||||
; maximum value is 32.
|
||||
;
|
||||
[rooms]
|
||||
conf = 880,,
|
104
egasterisk/mgcp.conf
Normal file
104
egasterisk/mgcp.conf
Normal file
|
@ -0,0 +1,104 @@
|
|||
;
|
||||
; MGCP Configuration for Asterisk
|
||||
;
|
||||
[general]
|
||||
;port = 2427
|
||||
;bindaddr = 0.0.0.0
|
||||
|
||||
;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
|
||||
; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a
|
||||
; MGCP channel. Defaults to "no". An enabled jitterbuffer will
|
||||
; be used only if the sending side can create and the receiving
|
||||
; side can not accept jitter. The MGCP channel can accept jitter,
|
||||
; thus an enabled jitterbuffer on the receive MGCP side will only
|
||||
; be used if the sending side can create jitter and jbforce is
|
||||
; also set to yes.
|
||||
|
||||
; jbforce = no ; Forces the use of a jitterbuffer on the receive side of a MGCP
|
||||
; channel. Defaults to "no".
|
||||
|
||||
; jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds.
|
||||
|
||||
; jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is
|
||||
; resynchronized. Useful to improve the quality of the voice, with
|
||||
; big jumps in/broken timestamps, usually sent from exotic devices
|
||||
; and programs. Defaults to 1000.
|
||||
|
||||
; jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a MGCP
|
||||
; channel. Two implementations are currently available - "fixed"
|
||||
; (with size always equals to jbmax-size) and "adaptive" (with
|
||||
; variable size, actually the new jb of IAX2). Defaults to fixed.
|
||||
|
||||
; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no".
|
||||
;-----------------------------------------------------------------------------------
|
||||
|
||||
;[dlinkgw]
|
||||
;host = 192.168.0.64
|
||||
;context = default
|
||||
;canreinvite = no
|
||||
;line => aaln/2
|
||||
;line => aaln/1
|
||||
|
||||
;; The MGCP channel supports the following service codes:
|
||||
;; # - Transfer
|
||||
;; *67 - Calling Number Delivery Blocking
|
||||
;; *70 - Cancel Call Waiting
|
||||
;; *72 - Call Forwarding Activation
|
||||
;; *73 - Call Forwarding Deactivation
|
||||
;; *78 - Do Not Disturb Activation
|
||||
;; *79 - Do Not Disturb Deactivation
|
||||
;; *8 - Call pick-up
|
||||
;
|
||||
; known to work with Swissvoice IP10s
|
||||
;[192.168.1.20]
|
||||
;context=local
|
||||
;host=192.168.1.20
|
||||
;callerid = "John Doe" <123>
|
||||
;callgroup=0 ; in the range from 0 to 63
|
||||
;pickupgroup=0 ; in the range from 0 to 63
|
||||
;nat=no
|
||||
;threewaycalling=yes
|
||||
;transfer=yes ; transfer requires threewaycalling=yes. Use FLASH to transfer
|
||||
;callwaiting=yes ; this might be a cause of trouble for ip10s
|
||||
;cancallforward=yes
|
||||
;line => aaln/1
|
||||
;
|
||||
|
||||
;[dph100]
|
||||
;
|
||||
; Supporting the DPH100M requires defining DLINK_BUGGY_FIRMWARE in
|
||||
; chan_mgcp.c in addition to enabling the slowsequence mode due to
|
||||
; bugs in the D-Link firmware
|
||||
;
|
||||
;context=local
|
||||
;host=dynamic
|
||||
;dtmfmode=none ; DTMF Mode can be 'none', 'rfc2833', or 'inband' or
|
||||
; 'hybrid' which starts in none and moves to inband. Default is none.
|
||||
;slowsequence=yes ; The DPH100M does not follow MGCP standards for sequencing
|
||||
;line => aaln/1
|
||||
|
||||
; known to work with wave7optics FTTH LMGs
|
||||
;[192.168.1.20]
|
||||
;accountcode = 1000 ; record this in cdr as account identification for billing
|
||||
;amaflags = billing ; record this in cdr as flagged for 'billing',
|
||||
; 'documentation', or 'omit'
|
||||
;context = local
|
||||
;host = 192.168.1.20
|
||||
;wcardep = aaln/* ; enables wildcard endpoint and sets it to 'aaln/*'
|
||||
; another common format is '*'
|
||||
;callerid = "Duane Cox" <123> ; now lets setup line 1 using per endpoint configuration...
|
||||
;callwaiting = no
|
||||
;callreturn = yes
|
||||
;cancallforward = yes
|
||||
;canreinvite = no
|
||||
;transfer = no
|
||||
;dtmfmode = inband
|
||||
;line => aaln/1 ; now lets save this config to line1 aka aaln/1
|
||||
;callerid = "Duane Cox" <456> ; now lets setup line 2
|
||||
;callwaiting = no
|
||||
;callreturn = yes
|
||||
;cancallforward = yes
|
||||
;canreinvite = no
|
||||
;transfer = no
|
||||
;dtmfmode = inband
|
||||
;line => aaln/2 ; now lets save this config to line2 aka aaln/2
|
429
egasterisk/misdn.conf
Normal file
429
egasterisk/misdn.conf
Normal file
|
@ -0,0 +1,429 @@
|
|||
;
|
||||
; chan_misdn sample config
|
||||
;
|
||||
|
||||
; general section:
|
||||
;
|
||||
; for debugging and general setup, things that are not bound to port groups
|
||||
;
|
||||
|
||||
[general]
|
||||
;
|
||||
; Sets the Path to the misdn-init.conf (for nt_ptp mode checking)
|
||||
;
|
||||
misdn_init=/etc/misdn-init.conf
|
||||
|
||||
; set debugging flag:
|
||||
; 0 - No Debug
|
||||
; 1 - mISDN Messages and * - Messages, and * - State changes
|
||||
; 2 - Messages + Message specific Informations (e.g. bearer capability)
|
||||
; 3 - very Verbose, the above + lots of Driver specific infos
|
||||
; 4 - even more Verbose than 3
|
||||
;
|
||||
; default value: 0
|
||||
;
|
||||
debug=0
|
||||
|
||||
|
||||
|
||||
; set debugging file and flags for mISDNuser (NT-Stack)
|
||||
;
|
||||
; flags can be or'ed with the following values:
|
||||
;
|
||||
; DBGM_NET 0x00000001
|
||||
; DBGM_MSG 0x00000002
|
||||
; DBGM_FSM 0x00000004
|
||||
; DBGM_TEI 0x00000010
|
||||
; DBGM_L2 0x00000020
|
||||
; DBGM_L3 0x00000040
|
||||
; DBGM_L3DATA 0x00000080
|
||||
; DBGM_BC 0x00000100
|
||||
; DBGM_TONE 0x00000200
|
||||
; DBGM_BCDATA 0x00000400
|
||||
; DBGM_MAN 0x00001000
|
||||
; DBGM_APPL 0x00002000
|
||||
; DBGM_ISDN 0x00004000
|
||||
; DBGM_SOCK 0x00010000
|
||||
; DBGM_CONN 0x00020000
|
||||
; DBGM_CDATA 0x00040000
|
||||
; DBGM_DDATA 0x00080000
|
||||
; DBGM_SOUND 0x00100000
|
||||
; DBGM_SDATA 0x00200000
|
||||
; DBGM_TOPLEVEL 0x40000000
|
||||
; DBGM_ALL 0xffffffff
|
||||
;
|
||||
|
||||
ntdebugflags=0
|
||||
ntdebugfile=/var/log/misdn-nt.log
|
||||
|
||||
|
||||
; some pbx systems do cut the L1 for some milliseconds, to avoid
|
||||
; dropping running calls, we can set this flag to yes and tell
|
||||
; mISDNuser not to drop the calls on L2_RELEASE
|
||||
ntkeepcalls=no
|
||||
|
||||
; the big trace
|
||||
;
|
||||
; default value: [not set]
|
||||
;
|
||||
;tracefile=/var/log/asterisk/misdn.log
|
||||
|
||||
|
||||
; set to yes if you want mISDN_dsp to bridge the calls in HW
|
||||
;
|
||||
; default value: yes
|
||||
;
|
||||
bridging=no
|
||||
|
||||
|
||||
;
|
||||
; watches the L1s of every port. If one l1 is down it tries to
|
||||
; get it up. The timeout is given in seconds. with 0 as value it
|
||||
; does not watch the l1 at all
|
||||
;
|
||||
; default value: 0
|
||||
;
|
||||
; this option is only read at loading time of chan_misdn,
|
||||
; which means you need to unload and load chan_misdn to change the
|
||||
; value, an asterisk restart should do the trick
|
||||
;
|
||||
l1watcher_timeout=0
|
||||
|
||||
; stops dialtone after getting first digit on nt Port
|
||||
;
|
||||
; default value: yes
|
||||
;
|
||||
stop_tone_after_first_digit=yes
|
||||
|
||||
; whether to append overlapdialed Digits to Extension or not
|
||||
;
|
||||
; default value: yes
|
||||
;
|
||||
append_digits2exten=yes
|
||||
|
||||
;;; CRYPTION STUFF
|
||||
|
||||
; Whether to look for dynamic crypting attempt
|
||||
;
|
||||
; default value: no
|
||||
;
|
||||
dynamic_crypt=no
|
||||
|
||||
; crypt_prefix, what is used for crypting Protocol
|
||||
;
|
||||
; default value: [not set]
|
||||
;
|
||||
crypt_prefix=**
|
||||
|
||||
; Keys for cryption, you reference them in the dialplan
|
||||
; later also in dynamic encr.
|
||||
;
|
||||
; default value: [not set]
|
||||
;
|
||||
crypt_keys=test,muh
|
||||
|
||||
; users sections:
|
||||
;
|
||||
; name your sections as you which but not "general" !
|
||||
; the sections are Groups, you can dial out in extensions.conf
|
||||
; with Dial(mISDN/g:extern/101) where extern is a section name,
|
||||
; chan_misdn tries every port in this section to find a
|
||||
; new free channel
|
||||
;
|
||||
|
||||
; The default section is not a group section, it just contains config elements
|
||||
; which are inherited by group sections.
|
||||
;
|
||||
|
||||
[default]
|
||||
|
||||
; define your default context here
|
||||
;
|
||||
; default value: default
|
||||
;
|
||||
context=misdn
|
||||
|
||||
; language
|
||||
;
|
||||
; default value: en
|
||||
;
|
||||
language=en
|
||||
|
||||
;
|
||||
; sets the musiconhold class
|
||||
;
|
||||
musicclass=default
|
||||
|
||||
;
|
||||
; Either if we should produce DTMF Tones ourselves
|
||||
;
|
||||
senddtmf=yes
|
||||
|
||||
;
|
||||
; If we should generate Ringing for chan_sip and others
|
||||
;
|
||||
far_alerting=no
|
||||
|
||||
|
||||
;
|
||||
; here you can define which bearers should be allowed
|
||||
;
|
||||
allowed_bearers=all
|
||||
|
||||
; Prefixes for national and international, those are put before the
|
||||
; oad if an according dialplan is set by the other end.
|
||||
;
|
||||
; default values: nationalprefix : 0
|
||||
; internationalprefix : 00
|
||||
;
|
||||
nationalprefix=0
|
||||
internationalprefix=00
|
||||
|
||||
; set rx/tx gains between -8 and 8 to change the RX/TX Gain
|
||||
;
|
||||
; default values: rxgain: 0
|
||||
; txgain: 0
|
||||
;
|
||||
rxgain=0
|
||||
txgain=0
|
||||
|
||||
; some telcos especially in NL seem to need this set to yes, also in
|
||||
; switzerland this seems to be important
|
||||
;
|
||||
; default value: no
|
||||
;
|
||||
te_choose_channel=no
|
||||
|
||||
|
||||
|
||||
;
|
||||
; This option defines, if chan_misdn should check the L1 on a PMP
|
||||
; before making a group call on it. The L1 may go down for PMP Ports
|
||||
; so we might need this.
|
||||
; But be aware! a broken or plugged off cable might be used for a group call
|
||||
; as well, since chan_misdn has no chance to distinguish if the L1 is down
|
||||
; because of a lost Link or because the Provider shut it down...
|
||||
;
|
||||
; default: no
|
||||
;
|
||||
pmp_l1_check=no
|
||||
|
||||
|
||||
;
|
||||
; in PMP this option defines which cause should be sent out to
|
||||
; the 3. caller. chan_misdn does not support callwaiting on TE
|
||||
; PMP side. This allows to modify the RELEASE_COMPLETE cause
|
||||
; at least.
|
||||
;
|
||||
reject_cause=16
|
||||
|
||||
|
||||
;
|
||||
; Send Setup_Acknowledge on incoming calls anyway (instead of PROCEEDING),
|
||||
; this requests additional Infos, so we can waitfordigits
|
||||
; without much issues. This works only for PTP Ports
|
||||
;
|
||||
; default value: no
|
||||
;
|
||||
need_more_infos=no
|
||||
|
||||
|
||||
;
|
||||
; set this to yes if you want to disconnect calls when a timeout occurs
|
||||
; for example during the overlapdial phase
|
||||
;
|
||||
nttimeout=no
|
||||
|
||||
; set the method to use for channel selection:
|
||||
; standard - always choose the first free channel with the lowest number
|
||||
; round_robin - use the round robin algorithm to select a channel. use this
|
||||
; if you want to balance your load.
|
||||
;
|
||||
; default value: standard
|
||||
;
|
||||
method=standard
|
||||
|
||||
|
||||
; specify if chan_misdn should collect digits before going into the
|
||||
; dialplan, you can choose yes=4 Seconds, no, or specify the amount
|
||||
; of seconds you need;
|
||||
;
|
||||
overlapdial=yes
|
||||
|
||||
;
|
||||
; dialplan means Type Of Number in ISDN Terms (for outgoing calls)
|
||||
;
|
||||
; there are different types of the dialplan:
|
||||
;
|
||||
; dialplan -> outgoing Number
|
||||
; localdialplan -> callerid
|
||||
; cpndialplan -> connected party number
|
||||
;
|
||||
; dialplan options:
|
||||
;
|
||||
; 0 - unknown
|
||||
; 1 - International
|
||||
; 2 - National
|
||||
; 4 - Subscriber
|
||||
;
|
||||
; This setting is used for outgoing calls
|
||||
;
|
||||
; default value: 0
|
||||
;
|
||||
dialplan=0
|
||||
localdialplan=0
|
||||
cpndialplan=0
|
||||
|
||||
|
||||
|
||||
;
|
||||
; turn this to no if you don't mind correct handling of Progress Indicators
|
||||
;
|
||||
early_bconnect=yes
|
||||
|
||||
|
||||
;
|
||||
; turn this on if you like to send Tone Indications to a Incoming
|
||||
; isdn channel on a TE Port. Rarely used, only if the Telco allows
|
||||
; you to send indications by yourself, normally the Telco sends the
|
||||
; indications to the remote party.
|
||||
;
|
||||
; default: no
|
||||
;
|
||||
incoming_early_audio=no
|
||||
|
||||
; uncomment the following to get into s extension at extension conf
|
||||
; there you can use DigitTimeout if you can't or don't want to use
|
||||
; isdn overlap dial.
|
||||
; note: This will jump into the s exten for every exten!
|
||||
;
|
||||
; default value: no
|
||||
;
|
||||
;always_immediate=no
|
||||
|
||||
;
|
||||
; set this to yes if you want to generate your own dialtone
|
||||
; with always_immediate=yes, else chan_misdn generates the dialtone
|
||||
;
|
||||
; default value: no
|
||||
;
|
||||
nodialtone=no
|
||||
|
||||
|
||||
; uncomment the following if you want callers which called exactly the
|
||||
; base number (so no extension is set) jump to the s extension.
|
||||
; if the user dials something more it jumps to the correct extension
|
||||
; instead
|
||||
;
|
||||
; default value: no
|
||||
;
|
||||
;immediate=no
|
||||
|
||||
; uncomment the following to have hold and retrieve support
|
||||
;
|
||||
; default value: no
|
||||
;
|
||||
;hold_allowed=yes
|
||||
|
||||
; Pickup and Callgroup
|
||||
;
|
||||
; default values: not set = 0
|
||||
; range: 0-63
|
||||
;
|
||||
;callgroup=1
|
||||
;pickupgroup=1
|
||||
|
||||
|
||||
;
|
||||
; these are the exact isdn screening and presentation indicators
|
||||
; if -1 is given for both values the presentation indicators are used
|
||||
; from asterisks SetCallerPres application.
|
||||
; s=0, p=0 -> callerid presented not screened
|
||||
; s=1, p=1 -> callerid presented but screened (the remote end does not see it!)
|
||||
;
|
||||
; default values s=-1, p=-1
|
||||
presentation=-1
|
||||
screen=-1
|
||||
|
||||
; this enables echocancellation, with the given number of taps
|
||||
; be aware, move this setting only to outgoing portgroups!
|
||||
; A value of zero turns echocancellation off.
|
||||
;
|
||||
; possible values are: 0,32,64,128,256,yes(=128),no(=0)
|
||||
;
|
||||
; default value: no
|
||||
;
|
||||
;echocancel=no
|
||||
|
||||
; Set this to no to disable echotraining. You can enter a number > 10
|
||||
; the value is a multiple of 0.125 ms.
|
||||
;
|
||||
; default value: no
|
||||
; yes = 2000
|
||||
; no = 0
|
||||
;
|
||||
echotraining=no
|
||||
|
||||
;
|
||||
; chan_misdns jitterbuffer, default 4000
|
||||
;
|
||||
jitterbuffer=4000
|
||||
|
||||
;
|
||||
; change this threshold to enable dejitter functionality
|
||||
;
|
||||
jitterbuffer_upper_threshold=0
|
||||
|
||||
|
||||
;
|
||||
; change this to yes, if you want to bridge a mISDN data channel to
|
||||
; another channel type or to an application.
|
||||
;
|
||||
hdlc=no
|
||||
|
||||
|
||||
;
|
||||
; defines the maximum amount of incoming calls per port for
|
||||
; this group. Calls which exceed the maximum will be marked with
|
||||
; the channel variable MAX_OVERFLOW. It will contain the amount of
|
||||
; overflowed calls
|
||||
;
|
||||
max_incoming=-1
|
||||
|
||||
;
|
||||
; defines the maximum amount of outgoing calls per port for this group
|
||||
; exceeding calls will be rejected
|
||||
;
|
||||
max_outgoing=-1
|
||||
|
||||
[intern]
|
||||
; define your ports, e.g. 1,2 (depends on mISDN-driver loading order)
|
||||
ports=1,2
|
||||
; context where to go to when incoming Call on one of the above ports
|
||||
context=Intern
|
||||
|
||||
[internPP]
|
||||
;
|
||||
; adding the postfix 'ptp' to a port number is obsolete now, chan_misdn
|
||||
; parses /etc/misdn-init.conf and sets the ptp mode to the corresponding
|
||||
; configs. For backwards compatibility you can still set ptp here.
|
||||
;
|
||||
ports=3
|
||||
|
||||
[first_extern]
|
||||
; again port defs
|
||||
ports=4
|
||||
; again a context for incoming calls
|
||||
context=Extern1
|
||||
; msns for te ports, listen on those numbers on the above ports, and
|
||||
; indicate the incoming calls to asterisk
|
||||
; here you can give a comma separated list or simply an '*' for
|
||||
; any msn.
|
||||
msns=*
|
||||
|
||||
; here an example with given msns
|
||||
[second_extern]
|
||||
ports=5
|
||||
context=Extern2
|
||||
callerid=15
|
||||
msns=102,144,101,104
|
9
egasterisk/misdninit_guiRead.conf
Normal file
9
egasterisk/misdninit_guiRead.conf
Normal file
|
@ -0,0 +1,9 @@
|
|||
;!
|
||||
;! Automatically generated configuration file
|
||||
;! Filename: misdninit_guiRead.conf (/etc/asterisk/misdninit_guiRead.conf)
|
||||
;! Generator: Manager
|
||||
;! Creation Date: Sun Jul 20 23:04:52 2008
|
||||
;!
|
||||
|
||||
[general]
|
||||
#include "../misdn-init.conf" ; =
|
44
egasterisk/modules.conf
Normal file
44
egasterisk/modules.conf
Normal file
|
@ -0,0 +1,44 @@
|
|||
;
|
||||
; 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 has been initialized) can be loaded
|
||||
; using 'preload'. This will frequently be needed if you wish to map all
|
||||
; module configuration files into Realtime storage, since the Realtime
|
||||
; driver will need to be loaded before the modules using those configuration
|
||||
; files are initialized.
|
||||
;
|
||||
; An example of loading ODBC support would be:
|
||||
;preload => res_odbc.so
|
||||
;preload => res_config_odbc.so
|
||||
;
|
||||
; Uncomment the following if you wish to use the Speech Recognition API
|
||||
;preload => res_speech.so
|
||||
;
|
||||
; If you want, load the GTK console right away.
|
||||
;
|
||||
noload => pbx_gtkconsole.so
|
||||
;load => pbx_gtkconsole.so
|
||||
;
|
||||
load => res_musiconhold.so
|
||||
;
|
||||
; Load either OSS or ALSA, not both
|
||||
; By default, load OSS only (automatically) and do not load ALSA
|
||||
;
|
||||
noload => chan_alsa.so
|
||||
;noload => chan_oss.so
|
||||
;load => codec_a_mu.so
|
||||
;load => codec_adpcm.so
|
||||
load => codec_alaw.so
|
||||
load => codec_g729.so
|
||||
load => codec_gsm.so
|
||||
load => codec_ilbc.so
|
||||
;load => codec_lpc10.so
|
||||
load => codec_speex.so
|
||||
load => codec_ulaw.so
|
167
egasterisk/modules.conf.hads
Normal file
167
egasterisk/modules.conf.hads
Normal file
|
@ -0,0 +1,167 @@
|
|||
;
|
||||
; Asterisk configuration file
|
||||
;
|
||||
; Module Loader configuration file
|
||||
|
||||
[modules]
|
||||
autoload=yes
|
||||
|
||||
;##Formats##########
|
||||
;load => format_au.so
|
||||
;load => format_g723.so
|
||||
;load => format_g726.so
|
||||
load => format_g729.so
|
||||
load => format_gsm.so
|
||||
;load => format_h263.so
|
||||
;load => format_ilbc.so
|
||||
;load => format_jpeg.so
|
||||
;load => format_ogg_vorbis.so
|
||||
load => format_pcm.so
|
||||
load => format_sln.so
|
||||
;load => format_vox.so
|
||||
load => format_wav.so
|
||||
load => format_wav_gsm.so
|
||||
|
||||
;##Resources##########
|
||||
load => res_adsi.so
|
||||
;load => res_agi.so
|
||||
load => res_crypto.so
|
||||
load => res_features.so
|
||||
load => res_indications.so
|
||||
load => res_monitor.so
|
||||
load => res_musiconhold.so
|
||||
;noload => res_odbc.so
|
||||
;load => res_smdi.so
|
||||
|
||||
;##Public Branch eXchange##########
|
||||
;load => pbx_ael.so
|
||||
load => pbx_config.so
|
||||
;load => pbx_dundi.so
|
||||
;load => pbx_functions.so
|
||||
;load => pbx_loopback.so
|
||||
;load => pbx_realtime.so
|
||||
load => pbx_spool.so
|
||||
|
||||
;##Functions##########
|
||||
load => func_callerid.so
|
||||
;load => func_enum.so
|
||||
;load => func_uri.so
|
||||
;load => func_cut.so
|
||||
load => func_db.so
|
||||
load => func_strings.so
|
||||
|
||||
;##Call Detail Records##########
|
||||
load => cdr_csv.so
|
||||
;load => cdr_custom.so
|
||||
;load => cdr_manager.so
|
||||
noload => cdr_pgsql.so
|
||||
noload => cdr_mysql.so
|
||||
noload => cdr_sqlite.so
|
||||
noload => cdr_odbc.so
|
||||
|
||||
;##Channels##########
|
||||
;load => chan_agent.so
|
||||
;load => chan_alsa.so
|
||||
;load => chan_features.so
|
||||
load => chan_iax2.so
|
||||
load => chan_local.so
|
||||
;load => chan_mgcp.so
|
||||
noload => chan_oss.so
|
||||
noload => chan_phone.so
|
||||
load => chan_sip.so
|
||||
;load => chan_skinny.so
|
||||
load => chan_zap.so
|
||||
|
||||
|
||||
;##Codecs##########
|
||||
;load => codec_a_mu.so
|
||||
;load => codec_adpcm.so
|
||||
load => codec_alaw.so
|
||||
;load => codec_g729.so
|
||||
load => codec_gsm.so
|
||||
;load => codec_ilbc.so
|
||||
;load => codec_lpc10.so
|
||||
;load => codec_speex.so
|
||||
load => codec_ulaw.so
|
||||
|
||||
;##Applications##########
|
||||
;load => app_rxfax.so
|
||||
;load => app_txfax.so
|
||||
;load => app_faxdetect.so
|
||||
;load => app_adsiprog.so
|
||||
;load => app_alarmreceiver.so
|
||||
;load => app_authenticate.so
|
||||
;load => app_cdr.so
|
||||
;load => app_chanisavail.so
|
||||
;load => app_chanspy.so
|
||||
;load => app_controlplayback.so
|
||||
;load => app_cut.so
|
||||
;load => app_db.so
|
||||
load => app_dial.so
|
||||
;load => app_dictate.so
|
||||
load => app_directed_pickup.so
|
||||
load => app_directory.so
|
||||
noload = app_directory_odbc.so
|
||||
;load => app_disa.so
|
||||
;load => app_dumpchan.so
|
||||
;load => app_echo.so
|
||||
;load => app_enumlookup.so
|
||||
;load => app_eval.so
|
||||
;load => app_exec.so
|
||||
;load => app_externalivr.so
|
||||
;load => app_festival.so
|
||||
;load => app_forkcdr.so
|
||||
;load => app_getcpeid.so
|
||||
;load => app_groupcount.so
|
||||
;load => app_hasnewvoicemail.so
|
||||
;load => app_ices.so
|
||||
;load => app_image.so
|
||||
;load => app_lookupblacklist.so
|
||||
;load => app_lookupcidname.so
|
||||
;load => app_macro.so
|
||||
load => app_macro.so
|
||||
;load => app_proc.so
|
||||
;load => app_math.so
|
||||
;load => app_meetme.so
|
||||
;load => app_md5.so
|
||||
;load => app_milliwatt.so
|
||||
;load => app_muxmon.so
|
||||
;load => app_mp3.so
|
||||
;load => app_nbscat.so
|
||||
;load => app_parkandannounce.so
|
||||
load => app_playback.so
|
||||
;load => app_privacy.so
|
||||
;load => app_queue.so
|
||||
;load => app_random.so
|
||||
;load => app_read.so
|
||||
;load => app_readfile.so
|
||||
;load => app_realtime.so
|
||||
;load => app_record.so
|
||||
load => app_sayunixtime.so
|
||||
;load => app_senddtmf.so
|
||||
;load => app_sendtext.so
|
||||
;load => app_setcallerid.so
|
||||
;load => app_setcdruserfield.so
|
||||
;load => app_setcidname.so
|
||||
;load => app_setcidnum.so
|
||||
;load => app_setrdnis.so
|
||||
;load => app_settransfercapability.so
|
||||
;load => app_sms.so
|
||||
;load => app_softhangup.so
|
||||
;load => app_stack.so
|
||||
load => app_system.so
|
||||
;load => app_talkdetect.so
|
||||
;load => app_test.so
|
||||
;load => app_transfer.so
|
||||
;load => app_txtcidname.so
|
||||
;load => app_url.so
|
||||
;load => app_userevent.so
|
||||
load => app_verbose.so
|
||||
load => app_voicemail.so
|
||||
noload = app_voicemail_odbc.so
|
||||
noload = app_voicemail_imap.so
|
||||
;load => app_waitforring.so
|
||||
;load => app_waitforsilence.so
|
||||
;load => app_while.so
|
||||
;load => app_zapateller.so
|
||||
|
66
egasterisk/musiconhold.conf
Normal file
66
egasterisk/musiconhold.conf
Normal file
|
@ -0,0 +1,66 @@
|
|||
;
|
||||
; Music on Hold -- Sample Configuration
|
||||
;
|
||||
|
||||
; valid mode options:
|
||||
; files -- read files from a directory in any Asterisk supported
|
||||
; media format
|
||||
; quietmp3 -- default
|
||||
; mp3 -- loud
|
||||
; mp3nb -- unbuffered
|
||||
; quietmp3nb -- quiet unbuffered
|
||||
; custom -- run a custom application (See examples below)
|
||||
|
||||
; =========
|
||||
; File-based (native) music on hold
|
||||
; =========
|
||||
;
|
||||
; This plays files directly from the specified directory, no external
|
||||
; processes are required. Files are played in normal sorting order
|
||||
; (same as a sorted directory listing), and no volume or other
|
||||
; sound adjustments are available. If the file is available in
|
||||
; the same format as the channel's codec, then it will be played
|
||||
; without transcoding (same as Playback would do in the dialplan).
|
||||
; Files can be present in as many formats as you wish, and the
|
||||
; 'best' format will be chosen at playback time.
|
||||
;
|
||||
; NOTE:
|
||||
; If you are not using "autoload" in modules.conf, then you
|
||||
; must ensure that the format modules for any formats you wish
|
||||
; to use are loaded _before_ res_musiconhold. If you do not do
|
||||
; this, res_musiconhold will skip the files it is not able to
|
||||
; understand when it loads.
|
||||
;
|
||||
|
||||
[default]
|
||||
mode=files
|
||||
directory=/var/lib/asterisk/moh
|
||||
;
|
||||
;[native-random]
|
||||
;mode=files
|
||||
;directory=/var/lib/asterisk/moh
|
||||
;random=yes ; Play the files in a random order
|
||||
|
||||
|
||||
; =========
|
||||
; Other (non-native) playback methods
|
||||
; =========
|
||||
|
||||
;[manual]
|
||||
;mode=custom
|
||||
; Note that with mode=custom, a directory is not required, such as when reading
|
||||
; from a stream.
|
||||
;directory=/var/lib/asterisk/mohmp3
|
||||
;application=/usr/bin/mpg123 -q -r 8000 -f 8192 -b 2048 --mono -s
|
||||
|
||||
;[ulawstream]
|
||||
;mode=custom
|
||||
;application=/usr/bin/streamplayer 192.168.100.52 888
|
||||
;format=ulaw
|
||||
|
||||
; mpg123 on Solaris does not always exit properly; madplay may be a better
|
||||
; choice
|
||||
;[solaris]
|
||||
;mode=custom
|
||||
;directory=/var/lib/asterisk/mohmp3
|
||||
;application=/site/sw/bin/madplay -Q -o raw:- --mono -R 8000 -a -12
|
39
egasterisk/muted.conf
Normal file
39
egasterisk/muted.conf
Normal file
|
@ -0,0 +1,39 @@
|
|||
#
|
||||
# Sample muted configuration file
|
||||
#
|
||||
# Copyright (C) 2004 Digium, Inc.
|
||||
#
|
||||
# What is this? Well, haven't you ever wished you could automatically
|
||||
# turn down the volume on your stereo, CDPlayer, etc, when a call comes in,
|
||||
# and then return it to normal when the call ends? Well, this is a possible
|
||||
# mechanism to make this happen!
|
||||
# You have to fire up the new utils/muted, which runs as a daemon in the
|
||||
# background. This daemon connects to asterisk via a manager interface, and
|
||||
# also reads this config file. When the channels mentioned
|
||||
# are activated, it tweaks the sound levels on the sound card(s).
|
||||
# So, depending on the sound card, you may be able to run all your sound
|
||||
# generating devices thru your sound card, and use this mechanism to quiet
|
||||
# them down while you are on the phone. If anyone figures out how to make
|
||||
# this work with kids, please inform!!
|
||||
#
|
||||
# First you have the host, username, and password
|
||||
# we use to connect to the asterisk system
|
||||
#
|
||||
host localhost
|
||||
user user
|
||||
pass pass
|
||||
#
|
||||
# List each channel we're supposed to watch
|
||||
#
|
||||
channel Zap/1
|
||||
channel Zap/2
|
||||
channel SIP/mark
|
||||
#
|
||||
# Mute level is the percentage of the current volume we should
|
||||
# lower the music to.
|
||||
#
|
||||
mutelevel 20
|
||||
#
|
||||
# Smooth fade makes the fadein/fadeout nicer sounding
|
||||
#
|
||||
smoothfade
|
72
egasterisk/osp.conf
Normal file
72
egasterisk/osp.conf
Normal file
|
@ -0,0 +1,72 @@
|
|||
;
|
||||
; Open Settlement Protocol Sample Configuration File
|
||||
;
|
||||
;
|
||||
; This file contains configuration of providers that
|
||||
; are used by the OSP subsystem of Asterisk. The section
|
||||
; "general" is reserved for global options. Each other
|
||||
; section declares an OSP Provider. The provider "default"
|
||||
; is used when no provider is otherwise specified.
|
||||
;
|
||||
[general]
|
||||
;
|
||||
; Should hardware acceleration be enabled? May not be changed
|
||||
; on a reload.
|
||||
;
|
||||
;accelerate=yes
|
||||
;
|
||||
; Defines the token format that Asterisk can validate.
|
||||
; 0 - signed tokens only
|
||||
; 1 - unsigned tokens only
|
||||
; 2 - both signed and unsigned
|
||||
; The defaults to 0, i.e. the Asterisk can validate signed tokens only.
|
||||
;
|
||||
;tokenformat=0
|
||||
|
||||
;[default]
|
||||
;
|
||||
; All paths are presumed to be under /var/lib/asterisk/keys unless
|
||||
; the path begins with '/'
|
||||
;
|
||||
; Specify the private keyfile. If unspecified, defaults to the name
|
||||
; of the section followed by "-privatekey.pem" (e.g. default-privatekey.pem)
|
||||
;
|
||||
;privatekey=pkey.pem
|
||||
;
|
||||
; Specify the local certificate file. If unspecified, defaults to
|
||||
; the name of the section followed by "-localcert.pem"
|
||||
;
|
||||
;localcert=localcert.pem
|
||||
;
|
||||
; Specify one or more Certificate Authority keys. If none are listed,
|
||||
; a single one is added with the name "-cacert.pem"
|
||||
;
|
||||
;cacert=cacert_0.pem
|
||||
;
|
||||
; Specific parameters can be tuned as well:
|
||||
;
|
||||
; maxconnections: Max number of simultaneous connections to the provider (default=20)
|
||||
; retrydelay: Extra delay between retries (default=0)
|
||||
; retrylimit: Max number of retries before giving up (default=2)
|
||||
; timeout: Timeout for response in milliseconds (default=500)
|
||||
;
|
||||
;maxconnections=20
|
||||
;retrydelay=0
|
||||
;retrylimit=2
|
||||
;timeout=500
|
||||
;
|
||||
; List all service points for this provider
|
||||
;
|
||||
;servicepoint=http://osptestserver.transnexus.com:1080/osp
|
||||
;
|
||||
; Set the "source" for requesting authorization
|
||||
;
|
||||
;source=foo
|
||||
;
|
||||
; Set the authentication policy.
|
||||
; 0 - NO
|
||||
; 1 - YES
|
||||
; 2 - EXCLUSIVE
|
||||
; Default is 1, validate token but allow no token.
|
||||
;
|
||||
;authpolicy=1
|
75
egasterisk/oss.conf
Normal file
75
egasterisk/oss.conf
Normal file
|
@ -0,0 +1,75 @@
|
|||
;
|
||||
; Automatically generated from ../channels/chan_oss.c
|
||||
;
|
||||
|
||||
[general]
|
||||
; General config options, with default values shown.
|
||||
; You should use one section per device, with [general] being used
|
||||
; for the first device and also as a template for other devices.
|
||||
;
|
||||
; All but 'debug' can go also in the device-specific sections.
|
||||
;
|
||||
; debug = 0x0 ; misc debug flags, default is 0
|
||||
|
||||
; Set the device to use for I/O
|
||||
; device = /dev/dsp
|
||||
|
||||
; Optional mixer command to run upon startup (e.g. to set
|
||||
; volume levels, mutes, etc.
|
||||
; mixer =
|
||||
|
||||
; Software mic volume booster (or attenuator), useful for sound
|
||||
; cards or microphones with poor sensitivity. The volume level
|
||||
; is in dB, ranging from -20.0 to +20.0
|
||||
; boost = n ; mic volume boost in dB
|
||||
|
||||
; Set the callerid for outgoing calls
|
||||
; callerid = John Doe <555-1234>
|
||||
|
||||
; autoanswer = no ; no autoanswer on call
|
||||
; autohangup = yes ; hangup when other party closes
|
||||
; extension = s ; default extension to call
|
||||
; context = default ; default context for outgoing calls
|
||||
; language = "" ; default language
|
||||
|
||||
; If you set overridecontext to 'yes', then the whole dial string
|
||||
; will be interpreted as an extension, which is extremely useful
|
||||
; to dial SIP, IAX and other extensions which use the '@' character.
|
||||
; The default is 'no' just for backward compatibility, but the
|
||||
; suggestion is to change it.
|
||||
; overridecontext = no ; if 'no', the last @ will start the context
|
||||
; if 'yes' the whole string is an extension.
|
||||
|
||||
; low level device parameters in case you have problems with the
|
||||
; device driver on your operating system. You should not touch these
|
||||
; unless you know what you are doing.
|
||||
; queuesize = 10 ; frames in device driver
|
||||
; frags = 8 ; argument to SETFRAGMENT
|
||||
|
||||
;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
|
||||
; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of an
|
||||
; OSS channel. Defaults to "no". An enabled jitterbuffer will
|
||||
; be used only if the sending side can create and the receiving
|
||||
; side can not accept jitter. The OSS channel can't accept jitter,
|
||||
; thus an enabled jitterbuffer on the receive OSS side will always
|
||||
; be used if the sending side can create jitter.
|
||||
|
||||
; jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds.
|
||||
|
||||
; jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is
|
||||
; resynchronized. Useful to improve the quality of the voice, with
|
||||
; big jumps in/broken timestamps, usually sent from exotic devices
|
||||
; and programs. Defaults to 1000.
|
||||
|
||||
; jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of an OSS
|
||||
; channel. Two implementations are currently available - "fixed"
|
||||
; (with size always equals to jbmax-size) and "adaptive" (with
|
||||
; variable size, actually the new jb of IAX2). Defaults to fixed.
|
||||
|
||||
; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no".
|
||||
;-----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
[card1]
|
||||
; device = /dev/dsp1 ; alternate device
|
||||
|
49
egasterisk/phone.conf
Normal file
49
egasterisk/phone.conf
Normal file
|
@ -0,0 +1,49 @@
|
|||
;
|
||||
; Linux Telephony Interface
|
||||
;
|
||||
; Configuration file
|
||||
;
|
||||
[interfaces]
|
||||
;
|
||||
; Select a mode, either the phone jack provides dialtone, reads digits,
|
||||
; then starts PBX with the given extension (dialtone mode), or
|
||||
; immediately provides the PBX without reading any digits or providing
|
||||
; any dialtone (this is the immediate mode, the default). Also, you
|
||||
; can set the mode to "fxo" if you have a linejack to make it operate
|
||||
; properly. If you are using a Sigma Designs board you may set this to
|
||||
; "sig".
|
||||
;
|
||||
mode=immediate
|
||||
;mode=dialtone
|
||||
;mode=fxo
|
||||
;mode=sig
|
||||
;
|
||||
; You can decide which format to use by default, "g723.1" or "slinear".
|
||||
; XXX Be careful, sometimes the card causes kernel panics when running
|
||||
; in signed linear mode for some reason... XXX
|
||||
;
|
||||
format=slinear
|
||||
;format=g723.1
|
||||
;
|
||||
; And set the echo cancellation to "off", "low", "medium", and "high".
|
||||
; This is not supported on all phones.
|
||||
;
|
||||
echocancel=medium
|
||||
;
|
||||
; You can optionally use VAD/CNG silence suppression
|
||||
;
|
||||
;silencesupression=yes
|
||||
;
|
||||
; List all devices we can use. Contexts may also be specified
|
||||
;
|
||||
;context=local
|
||||
;
|
||||
; You can set txgain and rxgain for each device in the same way as context.
|
||||
; If you want to change default gain value (1.0 =~ 100%) for device, simple
|
||||
; add txgain or rxgain line before device line. But remember, if you change
|
||||
; volume all cards listed below will be affected by these values. You can
|
||||
; use float values (1.0, 0.5, 2.0) or percentage values (100%, 150%, 50%).
|
||||
;
|
||||
;txgain=100%
|
||||
;rxgain=1.0
|
||||
;device => /dev/phone0
|
3
egasterisk/privacy.conf
Normal file
3
egasterisk/privacy.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
[general]
|
||||
|
||||
maxretries = 2 ;How many chances the caller has to enter their number
|
89
egasterisk/providers.conf
Normal file
89
egasterisk/providers.conf
Normal file
|
@ -0,0 +1,89 @@
|
|||
[iaxtel]
|
||||
order = 1
|
||||
providername = IAXTEL (Iax)
|
||||
providerlogo = images/iaxtel.jpg
|
||||
protocol = iax
|
||||
providerdesc = Iaxtel.com allows Asterisk users and IAX clients to connect with each other over the Inter-Asterisk eXchange protocol. Once registered with IAXtel, each user get a unique 1.700 telephone number that will ring their IAX compatible client from any where on the Asterisk network.
|
||||
port = 4569
|
||||
hasiax = yes
|
||||
hassip = no
|
||||
registeriax = yes
|
||||
registersip = no
|
||||
host = iaxtel.com
|
||||
;trunk_username = iaxtel ; if set - the trunk created by the GUI will be by this name instead of trunk_x
|
||||
regurl = http://www.iaxtel.com ; URL to providers home/signup page
|
||||
|
||||
[bandwidth]
|
||||
order = 2
|
||||
providername = Bandwidth (Sip)
|
||||
providerlogo = images/bandwidth.gif
|
||||
protocol = sip
|
||||
providerdesc = Bandwidth.com's SIP (Session Initiation Protocol) Trunking solution, combined with an IP-PBX, enables organizations to save money by consolidating their voice and data over a single IP circuit -- maximizing its usage by utilizing unused bandwidth. Note: No username or password required. Bandwidth.com uses IP based Authentication.
|
||||
hasiax = no
|
||||
hassip = yes
|
||||
port = 5060
|
||||
registeriax = no
|
||||
registersip = no
|
||||
host = 4.79.212.236
|
||||
;host_out = 216.82.224.202
|
||||
regurl = http://bandwidth.com
|
||||
|
||||
[VoicePulse-sip]
|
||||
order = 3
|
||||
providername = VoicePulse (Sip)
|
||||
providerlogo = images/voicepulse.gif
|
||||
providerdesc = VoicePulse is the award-winning service provider featured in Time Magazine, The New York Times, and NBC Television. VoicePulse, running entirely on Digium's Asterisk platform, has built their reputation on stellar customer support and seamless integration with Asterisk. <b>(Note: Enter the account username/password received<br>from the "credentials" tab at connect.voicepulse.com)</b>
|
||||
protocol = sip
|
||||
hasiax = no
|
||||
hassip = yes
|
||||
registeriax = no
|
||||
registersip = yes
|
||||
host = connect01.voicepulse.com
|
||||
port = 5060
|
||||
regurl = http://connect.voicepulse.com/
|
||||
;trunk_username = voicepulse
|
||||
|
||||
[VoicePulse-iax]
|
||||
order = 4
|
||||
providername = VoicePulse (Iax)
|
||||
providerlogo = images/voicepulse.gif
|
||||
providerdesc = VoicePulse is the award-winning service provider featured in Time Magazine, The New York Times, and NBC Television. VoicePulse, running entirely on Digium's Asterisk platform, has built their reputation on stellar customer support and seamless integration with Asterisk. <b>(Note: Enter the account username/password received<br>from the "credentials" tab at connect.voicepulse.com)</b>
|
||||
protocol = iax
|
||||
hassip = no
|
||||
hasiax = yes
|
||||
registeriax = yes
|
||||
registersip = no
|
||||
host = connect01.voicepulse.com
|
||||
port = 4569
|
||||
regurl = http://connect.voicepulse.com/
|
||||
trunk_username = voicepulse
|
||||
|
||||
[simplesignal]
|
||||
order = 5
|
||||
providername = Simple Signal (Sip)
|
||||
protocol = sip
|
||||
providerlogo = images/simplesignal.jpg
|
||||
providerdesc = Our approach to the creation of SimpleSignal continues to be an aggressive focus on providing real solutions for our customers well beyond the basics of selling and distribution of telecom products and services.
|
||||
hassip = yes
|
||||
hasiax = no
|
||||
registeriax = no
|
||||
registersip = yes
|
||||
host = trunk.myvtel.com
|
||||
domain = simplesignal.com
|
||||
regurl = http://simplesignal.com
|
||||
port = 5060
|
||||
;fromdomain = mydomain.tld
|
||||
|
||||
[ngt]
|
||||
order = 6
|
||||
providername = New Global Telecom (SIP)
|
||||
protocol = sip
|
||||
providerlogo = images/ngt.jpg
|
||||
providerdesc = New Global Telecom, Inc. (NGT) is the largest provider of wholesale hosted and trunk-based VoIP solutions in the United States. At its core, NGT is a widely-recognized, experienced provider of predictable, business class VoIP solutions. We enable small-to-mid-sized businesses (SMBs) to access phone features and communications tools previously only available to Fortune 500 companies. NGT’s business solutions deliver Asterisk users easy access to local telephone numbers, cost-effective voice services, IP Phones, FCC-compliant 911, directory listing and more. Enhance your Asterisk experience at www.ngt.com/asterisk.
|
||||
hassip = yes
|
||||
hasiax = no
|
||||
registeriax = no
|
||||
registersip = yes
|
||||
port = 5060
|
||||
host = (assigned via gui)
|
||||
|
311
egasterisk/queues.conf
Normal file
311
egasterisk/queues.conf
Normal file
|
@ -0,0 +1,311 @@
|
|||
[general]
|
||||
;
|
||||
; Global settings for call queues
|
||||
;
|
||||
; Persistent Members
|
||||
; Store each dynamic member in each queue in the astdb so that
|
||||
; when asterisk is restarted, each member will be automatically
|
||||
; read into their recorded queues. Default is 'yes'.
|
||||
;
|
||||
persistentmembers = yes
|
||||
;
|
||||
; AutoFill Behavior
|
||||
; The old/current behavior of the queue has a serial type behavior
|
||||
; in that the queue will make all waiting callers wait in the queue
|
||||
; even if there is more than one available member ready to take
|
||||
; calls until the head caller is connected with the member they
|
||||
; were trying to get to. The next waiting caller in line then
|
||||
; becomes the head caller, and they are then connected with the
|
||||
; next available member and all available members and waiting callers
|
||||
; waits while this happens. The new behavior, enabled by setting
|
||||
; autofill=yes makes sure that when the waiting callers are connecting
|
||||
; with available members in a parallel fashion until there are
|
||||
; no more available members or no more waiting callers. This is
|
||||
; probably more along the lines of how a queue should work and
|
||||
; in most cases, you will want to enable this behavior. If you
|
||||
; do not specify or comment out this option, it will default to no
|
||||
; to keep backward compatibility with the old behavior.
|
||||
;
|
||||
autofill = yes
|
||||
;
|
||||
; Monitor Type
|
||||
; By setting monitor-type = MixMonitor, when specifying monitor-format
|
||||
; to enable recording of queue member conversations, app_queue will
|
||||
; now use the new MixMonitor application instead of Monitor so
|
||||
; the concept of "joining/mixing" the in/out files now goes away
|
||||
; when this is enabled. You can set the default type for all queues
|
||||
; here, and then also change monitor-type for individual queues within
|
||||
; queue by using the same configuration parameter within a queue
|
||||
; configuration block. If you do not specify or comment out this option,
|
||||
; it will default to the old 'Monitor' behavior to keep backward
|
||||
; compatibility.
|
||||
;
|
||||
monitor-type = MixMonitor
|
||||
;
|
||||
; Note that a timeout to fail out of a queue may be passed as part of
|
||||
; an application call from extensions.conf:
|
||||
; Queue(queuename|[options]|[optionalurl]|[announceoverride]|[timeout])
|
||||
; example: Queue(dave|t|||45)
|
||||
|
||||
;[markq]
|
||||
;
|
||||
; A sample call queue
|
||||
;
|
||||
; Musicclass sets which music applies for this particular call queue.
|
||||
; The only class which can override this one is if the MOH class is set
|
||||
; directly on the channel using Set(CHANNEL(musicclass)=whatever) in the
|
||||
; dialplan.
|
||||
;
|
||||
;musicclass = default
|
||||
;
|
||||
; An announcement may be specified which is played for the member as
|
||||
; soon as they answer a call, typically to indicate to them which queue
|
||||
; this call should be answered as, so that agents or members who are
|
||||
; listening to more than one queue can differentiated how they should
|
||||
; engage the customer
|
||||
;
|
||||
;announce = queue-markq
|
||||
;
|
||||
; A strategy may be specified. Valid strategies include:
|
||||
;
|
||||
; ringall - ring all available channels until one answers (default)
|
||||
; roundrobin - take turns ringing each available interface
|
||||
; leastrecent - ring interface which was least recently called by this queue
|
||||
; fewestcalls - ring the one with fewest completed calls from this queue
|
||||
; random - ring random interface
|
||||
; rrmemory - round robin with memory, remember where we left off last ring pass
|
||||
;
|
||||
;strategy = ringall
|
||||
;
|
||||
; Second settings for service level (default 0)
|
||||
; Used for service level statistics (calls answered within service level time
|
||||
; frame)
|
||||
;servicelevel = 60
|
||||
;
|
||||
; A context may be specified, in which if the user types a SINGLE
|
||||
; digit extension while they are in the queue, they will be taken out
|
||||
; of the queue and sent to that extension in this context.
|
||||
;
|
||||
;context = qoutcon
|
||||
;
|
||||
; How long do we let the phone ring before we consider this a timeout...
|
||||
;
|
||||
;timeout = 15
|
||||
;
|
||||
; How long do we wait before trying all the members again?
|
||||
;
|
||||
;retry = 5
|
||||
;
|
||||
; Weight of queue - when compared to other queues, higher weights get
|
||||
; first shot at available channels when the same channel is included in
|
||||
; more than one queue.
|
||||
;
|
||||
;weight=0
|
||||
;
|
||||
; After a successful call, how long to wait before sending a potentially
|
||||
; free member another call (default is 0, or no delay)
|
||||
;
|
||||
;wrapuptime=15
|
||||
;
|
||||
; Autofill will follow queue strategy but push multiple calls through
|
||||
; at same time until there are no more waiting callers or no more
|
||||
; available members. The per-queue setting of autofill allows you
|
||||
; to override the default setting on an individual queue level.
|
||||
;
|
||||
;autofill=yes
|
||||
;
|
||||
; Autopause will pause a queue member if they fail to answer a call
|
||||
;
|
||||
;autopause=yes
|
||||
;
|
||||
; Maximum number of people waiting in the queue (0 for unlimited)
|
||||
;
|
||||
;maxlen = 0
|
||||
;
|
||||
; If set to yes, just prior to the caller being bridged with a queue member
|
||||
; the MEMBERINTERFACE variable will be set with the interface name (eg. Agent/1234)
|
||||
; of the queue member that was chosen and is now connected to be bridged with
|
||||
; the caller
|
||||
;
|
||||
;setinterfacevar=no
|
||||
;
|
||||
; How often to announce queue position and/or estimated
|
||||
; holdtime to caller (0=off)
|
||||
;
|
||||
;announce-frequency = 90
|
||||
;
|
||||
;
|
||||
; How often to make any periodic announcement (see periodic-announce)
|
||||
;
|
||||
;periodic-announce-frequency=60
|
||||
;
|
||||
; Should we include estimated hold time in position announcements?
|
||||
; Either yes, no, or only once.
|
||||
; Hold time will be announced as the estimated time,
|
||||
; or "less than 2 minutes" when appropriate.
|
||||
;
|
||||
;announce-holdtime = yes|no|once
|
||||
|
||||
;
|
||||
; What's the rounding time for the seconds?
|
||||
; If this is non-zero, then we announce the seconds as well as the minutes
|
||||
; rounded to this value.
|
||||
;
|
||||
; announce-round-seconds = 10
|
||||
;
|
||||
; Use these sound files in making position/holdtime announcements. The
|
||||
; defaults are as listed below -- change only if you need to.
|
||||
;
|
||||
; ("You are now first in line.")
|
||||
;queue-youarenext = queue-youarenext
|
||||
; ("There are")
|
||||
;queue-thereare = queue-thereare
|
||||
; ("calls waiting.")
|
||||
;queue-callswaiting = queue-callswaiting
|
||||
; ("The current est. holdtime is")
|
||||
;queue-holdtime = queue-holdtime
|
||||
; ("minutes.")
|
||||
;queue-minutes = queue-minutes
|
||||
; ("seconds.")
|
||||
;queue-seconds = queue-seconds
|
||||
; ("Thank you for your patience.")
|
||||
;queue-thankyou = queue-thankyou
|
||||
; ("less than")
|
||||
;queue-lessthan = queue-less-than
|
||||
; ("Hold time")
|
||||
;queue-reporthold = queue-reporthold
|
||||
; ("All reps busy / wait for next")
|
||||
;periodic-announce = queue-periodic-announce
|
||||
;
|
||||
; Calls may be recorded using Asterisk's monitor/MixMonitor resource
|
||||
; This can be enabled from within the Queue application, starting recording
|
||||
; when the call is actually picked up; thus, only successful calls are
|
||||
; recorded, and you are not recording while people are listening to MOH.
|
||||
; To enable monitoring, simply specify "monitor-format"; it will be disabled
|
||||
; otherwise.
|
||||
;
|
||||
; You can specify the monitor filename with by calling
|
||||
; Set(MONITOR_FILENAME=foo)
|
||||
; Otherwise it will use MONITOR_FILENAME=${UNIQUEID}
|
||||
;
|
||||
; Pick any one valid extension for monitor format recording. If you leave
|
||||
; monitor-format commented out, it will not record calls.
|
||||
;
|
||||
; monitor-format = gsm|wav|wav49
|
||||
;
|
||||
; Monitor Type
|
||||
; By setting monitor-type = MixMonitor, when specifying monitor-format
|
||||
; to enable recording of queue member conversations, app_queue will
|
||||
; now use the new MixMonitor application instead of Monitor so
|
||||
; the concept of "joining/mixing" the in/out files now goes away
|
||||
; when this is enabled. If you do not specify or comment out this option,
|
||||
; it will default to the old 'Monitor' behavior to keep backward
|
||||
; compatibility.
|
||||
;
|
||||
; monitor-type = MixMonitor
|
||||
;
|
||||
; ----------------------- TYPE MIXMONITOR OPTIONS -----------------------------
|
||||
;
|
||||
;
|
||||
; You can specify the options supplied to MixMonitor by calling
|
||||
; Set(MONITOR_OPTIONS=av(<x>)V(<x>)W(<x>))
|
||||
; The 'b' option for MixMonitor (only save audio to the file while bridged) is
|
||||
; implied.
|
||||
;
|
||||
; You can specify a post recording command to be executed after the end of
|
||||
; recording by calling
|
||||
; Set(MONITOR_EXEC=mv /var/spool/asterisk/monitor/^{MONITOR_FILENAME} /tmp/^{MONITOR_FILENAME})
|
||||
;
|
||||
; The command specified within the contents of MONITOR_EXEC will be executed when
|
||||
; the recording is over. Any strings matching ^{X} will be unescaped to ${X} and
|
||||
; all variables will be evaluated just prior to recording being started.
|
||||
;
|
||||
; The contents of MONITOR_FILENAME will also be unescaped from ^{X} to ${X} and
|
||||
; all variables will be evaluated just prior to recording being started.
|
||||
;
|
||||
;
|
||||
; This setting controls whether callers can join a queue with no members. There
|
||||
; are three choices:
|
||||
;
|
||||
; yes - callers can join a queue with no members or only unavailable members
|
||||
; no - callers cannot join a queue with no members
|
||||
; strict - callers cannot join a queue with no members or only unavailable
|
||||
; members
|
||||
;
|
||||
; joinempty = yes
|
||||
;
|
||||
;
|
||||
; If you wish to remove callers from the queue when new callers cannot join,
|
||||
; set this setting to one of the same choices for 'joinempty'
|
||||
;
|
||||
; leavewhenempty = yes
|
||||
;
|
||||
;
|
||||
; If this is set to yes, the following manager events will be generated:
|
||||
; AgentCalled, AgentDump, AgentConnect, AgentComplete; setting this to
|
||||
; vars also sends all channel variables with the event.
|
||||
; (may generate some extra manager events, but probably ones you want)
|
||||
;
|
||||
; eventwhencalled = yes|no|vars
|
||||
;
|
||||
; If this is set to yes, the following manager events will be generated:
|
||||
; QueueMemberStatus
|
||||
; (may generate a WHOLE LOT of extra manager events)
|
||||
;
|
||||
; eventmemberstatus = no
|
||||
;
|
||||
; If you wish to report the caller's hold time to the member before they are
|
||||
; connected to the caller, set this to yes.
|
||||
;
|
||||
; reportholdtime = no
|
||||
;
|
||||
; If you want the queue to avoid sending calls to members whose devices are
|
||||
; known to be 'in use' (via the channel driver supporting that device state)
|
||||
; uncomment this option. (Note: only the SIP channel driver currently is able
|
||||
; to report 'in use'.)
|
||||
;
|
||||
; ringinuse = no
|
||||
;
|
||||
; If you wish to have a delay before the member is connected to the caller (or
|
||||
; before the member hears any announcement messages), set this to the number of
|
||||
; seconds to delay.
|
||||
;
|
||||
; memberdelay = 0
|
||||
;
|
||||
; If timeoutrestart is set to yes, then the timeout for an agent to answer is
|
||||
; reset if a BUSY or CONGESTION is received. This can be useful if agents
|
||||
; are able to cancel a call with reject or similar.
|
||||
;
|
||||
; timeoutrestart = no
|
||||
;
|
||||
; Each member of this call queue is listed on a separate line in
|
||||
; the form technology/dialstring. "member" means a normal member of a
|
||||
; queue. An optional penalty may be specified after a comma, such that
|
||||
; entries with higher penalties are considered last. An optional member
|
||||
; name may also be specified after a second comma, which is used in log
|
||||
; messages as a "friendly name". Multiple interfaces may share a single
|
||||
; member name.
|
||||
;
|
||||
; It is important to ensure that channel drivers used for members are loaded
|
||||
; before app_queue.so itself or they may be marked invalid until reload. This
|
||||
; can be accomplished by explicitly listing them in modules.conf before
|
||||
; app_queue.so. Additionally, if you use Local channels as queue members, you
|
||||
; must also preload pbx_config.so (or pbx_ael.so, pbx_lua.so, or
|
||||
; pbx_realtime.so, depending on how your dialplan is configured).
|
||||
;
|
||||
;member => Zap/1
|
||||
;member => Zap/2,10
|
||||
;member => Zap/3,10,Bob Johnson
|
||||
;member => Agent/1001
|
||||
;member => Agent/1002
|
||||
|
||||
;
|
||||
; Note that using agent groups is probably not what you want. Strategies do
|
||||
; not propagate down to the Agent system so if you want round robin, least
|
||||
; recent, etc, you should list all the agents in this file individually and not
|
||||
; use agent groups.
|
||||
;
|
||||
;member => Agent/@1 ; Any agent in group 1
|
||||
;member => Agent/:1,1 ; Any agent in group 1, wait for first
|
||||
; available, but consider with penalty
|
||||
|
49
egasterisk/res_odbc.conf
Normal file
49
egasterisk/res_odbc.conf
Normal file
|
@ -0,0 +1,49 @@
|
|||
;;; odbc setup file
|
||||
|
||||
; ENV is a global set of environmental variables that will get set.
|
||||
; Note that all environmental variables can be seen by all connections,
|
||||
; so you can't have different values for different connections.
|
||||
[ENV]
|
||||
INFORMIXSERVER => my_special_database
|
||||
INFORMIXDIR => /opt/informix
|
||||
|
||||
; All other sections are arbitrary names for database connections.
|
||||
|
||||
[asterisk]
|
||||
enabled => no
|
||||
dsn => asterisk
|
||||
;username => myuser
|
||||
;password => mypass
|
||||
pre-connect => yes
|
||||
|
||||
|
||||
[mysql2]
|
||||
enabled => no
|
||||
dsn => MySQL-asterisk
|
||||
username => myuser
|
||||
password => mypass
|
||||
pre-connect => yes
|
||||
;
|
||||
; On some databases, the connection times out and a reconnection will be
|
||||
; necessary. This setting configures the amount of time a connection
|
||||
; may sit idle (in seconds) before a reconnection will be attempted.
|
||||
;idlecheck => 3600
|
||||
|
||||
; Certain servers, such as MS SQL Server and Sybase use the TDS protocol, which
|
||||
; limits the number of active queries per connection to 1. By setting up pools
|
||||
; of connections, Asterisk can be made to work with these servers.
|
||||
[sqlserver]
|
||||
enabled => no
|
||||
dsn => mickeysoft
|
||||
pooling => yes
|
||||
limit => 5
|
||||
username => oscar
|
||||
password => thegrouch
|
||||
pre-connect => yes
|
||||
; Many databases have a default of '\' to escape special characters. MS SQL
|
||||
; Server does not.
|
||||
backslash_is_escape => no
|
||||
|
||||
|
||||
|
||||
|
14
egasterisk/res_pgsql.conf
Normal file
14
egasterisk/res_pgsql.conf
Normal file
|
@ -0,0 +1,14 @@
|
|||
;
|
||||
; Sample configuration for res_config_pgsql
|
||||
;
|
||||
; The value of dbhost may be either a hostname or an IP address.
|
||||
; If dbhost is commented out or the string "localhost", a connection
|
||||
; to the local host is assumed and dbsock is used instead of TCP/IP
|
||||
; to connect to the server.
|
||||
;
|
||||
[general]
|
||||
dbhost=127.0.0.1
|
||||
dbport=5432
|
||||
dbname=asterisk
|
||||
dbuser=asterisk
|
||||
dbpass=password
|
10
egasterisk/res_snmp.conf
Normal file
10
egasterisk/res_snmp.conf
Normal file
|
@ -0,0 +1,10 @@
|
|||
;
|
||||
; Configuration file for res_snmp
|
||||
;
|
||||
|
||||
[general]
|
||||
; We run as a subagent per default -- to run as a full agent
|
||||
; we must run as root (to be able to bind to port 161)
|
||||
;subagent = yes
|
||||
; SNMP must be explicitly enabled to be active
|
||||
;enabled = yes
|
193
egasterisk/rpt.conf
Normal file
193
egasterisk/rpt.conf
Normal file
|
@ -0,0 +1,193 @@
|
|||
; Radio Repeater / Remote Base configuration file (for use with app_rpt)
|
||||
; As of app_rpt version 0.39, 12/20/2005
|
||||
;
|
||||
|
||||
;[000] ; Node ID of first repeater
|
||||
|
||||
;rxchannel = Zap/1 ; Rx audio/signalling channel
|
||||
; Note: if you use a unified interface (tx/rx on one channel), only
|
||||
; specify the rxchannel and the txchannel will be assumed from the rxchannel
|
||||
;txchannel = Zap/2 ; Tx audio/signalling channel
|
||||
;duplex = 2 ; (Optional) set duplex operating mode
|
||||
;; 0 = half duplex (telemetry and courtesy tones do not transmit)
|
||||
;; 1 = semi-half duplex (telemetry and courtesy tones transmit, but not
|
||||
;; repeated audio
|
||||
;; 2 = normal full-duplex mode (Default)
|
||||
;; 3 = full-duplex mode, without repeated audio from main input source
|
||||
;functions = functions-repeater ; DTMF function list
|
||||
;; specify this for a different function list then local when on link
|
||||
;;link_functions = functions-different ; DTMF function list for link
|
||||
;;phone_functions = functions-phone ; (optional) different functions for 'P' mode
|
||||
;;dphone_functions = functions-dphone ; (optional) different functions for 'D' mode
|
||||
;;nodes = nodes-different ; (optional) different node list
|
||||
;tonezone = us ; use US tones (default)
|
||||
;context = default ; dialing context for phone
|
||||
;callerid = "WB6NIL Repeater" <(213) 555-0123> ; Callerid for phone calls
|
||||
;idrecording = wb6nil ; id recording
|
||||
;accountcode=RADIO ; account code (optional)
|
||||
;funcchar = * ; function lead-in character (defaults to '*')
|
||||
;endchar = # ; command mode end character (defaults to '#')
|
||||
;;nobusyout=yes ; (optional) Do not busy-out reverse-patch when
|
||||
; normal patch in use
|
||||
;hangtime=1000 ; squelch tail hang time (in ms) (optional)
|
||||
;totime=100000 ; transmit time-out time (in ms) (optional)
|
||||
;idtime=30000 ; id interval time (in ms) (optional)
|
||||
;politeid=30000 ; time in milliseconds before ID timer
|
||||
; expires to try and ID in the tail.
|
||||
; (optional, default is 30000).
|
||||
;idtalkover=|iwb6nil/rpt ; Talkover ID (optional) default is none
|
||||
;unlinkedct=ct2 ; unlinked courtesy tone (optional) default is none
|
||||
|
||||
;; The tailmessagetime,tailsquashedtime, and tailmessages need to be set
|
||||
;; to support tail messages. They can be omitted otherwise.
|
||||
;tailmessagetime=300000 ; Play a tail message every 5 mins
|
||||
;tailsquashedtime=30000 ; If squashed by another user,
|
||||
;; try again after 30 seconds
|
||||
;tailmessages=msg1,msg2,msg3 ;list of messages to be played for tail message
|
||||
|
||||
; The default values for hangtime, time-out time, and id interval time are
|
||||
; 5 seconds (5000 ms), 3 minutes (180000 ms), and 5 minutes (300000 ms)
|
||||
; respectively
|
||||
|
||||
;[001] ; Node ID of first repeater
|
||||
|
||||
;rxchannel = Zap/3 ; Rx audio/signalling channel
|
||||
; Note: if you use a unified interface (tx/rx on one channel), only
|
||||
; specify the rxchannel and the txchannel will be assumed from the rxchannel
|
||||
;txchannel = Zap/4 ; Tx audio/signalling channel
|
||||
;functions = functions-repeater ; DTMF function list
|
||||
;; specify this for a different function list then local when on link
|
||||
;;link_functions = functions-different ; DTMF function list for link
|
||||
;;phone_functions = functions-phone ; (optional) different functions for 'P' mode
|
||||
;;dphone_functions = functions-dphone ; (optional) different functions for 'D' mode
|
||||
;;nodes = nodes-different ; (optional) different node list
|
||||
;tonezone = us ; use US tones (default)
|
||||
;context = default ; dialing context for phone
|
||||
;callerid = "WB6NIL Repeater" <(213) 555-0123> ; Callerid for phone calls
|
||||
;idrecording = wb6nil ; id recording
|
||||
;accountcode=RADIO ; account code (optional)
|
||||
;funcchar = * ; function lead-in character (defaults to '*')
|
||||
;endchar = # ; command mode end character (defaults to '#')
|
||||
;;nobusyout=yes ; (optional) Do not busy-out reverse-patch when
|
||||
; normal patch in use
|
||||
;hangtime=1000 ; squelch tail hang time (in ms) (optional)
|
||||
;totime=100000 ; transmit time-out time (in ms) (optional)
|
||||
;idtime=30000 ; id interval time (in ms) (optional)
|
||||
;politeid=30000 ; time in milliseconds before ID timer
|
||||
; expires to try and ID in the tail.
|
||||
; (optional, default is 30000).
|
||||
;idtalkover=|iwb6nil/rpt ; Talkover ID (optional) default is none
|
||||
;unlinkedct=ct2 ; unlinked courtesy tone (optional) default is none
|
||||
|
||||
;[002] ; Node ID of remote base
|
||||
|
||||
;rxchannel = Zap/5 ; Rx audio/signalling channel
|
||||
; Note: if you use a unified interface (tx/rx on one channel), only
|
||||
; specify the rxchannel and the txchannel will be assumed from the rxchannel
|
||||
;txchannel = Zap/6 ; Tx audio/signalling channel
|
||||
;functions = functions-remote
|
||||
;remote = ft897 ; Set remote=y for dumb remote or
|
||||
; remote=ft897 for Yaesu FT-897 or
|
||||
; remote=rbi for Doug Hall RBI1
|
||||
;iobase = 0x378 ; Specify IO port for parallel port (optional)
|
||||
|
||||
;[functions-repeater]
|
||||
;1=ilink,1 ; Specific link disconnect
|
||||
;2=ilink,2 ; Specific Link connect - monitor only
|
||||
;3=ilink,3 ; Specific Link connect - transceive
|
||||
;4=ilink,4 ; Enter command mode on a specific link
|
||||
;7=ilink,5 ; Link status
|
||||
;;XX=ilink,6 ; Disconnect all links (not used here)
|
||||
|
||||
;80=status,1 ; System info
|
||||
;81=status,2 ; Time
|
||||
;82=status,3 ; app_rpt.c Version
|
||||
|
||||
;6=autopatchup ; Autopatch up
|
||||
;0=autopatchdn ; Autopatch down
|
||||
|
||||
;90=cop,1 ; System warm boot
|
||||
;91=cop,2 ; System enable
|
||||
;92=cop,3 ; System disable
|
||||
|
||||
;[functions-remote]
|
||||
|
||||
;0=remote,1 ; Retrieve Memory
|
||||
;1=remote,2 ; Set freq.
|
||||
;2=remote,3 ; Set Rx PL tone.
|
||||
;40=remote,100 ; Rx PL off
|
||||
;41=remote,101 ; Rx PL on
|
||||
;42=remote,102 ; Tx PL off
|
||||
;43=remote,103 ; Tx PL on
|
||||
;44=remote,104 ; Low Pwr
|
||||
;45=remote,105 ; Med Pwr
|
||||
;46=remote,106 ; Hi Pwr
|
||||
;5=remote,5 ; Status
|
||||
|
||||
;[telemetry]
|
||||
|
||||
; Telemetry entries are shared across all repeaters
|
||||
; Can be a tone sequence, morse string, or a file
|
||||
;
|
||||
; |t - Tone escape sequence
|
||||
;
|
||||
; Tone sequences consist of 1 or more 4-tuple entries (freq1, freq2, duration, amplitude)
|
||||
; Single frequencies are created by setting freq1 or freq2 to zero.
|
||||
;
|
||||
; |m - Morse escape sequence
|
||||
;
|
||||
; Sends Morse code at the telemetry amplitude and telemetry frequency as defined in the
|
||||
; [morse] section.
|
||||
;
|
||||
; Follow with an alphanumeric string
|
||||
;
|
||||
; |i - Morse ID escape sequence
|
||||
;
|
||||
; Sends Morse code at the ID amplitude and ID frequency as defined in the
|
||||
; [morse] section.
|
||||
;
|
||||
; Follow with an alphanumeric string
|
||||
|
||||
|
||||
;ct1=|t(350,0,100,2048)(500,0,100,2048)(660,0,100,2048)
|
||||
;ct2=|t(660,880,150,2048)
|
||||
;ct3=|t(440,0,150,2048)
|
||||
;ct4=|t(550,0,150,2048)
|
||||
;ct5=|t(660,0,150,2048)
|
||||
;ct6=|t(880,0,150,2048)
|
||||
;ct7=|t(660,440,150,2048)
|
||||
;ct8=|t(700,1100,150,2048)
|
||||
;remotetx=|t(2000,0,75,2048)(0,0,75,0)(1600,0,75,2048);
|
||||
;remotemon=|t(1600,0,75,2048)
|
||||
;cmdmode=|t(900,903,200,2048)
|
||||
;functcomplete=|t(1000,0,100,2048)(0,0,100,0)(1000,0,100,2048)
|
||||
|
||||
|
||||
;[morse]
|
||||
|
||||
;speed=20 ; Approximate speed in WPM
|
||||
;frequency=800 ; Morse Telemetry Frequency
|
||||
;amplitude=4096 ; Morse Telemetry Amplitude
|
||||
;idfrequency=330 ; Morse ID Frequency
|
||||
;idamplitude=2048 ; Morse ID Amplitude
|
||||
|
||||
;[nodes]
|
||||
|
||||
;000 = context_A@foo.bar.com/1234,foo.bar.com
|
||||
;001 = context_B@baz.waldo.com/4321,baz.waldo.com
|
||||
;002 = context_C@pepper.salt.com/5678,pepper.salt.com,y ; this is a remote
|
||||
|
||||
;of course, you can also specify these with domain names, but why rely
|
||||
;on DNS working unnecessarily?
|
||||
|
||||
;[memory]
|
||||
|
||||
;; this example gives you 146.460, simplex, 100.0 HZ PL, hi-power, transmit PL
|
||||
;00 = 146.460,100.0,sht
|
||||
;; this example gives you 146.940, minus offset, 100.0 HZ PL, low-power, no PL
|
||||
;01 = 146.940,100.0,-l
|
||||
|
||||
; The format for these entries is: Receive-Freq,Receive-PL,Attrbutes
|
||||
; Attributes: l=low power, m=medium power, h=high power, -=minus offset,
|
||||
; s=simplex, +=plus offset, t=tx PL enable, r=rx PL enable
|
||||
|
22
egasterisk/rtp.conf
Normal file
22
egasterisk/rtp.conf
Normal file
|
@ -0,0 +1,22 @@
|
|||
;
|
||||
; RTP Configuration
|
||||
;
|
||||
[general]
|
||||
;
|
||||
; RTP start and RTP end configure start and end addresses
|
||||
;
|
||||
; Defaults are rtpstart=5000 and rtpend=31000
|
||||
;
|
||||
rtpstart=10000
|
||||
rtpend=20000
|
||||
;
|
||||
; Whether to enable or disable UDP checksums on RTP traffic
|
||||
;
|
||||
;rtpchecksums=no
|
||||
;
|
||||
; The amount of time a DTMF digit with no 'end' marker should be
|
||||
; allowed to continue (in 'samples', 1/8000 of a second)
|
||||
;
|
||||
;dtmftimeout=3000
|
||||
; rtcpinterval = 5000 ; Milliseconds between rtcp reports
|
||||
;(min 500, max 60000, default 5000)
|
171
egasterisk/say.conf
Normal file
171
egasterisk/say.conf
Normal file
|
@ -0,0 +1,171 @@
|
|||
; say.conf
|
||||
;
|
||||
; language configuration
|
||||
;
|
||||
; The new language routines produce strings of the form
|
||||
; prefix:[format:]data
|
||||
; that are matched against the rules in this file to produce
|
||||
; an output.
|
||||
;
|
||||
; The data is generally the string to be spelled (either a number,
|
||||
; an ascii string or a date/time in the format specified below).
|
||||
; It is available, in the right hand side of a rule, as variable ${SAY}.
|
||||
;
|
||||
; The format is optional and normally used only for date/time.
|
||||
; The prefix is used to select the pronunciation - standard
|
||||
; prefixes are
|
||||
; num used for numbers
|
||||
; enum used for enumerations
|
||||
; date for dates
|
||||
; time for times
|
||||
; datetime for dates and times
|
||||
; char for character strings
|
||||
; phonetic for phonetic strings
|
||||
; digit for digit strings
|
||||
;
|
||||
; but others can be used at will.
|
||||
;
|
||||
; Processing occurs as follows:
|
||||
; If the format is empty, or there is no format, the entire
|
||||
; string is matched against one of the pattern on the left hand side.
|
||||
; On the first match, the various comma-separated components on the right
|
||||
; hand side are pronounced, as follows:
|
||||
; + a component starting with a prefix: (i.e. with a ':' in it)
|
||||
; is re-processed according to these rules;
|
||||
; + a component without a ':' in it is considered a filename and
|
||||
; the corresponding file is played.
|
||||
;
|
||||
; If the format is non-empty, the format is split into its components
|
||||
; (individual characters, or filenames in single quotes), and then
|
||||
; filenames are played, whereas single characters are used to
|
||||
; generate a new string format:pat:data to be processed.
|
||||
;
|
||||
; DATES/AND TIMES assume that the date info is available in
|
||||
; the form YYYYMMDDHHmm.ss-dow-doy
|
||||
; with 4 digits for the year, 2 for month, day, hour, minutes, seconds,
|
||||
; one digit for the day-of-week, and 3 digits for the day-of-year.
|
||||
;
|
||||
; Example:
|
||||
; datetime::200604172030.00-4-102
|
||||
; (typical format for a date) is first matched against the line
|
||||
; datetime::. => date:AdBY 'digits/at' IMp:${SAY}
|
||||
; which is normally present with the default format for dates.
|
||||
; In turn, the format string "AdBY 'digits/at' IMp" results in
|
||||
; the sequence
|
||||
; date:A:200604172030.00-4-102
|
||||
; date:d:200604172030.00-4-102
|
||||
; date:B:200604172030.00-4-102
|
||||
; date:Y:200604172030.00-4-102
|
||||
; digits/at
|
||||
; date:I:200604172030.00-4-102
|
||||
; date:M:200604172030.00-4-102
|
||||
; date:p:200604172030.00-4-102
|
||||
;
|
||||
;
|
||||
; Remember, normally X Z N are special, and the search is
|
||||
; case insensitive, so you must use [X] [N] [Z] .. if you
|
||||
; want exact match.
|
||||
|
||||
; We start with the basic rules that might be more-or-less
|
||||
; language-independent
|
||||
|
||||
[digit-base](!) ; base rule for digit strings
|
||||
; XXX incomplete yet
|
||||
_digit:[0-9] => digits/${SAY}
|
||||
_digit:[-] => letters/dash
|
||||
_digit:[*] => letters/star
|
||||
_digit:[@] => letters/at
|
||||
_digit:[0-9]. => digit:${SAY:0:1}, digit:${SAY:1}
|
||||
|
||||
[date-base](!) ; base rules for dates and times
|
||||
; the 'SAY' variable contains YYYYMMDDHHmm.ss-dow-doy
|
||||
; these rule map the strftime attributes.
|
||||
_date:Y:. => num:${SAY:0:4} ; year, 19xx
|
||||
_date:[Bb]:. => digits/mon-$[${SAY:4:2}-1] ; month name, 0..11
|
||||
_date:[Aa]:. => digits/day-${SAY:16:1} ; day of week
|
||||
_date:[de]:. => num:${SAY:6:2} ; day of month
|
||||
_date:[hH]:. => num:${SAY:8:2} ; hour
|
||||
_date:[I]:. => num:$[${SAY:8:2} % 12] ; hour 0-12
|
||||
_date:[M]:. => num:${SAY:10:2} ; minute
|
||||
; XXX too bad the '?' function does not remove the quotes
|
||||
; _date:[pP]:. => digits/$[ ${SAY:10:2} > 12 ? "p-m" :: "a-m"] ; am pm
|
||||
_date:[pP]:. => digits/p-m ; am pm
|
||||
_date:[S]:. => num:${SAY:13:2} ; seconds
|
||||
|
||||
[en-base](!)
|
||||
_[n]um:0. => num:${SAY:1}
|
||||
_[n]um:X => digits/${SAY}
|
||||
_[n]um:1X => digits/${SAY}
|
||||
_[n]um:[2-9]0 => digits/${SAY}
|
||||
_[n]um:[2-9][1-9] => digits/${SAY:0:1}0, num:${SAY:1}
|
||||
_[n]um:XXX => num:${SAY:0:1}, digits/hundred, num:${SAY:1}
|
||||
|
||||
_[n]um:XXXX => num:${SAY:0:1}, digits/thousand, num:${SAY:1}
|
||||
_[n]um:XXXXX => num:${SAY:0:2}, digits/thousand, num:${SAY:2}
|
||||
_[n]um:XXXXXX => num:${SAY:0:3}, digits/thousand, num:${SAY:3}
|
||||
|
||||
_[n]um:XXXXXXX => num:${SAY:0:1}, digits/million, num:${SAY:1}
|
||||
_[n]um:XXXXXXXX => num:${SAY:0:2}, digits/million, num:${SAY:2}
|
||||
_[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/million, num:${SAY:3}
|
||||
|
||||
_[n]um:XXXXXXXXXX => num:${SAY:0:1}, digits/billion, num:${SAY:1}
|
||||
_[n]um:XXXXXXXXXXX => num:${SAY:0:2}, digits/billion, num:${SAY:2}
|
||||
_[n]um:XXXXXXXXXXXX => num:${SAY:0:3}, digits/billion, num:${SAY:3}
|
||||
|
||||
; enumeration
|
||||
_e[n]um:X => digits/h-${SAY}
|
||||
_e[n]um:1X => digits/h-${SAY}
|
||||
_e[n]um:[2-9]0 => digits/h-${SAY}
|
||||
_e[n]um:[2-9][1-9] => num:${SAY:0:1}0, digits/h-${SAY:1}
|
||||
_e[n]um:[1-9]XX => num:${SAY:0:1}, digits/hundred, enum:${SAY:1}
|
||||
|
||||
[it](digit-base,date-base)
|
||||
_[n]um:0. => num:${SAY:1}
|
||||
_[n]um:X => digits/${SAY}
|
||||
_[n]um:1X => digits/${SAY}
|
||||
_[n]um:[2-9]0 => digits/${SAY}
|
||||
_[n]um:[2-9][1-9] => digits/${SAY:0:1}0, num:${SAY:1}
|
||||
_[n]um:1XX => digits/hundred, num:${SAY:1}
|
||||
_[n]um:[2-9]XX => num:${SAY:0:1}, digits/hundred, num:${SAY:1}
|
||||
|
||||
_[n]um:1XXX => digits/thousand, num:${SAY:1}
|
||||
_[n]um:[2-9]XXX => num:${SAY:0:1}, digits/thousands, num:${SAY:1}
|
||||
_[n]um:XXXXX => num:${SAY:0:2}, digits/thousands, num:${SAY:2}
|
||||
_[n]um:XXXXXX => num:${SAY:0:3}, digits/thousands, num:${SAY:3}
|
||||
|
||||
_[n]um:1XXXXXX => num:${SAY:0:1}, digits/million, num:${SAY:1}
|
||||
_[n]um:[2-9]XXXXXX => num:${SAY:0:1}, digits/millions, num:${SAY:1}
|
||||
_[n]um:XXXXXXXX => num:${SAY:0:2}, digits/millions, num:${SAY:2}
|
||||
_[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/millions, num:${SAY:3}
|
||||
|
||||
_datetime::. => date:AdBY 'digits/at' IMp:${SAY}
|
||||
_date::. => date:AdBY:${SAY}
|
||||
_time::. => date:IMp:${SAY}
|
||||
|
||||
[en](en-base,date-base,digit-base)
|
||||
_datetime::. => date:AdBY 'digits/at' IMp:${SAY}
|
||||
_date::. => date:AdBY:${SAY}
|
||||
_time::. => date:IMp:${SAY}
|
||||
|
||||
[de](date-base,digit-base)
|
||||
_[n]um:0. => num:${SAY:1}
|
||||
_[n]um:X => digits/${SAY}
|
||||
_[n]um:1X => digits/${SAY}
|
||||
_[n]um:[2-9]0 => digits/${SAY}
|
||||
_[n]um:[2-9][1-9] => digits/${SAY:1}-and, digits/${SAY:0:1}0
|
||||
_[n]um:1XX => digits/ein, digits/hundred, num:${SAY:1}
|
||||
_[n]um:[2-9]XX => digits/${SAY:0:1}, digits/hundred, num:${SAY:1}
|
||||
_[n]um:1XXX => digits/ein, digits/thousand, num:${SAY:1}
|
||||
_[n]um:[2-9]XXX => digits/${SAY:0:1}, digits/thousand, num:${SAY:1}
|
||||
_[n]um:XXXXX => num:${SAY:0:2}, digits/thousand, num:${SAY:2}
|
||||
_[n]um:X00XXX => digits/${SAY:0:1}, digits/hundred, digits/thousand, num:${SAY:3}
|
||||
_[n]um:XXXXXX => digits/${SAY:0:1}, digits/hundred, num:${SAY:1}
|
||||
_[n]um:1XXXXXX => digits/eine, digits/million, num:${SAY:1}
|
||||
_[n]um:[2-9]XXXXXX => digits/${SAY:0:1}, digits/millions, num:${SAY:1}
|
||||
_[n]um:XXXXXXXX => num:${SAY:0:2}, digits/millions, num:${SAY:2}
|
||||
_[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/millions, num:${SAY:3}
|
||||
|
||||
_datetime::. => date:AdBY 'digits/at' IMp:${SAY}
|
||||
_date::. => date:AdBY:${SAY}
|
||||
_time::. => date:IMp:${SAY}
|
||||
|
442
egasterisk/sip.conf
Normal file
442
egasterisk/sip.conf
Normal file
|
@ -0,0 +1,442 @@
|
|||
;!
|
||||
;! Automatically generated configuration file
|
||||
;! Filename: sip.conf (/etc/asterisk/sip.conf)
|
||||
;! Generator: Manager
|
||||
;! Creation Date: Wed Jul 23 19:12:13 2008
|
||||
;!
|
||||
[general]
|
||||
context = default ; Default context for incoming calls
|
||||
;allowguest=no ; Allow or reject guest calls (default is yes)
|
||||
allowoverlap = no ; Disable overlap dialing support. (Default is yes)
|
||||
;allowtransfer=no ; Disable all transfers (unless enabled in peers or users)
|
||||
; Default is enabled
|
||||
;realm=mydomain.tld ; Realm for digest authentication
|
||||
; defaults to "asterisk". If you set a system name in
|
||||
; asterisk.conf, it defaults to that system name
|
||||
; Realms MUST be globally unique according to RFC 3261
|
||||
; Set this to your host name or domain name
|
||||
bindport = 5060 ; UDP Port to bind to (SIP standard port is 5060)
|
||||
; bindport is the local UDP port that Asterisk will listen on
|
||||
bindaddr = 202.6.116.229 ; IP address to bind to (0.0.0.0 binds to all)
|
||||
srvlookup = yes ; Enable DNS SRV lookups on outbound calls
|
||||
allowexternaldomains = no
|
||||
allowexternalinvites = no
|
||||
allowguest = no
|
||||
allowsubscribe = no
|
||||
allowtransfer = yes
|
||||
alwaysauthreject = no
|
||||
autodomain = no
|
||||
callevents = no
|
||||
compactheaders = no
|
||||
dumphistory = no
|
||||
g726nonstandard = no
|
||||
ignoreregexpire = no
|
||||
jbenable = no
|
||||
jbforce = no
|
||||
jblog = no
|
||||
maxcallbitrate = 384
|
||||
maxexpiry = 3600
|
||||
minexpiry = 60
|
||||
notifyringing = no
|
||||
pedantic = no
|
||||
promiscredir = no
|
||||
recordhistory = no
|
||||
relaxdtmf = no
|
||||
rtcachefriends = no
|
||||
rtsavesysname = no
|
||||
rtupdate = no
|
||||
sendrpid = no
|
||||
sipdebug = no
|
||||
t1min = 100
|
||||
t38pt_udptl = no
|
||||
trustrpid = no
|
||||
allow = alaw,ulaw,speex,gsm
|
||||
disallow = all
|
||||
progressinband = no
|
||||
usereqphone = no
|
||||
videosupport = no
|
||||
; Note: Asterisk only uses the first host
|
||||
; in SRV records
|
||||
; Disabling DNS SRV lookups disables the
|
||||
; ability to place SIP calls based on domain
|
||||
; names to some other SIP users on the Internet
|
||||
;domain=mydomain.tld ; Set default domain for this host
|
||||
; If configured, Asterisk will only allow
|
||||
; INVITE and REFER to non-local domains
|
||||
; Use "sip show domains" to list local domains
|
||||
;pedantic=yes ; Enable checking of tags in headers,
|
||||
; international character conversions in URIs
|
||||
; and multiline formatted headers for strict
|
||||
; SIP compatibility (defaults to "no")
|
||||
; See doc/ip-tos.txt for a description of these parameters.
|
||||
;tos_sip=cs3 ; Sets TOS for SIP packets.
|
||||
;tos_audio=ef ; Sets TOS for RTP audio packets.
|
||||
;tos_video=af41 ; Sets TOS for RTP video packets.
|
||||
;maxexpiry=3600 ; Maximum allowed time of incoming registrations
|
||||
; and subscriptions (seconds)
|
||||
;minexpiry=60 ; Minimum length of registrations/subscriptions (default 60)
|
||||
;defaultexpiry=120 ; Default length of incoming/outgoing registration
|
||||
;t1min=100 ; Minimum roundtrip time for messages to monitored hosts
|
||||
; Defaults to 100 ms
|
||||
;notifymimetype=text/plain ; Allow overriding of mime type in MWI NOTIFY
|
||||
;checkmwi=10 ; Default time between mailbox checks for peers
|
||||
;buggymwi=no ; Cisco SIP firmware doesn't support the MWI RFC
|
||||
; fully. Enable this option to not get error messages
|
||||
; when sending MWI to phones with this bug.
|
||||
;vmexten=voicemail ; dialplan extension to reach mailbox sets the
|
||||
; Message-Account in the MWI notify message
|
||||
; defaults to "asterisk"
|
||||
disallow=all ; First disallow all codecs
|
||||
allow=alaw ; Allow codecs in order of preference
|
||||
allow=ulaw ; Allow codecs in order of preference
|
||||
allow=speex ; Allow codecs in order of preference
|
||||
allow=gsm ; Allow codecs in order of preference
|
||||
;allow=g723 ; Allow codecs in order of preference
|
||||
;allow=ilbc ; see doc/rtp-packetization for framing options
|
||||
;
|
||||
; This option specifies a preference for which music on hold class this channel
|
||||
; should listen to when put on hold if the music class has not been set on the
|
||||
; channel with Set(CHANNEL(musicclass)=whatever) in the dialplan, and the peer
|
||||
; channel putting this one on hold did not suggest a music class.
|
||||
;
|
||||
; This option may be specified globally, or on a per-user or per-peer basis.
|
||||
;
|
||||
;mohinterpret=default
|
||||
;
|
||||
; This option specifies which music on hold class to suggest to the peer channel
|
||||
; when this channel places the peer on hold. It may be specified globally or on
|
||||
; a per-user or per-peer basis.
|
||||
;
|
||||
;mohsuggest=default
|
||||
;
|
||||
;language=en ; Default language setting for all users/peers
|
||||
; This may also be set for individual users/peers
|
||||
;relaxdtmf=yes ; Relax dtmf handling
|
||||
;trustrpid = no ; If Remote-Party-ID should be trusted
|
||||
;sendrpid = yes ; If Remote-Party-ID should be sent
|
||||
;progressinband=never ; If we should generate in-band ringing always
|
||||
; use 'never' to never use in-band signalling, even in cases
|
||||
; where some buggy devices might not render it
|
||||
; Valid values: yes, no, never Default: never
|
||||
;useragent=Asterisk PBX ; Allows you to change the user agent string
|
||||
;promiscredir = no ; If yes, allows 302 or REDIR to non-local SIP address
|
||||
; Note that promiscredir when redirects are made to the
|
||||
; local system will cause loops since Asterisk is incapable
|
||||
; of performing a "hairpin" call.
|
||||
;usereqphone = no ; If yes, ";user=phone" is added to uri that contains
|
||||
; a valid phone number
|
||||
;dtmfmode = rfc2833 ; Set default dtmfmode for sending DTMF. Default: rfc2833
|
||||
; Other options:
|
||||
; info : SIP INFO messages
|
||||
; inband : Inband audio (requires 64 kbit codec -alaw, ulaw)
|
||||
; auto : Use rfc2833 if offered, inband otherwise
|
||||
;compactheaders = yes ; send compact sip headers.
|
||||
;
|
||||
;videosupport=yes ; Turn on support for SIP video. You need to turn this on
|
||||
; in the this section to get any video support at all.
|
||||
; You can turn it off on a per peer basis if the general
|
||||
; video support is enabled, but you can't enable it for
|
||||
; one peer only without enabling in the general section.
|
||||
;maxcallbitrate=384 ; Maximum bitrate for video calls (default 384 kb/s)
|
||||
; Videosupport and maxcallbitrate is settable
|
||||
; for peers and users as well
|
||||
;callevents=no ; generate manager events when sip ua
|
||||
; performs events (e.g. hold)
|
||||
;alwaysauthreject = yes ; When an incoming INVITE or REGISTER is to be rejected,
|
||||
; for any reason, always reject with '401 Unauthorized'
|
||||
; instead of letting the requester know whether there was
|
||||
; a matching user or peer for their request
|
||||
;g726nonstandard = yes ; If the peer negotiates G726-32 audio, use AAL2 packing
|
||||
; order instead of RFC3551 packing order (this is required
|
||||
; for Sipura and Grandstream ATAs, among others). This is
|
||||
; contrary to the RFC3551 specification, the peer _should_
|
||||
; be negotiating AAL2-G726-32 instead :-(
|
||||
;matchexterniplocally = yes ; Only substitute the externip or externhost setting if it matches
|
||||
; your localnet setting. Unless you have some sort of strange network
|
||||
; setup you will not need to enable this.
|
||||
;
|
||||
; If regcontext is specified, Asterisk will dynamically create and destroy a
|
||||
; NoOp priority 1 extension for a given peer who registers or unregisters with
|
||||
; us and have a "regexten=" configuration item.
|
||||
; Multiple contexts may be specified by separating them with '&'. The
|
||||
; actual extension is the 'regexten' parameter of the registering peer or its
|
||||
; name if 'regexten' is not provided. If more than one context is provided,
|
||||
; the context must be specified within regexten by appending the desired
|
||||
; context after '@'. More than one regexten may be supplied if they are
|
||||
; separated by '&'. Patterns may be used in regexten.
|
||||
;
|
||||
;regcontext=sipregistrations
|
||||
;
|
||||
;--------------------------- RTP timers ----------------------------------------------------
|
||||
; These timers are currently used for both audio and video streams. The RTP timeouts
|
||||
; are only applied to the audio channel.
|
||||
; The settings are settable in the global section as well as per device
|
||||
;
|
||||
;rtptimeout=60 ; Terminate call if 60 seconds of no RTP or RTCP activity
|
||||
; on the audio channel
|
||||
; when we're not on hold. This is to be able to hangup
|
||||
; a call in the case of a phone disappearing from the net,
|
||||
; like a powerloss or grandma tripping over a cable.
|
||||
;rtpholdtimeout=300 ; Terminate call if 300 seconds of no RTP or RTCP activity
|
||||
; on the audio channel
|
||||
; when we're on hold (must be > rtptimeout)
|
||||
;rtpkeepalive=<secs> ; Send keepalives in the RTP stream to keep NAT open
|
||||
; (default is off - zero)
|
||||
;--------------------------- SIP DEBUGGING ---------------------------------------------------
|
||||
;sipdebug = yes ; Turn on SIP debugging by default, from
|
||||
; the moment the channel loads this configuration
|
||||
;recordhistory=yes ; Record SIP history by default
|
||||
; (see sip history / sip no history)
|
||||
;dumphistory=yes ; Dump SIP history at end of SIP dialogue
|
||||
; SIP history is output to the DEBUG logging channel
|
||||
;--------------------------- STATUS NOTIFICATIONS (SUBSCRIPTIONS) ----------------------------
|
||||
; You can subscribe to the status of extensions with a "hint" priority
|
||||
; (See extensions.conf.sample for examples)
|
||||
; chan_sip support two major formats for notifications: dialog-info and SIMPLE
|
||||
;
|
||||
; You will get more detailed reports (busy etc) if you have a call limit set
|
||||
; for a device. When the call limit is filled, we will indicate busy. Note that
|
||||
; you need at least 2 in order to be able to do attended transfers.
|
||||
;
|
||||
; For queues, you will need this level of detail in status reporting, regardless
|
||||
; if you use SIP subscriptions. Queues and manager use the same internal interface
|
||||
; for reading status information.
|
||||
;
|
||||
; Note: Subscriptions does not work if you have a realtime dialplan and use the
|
||||
; realtime switch.
|
||||
;
|
||||
;allowsubscribe=no ; Disable support for subscriptions. (Default is yes)
|
||||
;subscribecontext = default ; Set a specific context for SUBSCRIBE requests
|
||||
; Useful to limit subscriptions to local extensions
|
||||
; Settable per peer/user also
|
||||
;notifyringing = yes ; Notify subscriptions on RINGING state (default: no)
|
||||
;notifyhold = yes ; Notify subscriptions on HOLD state (default: no)
|
||||
; Turning on notifyringing and notifyhold will add a lot
|
||||
; more database transactions if you are using realtime.
|
||||
;limitonpeers = yes ; Apply call limits on peers only. This will improve
|
||||
; status notification when you are using type=friend
|
||||
; Inbound calls, that really apply to the user part
|
||||
; of a friend will now be added to and compared with
|
||||
; the peer limit instead of applying two call limits,
|
||||
; one for the peer and one for the user.
|
||||
; "sip show inuse" will only show active calls on
|
||||
; the peer side of a "type=friend" object if this
|
||||
; setting is turned on.
|
||||
;----------------------------------------- T.38 FAX PASSTHROUGH SUPPORT -----------------------
|
||||
;
|
||||
; This setting is available in the [general] section as well as in device configurations.
|
||||
; Setting this to yes, enables T.38 fax (UDPTL) passthrough on SIP to SIP calls, provided
|
||||
; both parties have T38 support enabled in their Asterisk configuration
|
||||
; This has to be enabled in the general section for all devices to work. You can then
|
||||
; disable it on a per device basis.
|
||||
;
|
||||
; T.38 faxing only works in SIP to SIP calls, with no local or agent channel being used.
|
||||
;
|
||||
; t38pt_udptl = yes ; Default false
|
||||
;
|
||||
;----------------------------------------- OUTBOUND SIP REGISTRATIONS ------------------------
|
||||
; Asterisk can register as a SIP user agent to a SIP proxy (provider)
|
||||
; Format for the register statement is:
|
||||
; register => user[:secret[:authuser]]@host[:port][/extension]
|
||||
;
|
||||
; If no extension is given, the 's' extension is used. The extension needs to
|
||||
; be defined in extensions.conf to be able to accept calls from this SIP proxy
|
||||
; (provider).
|
||||
;
|
||||
; host is either a host name defined in DNS or the name of a section defined
|
||||
; below.
|
||||
;
|
||||
; Examples:
|
||||
;
|
||||
;register => 1234:password@mysipprovider.com
|
||||
;
|
||||
; This will pass incoming calls to the 's' extension
|
||||
;
|
||||
;
|
||||
;register => 2345:password@sip_proxy/1234
|
||||
;
|
||||
; Register 2345 at sip provider 'sip_proxy'. Calls from this provider
|
||||
; connect to local extension 1234 in extensions.conf, default context,
|
||||
; unless you configure a [sip_proxy] section below, and configure a
|
||||
; context.
|
||||
; Tip 1: Avoid assigning hostname to a sip.conf section like [provider.com]
|
||||
; Tip 2: Use separate type=peer and type=user sections for SIP providers
|
||||
; (instead of type=friend) if you have calls in both directions
|
||||
;registertimeout=20 ; retry registration calls every 20 seconds (default)
|
||||
;registerattempts=10 ; Number of registration attempts before we give up
|
||||
; 0 = continue forever, hammering the other server
|
||||
; until it accepts the registration
|
||||
; Default is 0 tries, continue forever
|
||||
;registerattempts=0
|
||||
|
||||
;registertimeout=20
|
||||
|
||||
; Register line should be somewhere inside your general section
|
||||
|
||||
;register => 028894221:p08vd15w@2talk.co.nz/028894221
|
||||
|
||||
;----------------------------------------- NAT SUPPORT ------------------------
|
||||
; The externip, externhost and localnet settings are used if you use Asterisk
|
||||
; behind a NAT device to communicate with services on the outside.
|
||||
;externip = 200.201.202.203 ; Address that we're going to put in outbound SIP
|
||||
; messages if we're behind a NAT
|
||||
; The externip and localnet is used
|
||||
; when registering and communicating with other proxies
|
||||
; that we're registered with
|
||||
;externhost=foo.dyndns.net ; Alternatively you can specify an
|
||||
; external host, and Asterisk will
|
||||
; perform DNS queries periodically. Not
|
||||
; recommended for production
|
||||
; environments! Use externip instead
|
||||
;externrefresh=10 ; How often to refresh externhost if
|
||||
; used
|
||||
; You may add multiple local networks. A reasonable
|
||||
; set of defaults are:
|
||||
;localnet=192.168.0.0/255.255.0.0; All RFC 1918 addresses are local networks
|
||||
;localnet=10.0.0.0/255.0.0.0 ; Also RFC1918
|
||||
;localnet=172.16.0.0/12 ; Another RFC1918 with CIDR notation
|
||||
;localnet=169.254.0.0/255.255.0.0 ;Zero conf local network
|
||||
; The nat= setting is used when Asterisk is on a public IP, communicating with
|
||||
; devices hidden behind a NAT device (broadband router). If you have one-way
|
||||
; audio problems, you usually have problems with your NAT configuration or your
|
||||
; firewall's support of SIP+RTP ports. You configure Asterisk choice of RTP
|
||||
; ports for incoming audio in rtp.conf
|
||||
;
|
||||
;nat=no ; Global NAT settings (Affects all peers and users)
|
||||
; yes = Always ignore info and assume NAT
|
||||
; no = Use NAT mode only according to RFC3581 (;rport)
|
||||
; never = Never attempt NAT mode or RFC3581 support
|
||||
; route = Assume NAT, don't send rport
|
||||
; (work around more UNIDEN bugs)
|
||||
;----------------------------------- MEDIA HANDLING --------------------------------
|
||||
; By default, Asterisk tries to re-invite the audio to an optimal path. If there's
|
||||
; no reason for Asterisk to stay in the media path, the media will be redirected.
|
||||
; This does not really work with in the case where Asterisk is outside and have
|
||||
; clients on the inside of a NAT. In that case, you want to set canreinvite=nonat
|
||||
;
|
||||
;canreinvite=yes ; Asterisk by default tries to redirect the
|
||||
; RTP media stream (audio) to go directly from
|
||||
; the caller to the callee. Some devices do not
|
||||
; support this (especially if one of them is behind a NAT).
|
||||
; The default setting is YES. If you have all clients
|
||||
; behind a NAT, or for some other reason wants Asterisk to
|
||||
; stay in the audio path, you may want to turn this off.
|
||||
; In Asterisk 1.4 this setting also affect direct RTP
|
||||
; at call setup (a new feature in 1.4 - setting up the
|
||||
; call directly between the endpoints instead of sending
|
||||
; a re-INVITE).
|
||||
;directrtpsetup=yes ; Enable the new experimental direct RTP setup. This sets up
|
||||
; the call directly with media peer-2-peer without re-invites.
|
||||
; Will not work for video and cases where the callee sends
|
||||
; RTP payloads and fmtp headers in the 200 OK that does not match the
|
||||
; callers INVITE. This will also fail if canreinvite is enabled when
|
||||
; the device is actually behind NAT.
|
||||
;canreinvite=nonat ; An additional option is to allow media path redirection
|
||||
; (reinvite) but only when the peer where the media is being
|
||||
; sent is known to not be behind a NAT (as the RTP core can
|
||||
; determine it based on the apparent IP address the media
|
||||
; arrives from).
|
||||
;canreinvite=update ; Yet a third option... use UPDATE for media path redirection,
|
||||
; instead of INVITE. This can be combined with 'nonat', as
|
||||
; 'canreinvite=update,nonat'. It implies 'yes'.
|
||||
;----------------------------------------- REALTIME SUPPORT ------------------------
|
||||
; For additional information on ARA, the Asterisk Realtime Architecture,
|
||||
; please read realtime.txt and extconfig.txt in the /doc directory of the
|
||||
; source code.
|
||||
;
|
||||
;rtcachefriends=yes ; Cache realtime friends by adding them to the internal list
|
||||
; just like friends added from the config file only on a
|
||||
; as-needed basis? (yes|no)
|
||||
;rtsavesysname=yes ; Save systemname in realtime database at registration
|
||||
; Default= no
|
||||
;rtupdate=yes ; Send registry updates to database using realtime? (yes|no)
|
||||
; If set to yes, when a SIP UA registers successfully, the ip address,
|
||||
; the origination port, the registration period, and the username of
|
||||
; the UA will be set to database via realtime.
|
||||
; If not present, defaults to 'yes'.
|
||||
;rtautoclear=yes ; Auto-Expire friends created on the fly on the same schedule
|
||||
; as if it had just registered? (yes|no|<seconds>)
|
||||
; If set to yes, when the registration expires, the friend will
|
||||
; vanish from the configuration until requested again. If set
|
||||
; to an integer, friends expire within this number of seconds
|
||||
; instead of the registration interval.
|
||||
;ignoreregexpire=yes ; Enabling this setting has two functions:
|
||||
;
|
||||
; For non-realtime peers, when their registration expires, the
|
||||
; information will _not_ be removed from memory or the Asterisk database
|
||||
; if you attempt to place a call to the peer, the existing information
|
||||
; will be used in spite of it having expired
|
||||
;
|
||||
; For realtime peers, when the peer is retrieved from realtime storage,
|
||||
; the registration information will be used regardless of whether
|
||||
; it has expired or not; if it expires while the realtime peer
|
||||
; is still in memory (due to caching or other reasons), the
|
||||
; information will not be removed from realtime storage
|
||||
;----------------------------------------- SIP DOMAIN SUPPORT ------------------------
|
||||
; Incoming INVITE and REFER messages can be matched against a list of 'allowed'
|
||||
; domains, each of which can direct the call to a specific context if desired.
|
||||
; By default, all domains are accepted and sent to the default context or the
|
||||
; context associated with the user/peer placing the call.
|
||||
; Domains can be specified using:
|
||||
; domain=<domain>[,<context>]
|
||||
; Examples:
|
||||
; domain=myasterisk.dom
|
||||
; domain=customer.com,customer-context
|
||||
;
|
||||
; In addition, all the 'default' domains associated with a server should be
|
||||
; added if incoming request filtering is desired.
|
||||
; autodomain=yes
|
||||
;
|
||||
; To disallow requests for domains not serviced by this server:
|
||||
; allowexternaldomains=no
|
||||
;domain=mydomain.tld,mydomain-incoming
|
||||
; Add domain and configure incoming context
|
||||
; for external calls to this domain
|
||||
;domain=1.2.3.4 ; Add IP address as local domain
|
||||
; You can have several "domain" settings
|
||||
;allowexternaldomains=no ; Disable INVITE and REFER to non-local domains
|
||||
; Default is yes
|
||||
;autodomain=yes ; Turn this on to have Asterisk add local host
|
||||
; name and local IP to domain list.
|
||||
; fromdomain=mydomain.tld ; When making outbound SIP INVITEs to
|
||||
; non-peers, use your primary domain "identity"
|
||||
; for From: headers instead of just your IP
|
||||
; address. This is to be polite and
|
||||
; it may be a mandatory requirement for some
|
||||
; destinations which do not have a prior
|
||||
; account relationship with your server.
|
||||
;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
|
||||
; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a
|
||||
; SIP channel. Defaults to "no". An enabled jitterbuffer will
|
||||
; be used only if the sending side can create and the receiving
|
||||
; side can not accept jitter. The SIP channel can accept jitter,
|
||||
; thus a jitterbuffer on the receive SIP side will be used only
|
||||
; if it is forced and enabled.
|
||||
; jbforce = no ; Forces the use of a jitterbuffer on the receive side of a SIP
|
||||
; channel. Defaults to "no".
|
||||
; jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds.
|
||||
; jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is
|
||||
; resynchronized. Useful to improve the quality of the voice, with
|
||||
; big jumps in/broken timestamps, usually sent from exotic devices
|
||||
; and programs. Defaults to 1000.
|
||||
; jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a SIP
|
||||
; channel. Two implementations are currently available - "fixed"
|
||||
; (with size always equals to jbmaxsize) and "adaptive" (with
|
||||
; variable size, actually the new jb of IAX2). Defaults to fixed.
|
||||
; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no".
|
||||
;-----------------------------------------------------------------------------------
|
||||
[authentication]
|
||||
|
||||
|
||||
;[2talk]
|
||||
;type=friend
|
||||
;context=default
|
||||
;host=trunk.2talk.co.nz
|
||||
;dtmfmode=rfc2833
|
||||
;insecure=very
|
||||
;nat=never
|
||||
;qualify=no
|
||||
;canreinvite=no
|
||||
;disallow=all
|
||||
;allow=gsm
|
||||
;allow=alaw
|
22
egasterisk/sip_notify.conf
Normal file
22
egasterisk/sip_notify.conf
Normal file
|
@ -0,0 +1,22 @@
|
|||
[polycom-check-cfg]
|
||||
Event=>check-sync
|
||||
Content-Length=>0
|
||||
|
||||
; Untested
|
||||
[sipura-check-cfg]
|
||||
Event=>resync
|
||||
Content-Length=>0
|
||||
|
||||
; Untested
|
||||
[grandstream-check-cfg]
|
||||
Event=>sys-control
|
||||
|
||||
; Untested
|
||||
[cisco-check-cfg]
|
||||
Event=>check-sync
|
||||
Content-Length=>0
|
||||
|
||||
; Tested
|
||||
[snom-check-cfg]
|
||||
Event=>check-sync\;reboot=false
|
||||
Content-Length=>0
|
96
egasterisk/skinny.conf
Normal file
96
egasterisk/skinny.conf
Normal file
|
@ -0,0 +1,96 @@
|
|||
;
|
||||
; Skinny Configuration for Asterisk
|
||||
;
|
||||
[general]
|
||||
bindaddr=0.0.0.0 ; Address to bind to
|
||||
bindport=2000 ; Port to bind to, default tcp/2000
|
||||
dateformat=M-D-Y ; M,D,Y in any order (6 chars max)
|
||||
; "A" may also be used, but it must be at the end.
|
||||
; Use M for month, D for day, Y for year, A for 12-hour time.
|
||||
keepalive=120
|
||||
|
||||
;allow=all ; see doc/rtp-packetization for framing options
|
||||
;disallow=
|
||||
|
||||
;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
|
||||
;jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a
|
||||
; skinny channel. Defaults to "no". An enabled jitterbuffer will
|
||||
; be used only if the sending side can create and the receiving
|
||||
; side can not accept jitter. The skinny channel can accept
|
||||
; jitter, thus a jitterbuffer on the receive skinny side will be
|
||||
; used only if it is forced and enabled.
|
||||
|
||||
;jbforce = no ; Forces the use of a jitterbuffer on the receive side of a skinny
|
||||
; channel. Defaults to "no".
|
||||
|
||||
;jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds.
|
||||
|
||||
;jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is
|
||||
; resynchronized. Useful to improve the quality of the voice, with
|
||||
; big jumps in/broken timestamps, usually sent from exotic devices
|
||||
; and programs. Defaults to 1000.
|
||||
|
||||
;jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a
|
||||
; skinny channel. Two implementations are currently available
|
||||
; - "fixed" (with size always equals to jbmaxsize)
|
||||
; - "adaptive" (with variable size, actually the new jb of IAX2).
|
||||
; Defaults to fixed.
|
||||
|
||||
;jblog = no ; Enables jitterbuffer frame logging. Defaults to "no".
|
||||
;-----------------------------------------------------------------------------------
|
||||
|
||||
;----------------------------------- DEVICE OPTIONS --------------------------------
|
||||
;earlyrtp=1 ; whether audio signalling should be provided by asterisk
|
||||
; (earlyrtp=1) or device generated (earlyrtp=0).
|
||||
; defaults to earlyrtp=1
|
||||
;-----------------------------------------------------------------------------------
|
||||
|
||||
; Typical config for 12SP+
|
||||
;[florian]
|
||||
;device=SEP00D0BA847E6B
|
||||
;version=P002G204 ; Thanks critch
|
||||
;context=did
|
||||
;line => 120 ; Dial(Skinny/120@florian)
|
||||
|
||||
|
||||
; Typical config for a 7910
|
||||
;[duba] ; Device name
|
||||
;device=SEP0007EB463101 ; Official identifier
|
||||
;version=P002F202 ; Firmware version identifier
|
||||
;host=192.168.1.144
|
||||
;permit=192.168.0/24 ; Optional, used for authentication
|
||||
;nat=yes
|
||||
;callerid="George W. Bush" <202-456-1414>
|
||||
;mailbox=500
|
||||
;callwaiting=yes
|
||||
;transfer=yes
|
||||
;threewaycalling=yes
|
||||
;context=default
|
||||
;line => 500 ; Dial(Skinny/500@duba)
|
||||
;mohinterpret=default ; This option specifies a default music on hold class to
|
||||
; use when put on hold if the channel's moh class was not
|
||||
; explicitly set with Set(CHANNEL(musicclass)=whatever) and
|
||||
; the peer channel did not suggest a class to use.
|
||||
;mohsuggest=default ; This option specifies which music on hold class to suggest to the peer channel
|
||||
; when this channel places the peer on hold. It may be specified globally or on
|
||||
; a per-user or per-peer basis.
|
||||
|
||||
; Typical config for a 7940 with dual 7914s
|
||||
;[support]
|
||||
;device=SEP0007EB463121
|
||||
;nat=yes
|
||||
;callerid="Customer Support" <810-234-1212>
|
||||
;mailbox=100
|
||||
;context=inbound
|
||||
;linelabel="Support Line" ; Displays next to the line
|
||||
; button on 7940's and 7960s
|
||||
;line => 100
|
||||
;callerid="John Chambers" <408-526-4000>
|
||||
;context=did
|
||||
;linelabel="John"
|
||||
;mailbox=110
|
||||
;line => 110
|
||||
;speeddial => 111,Jack Smith
|
||||
;speeddial => 112,Bob Peterson
|
||||
;addon => 7914
|
||||
;addon => 7914
|
140
egasterisk/sla.conf
Normal file
140
egasterisk/sla.conf
Normal file
|
@ -0,0 +1,140 @@
|
|||
;
|
||||
; Configuration for Shared Line Appearances (SLA).
|
||||
;
|
||||
; See doc/sla.pdf for more information.
|
||||
;
|
||||
|
||||
; ---- General Options ----------------
|
||||
[general]
|
||||
|
||||
;attemptcallerid=no ; Attempt CallerID handling. The default value for this
|
||||
; is "no" because CallerID handling with an SLA setup is
|
||||
; known to not work properly in some situations. However,
|
||||
; feel free to enable it if you would like. If you do, and
|
||||
; you find problems, please do not report them.
|
||||
; -------------------------------------
|
||||
|
||||
|
||||
; ---- Trunk Declarations -------------
|
||||
;
|
||||
;[line1] ; Provide a name for this trunk.
|
||||
|
||||
;type=trunk ; This line is what marks this entry as a trunk.
|
||||
|
||||
;device=Zap/3 ; Map this trunk declaration to a specific device.
|
||||
; NOTE: You can not just put any type of channel here.
|
||||
; Zap channels can be directly used. IP trunks
|
||||
; require some indirect configuration which is
|
||||
; described in doc/sla.pdf.
|
||||
|
||||
;autocontext=line1 ; This supports automatic generation of the dialplan entries
|
||||
; if the autocontext option is used. Each trunk should have
|
||||
; a unique context name. Then, in zapata.conf, this device
|
||||
; should be configured to have incoming calls go to this context.
|
||||
|
||||
;ringtimeout=30 ; Set how long to allow this trunk to ring on an inbound call before hanging
|
||||
; it up as an unanswered call. The value is in seconds.
|
||||
|
||||
;barge=no ; If this option is set to "no", then no station will be
|
||||
; allowed to join a call that is in progress. The default
|
||||
; value is "yes".
|
||||
|
||||
;hold=private ; This option configure hold permissions for this trunk.
|
||||
; "open" - This means that any station can put this trunk
|
||||
; on hold, and any station can retrieve it from
|
||||
; hold. This is the default.
|
||||
; "private" - This means that once a station puts the
|
||||
; trunk on hold, no other station will be
|
||||
; allowed to retrieve the call from hold.
|
||||
|
||||
;[line2]
|
||||
;type=trunk
|
||||
;device=Zap/4
|
||||
;autocontext=line2
|
||||
|
||||
;[line3]
|
||||
;type=trunk
|
||||
;device=Zap/3
|
||||
;autocontext=line3
|
||||
|
||||
;[line4]
|
||||
;type=trunk
|
||||
;device=Local/disa@line4_outbound ; A Local channel in combination with the Disa
|
||||
; application can be used to support IP trunks.
|
||||
; See doc/sla.pdf on more information on how
|
||||
; IP trunks work.
|
||||
;autocontext=line4
|
||||
; --------------------------------------
|
||||
|
||||
|
||||
; ---- Station Declarations ------------
|
||||
|
||||
;[station1] ; Define a name for this station.
|
||||
|
||||
;type=station ; This line indicates that this entry is a station.
|
||||
|
||||
;device=SIP/station1 ; Each station must be mapped to a device.
|
||||
|
||||
;autocontext=sla_stations ; This supports automatic generation of the dialplan entries if
|
||||
; the autocontext option is used. All stations can use the same
|
||||
; context without conflict. The device for this station should
|
||||
; have its context configured to the same one listed here.
|
||||
|
||||
;ringtimeout=10 ; Set a timeout for how long to allow the station to ring for an
|
||||
; incoming call, in seconds.
|
||||
|
||||
;ringdelay=10 ; Set a time for how long to wait before beginning to ring this station
|
||||
; once there is an incoming call, in seconds.
|
||||
|
||||
;hold=private ; This option configure hold permissions for this station. Note
|
||||
; that if private hold is set in the trunk entry, that will override
|
||||
; anything here. However, if a trunk has open hold access, but this
|
||||
; station is set to private hold, then the private hold will be in
|
||||
; effect.
|
||||
; "open" - This means that once this station puts a call
|
||||
; on hold, any other station is allowed to retrieve
|
||||
; it. This is the default.
|
||||
; "private" - This means that once this station puts a
|
||||
; call on hold, no other station will be
|
||||
; allowed to retrieve the call from hold.
|
||||
|
||||
|
||||
;trunk=line1 ; Individually list all of the trunks that will appear on this station. This
|
||||
; order is significant. It should be the same order as they appear on the
|
||||
; phone. The order here defines the order of preference that the trunks will
|
||||
; be used.
|
||||
;trunk=line2
|
||||
;trunk=line3,ringdelay=5 ; A ring delay for the station can also be specified for a specific trunk.
|
||||
; If a ring delay is specified both for the whole station and for a specific
|
||||
; trunk on a station, the setting for the specific trunk will take priority.
|
||||
; This value is in seconds.
|
||||
|
||||
;trunk=line4,ringtimeout=5 ; A ring timeout for the station can also be specified for a specific trunk.
|
||||
; If a ring timeout is specified both for the whole station and for a specific
|
||||
; trunk on a station, the setting for the specific trunk will take priority.
|
||||
; This value is in seconds.
|
||||
|
||||
|
||||
;[station](!) ; When there are a lot of stations that are configured the same way,
|
||||
; it is convenient to use a configuration template like this so that
|
||||
; the common settings stay in one place.
|
||||
;type=station
|
||||
;autocontext=sla_stations
|
||||
;trunk=line1
|
||||
;trunk=line2
|
||||
;trunk=line3
|
||||
;trunk=line4
|
||||
|
||||
;[station2](station) ; Define a station that uses the configuration from the template "station".
|
||||
;device=SIP/station2
|
||||
;
|
||||
;[station3](station)
|
||||
;device=SIP/station3
|
||||
;
|
||||
;[station4](station)
|
||||
;device=SIP/station4
|
||||
;
|
||||
;[station5](station)
|
||||
;device=SIP/station5
|
||||
; --------------------------------------
|
||||
|
75
egasterisk/smdi.conf
Normal file
75
egasterisk/smdi.conf
Normal file
|
@ -0,0 +1,75 @@
|
|||
; Asterisk SMDI configuration
|
||||
|
||||
[interfaces]
|
||||
; Specify serial ports to listen for SMDI messages on below. These will be
|
||||
; referenced later in zapata.conf. If you do not specify any interfaces then
|
||||
; SMDI will be disabled. Interfaces can have several different attributes
|
||||
; associated with them.
|
||||
|
||||
; Set the number of stop bits to use per character here. The default is no,
|
||||
; in which case one stop bit will be used.
|
||||
|
||||
;twostopbits = no
|
||||
|
||||
; Character size or bit length is the size of each character sent across the
|
||||
; link. Character size can be 7 or 8. The default is 7.
|
||||
|
||||
;charsize = 7
|
||||
|
||||
; If you need parity checking enabled you can turn it on here. Acceptable
|
||||
; values are even, odd, and none. The default is even.
|
||||
|
||||
;paritybit = even
|
||||
|
||||
; The baudrate to use for this port. Acceptable values are 1200, 2400, 4800,
|
||||
; and 9600. The default is 9600.
|
||||
|
||||
;baudrate = 1200
|
||||
|
||||
; Often the numbering scheme for a set of mailboxes or extensions will not be 7
|
||||
; or 10 digits (as SMDI requires). Use the msdstrip option to strip unused
|
||||
; digits from the start of numbers.
|
||||
|
||||
;msdstrip = 0
|
||||
|
||||
; Occasionally Asterisk and the SMDI switch may become out of sync. If this
|
||||
; happens, Asterisk will appear one or several calls behind as it processes
|
||||
; voicemail requests. To prevent this from happening, adjust the msgexpirytime.
|
||||
; This will make Asterisk discard old SMDI messages that have not yet been
|
||||
; processed. The default expiry time is 30000 milliseconds.
|
||||
|
||||
;msgexpirytime = 30000
|
||||
|
||||
;smdiport => /dev/ttyS0
|
||||
|
||||
|
||||
[mailboxes]
|
||||
; This section configures parameters related to MWI handling for the SMDI link.
|
||||
|
||||
; This option configures the polling interval used to check to see if the
|
||||
; mailboxes have any new messages. This option is specified in seconds.
|
||||
; The default value is 10 seconds.
|
||||
;
|
||||
;pollinginterval=10
|
||||
|
||||
; Every other entry in this section of the configuration file is interpreted as
|
||||
; a mapping between the mailbox ID on the SMDI link, and the local Asterisk
|
||||
; mailbox name. In many cases, they are the same thing, but they still must be
|
||||
; listed here so that this module knows which mailboxes it needs to pay
|
||||
; attention to.
|
||||
;
|
||||
; Syntax:
|
||||
; <SMDI mailbox ID>=<Asterisk Mailbox Name>[@Asterisk Voicemail Context]
|
||||
;
|
||||
; If no Asterisk voicemail context is specified, "default" will be assumed.
|
||||
;
|
||||
; Before specifying mailboxes, you must specify an SMDI interface. All mailbox
|
||||
; definitions that follow will correspond to that SMDI interface. If you specify
|
||||
; another interface, then all definitions following that will correspond to the
|
||||
; new interface.
|
||||
;
|
||||
;smdiport=/dev/ttyS0
|
||||
;2565551234=1234@vmcontext1
|
||||
;2565555678=5678@vmcontext2
|
||||
;smdiport=/dev/ttyS1
|
||||
;2565559999=9999
|
83
egasterisk/telcordia-1.adsi
Normal file
83
egasterisk/telcordia-1.adsi
Normal file
|
@ -0,0 +1,83 @@
|
|||
;
|
||||
; Asterisk default ADSI script
|
||||
;
|
||||
;
|
||||
; Begin with the preamble requirements
|
||||
;
|
||||
DESCRIPTION "Telcordia Demo" ; Name of vendor
|
||||
VERSION 0x02 ; Version of stuff
|
||||
;SECURITY "_AST" ; Security code
|
||||
SECURITY 0x0000 ; Security code
|
||||
FDN 0x0000000f ; Descriptor number
|
||||
|
||||
;
|
||||
; Predefined strings
|
||||
;
|
||||
DISPLAY "talkingto" IS "Talking To" "$Call1p" WRAP
|
||||
DISPLAY "titles" IS "20th Century IQ Svc"
|
||||
DISPLAY "newcall" IS "New Call From" "$Call1p" WRAP
|
||||
DISPLAY "ringing" IS "Ringing"
|
||||
|
||||
;
|
||||
; Begin state definitions
|
||||
;
|
||||
STATE "callup" ; Call is currently up
|
||||
STATE "inactive" ; No active call
|
||||
|
||||
;
|
||||
; Begin soft key definitions
|
||||
;
|
||||
KEY "CB_OH" IS "Block" OR "Call Block"
|
||||
OFFHOOK
|
||||
VOICEMODE
|
||||
WAITDIALTONE
|
||||
SENDDTMF "*60"
|
||||
SUBSCRIPT "offHook"
|
||||
ENDKEY
|
||||
|
||||
KEY "CB" IS "Block" OR "Call Block"
|
||||
SENDDTMF "*60"
|
||||
ENDKEY
|
||||
|
||||
;
|
||||
; Begin main subroutine
|
||||
;
|
||||
|
||||
SUB "main" IS
|
||||
IFEVENT NEARANSWER THEN
|
||||
CLEAR
|
||||
SHOWDISPLAY "talkingto" AT 1
|
||||
GOTO "stableCall"
|
||||
ENDIF
|
||||
IFEVENT OFFHOOK THEN
|
||||
CLEAR
|
||||
SHOWDISPLAY "titles" AT 1
|
||||
SHOWKEYS "CB"
|
||||
GOTO "offHook"
|
||||
ENDIF
|
||||
IFEVENT IDLE THEN
|
||||
CLEAR
|
||||
SHOWDISPLAY "titles" AT 1
|
||||
SHOWKEYS "CB_OH"
|
||||
ENDIF
|
||||
IFEVENT CALLERID THEN
|
||||
CLEAR
|
||||
SHOWDISPLAY "newcall" AT 1
|
||||
ENDIF
|
||||
ENDSUB
|
||||
|
||||
SUB "offHook" IS
|
||||
IFEVENT FARRING THEN
|
||||
CLEAR
|
||||
SHOWDISPLAY "ringing" AT 1
|
||||
ENDIF
|
||||
IFEVENT FARANSWER THEN
|
||||
CLEAR
|
||||
SHOWDISPLAY "talkingto" AT 1
|
||||
GOTO "stableCall"
|
||||
ENDIF
|
||||
ENDSUB
|
||||
|
||||
SUB "stableCall" IS
|
||||
|
||||
ENDSUB
|
30
egasterisk/udptl.conf
Normal file
30
egasterisk/udptl.conf
Normal file
|
@ -0,0 +1,30 @@
|
|||
;
|
||||
; UDPTL Configuration (UDPTL is one of the transports for T.38)
|
||||
;
|
||||
[general]
|
||||
;
|
||||
; UDPTL start and UDPTL end configure start and end addresses
|
||||
;
|
||||
udptlstart=4000
|
||||
udptlend=4999
|
||||
;
|
||||
; Whether to enable or disable UDP checksums on UDPTL traffic
|
||||
;
|
||||
;udptlchecksums=no
|
||||
;
|
||||
; The error correction type to be sent
|
||||
;
|
||||
T38FaxUdpEC = t38UDPFEC
|
||||
;T38FaxUdpEC = t38UDPRedundancy
|
||||
;
|
||||
; The maximum length of a UDPTL packet
|
||||
;
|
||||
T38FaxMaxDatagram = 400
|
||||
;
|
||||
; The number of error correction entries in a UDPTL packet
|
||||
;
|
||||
udptlfecentries = 3
|
||||
;
|
||||
; The span over which parity is calculated for FEC in a UDPTL packet
|
||||
;
|
||||
udptlfecspan = 3
|
354
egasterisk/users.conf
Normal file
354
egasterisk/users.conf
Normal file
|
@ -0,0 +1,354 @@
|
|||
;!
|
||||
;! Automatically generated configuration file
|
||||
;! Filename: users.conf (/etc/asterisk/users.conf)
|
||||
;! Generator: Manager
|
||||
;! Creation Date: Thu Jul 31 23:07:02 2008
|
||||
;!
|
||||
[general]
|
||||
;
|
||||
; Full name of a user
|
||||
;
|
||||
fullname = New User
|
||||
userbase = 800
|
||||
;
|
||||
; Create voicemail mailbox and use use macro-stdexten
|
||||
;
|
||||
hasvoicemail = yes
|
||||
;
|
||||
; Create SIP Peer
|
||||
;
|
||||
hassip = yes
|
||||
;
|
||||
; Create IAX friend
|
||||
;
|
||||
hasiax = yes
|
||||
;
|
||||
; Create H.323 friend
|
||||
;
|
||||
;hash323 = yes
|
||||
;
|
||||
; Create manager entry
|
||||
;
|
||||
hasmanager = no
|
||||
;
|
||||
; Set permissions for manager entry (see manager.conf.sample for documentation)
|
||||
; (defaults to *all* permissions)
|
||||
;managerread = system,call,log,verbose,command,agent,user,config
|
||||
;managerwrite = system,call,log,verbose,command,agent,user,config
|
||||
;
|
||||
; Remaining options are not specific to users.conf entries but are general.
|
||||
;
|
||||
callwaiting = yes
|
||||
threewaycalling = yes
|
||||
callwaitingcallerid = yes
|
||||
transfer = yes
|
||||
canpark = yes
|
||||
cancallforward = yes
|
||||
callreturn = yes
|
||||
callgroup = 1
|
||||
pickupgroup = 1
|
||||
localextenlength = 3
|
||||
allow_aliasextns = no
|
||||
allow_an_extns = no
|
||||
hasagent = no
|
||||
hasdirectory = yes
|
||||
operatorExtension = 802
|
||||
|
||||
[802]
|
||||
callwaiting = no
|
||||
cid_number = 802
|
||||
email = rob@egressive.com
|
||||
fullname = Rob Fraser
|
||||
hasagent = no
|
||||
hasdirectory = yes
|
||||
hasiax = yes
|
||||
hasmanager = no
|
||||
hassip = yes
|
||||
hasvoicemail = yes
|
||||
deletevoicemail = no
|
||||
host = dynamic
|
||||
mailbox = 802
|
||||
secret = 880022
|
||||
threewaycalling = yes
|
||||
vmsecret = 880022
|
||||
registeriax = yes
|
||||
registersip = yes
|
||||
autoprov = no
|
||||
canreinvite = no
|
||||
nat = no
|
||||
dtmfmode = rfc2833
|
||||
disallow = all
|
||||
allow = all
|
||||
signalling = fxo_ks
|
||||
context = numberplan-custom-1
|
||||
|
||||
[801]
|
||||
callwaiting = yes
|
||||
context = numberplan-custom-1
|
||||
email = dave@egressive.com
|
||||
fullname = Dave Lane
|
||||
hasagent = no
|
||||
hasdirectory = yes
|
||||
hasiax = yes
|
||||
hasmanager = no
|
||||
hassip = yes
|
||||
hasvoicemail = yes
|
||||
deletevoicemail = no
|
||||
host = dynamic
|
||||
mailbox = 801
|
||||
secret = 880011
|
||||
threewaycalling = yes
|
||||
vmsecret = 880011
|
||||
registeriax = yes
|
||||
registersip = yes
|
||||
autoprov = no
|
||||
canreinvite = no
|
||||
nat = no
|
||||
dtmfmode = rfc2833
|
||||
disallow = all
|
||||
allow = all
|
||||
signalling = fxo_ks
|
||||
|
||||
[890]
|
||||
callwaiting = no
|
||||
context = numberplan-custom-1
|
||||
email = support@egressive.com
|
||||
fullname = Office Voicemail
|
||||
hasagent = no
|
||||
hasdirectory = yes
|
||||
hasiax = no
|
||||
hasmanager = no
|
||||
hassip = no
|
||||
hasvoicemail = yes
|
||||
deletevoicemail = yes
|
||||
host = dynamic
|
||||
mailbox = 890
|
||||
secret = 890
|
||||
threewaycalling = no
|
||||
vmsecret = 890
|
||||
registeriax = no
|
||||
registersip = no
|
||||
autoprov = no
|
||||
canreinvite = no
|
||||
nat = no
|
||||
dtmfmode = rfc2833
|
||||
disallow = all
|
||||
allow = all
|
||||
signalling = fxo_ks
|
||||
|
||||
[803]
|
||||
callwaiting = yes
|
||||
context = numberplan-custom-1
|
||||
email = jonathan@egressive.com
|
||||
fullname = Jonathan Hunt
|
||||
hasagent = no
|
||||
hasdirectory = yes
|
||||
hasiax = yes
|
||||
hasmanager = no
|
||||
hassip = yes
|
||||
hasvoicemail = yes
|
||||
deletevoicemail = no
|
||||
host = dynamic
|
||||
mailbox = 803
|
||||
secret = 880033
|
||||
threewaycalling = yes
|
||||
vmsecret = 880033
|
||||
registeriax = yes
|
||||
registersip = yes
|
||||
autoprov = no
|
||||
canreinvite = no
|
||||
nat = no
|
||||
dtmfmode = rfc2833
|
||||
disallow = all
|
||||
allow = all
|
||||
signalling = fxo_ks
|
||||
|
||||
[804]
|
||||
callwaiting = yes
|
||||
context = numberplan-custom-1
|
||||
email = andrew@egressive.com
|
||||
fullname = Andrew Turner
|
||||
hasagent = no
|
||||
hasdirectory = yes
|
||||
hasiax = yes
|
||||
hasmanager = no
|
||||
hassip = yes
|
||||
hasvoicemail = yes
|
||||
deletevoicemail = no
|
||||
host = dynamic
|
||||
mailbox = 804
|
||||
secret = 880044
|
||||
threewaycalling = yes
|
||||
vmsecret = 880044
|
||||
registeriax = yes
|
||||
registersip = yes
|
||||
autoprov = no
|
||||
canreinvite = no
|
||||
nat = no
|
||||
dtmfmode = rfc2833
|
||||
disallow = all
|
||||
allow = all
|
||||
signalling = fxo_ks
|
||||
|
||||
[805]
|
||||
callwaiting = yes
|
||||
context = numberplan-custom-1
|
||||
email = ross@egressive.com
|
||||
fullname = Ross Campbell
|
||||
hasagent = no
|
||||
hasdirectory = yes
|
||||
hasiax = yes
|
||||
hasmanager = no
|
||||
hassip = yes
|
||||
hasvoicemail = yes
|
||||
deletevoicemail = yes
|
||||
host = dynamic
|
||||
mailbox = 805
|
||||
secret = 880055
|
||||
threewaycalling = yes
|
||||
vmsecret = 880055
|
||||
registeriax = yes
|
||||
registersip = yes
|
||||
autoprov = no
|
||||
canreinvite = no
|
||||
nat = no
|
||||
dtmfmode = rfc2833
|
||||
disallow = all
|
||||
allow = all
|
||||
signalling = fxo_ks
|
||||
|
||||
[852]
|
||||
callwaiting = yes
|
||||
context = numberplan-custom-1
|
||||
email = rob@egressive.com
|
||||
fullname = Rob Fraser Home
|
||||
hasagent = no
|
||||
hasdirectory = yes
|
||||
hasiax = yes
|
||||
hasmanager = no
|
||||
hassip = yes
|
||||
hasvoicemail = yes
|
||||
deletevoicemail = yes
|
||||
host = dynamic
|
||||
mailbox = 852
|
||||
secret = 885522
|
||||
threewaycalling = yes
|
||||
vmsecret = 885522
|
||||
registeriax = yes
|
||||
registersip = yes
|
||||
autoprov = no
|
||||
canreinvite = no
|
||||
nat = no
|
||||
dtmfmode = rfc2833
|
||||
disallow = all
|
||||
allow = all
|
||||
signalling = fxo_ks
|
||||
|
||||
[851]
|
||||
callwaiting = yes
|
||||
context = numberplan-custom-1
|
||||
email = dave@egressive.com
|
||||
fullname = Dave Lane Home
|
||||
hasagent = no
|
||||
hasdirectory = yes
|
||||
hasiax = yes
|
||||
hasmanager = no
|
||||
hassip = yes
|
||||
hasvoicemail = yes
|
||||
deletevoicemail = yes
|
||||
host = dynamic
|
||||
mailbox = 851
|
||||
secret = 885511
|
||||
threewaycalling = yes
|
||||
vmsecret = 885511
|
||||
registeriax = yes
|
||||
registersip = yes
|
||||
autoprov = no
|
||||
canreinvite = no
|
||||
nat = no
|
||||
dtmfmode = rfc2833
|
||||
disallow = all
|
||||
signalling = fxo_ks
|
||||
|
||||
[853]
|
||||
callwaiting = yes
|
||||
context = numberplan-custom-1
|
||||
email = jonathan@egressive.com
|
||||
fullname = Jonathan Hunt Home
|
||||
hasagent = no
|
||||
hasdirectory = yes
|
||||
hasiax = yes
|
||||
hasmanager = no
|
||||
hassip = yes
|
||||
hasvoicemail = yes
|
||||
deletevoicemail = yes
|
||||
host = dynamic
|
||||
mailbox = 853
|
||||
secret = 885533
|
||||
threewaycalling = yes
|
||||
vmsecret = 885533
|
||||
registeriax = yes
|
||||
registersip = yes
|
||||
autoprov = no
|
||||
canreinvite = no
|
||||
nat = no
|
||||
dtmfmode = rfc2833
|
||||
disallow = all
|
||||
allow = all
|
||||
signalling = fxo_ks
|
||||
|
||||
[810]
|
||||
callwaiting = yes
|
||||
context = numberplan-custom-1
|
||||
fullname = Egressive
|
||||
hasagent = no
|
||||
hasdirectory = yes
|
||||
hasiax = yes
|
||||
hasmanager = no
|
||||
hassip = yes
|
||||
hasvoicemail = no
|
||||
deletevoicemail = no
|
||||
host = dynamic
|
||||
mailbox = 810
|
||||
secret = 881100
|
||||
threewaycalling = yes
|
||||
registeriax = yes
|
||||
registersip = yes
|
||||
autoprov = no
|
||||
canreinvite = no
|
||||
nat = no
|
||||
dtmfmode = rfc2833
|
||||
disallow = all
|
||||
allow = all
|
||||
signalling = fxo_ks
|
||||
zapchan = 1
|
||||
|
||||
[trunk_1]
|
||||
signalling = fxs_ks
|
||||
callerid = asreceived
|
||||
context = DID_trunk_1
|
||||
canreinvite = no
|
||||
group = 2
|
||||
hasexten = no
|
||||
hasiax = no
|
||||
hassip = no
|
||||
trunkname = Ports 2,3
|
||||
trunkstyle = analog
|
||||
zapchan = 2,3
|
||||
|
||||
|
||||
[trunk_2]
|
||||
allow = all
|
||||
context = DID_trunk_2
|
||||
dialformat = ${EXTEN:1}
|
||||
canreinvite = no
|
||||
hasexten = no
|
||||
hasiax = no
|
||||
hassip = yes
|
||||
host = trunk.2talk.co.nz
|
||||
port = 5060
|
||||
registeriax = no
|
||||
registersip = no
|
||||
trunkname = Custom - 2talk
|
||||
trunkstyle = customvoip
|
||||
insecure = very
|
245
egasterisk/voicemail.conf
Normal file
245
egasterisk/voicemail.conf
Normal file
|
@ -0,0 +1,245 @@
|
|||
;!
|
||||
;! Automatically generated configuration file
|
||||
;! Filename: voicemail.conf (/etc/asterisk/voicemail.conf)
|
||||
;! Generator: Manager
|
||||
;! Creation Date: Wed Jul 23 22:42:57 2008
|
||||
;!
|
||||
[general]
|
||||
; Formats for writing Voicemail. Note that when using IMAP storage for
|
||||
; voicemail, only the first format specified will be used.
|
||||
;format=g723sf|wav49|wav
|
||||
;format = wav49|gsm|wav
|
||||
format = wav49
|
||||
;
|
||||
; WARNING:
|
||||
; If you change the list of formats that you record voicemail in
|
||||
; when you have mailboxes that contain messages, you _MUST_ absolutely
|
||||
; manually go through those mailboxes and convert/delete/add the
|
||||
; the message files so that they appear to have been stored using
|
||||
; your new format list. If you don't do this, very unpleasant
|
||||
; things may happen to your users while they are retrieving and
|
||||
; manipulating their voicemail.
|
||||
;
|
||||
; In other words: don't change the format list on a production system
|
||||
; unless you are _VERY_ sure that you know what you are doing and are
|
||||
; prepared for the consequences.
|
||||
;
|
||||
; Who the e-mail notification should appear to come from
|
||||
serveremail = asterisk@egressive.com
|
||||
;serveremail=asterisk@linux-support.net
|
||||
; Should the email contain the voicemail as an attachment
|
||||
attach = yes
|
||||
; Maximum number of messages per folder. If not specified, a default value
|
||||
; (100) is used. Maximum value for this option is 9999.
|
||||
;maxmsg=100
|
||||
; Maximum length of a voicemail message in seconds
|
||||
;maxmessage=180
|
||||
; Minimum length of a voicemail message in seconds for the message to be kept
|
||||
; The default is no minimum.
|
||||
;minmessage=3
|
||||
; Maximum length of greetings in seconds
|
||||
;maxgreet=60
|
||||
; How many milliseconds to skip forward/back when rew/ff in message playback
|
||||
skipms = 3000
|
||||
; How many seconds of silence before we end the recording
|
||||
maxsilence = 10
|
||||
; Silence threshold (what we consider silence: the lower, the more sensitive)
|
||||
silencethreshold = 128
|
||||
; Max number of failed login attempts
|
||||
maxlogins = 3
|
||||
;
|
||||
; User context is where entries from users.conf are registered. The
|
||||
; default value is 'default'
|
||||
;
|
||||
;userscontext=default
|
||||
;
|
||||
; If you need to have an external program, i.e. /usr/bin/myapp
|
||||
; called when a voicemail is left, delivered, or your voicemailbox
|
||||
; is checked, uncomment this. It can also be set to 'smdi' to use
|
||||
; smdi for external notification. If it is 'smdi', smdiport should
|
||||
; be set to a valid port as specified in smdi.conf.
|
||||
;externnotify=/usr/bin/myapp
|
||||
;smdiport=/dev/ttyS0
|
||||
; If you need to have an external program, i.e. /usr/bin/myapp
|
||||
; called when a voicemail password is changed, uncomment this:
|
||||
;externpass=/usr/bin/myapp
|
||||
; For the directory, you can override the intro file if you want
|
||||
;directoryintro=dir-intro
|
||||
; The character set for voicemail messages can be specified here
|
||||
;charset=ISO-8859-1
|
||||
; The ADSI feature descriptor number to download to
|
||||
;adsifdn=0000000F
|
||||
; The ADSI security lock code
|
||||
;adsisec=9BDBF7AC
|
||||
; The ADSI voicemail application version number.
|
||||
;adsiver=1
|
||||
; Skip the "[PBX]:" string from the message title
|
||||
;pbxskip=yes
|
||||
; Change the From: string
|
||||
;fromstring=The Asterisk PBX
|
||||
; Permit finding entries for forward/compose from the directory
|
||||
;usedirectory=yes
|
||||
; Voicemail can be stored in a database using the ODBC driver.
|
||||
; The value of odbcstorage is the database connection configured
|
||||
; in res_odbc.conf.
|
||||
;odbcstorage=asterisk
|
||||
; The default table for ODBC voicemail storage is voicemessages.
|
||||
;odbctable=voicemessages
|
||||
;
|
||||
; Change the from, body and/or subject, variables:
|
||||
; VM_NAME, VM_DUR, VM_MSGNUM, VM_MAILBOX, VM_CALLERID, VM_CIDNUM,
|
||||
; VM_CIDNAME, VM_DATE
|
||||
;
|
||||
; Note: The emailbody config row can only be up to 512 characters due to a
|
||||
; limitation in the Asterisk configuration subsystem.
|
||||
;emailsubject=[PBX]: New message ${VM_MSGNUM} in mailbox ${VM_MAILBOX}
|
||||
; The following definition is very close to the default, but the default shows
|
||||
; just the CIDNAME, if it is not null, otherwise just the CIDNUM, or "an unknown
|
||||
; caller", if they are both null.
|
||||
;emailbody=Dear ${VM_NAME}:\n\n\tjust wanted to let you know you were just left a ${VM_DUR} long message (number ${VM_MSGNUM})\nin mailbox ${VM_MAILBOX} from ${VM_CALLERID}, on ${VM_DATE}, so you might\nwant to check it when you get a chance. Thanks!\n\n\t\t\t\t--Asterisk\n
|
||||
;
|
||||
; You can also change the Pager From: string, the pager body and/or subject.
|
||||
; The above defined variables also can be used here
|
||||
;pagerfromstring=The Asterisk PBX
|
||||
;pagersubject=New VM
|
||||
;pagerbody=New ${VM_DUR} long msg in box ${VM_MAILBOX}\nfrom ${VM_CALLERID}, on ${VM_DATE}
|
||||
;
|
||||
; Set the date format on outgoing mails. Valid arguments can be found on the
|
||||
; strftime(3) man page
|
||||
;
|
||||
; Default
|
||||
emaildateformat = %A, %B %d, %Y at %r
|
||||
; 24h date format
|
||||
;emaildateformat=%A, %d %B %Y at %H:%M:%S
|
||||
;
|
||||
; You can override the default program to send e-mail if you wish, too
|
||||
;
|
||||
;mailcmd=/usr/sbin/sendmail -t
|
||||
;
|
||||
; Users may be located in different timezones, or may have different
|
||||
; message announcements for their introductory message when they enter
|
||||
; the voicemail system. Set the message and the timezone each user
|
||||
; hears here. Set the user into one of these zones with the tz= attribute
|
||||
; in the options field of the mailbox. Of course, language substitution
|
||||
; still applies here so you may have several directory trees that have
|
||||
; alternate language choices.
|
||||
;
|
||||
; Look in /usr/share/zoneinfo/ for names of timezones.
|
||||
; Look at the manual page for strftime for a quick tutorial on how the
|
||||
; variable substitution is done on the values below.
|
||||
;
|
||||
; Supported values:
|
||||
; 'filename' filename of a soundfile (single ticks around the filename
|
||||
; required)
|
||||
; ${VAR} variable substitution
|
||||
; A or a Day of week (Saturday, Sunday, ...)
|
||||
; B or b or h Month name (January, February, ...)
|
||||
; d or e numeric day of month (first, second, ..., thirty-first)
|
||||
; Y Year
|
||||
; I or l Hour, 12 hour clock
|
||||
; H Hour, 24 hour clock (single digit hours preceded by "oh")
|
||||
; k Hour, 24 hour clock (single digit hours NOT preceded by "oh")
|
||||
; M Minute, with 00 pronounced as "o'clock"
|
||||
; N Minute, with 00 pronounced as "hundred" (US military time)
|
||||
; P or p AM or PM
|
||||
; Q "today", "yesterday" or ABdY
|
||||
; (*note: not standard strftime value)
|
||||
; q "" (for today), "yesterday", weekday, or ABdY
|
||||
; (*note: not standard strftime value)
|
||||
; R 24 hour time, including minute
|
||||
;
|
||||
;
|
||||
;
|
||||
; Each mailbox is listed in the form <mailbox>=<password>,<name>,<email>,<pager_email>,<options>
|
||||
; if the e-mail is specified, a message will be sent when a message is
|
||||
; received, to the given mailbox. If pager is specified, a message will be
|
||||
; sent there as well. If the password is prefixed by '-', then it is
|
||||
; considered to be unchangeable.
|
||||
;
|
||||
; Advanced options example is extension 4069
|
||||
; NOTE: All options can be expressed globally in the general section, and
|
||||
; overridden in the per-mailbox settings, unless listed otherwise.
|
||||
;
|
||||
; tz=central ; Timezone from zonemessages below. Irrelevant if envelope=no.
|
||||
; attach=yes ; Attach the voicemail to the notification email *NOT* the pager email
|
||||
; attachfmt=wav49 ; Which format to attach to the email. Normally this is the
|
||||
; first format specified in the format parameter above, but this
|
||||
; option lets you customize the format sent to particular mailboxes.
|
||||
; Useful if Windows users want wav49, but Linux users want gsm.
|
||||
; [per-mailbox only]
|
||||
; saycid=yes ; Say the caller id information before the message. If not described,
|
||||
; or set to no, it will be in the envelope
|
||||
; cidinternalcontexts=intern ; Internal Context for Name Playback instead of
|
||||
; extension digits when saying caller id.
|
||||
; sayduration=no ; Turn on/off the duration information before the message. [ON by default]
|
||||
; saydurationm=2 ; Specify the minimum duration to say. Default is 2 minutes
|
||||
; dialout=fromvm ; Context to dial out from [option 4 from mailbox's advanced menu].
|
||||
; If not specified, option 4 will not be listed and dialing out
|
||||
; from within VoiceMailMain() will not be permitted.
|
||||
sendvoicemail = yes ; Allow the user to compose and send a voicemail while inside
|
||||
deletevoicemail = no
|
||||
envelope = no
|
||||
operator = no
|
||||
review = no
|
||||
saycid = no
|
||||
sayduration = no
|
||||
mailcmd = /usr/sbin/sendmail -t
|
||||
attachfmt = wav
|
||||
; VoiceMailMain() [option 5 from mailbox's advanced menu].
|
||||
; If set to 'no', option 5 will not be listed.
|
||||
; searchcontexts=yes ; Current default behavior is to search only the default context
|
||||
; if one is not specified. The older behavior was to search all contexts.
|
||||
; This option restores the old behavior [DEFAULT=no]
|
||||
; callback=fromvm ; Context to call back from
|
||||
; if not listed, calling the sender back will not be permitted
|
||||
; exitcontext=fromvm ; Context to go to on user exit such as * or 0
|
||||
; The default is the current context.
|
||||
; review=yes ; Allow sender to review/rerecord their message before saving it [OFF by default
|
||||
; operator=yes ; Allow sender to hit 0 before/after/during leaving a voicemail to
|
||||
; reach an operator [OFF by default]
|
||||
; envelope=no ; Turn on/off envelope playback before message playback. [ON by default]
|
||||
; This does NOT affect option 3,3 from the advanced options menu
|
||||
; delete=yes ; After notification, the voicemail is deleted from the server. [per-mailbox only]
|
||||
; This is intended for use with users who wish to receive their
|
||||
; voicemail ONLY by email. Note: "deletevoicemail" is provided as an
|
||||
; equivalent option for Realtime configuration.
|
||||
; volgain=0.0 ; Emails bearing the voicemail may arrive in a volume too
|
||||
; quiet to be heard. This parameter allows you to specify how
|
||||
; much gain to add to the message when sending a voicemail.
|
||||
; NOTE: sox must be installed for this option to work.
|
||||
; nextaftercmd=yes ; Skips to the next message after hitting 7 or 9 to delete/save current message.
|
||||
; [global option only at this time]
|
||||
; forcename=yes ; Forces a new user to record their name. A new user is
|
||||
; determined by the password being the same as
|
||||
; the mailbox number. The default is "no".
|
||||
; forcegreetings=no ; This is the same as forcename, except for recording
|
||||
; greetings. The default is "no".
|
||||
; hidefromdir=yes ; Hide this mailbox from the directory produced by app_directory
|
||||
; The default is "no".
|
||||
;tempgreetwarn=yes ; Remind the user that their temporary greeting is set
|
||||
[zonemessages]
|
||||
eastern = America/New_York|'vm-received' Q 'digits/at' IMp
|
||||
central = America/Chicago|'vm-received' Q 'digits/at' IMp
|
||||
central24 = America/Chicago|'vm-received' q 'digits/at' H N 'hours'
|
||||
military = Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p'
|
||||
european = Europe/Copenhagen|'vm-received' a d b 'digits/at' HM
|
||||
|
||||
[default]
|
||||
; Define maximum number of messages per folder for a particular context.
|
||||
;maxmsg=50
|
||||
1234 => 4242,Example Mailbox,root@localhost
|
||||
;4200 => 9855,Mark Spencer,markster@linux-support.net,mypager@digium.com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10
|
||||
;4300 => 3456,Ben Rigas,ben@american-computer.net
|
||||
;4310 => -5432,Sales,sales@marko.net
|
||||
;4069 => 6522,Matt Brooks,matt@marko.net,,|tz=central|attach=yes|saycid=yes|dialout=fromvm|callback=fromvm|review=yes|operator=yes|envelope=yes|sayduration=yes|saydurationm=1
|
||||
;4073 => 1099,Bianca Paige,bianca@biancapaige.com,,delete=1
|
||||
;4110 => 3443,Rob Flynn,rflynn@blueridge.net
|
||||
;4235 => 1234,Jim Holmes,jim@astricon.ips,,Tz=european
|
||||
;
|
||||
; Mailboxes may be organized into multiple contexts for
|
||||
; voicemail virtualhosting
|
||||
;
|
||||
[other]
|
||||
;The intro can be customized on a per-context basis
|
||||
;directoryintro=dir-company2
|
||||
1234 => 5678,Company2 User,root@localhost
|
108
egasterisk/vpb.conf
Normal file
108
egasterisk/vpb.conf
Normal file
|
@ -0,0 +1,108 @@
|
|||
;
|
||||
; V6PCI/V12PCI config file for VoiceTronix Hardware
|
||||
;
|
||||
; Options for [general] section
|
||||
;
|
||||
; type = v12pci|v6pci|v4pci
|
||||
; cards = number of cards
|
||||
; To use Asterisk indication tones
|
||||
; indication = 1
|
||||
; none,-24db,-18db only for use with OpenLine4
|
||||
; ecsuppthres = 0|2048|4096
|
||||
; Inter Digit Delay timeout for when collecting DTMF tones for dialling
|
||||
; from a Station port, in ms
|
||||
; dtmfidd = 3000
|
||||
; To use Asterisk DTMF detection
|
||||
; ast-dtmf-det=1
|
||||
; Used with ast-dtmf-det
|
||||
; relaxdtmf=1
|
||||
; When a native bridge occurs between 2 vpb channels, it will only break
|
||||
; the connection for '#' and '*'
|
||||
; break-for-dtmf=no
|
||||
; Set the maximum period between received rings, default 4000ms
|
||||
; timer_period_ring=4000
|
||||
;
|
||||
; Options for [interface] section
|
||||
; board = board_number (1, 2, 3, ...)
|
||||
; channel = channel_number (1,2,3...)
|
||||
; mode = fxo|immediate|dialtone -- for type of line and line handling
|
||||
; context = starting context
|
||||
; echocancel = on|off (on by default of v4pci, off by default for others)
|
||||
; callerid = on|off|v23|bell (on => to collect caller ID if available between 1st/2nd rings using vpb functions)
|
||||
; (v23|bell => collect caller ID using asterisk functions)
|
||||
; Or for use with FXS channels a '"name" <location>' format can be used to set the channels CID
|
||||
;
|
||||
; UseLoopDrop = 0|1 (enables the use of Loop Drop detection, on by default in
|
||||
; some cases spurious loop-drops can cause unexpected
|
||||
; hangup detection)
|
||||
;
|
||||
; Gain settings
|
||||
; txgain => Transmit Software Gain (-12 => 12)
|
||||
; rxgain => Receive Software Gain (-12 => 12)
|
||||
; txhwgain => Transmit hardware gain (-12 => 12)
|
||||
; rxhwgain => Receive Hardware gain (-12 => 12)
|
||||
;
|
||||
; These are advanced settings and only mentioned for completeness.
|
||||
; bal1 => Hybrid balance codec register 1
|
||||
; bal2 => Hybrid balance codec register 2
|
||||
; bal3 => Hybrid balance codec register 3
|
||||
;
|
||||
; Dial translations - if you want a pause or hook-flash in your dial string
|
||||
; you can use "w" for pause (wait) or "f" for "hook-flash", eg:
|
||||
; exten => _9XXX,1,Dial(vpb/g1/ww${EXTEN:${TRUNKMSD}})
|
||||
;
|
||||
;
|
||||
|
||||
[general]
|
||||
type = v12pci
|
||||
;type = v6pci
|
||||
;type = v4pci
|
||||
cards = 1
|
||||
|
||||
[interfaces]
|
||||
|
||||
board = 0
|
||||
echocancel = on
|
||||
|
||||
|
||||
; For OpenLine4 cards
|
||||
;context = demo
|
||||
;mode = fxo
|
||||
;channel = 0
|
||||
;channel = 1
|
||||
;channel = 2
|
||||
;channel = 3
|
||||
|
||||
; For OpenSwith12 with jumpers at factory default
|
||||
context = demo
|
||||
mode = fxo
|
||||
channel = 8
|
||||
channel = 9
|
||||
channel = 10
|
||||
channel = 11
|
||||
|
||||
context = local
|
||||
mode = dialtone
|
||||
channel = 0
|
||||
channel = 1
|
||||
channel = 2
|
||||
channel = 3
|
||||
channel = 4
|
||||
channel = 5
|
||||
channel = 6
|
||||
channel = 7
|
||||
;
|
||||
; For OpenSwitch6
|
||||
; Note that V6PCI channel numbers start at 7!
|
||||
;context = demo
|
||||
;mode = fxo
|
||||
;channel = 6
|
||||
;channel = 7
|
||||
|
||||
;mode = dialtone
|
||||
;channel = 8
|
||||
;channel = 9
|
||||
;channel = 10
|
||||
;channel = 11
|
||||
|
||||
|
673
egasterisk/zapata.conf
Normal file
673
egasterisk/zapata.conf
Normal file
|
@ -0,0 +1,673 @@
|
|||
;
|
||||
; Zapata telephony interface
|
||||
;
|
||||
; Configuration file
|
||||
;
|
||||
; You need to restart Asterisk to re-configure the Zap channel
|
||||
; CLI> reload chan_zap.so
|
||||
; will reload the configuration file,
|
||||
; but not all configuration options are
|
||||
; re-configured during a reload.
|
||||
|
||||
|
||||
|
||||
[trunkgroups]
|
||||
;
|
||||
; Trunk groups are used for NFAS or GR-303 connections.
|
||||
;
|
||||
; Group: Defines a trunk group.
|
||||
; trunkgroup => <trunkgroup>,<dchannel>[,<backup1>...]
|
||||
;
|
||||
; trunkgroup is the numerical trunk group to create
|
||||
; dchannel is the zap channel which will have the
|
||||
; d-channel for the trunk.
|
||||
; backup1 is an optional list of backup d-channels.
|
||||
;
|
||||
;trunkgroup => 1,24,48
|
||||
;trunkgroup => 1,24
|
||||
;
|
||||
; Spanmap: Associates a span with a trunk group
|
||||
; spanmap => <zapspan>,<trunkgroup>[,<logicalspan>]
|
||||
;
|
||||
; zapspan is the zap span number to associate
|
||||
; trunkgroup is the trunkgroup (specified above) for the mapping
|
||||
; logicalspan is the logical span number within the trunk group to use.
|
||||
; if unspecified, no logical span number is used.
|
||||
;
|
||||
;spanmap => 1,1,1
|
||||
;spanmap => 2,1,2
|
||||
;spanmap => 3,1,3
|
||||
;spanmap => 4,1,4
|
||||
|
||||
[channels]
|
||||
;
|
||||
; Default language
|
||||
;
|
||||
;language=en
|
||||
;
|
||||
; Default context
|
||||
;
|
||||
context=default
|
||||
;
|
||||
; Switchtype: Only used for PRI.
|
||||
;
|
||||
; national: National ISDN 2 (default)
|
||||
; dms100: Nortel DMS100
|
||||
; 4ess: AT&T 4ESS
|
||||
; 5ess: Lucent 5ESS
|
||||
; euroisdn: EuroISDN
|
||||
; ni1: Old National ISDN 1
|
||||
; qsig: Q.SIG
|
||||
;
|
||||
switchtype=national
|
||||
;
|
||||
; Some switches (AT&T especially) require network specific facility IE
|
||||
; supported values are currently 'none', 'sdn', 'megacom', 'tollfreemegacom', 'accunet'
|
||||
;
|
||||
;nsf=none
|
||||
;
|
||||
; PRI Dialplan: Only RARELY used for PRI.
|
||||
;
|
||||
; unknown: Unknown
|
||||
; private: Private ISDN
|
||||
; local: Local ISDN
|
||||
; national: National ISDN
|
||||
; international: International ISDN
|
||||
; dynamic: Dynamically selects the appropriate dialplan
|
||||
;
|
||||
;pridialplan=national
|
||||
;
|
||||
; PRI Local Dialplan: Only RARELY used for PRI (sets the calling number's numbering plan)
|
||||
;
|
||||
; unknown: Unknown
|
||||
; private: Private ISDN
|
||||
; local: Local ISDN
|
||||
; national: National ISDN
|
||||
; international: International ISDN
|
||||
; dynamic: Dynamically selects the appropriate dialplan
|
||||
;
|
||||
;prilocaldialplan=national
|
||||
;
|
||||
; PRI callerid prefixes based on the given TON/NPI (dialplan)
|
||||
; This is especially needed for euroisdn E1-PRIs
|
||||
;
|
||||
; sample 1 for Germany
|
||||
;internationalprefix = 00
|
||||
;nationalprefix = 0
|
||||
;localprefix = 0711
|
||||
;privateprefix = 07115678
|
||||
;unknownprefix =
|
||||
;
|
||||
; sample 2 for Germany
|
||||
;internationalprefix = +
|
||||
;nationalprefix = +49
|
||||
;localprefix = +49711
|
||||
;privateprefix = +497115678
|
||||
;unknownprefix =
|
||||
;
|
||||
; PRI resetinterval: sets the time in seconds between restart of unused
|
||||
; channels, defaults to 3600; minimum 60 seconds. Some PBXs don't like
|
||||
; channel restarts. so set the interval to a very long interval e.g. 100000000
|
||||
; or 'never' to disable *entirely*.
|
||||
;
|
||||
;resetinterval = 3600
|
||||
;
|
||||
; Overlap dialing mode (sending overlap digits)
|
||||
;
|
||||
;overlapdial=yes
|
||||
;
|
||||
; PRI Out of band indications.
|
||||
; Enable this to report Busy and Congestion on a PRI using out-of-band
|
||||
; notification. Inband indication, as used by Asterisk doesn't seem to work
|
||||
; with all telcos.
|
||||
;
|
||||
; outofband: Signal Busy/Congestion out of band with RELEASE/DISCONNECT
|
||||
; inband: Signal Busy/Congestion using in-band tones
|
||||
;
|
||||
; priindication = outofband
|
||||
;
|
||||
; If you need to override the existing channels selection routine and force all
|
||||
; PRI channels to be marked as exclusively selected, set this to yes.
|
||||
; priexclusive = yes
|
||||
;
|
||||
; ISDN Timers
|
||||
; All of the ISDN timers and counters that are used are configurable. Specify
|
||||
; the timer name, and its value (in ms for timers).
|
||||
; K: Layer 2 max number of outstanding unacknowledged I frames (default 7)
|
||||
; N200: Layer 2 max number of retransmissions of a frame (default 3)
|
||||
; T200: Layer 2 max time before retransmission of a frame (default 1000 ms)
|
||||
; T203: Layer 2 max time without frames being exchanged (default 10000 ms)
|
||||
; T305: Wait for DISCONNECT acknowledge (default 30000 ms)
|
||||
; T308: Wait for RELEASE acknowledge (default 4000 ms)
|
||||
; T309: Maintain active calls on Layer 2 disconnection (default -1, Asterisk clears calls)
|
||||
; EuroISDN: 6000 to 12000 ms, according to (N200 + 1) x T200 + 2s
|
||||
; May vary in other ISDN standards (Q.931 1993 : 90000 ms)
|
||||
; T313: Wait for CONNECT acknowledge, CPE side only (default 3000 ms)
|
||||
;
|
||||
; pritimer => t200,1000
|
||||
; pritimer => t313,4000
|
||||
;
|
||||
; To enable transmission of facility-based ISDN supplementary services (such
|
||||
; as caller name from CPE over facility), enable this option.
|
||||
; facilityenable = yes
|
||||
;
|
||||
;
|
||||
; Signalling method (default is fxs). Valid values:
|
||||
; em: E & M
|
||||
; em_w: E & M Wink
|
||||
; featd: Feature Group D (The fake, Adtran style, DTMF)
|
||||
; featdmf: Feature Group D (The real thing, MF (domestic, US))
|
||||
; featdmf_ta: Feature Group D (The real thing, MF (domestic, US)) through
|
||||
; a Tandem Access point
|
||||
; featb: Feature Group B (MF (domestic, US))
|
||||
; fgccama Feature Group C-CAMA (DP DNIS, MF ANI)
|
||||
; fgccamamf Feature Group C-CAMA MF (MF DNIS, MF ANI)
|
||||
; fxs_ls: FXS (Loop Start)
|
||||
; fxs_gs: FXS (Ground Start)
|
||||
; fxs_ks: FXS (Kewl Start)
|
||||
; fxo_ls: FXO (Loop Start)
|
||||
; fxo_gs: FXO (Ground Start)
|
||||
; fxo_ks: FXO (Kewl Start)
|
||||
; pri_cpe: PRI signalling, CPE side
|
||||
; pri_net: PRI signalling, Network side
|
||||
; gr303fxoks_net: GR-303 Signalling, FXO Loopstart, Network side
|
||||
; gr303fxsks_cpe: GR-303 Signalling, FXS Loopstart, CPE side
|
||||
; sf: SF (Inband Tone) Signalling
|
||||
; sf_w: SF Wink
|
||||
; sf_featd: SF Feature Group D (The fake, Adtran style, DTMF)
|
||||
; sf_featdmf: SF Feature Group D (The real thing, MF (domestic, US))
|
||||
; sf_featb: SF Feature Group B (MF (domestic, US))
|
||||
; e911: E911 (MF) style signalling
|
||||
;
|
||||
; The following are used for Radio interfaces:
|
||||
; fxs_rx: Receive audio/COR on an FXS kewlstart interface (FXO at the
|
||||
; channel bank)
|
||||
; fxs_tx: Transmit audio/PTT on an FXS loopstart interface (FXO at the
|
||||
; channel bank)
|
||||
; fxo_rx: Receive audio/COR on an FXO loopstart interface (FXS at the
|
||||
; channel bank)
|
||||
; fxo_tx: Transmit audio/PTT on an FXO groundstart interface (FXS at
|
||||
; the channel bank)
|
||||
; em_rx: Receive audio/COR on an E&M interface (1-way)
|
||||
; em_tx: Transmit audio/PTT on an E&M interface (1-way)
|
||||
; em_txrx: Receive audio/COR AND Transmit audio/PTT on an E&M interface
|
||||
; (2-way)
|
||||
; em_rxtx: Same as em_txrx (for our dyslexic friends)
|
||||
; sf_rx: Receive audio/COR on an SF interface (1-way)
|
||||
; sf_tx: Transmit audio/PTT on an SF interface (1-way)
|
||||
; sf_txrx: Receive audio/COR AND Transmit audio/PTT on an SF interface
|
||||
; (2-way)
|
||||
; sf_rxtx: Same as sf_txrx (for our dyslexic friends)
|
||||
;
|
||||
signalling=fxo_ks
|
||||
;
|
||||
; If you have an outbound signalling format that is different from format
|
||||
; specified above (but compatible), you can specify outbound signalling format,
|
||||
; (see below). The 'signalling' format specified will be the inbound signalling
|
||||
; format. If you only specify 'signalling', then it will be the format for
|
||||
; both inbound and outbound.
|
||||
;
|
||||
; signalling=featdmf
|
||||
; outsignalling=featb
|
||||
;
|
||||
; For Feature Group D Tandem access, to set the default CIC and OZZ use these
|
||||
; parameters:
|
||||
;defaultozz=0000
|
||||
;defaultcic=303
|
||||
;
|
||||
; A variety of timing parameters can be specified as well
|
||||
; Including:
|
||||
; prewink: Pre-wink time (default 50ms)
|
||||
; preflash: Pre-flash time (default 50ms)
|
||||
; wink: Wink time (default 150ms)
|
||||
; flash: Flash time (default 750ms)
|
||||
; start: Start time (default 1500ms)
|
||||
; rxwink: Receiver wink time (default 300ms)
|
||||
; rxflash: Receiver flashtime (default 1250ms)
|
||||
; debounce: Debounce timing (default 600ms)
|
||||
;
|
||||
rxwink=300 ; Atlas seems to use long (250ms) winks
|
||||
;
|
||||
; How long generated tones (DTMF and MF) will be played on the channel
|
||||
; (in milliseconds)
|
||||
;toneduration=100
|
||||
;
|
||||
; Whether or not to do distinctive ring detection on FXO lines
|
||||
;
|
||||
;usedistinctiveringdetection=yes
|
||||
;distinctiveringaftercid=yes ; enable dring detection after callerid for those countries like Australia
|
||||
; where the ring cadence is changed *after* the callerid spill.
|
||||
;
|
||||
; Whether or not to use caller ID
|
||||
;
|
||||
usecallerid=yes
|
||||
;
|
||||
; Type of caller ID signalling in use
|
||||
; bell = bell202 as used in US
|
||||
; v23 = v23 as used in the UK
|
||||
; v23_jp = v23 as used in Japan
|
||||
; dtmf = DTMF as used in Denmark, Sweden and Netherlands
|
||||
; smdi = Use SMDI for callerid. Requires SMDI to be enabled (usesmdi).
|
||||
;
|
||||
;cidsignalling=bell
|
||||
;
|
||||
; What signals the start of caller ID
|
||||
; ring = a ring signals the start
|
||||
; polarity = polarity reversal signals the start
|
||||
;
|
||||
;cidstart=ring
|
||||
;
|
||||
; Whether or not to hide outgoing caller ID (Override with *67 or *82)
|
||||
;
|
||||
hidecallerid=no
|
||||
;
|
||||
; Whether or not to enable call waiting on internal extensions
|
||||
; With this set to 'yes', busy extensions will hear the call-waiting
|
||||
; tone, and can use hook-flash to switch between callers. The Dial()
|
||||
; app will not return the "BUSY" result for extensions.
|
||||
;
|
||||
callwaiting=yes
|
||||
;
|
||||
; Whether or not restrict outgoing caller ID (will be sent as ANI only, not
|
||||
; available for the user)
|
||||
; Mostly use with FXS ports
|
||||
;
|
||||
;restrictcid=no
|
||||
;
|
||||
; Whether or not use the caller ID presentation for the outgoing call that the
|
||||
; calling switch is sending.
|
||||
; See doc/callingpres.txt
|
||||
;
|
||||
usecallingpres=yes
|
||||
;
|
||||
; Some countries (UK) have ring tones with different ring tones (ring-ring),
|
||||
; which means the callerid needs to be set later on, and not just after
|
||||
; the first ring, as per the default.
|
||||
;
|
||||
;sendcalleridafter=1
|
||||
;
|
||||
;
|
||||
; Support Caller*ID on Call Waiting
|
||||
;
|
||||
callwaitingcallerid=yes
|
||||
;
|
||||
; Support three-way calling
|
||||
;
|
||||
threewaycalling=yes
|
||||
;
|
||||
; For FXS ports (either direct analog or over T1/E1):
|
||||
; Support flash-hook call transfer (requires three way calling)
|
||||
; Also enables call parking (overrides the 'canpark' parameter)
|
||||
;
|
||||
; For digital ports using ISDN PRI protocols:
|
||||
; Support switch-side transfer (called 2BCT, RLT or other names)
|
||||
; This setting must be enabled on both ports involved, and the
|
||||
; 'facilityenable' setting must also be enabled to allow sending
|
||||
; the transfer to the ISDN switch, since it sent in a FACILITY
|
||||
; message.
|
||||
;
|
||||
transfer=yes
|
||||
;
|
||||
; Allow call parking
|
||||
; ('canpark=no' is overridden by 'transfer=yes')
|
||||
;
|
||||
canpark=yes
|
||||
;
|
||||
; Support call forward variable
|
||||
;
|
||||
cancallforward=yes
|
||||
;
|
||||
; Whether or not to support Call Return (*69)
|
||||
;
|
||||
callreturn=yes
|
||||
;
|
||||
; Stutter dialtone support: If a mailbox is specified without a voicemail
|
||||
; context, then when voicemail is received in a mailbox in the default
|
||||
; voicemail context in voicemail.conf, taking the phone off hook will cause a
|
||||
; stutter dialtone instead of a normal one.
|
||||
;
|
||||
; If a mailbox is specified *with* a voicemail context, the same will result
|
||||
; if voicemail received in mailbox in the specified voicemail context.
|
||||
;
|
||||
; for default voicemail context, the example below is fine:
|
||||
;
|
||||
;mailbox=1234
|
||||
;
|
||||
; for any other voicemail context, the following will produce the stutter tone:
|
||||
;
|
||||
;mailbox=1234@context
|
||||
;
|
||||
; Enable echo cancellation
|
||||
; Use either "yes", "no", or a power of two from 32 to 256 if you wish to
|
||||
; actually set the number of taps of cancellation.
|
||||
;
|
||||
; Note that when setting the number of taps, the number 256 does not translate
|
||||
; to 256 ms of echo cancellation. echocancel=256 means 256 / 8 = 32 ms.
|
||||
;
|
||||
; Note that if any of your Zaptel cards have hardware echo cancellers,
|
||||
; then this setting only turns them on and off; numeric settings will
|
||||
; be treated as "yes". There are no special settings required for
|
||||
; hardware echo cancellers; when present and enabled in their kernel
|
||||
; modules, they take precedence over the software echo canceller compiled
|
||||
; into Zaptel automatically.
|
||||
;
|
||||
echocancel=yes
|
||||
;
|
||||
; Generally, it is not necessary (and in fact undesirable) to echo cancel when
|
||||
; the circuit path is entirely TDM. You may, however, change this behavior
|
||||
; by enabling the echo cancel during pure TDM bridging below.
|
||||
;
|
||||
echocancelwhenbridged=yes
|
||||
;
|
||||
; In some cases, the echo canceller doesn't train quickly enough and there
|
||||
; is echo at the beginning of the call. Enabling echo training will cause
|
||||
; asterisk to briefly mute the channel, send an impulse, and use the impulse
|
||||
; response to pre-train the echo canceller so it can start out with a much
|
||||
; closer idea of the actual echo. Value may be "yes", "no", or a number of
|
||||
; milliseconds to delay before training (default = 400)
|
||||
;
|
||||
; WARNING: In some cases this option can make echo worse! If you are
|
||||
; trying to debug an echo problem, it is worth checking to see if your echo
|
||||
; is better with the option set to yes or no. Use whatever setting gives
|
||||
; the best results.
|
||||
;
|
||||
; Note that these parameters do not apply to hardware echo cancellers.
|
||||
;
|
||||
;echotraining=yes
|
||||
;echotraining=800
|
||||
;
|
||||
; If you are having trouble with DTMF detection, you can relax the DTMF
|
||||
; detection parameters. Relaxing them may make the DTMF detector more likely
|
||||
; to have "talkoff" where DTMF is detected when it shouldn't be.
|
||||
;
|
||||
;relaxdtmf=yes
|
||||
;
|
||||
; You may also set the default receive and transmit gains (in dB)
|
||||
;
|
||||
rxgain=0.0
|
||||
txgain=0.0
|
||||
;
|
||||
; Logical groups can be assigned to allow outgoing rollover. Groups range
|
||||
; from 0 to 63, and multiple groups can be specified.
|
||||
;
|
||||
group=1
|
||||
;
|
||||
; Ring groups (a.k.a. call groups) and pickup groups. If a phone is ringing
|
||||
; and it is a member of a group which is one of your pickup groups, then
|
||||
; you can answer it by picking up and dialling *8#. For simple offices, just
|
||||
; make these both the same. Groups range from 0 to 63.
|
||||
;
|
||||
callgroup=1
|
||||
pickupgroup=1
|
||||
|
||||
;
|
||||
; Specify whether the channel should be answered immediately or if the simple
|
||||
; switch should provide dialtone, read digits, etc.
|
||||
; Note: If immediate=yes the dialplan execution will always start at extension
|
||||
; 's' priority 1 regardless of the dialed number!
|
||||
;
|
||||
immediate=no
|
||||
;
|
||||
; Specify whether flash-hook transfers to 'busy' channels should complete or
|
||||
; return to the caller performing the transfer (default is yes).
|
||||
;
|
||||
;transfertobusy=no
|
||||
;
|
||||
; CallerID can be set to "asreceived" or a specific number if you want to
|
||||
; override it. Note that "asreceived" only applies to trunk interfaces.
|
||||
;
|
||||
;callerid=2564286000
|
||||
;
|
||||
; AMA flags affects the recording of Call Detail Records. If specified
|
||||
; it may be 'default', 'omit', 'billing', or 'documentation'.
|
||||
;
|
||||
;amaflags=default
|
||||
;
|
||||
; Channels may be associated with an account code to ease
|
||||
; billing
|
||||
;
|
||||
;accountcode=lss0101
|
||||
;
|
||||
; ADSI (Analog Display Services Interface) can be enabled on a per-channel
|
||||
; basis if you have (or may have) ADSI compatible CPE equipment
|
||||
;
|
||||
;adsi=yes
|
||||
;
|
||||
; SMDI (Simplified Message Desk Interface) can be enabled on a per-channel
|
||||
; basis if you would like that channel to behave like an SMDI message desk.
|
||||
; The SMDI port specified should have already been defined in smdi.conf. The
|
||||
; default port is /dev/ttyS0.
|
||||
;
|
||||
;usesmdi=yes
|
||||
;smdiport=/dev/ttyS0
|
||||
;
|
||||
; On trunk interfaces (FXS) and E&M interfaces (E&M, Wink, Feature Group D
|
||||
; etc, it can be useful to perform busy detection either in an effort to
|
||||
; detect hangup or for detecting busies. This enables listening for
|
||||
; the beep-beep busy pattern.
|
||||
;
|
||||
;busydetect=yes
|
||||
;
|
||||
; If busydetect is enabled, it is also possible to specify how many busy tones
|
||||
; to wait for before hanging up. The default is 4, but better results can be
|
||||
; achieved if set to 6 or even 8. Mind that the higher the number, the more
|
||||
; time that will be needed to hangup a channel, but lowers the probability
|
||||
; that you will get random hangups.
|
||||
;
|
||||
;busycount=4
|
||||
;
|
||||
; If busydetect is enabled, it is also possible to specify the cadence of your
|
||||
; busy signal. In many countries, it is 500msec on, 500msec off. Without
|
||||
; busypattern specified, we'll accept any regular sound-silence pattern that
|
||||
; repeats <busycount> times as a busy signal. If you specify busypattern,
|
||||
; then we'll further check the length of the sound (tone) and silence, which
|
||||
; will further reduce the chance of a false positive.
|
||||
;
|
||||
;busypattern=500,500
|
||||
;
|
||||
; NOTE: In the Asterisk Makefile you'll find further options to tweak the busy
|
||||
; detector. If your country has a busy tone with the same length tone and
|
||||
; silence (as many countries do), consider defining the
|
||||
; -DBUSYDETECT_COMPARE_TONE_AND_SILENCE option.
|
||||
;
|
||||
; Use a polarity reversal to mark when a outgoing call is answered by the
|
||||
; remote party.
|
||||
;
|
||||
;answeronpolarityswitch=yes
|
||||
;
|
||||
; In some countries, a polarity reversal is used to signal the disconnect of a
|
||||
; phone line. If the hanguponpolarityswitch option is selected, the call will
|
||||
; be considered "hung up" on a polarity reversal.
|
||||
;
|
||||
;hanguponpolarityswitch=yes
|
||||
;
|
||||
; On trunk interfaces (FXS) it can be useful to attempt to follow the progress
|
||||
; of a call through RINGING, BUSY, and ANSWERING. If turned on, call
|
||||
; progress attempts to determine answer, busy, and ringing on phone lines.
|
||||
; This feature is HIGHLY EXPERIMENTAL and can easily detect false answers,
|
||||
; so don't count on it being very accurate.
|
||||
;
|
||||
; Few zones are supported at the time of this writing, but may be selected
|
||||
; with "progzone"
|
||||
;
|
||||
; This feature can also easily detect false hangups. The symptoms of this is
|
||||
; being disconnected in the middle of a call for no reason.
|
||||
;
|
||||
;callprogress=yes
|
||||
;progzone=us
|
||||
;
|
||||
; FXO (FXS signalled) devices must have a timeout to determine if there was a
|
||||
; hangup before the line was answered. This value can be tweaked to shorten
|
||||
; how long it takes before Zap considers a non-ringing line to have hungup.
|
||||
;
|
||||
;ringtimeout=8000
|
||||
;
|
||||
; For FXO (FXS signalled) devices, whether to use pulse dial instead of DTMF
|
||||
;
|
||||
;pulsedial=yes
|
||||
;
|
||||
; For fax detection, uncomment one of the following lines. The default is *OFF*
|
||||
;
|
||||
;faxdetect=both
|
||||
;faxdetect=incoming
|
||||
;faxdetect=outgoing
|
||||
;faxdetect=no
|
||||
;
|
||||
; This option specifies a preference for which music on hold class this channel
|
||||
; should listen to when put on hold if the music class has not been set on the
|
||||
; channel with Set(CHANNEL(musicclass)=whatever) in the dialplan, and the peer
|
||||
; channel putting this one on hold did not suggest a music class.
|
||||
;
|
||||
; If this option is set to "passthrough", then the hold message will always be
|
||||
; passed through as signalling instead of generating hold music locally. This
|
||||
; setting is only valid when used on a channel that uses digital signalling.
|
||||
;
|
||||
; This option may be specified globally, or on a per-user or per-peer basis.
|
||||
;
|
||||
;mohinterpret=default
|
||||
;
|
||||
; This option specifies which music on hold class to suggest to the peer channel
|
||||
; when this channel places the peer on hold. It may be specified globally or on
|
||||
; a per-user or per-peer basis.
|
||||
;
|
||||
;mohsuggest=default
|
||||
;
|
||||
; PRI channels can have an idle extension and a minunused number. So long as
|
||||
; at least "minunused" channels are idle, chan_zap will try to call "idledial"
|
||||
; on them, and then dump them into the PBX in the "idleext" extension (which
|
||||
; is of the form exten@context). When channels are needed the "idle" calls
|
||||
; are disconnected (so long as there are at least "minidle" calls still
|
||||
; running, of course) to make more channels available. The primary use of
|
||||
; this is to create a dynamic service, where idle channels are bundled through
|
||||
; multilink PPP, thus more efficiently utilizing combined voice/data services
|
||||
; than conventional fixed mappings/muxings.
|
||||
;
|
||||
;idledial=6999
|
||||
;idleext=6999@dialout
|
||||
;minunused=2
|
||||
;minidle=1
|
||||
;
|
||||
; Configure jitter buffers in zapata (each one is 20ms, default is 4)
|
||||
;
|
||||
;jitterbuffers=4
|
||||
;
|
||||
;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
|
||||
; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a
|
||||
; ZAP channel. Defaults to "no". An enabled jitterbuffer will
|
||||
; be used only if the sending side can create and the receiving
|
||||
; side can not accept jitter. The ZAP channel can't accept jitter,
|
||||
; thus an enabled jitterbuffer on the receive ZAP side will always
|
||||
; be used if the sending side can create jitter.
|
||||
|
||||
; jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds.
|
||||
|
||||
; jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is
|
||||
; resynchronized. Useful to improve the quality of the voice, with
|
||||
; big jumps in/broken timestamps, usually sent from exotic devices
|
||||
; and programs. Defaults to 1000.
|
||||
|
||||
; jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a ZAP
|
||||
; channel. Two implementations are currently available - "fixed"
|
||||
; (with size always equals to jbmax-size) and "adaptive" (with
|
||||
; variable size, actually the new jb of IAX2). Defaults to fixed.
|
||||
|
||||
; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no".
|
||||
;-----------------------------------------------------------------------------------
|
||||
;
|
||||
; You can define your own custom ring cadences here. You can define up to 8
|
||||
; pairs. If the silence is negative, it indicates where the callerid spill is
|
||||
; to be placed. Also, if you define any custom cadences, the default cadences
|
||||
; will be turned off.
|
||||
;
|
||||
; Syntax is: cadence=ring,silence[,ring,silence[...]]
|
||||
;
|
||||
; These are the default cadences:
|
||||
;
|
||||
;cadence=125,125,2000,-4000
|
||||
;cadence=250,250,500,1000,250,250,500,-4000
|
||||
;cadence=125,125,125,125,125,-4000
|
||||
;cadence=1000,500,2500,-5000
|
||||
;
|
||||
; Each channel consists of the channel number or range. It inherits the
|
||||
; parameters that were specified above its declaration.
|
||||
;
|
||||
; For GR-303, CRV's are created like channels except they must start with the
|
||||
; trunk group followed by a colon, e.g.:
|
||||
;
|
||||
; crv => 1:1
|
||||
; crv => 2:1-2,5-8
|
||||
;
|
||||
;
|
||||
;callerid="Green Phone"<(256) 428-6121>
|
||||
;channel => 1
|
||||
;callerid="Black Phone"<(256) 428-6122>
|
||||
;channel => 2
|
||||
;callerid="CallerID Phone" <(256) 428-6123>
|
||||
;callerid="CallerID Phone" <(630) 372-1564>
|
||||
;callerid="CallerID Phone" <(256) 704-4666>
|
||||
;channel => 3
|
||||
;callerid="Pac Tel Phone" <(256) 428-6124>
|
||||
;channel => 4
|
||||
;callerid="Uniden Dead" <(256) 428-6125>
|
||||
;channel => 5
|
||||
;callerid="Cortelco 2500" <(256) 428-6126>
|
||||
;channel => 6
|
||||
;callerid="Main TA 750" <(256) 428-6127>
|
||||
;channel => 44
|
||||
;
|
||||
; For example, maybe we have some other channels which start out in a
|
||||
; different context and use E & M signalling instead.
|
||||
;
|
||||
;context=remote
|
||||
;sigalling=em
|
||||
;channel => 15
|
||||
;channel => 16
|
||||
|
||||
;signalling=em_w
|
||||
;
|
||||
; All those in group 0 I'll use for outgoing calls
|
||||
;
|
||||
; Strip most significant digit (9) before sending
|
||||
;
|
||||
;stripmsd=1
|
||||
;callerid=asreceived
|
||||
;group=0
|
||||
;signalling=fxs_ls
|
||||
;channel => 45
|
||||
|
||||
;signalling=fxo_ls
|
||||
;group=1
|
||||
;callerid="Joe Schmoe" <(256) 428-6131>
|
||||
;channel => 25
|
||||
;callerid="Megan May" <(256) 428-6132>
|
||||
;channel => 26
|
||||
;callerid="Suzy Queue" <(256) 428-6233>
|
||||
;channel => 27
|
||||
;callerid="Larry Moe" <(256) 428-6234>
|
||||
;channel => 28
|
||||
;
|
||||
; Sample PRI (CPE) config: Specify the switchtype, the signalling as either
|
||||
; pri_cpe or pri_net for CPE or Network termination, and generally you will
|
||||
; want to create a single "group" for all channels of the PRI.
|
||||
;
|
||||
; switchtype = national
|
||||
; signalling = pri_cpe
|
||||
; group = 2
|
||||
; channel => 1-23
|
||||
|
||||
;
|
||||
|
||||
; Used for distinctive ring support for x100p.
|
||||
; You can see the dringX patterns is to set any one of the dringXcontext fields
|
||||
; and they will be printed on the console when an inbound call comes in.
|
||||
;
|
||||
;dring1=95,0,0
|
||||
;dring1context=internal1
|
||||
;dring2=325,95,0
|
||||
;dring2context=internal2
|
||||
; If no pattern is matched here is where we go.
|
||||
context=default
|
||||
channel => 1
|
||||
|
||||
signalling = fxs_ks
|
||||
channel => 2,3
|
9
egasterisk/zaptel_guiRead.conf
Normal file
9
egasterisk/zaptel_guiRead.conf
Normal file
|
@ -0,0 +1,9 @@
|
|||
;!
|
||||
;! Automatically generated configuration file
|
||||
;! Filename: zaptel_guiRead.conf (/etc/asterisk/zaptel_guiRead.conf)
|
||||
;! Generator: Manager
|
||||
;! Creation Date: Wed Jul 23 18:51:04 2008
|
||||
;!
|
||||
|
||||
[general]
|
||||
#include "../zaptel.conf" ; =
|
16
egasterisk/ztscan.conf
Normal file
16
egasterisk/ztscan.conf
Normal file
|
@ -0,0 +1,16 @@
|
|||
[1]
|
||||
active=yes
|
||||
alarms=OK
|
||||
description=Wildcard TDM400P REV I Board 1
|
||||
name=WCTDM/0
|
||||
manufacturer=Digium
|
||||
devicetype=Wildcard TDM400P REV I
|
||||
location=PCI Bus 00 Slot 15
|
||||
basechan=1
|
||||
totchans=4
|
||||
irq=12
|
||||
type=analog
|
||||
port=1,FXS
|
||||
port=2,FXO
|
||||
port=3,FXO
|
||||
port=4,none
|
25
egautoupdates/egautoupdates
Executable file
25
egautoupdates/egautoupdates
Executable file
|
@ -0,0 +1,25 @@
|
|||
#! /bin/bash
|
||||
|
||||
LOG=/var/log/egautoupdates.log
|
||||
APTGET=`which apt-get`
|
||||
|
||||
message () {
|
||||
TIME=`date`
|
||||
echo "$TIME: $@" >> $LOG
|
||||
}
|
||||
|
||||
message ""
|
||||
message "******** egAutoUpdate *******"
|
||||
|
||||
#
|
||||
# update the current package lists
|
||||
#
|
||||
message "Updating package lists..."
|
||||
$APTGET update >> $LOG
|
||||
#
|
||||
# apply any pending security updates
|
||||
#
|
||||
message "Applying security updates"
|
||||
$APTGET upgrade -y -t breezy-security >> $LOG
|
||||
|
||||
message "Security updates applied (if found)"
|
22
egbackup/conf/samples/daily.conf
Normal file
22
egbackup/conf/samples/daily.conf
Normal file
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# egbackup, copyright 2005 egressive limited, www.egressive.com
|
||||
#
|
||||
# configuration file for /etc/ebu/ebu, a simple script for doing
|
||||
# tar-based backups.
|
||||
#
|
||||
# base filename for the backups...
|
||||
BU_FROOT="daily"
|
||||
CURRENT_LINK="Current-daily"
|
||||
#
|
||||
# directory in which to save the backups...
|
||||
BU_DIR=/storage/oslUK
|
||||
#
|
||||
# directories to back up
|
||||
FILES="/home/* /etc /var/www /var/spool/mail"
|
||||
#
|
||||
# directories/files to exclude
|
||||
EXCLUDE="*.log *Cache* *cache* *~ */tmp"
|
||||
#
|
||||
# removal all but the $BU_TO_KEEP most recent
|
||||
# backups.
|
||||
BU_TO_KEEP=4
|
22
egbackup/conf/samples/monthly.conf
Normal file
22
egbackup/conf/samples/monthly.conf
Normal file
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# egbackup, copyright 2005 egressive limited, www.egressive.com
|
||||
#
|
||||
# configuration file for egbackup, a simple script for doing
|
||||
# tar-based backups.
|
||||
#
|
||||
# base filename for the backups...
|
||||
BU_FROOT="monthly"
|
||||
CURRENT_LINK="Current-monthly"
|
||||
#
|
||||
# directory in which to save the backups...
|
||||
BU_DIR=/storage/oslUK
|
||||
#
|
||||
# directories to back up
|
||||
FILES="/home/* /etc /var/www /var/spool/mail"
|
||||
#
|
||||
# directories/files to exclude
|
||||
EXCLUDE=" *.log *Cache* *cache* *~ */tmp"
|
||||
#
|
||||
# removal all but the $BU_TO_KEEP most recent
|
||||
# backups.
|
||||
BU_TO_KEEP=3
|
20
egbackup/conf/samples/site.conf
Normal file
20
egbackup/conf/samples/site.conf
Normal file
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# egbackup, copyright 2005 egressive limited, www.egressive.com
|
||||
#
|
||||
# Site-wide configuration for this installation of the Egressive Backup
|
||||
# Utility.
|
||||
#
|
||||
# machine name
|
||||
MACHINE_NAME="OslUK"
|
||||
#
|
||||
# report email address
|
||||
EMAIL_TO=backup-reports@lists.openstrategies.net
|
||||
#
|
||||
# how nice should we be to the CPU?
|
||||
# 0 is high priority, 19 is lowest priority
|
||||
NICE=19
|
||||
#
|
||||
# directory name a user can use to keep some files
|
||||
# out of the backup set, e.g. large unimportant files.
|
||||
NO_BACKUP_DIR="nobackup"
|
||||
|
22
egbackup/conf/samples/weekly.conf
Normal file
22
egbackup/conf/samples/weekly.conf
Normal file
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# egbackup, copyright 2005 egressive limited, www.egressive.com
|
||||
#
|
||||
# configuration file for egbackup, a simple script for doing
|
||||
# tar-based backups.
|
||||
#
|
||||
# base filename for the backups...
|
||||
BU_FROOT="weekly"
|
||||
CURRENT_LINK="Current-weekly"
|
||||
#
|
||||
# directory in which to save the backups...
|
||||
BU_DIR=/storage/oslUK
|
||||
#
|
||||
# directories to back up
|
||||
FILES="/home/* /etc /var/www /var/spool/mail"
|
||||
#
|
||||
# directories/files to exclude
|
||||
EXCLUDE=" *.log *Cache* *cache* *~ */tmp"
|
||||
#
|
||||
# removal all but the $BU_TO_KEEP most recent
|
||||
# backups.
|
||||
BU_TO_KEEP=3
|
22
egbackup/conf/samples/yearly.conf
Normal file
22
egbackup/conf/samples/yearly.conf
Normal file
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# egbackup, copyright 2005 egressive limited, www.egressive.com
|
||||
#
|
||||
# configuration file for egbackup, a simple script for doing
|
||||
# tar-based backups.
|
||||
#
|
||||
# base filename for the backups...
|
||||
BU_FROOT="yearly"
|
||||
CURRENT_LINK="Current-yearly"
|
||||
#
|
||||
# directory in which to save the backups...
|
||||
BU_DIR=/storage/oslUK
|
||||
#
|
||||
# directories to back up
|
||||
FILES="/home/* /etc /var/www /var/spool/mail"
|
||||
#
|
||||
# directories/files to exclude
|
||||
EXCLUDE=" *.log *Cache* *cache* *~ */tmp"
|
||||
#
|
||||
# removal all but the $BU_TO_KEEP most recent
|
||||
# backups.
|
||||
BU_TO_KEEP=6
|
488
egbackup/egbackup
Executable file
488
egbackup/egbackup
Executable file
|
@ -0,0 +1,488 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# egbackup, copyright 2005 egressive limited, www.egressive.com
|
||||
#
|
||||
# this script runs a series of daily backup files, one after another
|
||||
#
|
||||
#==========================================
|
||||
# The Variables - these must be define
|
||||
# before they're referenced
|
||||
#==========================================
|
||||
VERSION="0.1"
|
||||
#EGBU_DIR=/etc/egscripts/egbackup
|
||||
EGBU_NAME=`basename $0`
|
||||
#echo $EGBU_NAME
|
||||
EGBU_DIR=/etc/egscripts/egbackup
|
||||
EGBU_CMD=$EGBU_DIR/egbackup
|
||||
EGBU_CONF_DIR=$EGBU_DIR/conf
|
||||
SITE_CONF=$EGBU_CONF_DIR/site.conf
|
||||
BU_EXCLUDES=$EGBU_CONF_DIR/.excludes
|
||||
#
|
||||
# this provides values for MACHINE_NAME and EMAIL
|
||||
. $SITE_CONF
|
||||
#
|
||||
LOGS=/var/log
|
||||
LOG=$LOGS/egbackup.log
|
||||
# required programs
|
||||
MAIL=`which mail`
|
||||
GREP=`which grep`
|
||||
LS=`which ls`
|
||||
ID=`which id`
|
||||
DATE=`which date`
|
||||
DF=`which df`
|
||||
GZIP=`which gzip`
|
||||
RM=`which rm`
|
||||
LN=`which ln`
|
||||
CUT=`which cut`
|
||||
TOUCH=`which touch`
|
||||
# determine today's date
|
||||
TODAY=`$DATE '+%Y-%m-%d-%a'`
|
||||
# determine today's date
|
||||
NOW=`$DATE '+%H-%M-%S'`
|
||||
# a timestamp for logging purposes
|
||||
TIMESTAMP=`$DATE '+%Y-%m-%d %H:%M.%S'`
|
||||
# temporary holding point for email
|
||||
TMP_DIR=/tmp
|
||||
TMP_EMAIL=$TMP_DIR/$EGBU_NAME"_tmp_email_"$TODAY.$TIME
|
||||
#
|
||||
# for pruning old backups
|
||||
#
|
||||
# build list of possible pruning candidates
|
||||
BU_SUFFIX="tgz"
|
||||
LIST_SUFFIX="list"
|
||||
#
|
||||
# tar command
|
||||
TAR=`which tar`
|
||||
# tar command options
|
||||
# c = create
|
||||
# v = verbose (for the purpose of recording a list of files)
|
||||
# f = save to file rather than pipe
|
||||
# z = compress with gzip
|
||||
# W = verify archive against file system on completion
|
||||
#FLAGS=" cvfzW "
|
||||
FLAGS=" cvfz "
|
||||
# wc (word count) command
|
||||
WC=`which wc`
|
||||
# awk command
|
||||
AWK=`which awk`
|
||||
# don't worry, this is just used to determine if the
|
||||
# disk is installed - it's not going to change the partition table!
|
||||
FDISK=`which fdisk`
|
||||
#
|
||||
#==========================================
|
||||
# The Functions - these have to be defined
|
||||
# before they're called! Note, refer
|
||||
# to them without the "()" and provide
|
||||
# up to one argument, referred to as "$@"
|
||||
# in the function...
|
||||
#==========================================
|
||||
#
|
||||
# function to direct a message...
|
||||
message() {
|
||||
#
|
||||
# a timestamp for logging purposes
|
||||
timestamp
|
||||
if test -w $LOG ; then
|
||||
echo "$EGBU_NAME: $TIMESTAMP $@" >> $LOG
|
||||
fi
|
||||
if test -w $TMP_EMAIL ; then
|
||||
echo "$EGBU_NAME: $TIMESTAMP $@" >> $TMP_EMAIL
|
||||
fi
|
||||
verbose "$TIMESTAMP $@"
|
||||
}
|
||||
#
|
||||
# function to direct a message...
|
||||
verbose() {
|
||||
if test $VERBOSE ; then
|
||||
echo "$@"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# insert a blank line into the log and on the console
|
||||
insert_blank() {
|
||||
echo "" >> $TMP_EMAIL
|
||||
verbose ""
|
||||
}
|
||||
#
|
||||
# update date and time info..
|
||||
today() {
|
||||
# determine today's date
|
||||
TODAY=`$DATE '+%Y-%m-%d-%a'`
|
||||
}
|
||||
now() {
|
||||
# determine today's date
|
||||
NOW=`$DATE '+%H-%M-%S'`
|
||||
}
|
||||
timestamp() {
|
||||
# a timestamp for logging purposes
|
||||
TIMESTAMP=`date '+%Y-%m-%d %H:%M.%S'`
|
||||
}
|
||||
#
|
||||
# create the temporary email file
|
||||
create_tmp_email() {
|
||||
if test -d $TMP_DIR ; then
|
||||
if test -w $TMP_DIR ; then
|
||||
touch $TMP_EMAIL 2>&1
|
||||
else
|
||||
error "Email tmp directory $TMP_DIR is not writable"
|
||||
fi
|
||||
else
|
||||
error "Email tmp directory $TMP_DIR does not exist"
|
||||
fi
|
||||
|
||||
if test -w $TMP_EMAIL ; then
|
||||
message "created temporary email $TMP_EMAIL"
|
||||
else
|
||||
error "Failed to create temporary email $TMP_EMAIL"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# send the contents of the temporary file to the
|
||||
# designated report recipient
|
||||
send_email_report() {
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "sending email report to $EMAIL_TO"
|
||||
if test $ERROR_STATUS == 1 ; then
|
||||
EMAIL_SUBJ="[ERROR] $MACHINE_NAME Backup - $PERIOD"
|
||||
else
|
||||
EMAIL_SUBJ="[SUCCESS] $MACHINE_NAME Backup Report - $PERIOD"
|
||||
fi
|
||||
# check space again to see how close things are to full
|
||||
|
||||
message "Printing disk space for reference purposes:"
|
||||
DISK_SPACE=`$DF`
|
||||
message "$DISK_SPACE"
|
||||
# send it to each email address in the list...
|
||||
for EMAIL_ADD in $EMAIL_TO
|
||||
do
|
||||
RES=`$MAIL -s "$EMAIL_SUBJ" $EMAIL_ADD < $TMP_EMAIL`
|
||||
if test -z $RES ; then
|
||||
if test $ERROR_STATUS == 1 ; then
|
||||
message "Error email report successfully sent to $EMAIL_ADD"
|
||||
else
|
||||
message "Email report successfully sent to $EMAIL_ADD"
|
||||
fi
|
||||
else
|
||||
if ! test $ERROR_STATUS == 1 ; then
|
||||
error "Email report send to $EMAIL_ADD failed with this message: $RES"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if test -w $TMP_EMAIL ; then
|
||||
$RM $TMP_EMAIL 2>&1
|
||||
else
|
||||
if ! test $ERROR_STATUS == 1 ; then
|
||||
error "Failed to remove email message file, $TMP_EMAIL: permission denied."
|
||||
fi
|
||||
fi
|
||||
if test -f $TMP_EMAIL ; then
|
||||
error "Failed to remove email message file $TMP_EMAIL for an unknown reason"
|
||||
else
|
||||
message "successfully removed temporary email $TMP_EMAIL"
|
||||
fi
|
||||
else
|
||||
if ! test $ERROR_STATUS == 1 ; then
|
||||
error "Email message file, $TMP_EMAIL, does not exist."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
#
|
||||
# build list of backup configuration files
|
||||
get_confs() {
|
||||
CONFS=`$LS -1 $EGBU_CONF_DIR/$CONF_ROOT*.conf 2>&1`
|
||||
TEST=`echo $CONFS | $GREP -c "No such file or directory" -`
|
||||
#TEST2=`echo $CONFS | $GREP -c "$EGBU_CONF_DIR" -`
|
||||
if test $TEST == 1 ; then
|
||||
error "No configuration files found with root $CONF_ROOT in $EGBU_CONF_DIR"
|
||||
fi
|
||||
#echo "CONFS = $CONFS"
|
||||
}
|
||||
#
|
||||
# function to direct an error...
|
||||
error() {
|
||||
#
|
||||
# recognise that the system experienced
|
||||
# an error and send out a special email, and halt
|
||||
# the program!
|
||||
timestamp
|
||||
ERROR_STATUS=1
|
||||
#
|
||||
# get current user details
|
||||
USER_DETAILS=`$ID`
|
||||
if test -w $LOG ; then
|
||||
echo "$EGBU_NAME: **ERROR** $TIMESTAMP $@" >> $LOG
|
||||
echo "$EGBU_NAME: user details - $USER_DETAILS" >> $LOG
|
||||
fi
|
||||
if test -w $TMP_EMAIL ; then
|
||||
echo "$EGBU_NAME: **ERROR** $TIMESTAMP $@" >> $TMP_EMAIL
|
||||
echo " user details: $USER_DETAILS" >> $LOG
|
||||
fi
|
||||
verbose "$TIMESTAMP **ERROR** $@"
|
||||
verbose " user details: $USER_DETAILS"
|
||||
send_email_report
|
||||
exit 1
|
||||
}
|
||||
#
|
||||
# build excludes list
|
||||
build_excludes() {
|
||||
message "building excludes"
|
||||
# the following is required to avoid expanding wildcards...
|
||||
# see man bash, search on GLOBIGNORE, for more info
|
||||
GLOBIGNORE=*
|
||||
if test -f $BU_EXCLUDES ; then
|
||||
rm $BU_EXCLUDES
|
||||
fi
|
||||
$TOUCH $BU_EXCLUDES
|
||||
for PAT in $EXCLUDE
|
||||
do
|
||||
echo $PAT >> $BU_EXCLUDES
|
||||
done
|
||||
echo "*/$NO_BACKUP_DIR/*" >> $BU_EXCLUDES
|
||||
|
||||
# EXCLUDES=
|
||||
# for PAT in $EXCLUDE
|
||||
# do
|
||||
# EXCLUDES="$EXCLUDES --exclude=\"$PAT\""
|
||||
# done
|
||||
# EXCLUDES="$EXCLUDES --exclude=\"*/$NO_BACKUP_DIR\""
|
||||
#
|
||||
# echo */$NO_BACKUP_DIR >> $EXCLUDES_FILE
|
||||
|
||||
# also required - see above
|
||||
GLOBIGNORE=
|
||||
#echo "Excludes = $EXCLUDES"
|
||||
}
|
||||
#
|
||||
# delete old backups
|
||||
delete_old() {
|
||||
#
|
||||
if test -n $BU_FROOT && test -n $BU_TO_KEEP ; then
|
||||
# pattern to search for to build the list...
|
||||
PATTERN="$BU_DIR/$BU_FROOT.*"
|
||||
# build the list, with the suffix...
|
||||
PRUNEABLES=`$LS -1t $PATTERN.$BU_SUFFIX 2>&1`
|
||||
#echo "PRUNEABLES=$PRUNEABLES"
|
||||
TEST=`echo $PRUNEABLES | $GREP -c "No such file or directory" -`
|
||||
if ! test $TEST == 1 ; then
|
||||
message "pruning older files based on $PATTERN.$BU_SUFFIX"
|
||||
message "keeping last $BU_TO_KEEP backups"
|
||||
#
|
||||
# set counter
|
||||
NUM=0
|
||||
# go through the list of files and remove those we don't want
|
||||
for PRUNEABLE in $PRUNEABLES
|
||||
do
|
||||
NUM=$(($NUM + 1))
|
||||
if test $NUM -gt $BU_TO_KEEP ; then
|
||||
message "deleting $PRUNEABLE and associated list files"
|
||||
BASE=`basename $PRUNEABLE .$BU_SUFFIX`
|
||||
if test $DRY_RUN == 1 ; then
|
||||
message "would delete $BU_DIR/$BASE.$BU_SUFFIX and associated list file"
|
||||
else
|
||||
if [ -e "$BU_DIR/$BASE.$BU_SUFFIX" ]; then
|
||||
$RM $BU_DIR/$BASE.$BU_SUFFIX 2>&1
|
||||
elif [ -e "$BU_DIR/$BASE.$LIST_SUFFIX" ]; then
|
||||
$RM $BU_DIR/$BASE.$LIST_SUFFIX 2>&1
|
||||
elif [ -e "$BU_DIR/$BASE.$LIST_SUFFIX.gz" ]; then
|
||||
$RM $BU_DIR/$BASE.$LIST_SUFFIX.gz 2>&1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
message "keeping $PRUNEABLE"
|
||||
fi
|
||||
done
|
||||
else
|
||||
message "no pruneable files found based on pattern: $PATTERN.$BU_SUFFIX"
|
||||
fi
|
||||
else
|
||||
message "keeping older backups, missing backup_root_filename..."
|
||||
fi
|
||||
}
|
||||
#
|
||||
#
|
||||
check_space() {
|
||||
RES=`$DF -h`
|
||||
#message "$RES"
|
||||
TEST=0
|
||||
PCENT="100%"
|
||||
TEST=`echo "$RES" | $GREP -c "$PCENT"`
|
||||
if test $TEST == 1 ; then
|
||||
PART_LINE=`echo "$RES" | $GREP "$PCENT"`
|
||||
# get the device name which is showing $PCENT
|
||||
TEST=`echo $PART_LINE | $CUT -f 1 -d ' '`
|
||||
# if it has a partition number in the name, it's probably a block
|
||||
# device rather than, say, a CDROM...
|
||||
TEST2=`echo $TEST | $GREP -c [0-9]`
|
||||
echo "Test2 = $TEST2"
|
||||
if test $TEST2 == 1 ; then
|
||||
error "Partition $TEST is full - detail: $PART_LINE"
|
||||
else
|
||||
message "false alarm - it's only the $TEST volume..."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
#
|
||||
# this is where we do all the backup-related stuff - what ebu used to do...
|
||||
do_backup() {
|
||||
#
|
||||
# set up filenames for backup files
|
||||
today # update date stamp
|
||||
now # update time stamp
|
||||
BU_FILE="$BU_FROOT.$TODAY.$NOW.$BU_SUFFIX"
|
||||
BU_LIST="$BU_FROOT.$TODAY.$NOW.$LIST_SUFFIX"
|
||||
message "will create backup files: $BU_FILE, $BU_LIST"
|
||||
#
|
||||
delete_old # delete old backups
|
||||
check_space # see how much space is left in backup area
|
||||
build_excludes # build list of files to exclude
|
||||
BU_CONF_NAME=`basename $BU_CONF`
|
||||
#echo "CURRENT_LINK = $CURRENT_LINK"
|
||||
if test -d $BU_DIR ; then
|
||||
if ! test -w $BU_DIR ; then
|
||||
error "Backup directory, $BU_DIR, not writable"
|
||||
fi
|
||||
else
|
||||
error "Backup directory, $BU_DIR, doesn't exist"
|
||||
fi
|
||||
#BU_CMD="nice -n $NICE $TAR $FLAGS $BU_DIR/$BU_FILE $EXCLUDES $FILES"
|
||||
BU_CMD="nice -n $NICE $TAR $FLAGS $BU_DIR/$BU_FILE -X $BU_EXCLUDES $FILES"
|
||||
#echo "DR=$DRY_RUN"
|
||||
if test $DRY_RUN == 1 ; then
|
||||
message "dry run, not doing backup"
|
||||
message "if we were, we'd run $BU_CMD"
|
||||
else
|
||||
if test ! $CURRENT_LINK = "none" ; then
|
||||
message "removing link: $BU_DIR/$CURRENT_LINK"
|
||||
# first remove any existing link
|
||||
if [ -h "$BU_DIR/$CURRENT_LINK.$BU_SUFFIX" ]; then
|
||||
$RM $BU_DIR/$CURRENT_LINK.$BU_SUFFIX 2>&1
|
||||
fi
|
||||
fi
|
||||
message "Executing backup command: $BU_CMD"
|
||||
RES=`echo $GLOBIGNORE > $BU_DIR/$BU_LIST; $BU_CMD >> $BU_DIR/$BU_LIST`
|
||||
if test "$?" -ne "0" ; then
|
||||
message "-------Backup ended with error, error: $? ----------"
|
||||
error "TAR EXIT CODE: $?"
|
||||
else
|
||||
message "+++++++Backup $BU_FILE successfully finished++++++++"
|
||||
NUM_FILES=`$WC $BU_DIR/$BU_LIST | $AWK '{print $1}'`
|
||||
message "Backed up $NUM_FILES files..."
|
||||
BYTES=`$LS -l $BU_DIR/$BU_FILE | $AWK '{print $5;}'`
|
||||
KBYTES=$(($BYTES/1024))
|
||||
MBYTES=$(($KBYTES/1024))
|
||||
message "Backup size: $MBYTES MB ($KBYTES K)"
|
||||
# echo "success: $NUM_FILES backed up $NUM_FILES in $MBYTES MB ($KBYTES K)" > $STAT_DIR/$NAME-$BU_CONF_NAME
|
||||
# if the variable $CURRENT_LINK is defined in the .conf file, make
|
||||
# a link to it.
|
||||
if test ! $CURRENT_LINK = "none" ; then
|
||||
message "Linking $BU_DIR/$CURRENT_LINK to $BU_DIR/$BU_FILE..."
|
||||
# create a new link to the current archive
|
||||
RES=`$LN -f $BU_DIR/$BU_FILE $BU_DIR/$CURRENT_LINK.$BU_SUFFIX 2>&1`
|
||||
if test "$?" -ne "0" ; then
|
||||
error "Linking $BU_DIR/$BU_FILE to $BU_DIR/$CURRENT_LINK.$BU_SUFFIX failed"
|
||||
fi
|
||||
fi
|
||||
if test -f "$BU_DIR/$BU_LIST.gz" ; then
|
||||
$RM $BU_DIR/$BU_LIST.gz
|
||||
fi
|
||||
$GZIP $BU_DIR/$BU_LIST
|
||||
fi
|
||||
fi
|
||||
}
|
||||
#========================================
|
||||
# The Error Checking
|
||||
#========================================
|
||||
#
|
||||
# first, check that all the necessary files and stuff are there and usable
|
||||
#
|
||||
# if the log doesn't exist, create it
|
||||
if ! test -f $LOG ; then
|
||||
message "creating non-existent log file $LOG"
|
||||
RET=`touch $LOG 2>&1 /dev/null`
|
||||
TEST=`echo $RET | $GREP -c "Permission denied" -`
|
||||
if test $TEST == 1 ; then
|
||||
error "Failed to create log file $LOG, user cannot write to that directory"
|
||||
fi
|
||||
fi
|
||||
# checking whether it's there an is writable
|
||||
if ! test -w $LOG ; then
|
||||
error "Log file $LOG not writable"
|
||||
fi
|
||||
|
||||
#========================================
|
||||
# The Functional Part of the Script
|
||||
#========================================
|
||||
# set variable defaults
|
||||
ERROR_STATUS=0 # initially assume no errors
|
||||
VERBOSE=0 # initially assume quiet output
|
||||
CONF_ROOT=1 # set it to something we know so we can test if it's changed
|
||||
DRY_RUN=0 # assume this is not a dry run...
|
||||
CURRENT_LINK="none"
|
||||
MODE=help
|
||||
# process any arguments
|
||||
while test $# -ne 0 ; do # while there are arguments
|
||||
message "argument: $1"
|
||||
case $1 in
|
||||
--verbose|-v)
|
||||
verbose "setting verbostity to ON"
|
||||
VERBOSE=1
|
||||
;;
|
||||
--dryrun)
|
||||
verbose "setting dryrun to ON"
|
||||
DRY_RUN=1
|
||||
;;
|
||||
*)
|
||||
TEST=`echo $1 | $GREP -c '-'`
|
||||
if ! test $TEST == 1 ; then
|
||||
CONF_ROOT=$1
|
||||
PERIOD=$CONF_ROOT
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
if test $CONF_ROOT == 1 ; then
|
||||
MODE=help
|
||||
verbose "showing help, because we didn't get a CONF_ROOT value"
|
||||
else
|
||||
MODE=run
|
||||
fi
|
||||
#
|
||||
# set things in motion based on the script arguments
|
||||
case $MODE in
|
||||
run)
|
||||
create_tmp_email
|
||||
get_confs
|
||||
# run backup for each file
|
||||
for BU_CONF in $CONFS
|
||||
do
|
||||
message "do backup with conf: $BU_CONF"
|
||||
. $BU_CONF # grab the current variables for this conf file...
|
||||
do_backup
|
||||
# put a space in the email to separate tasks
|
||||
insert_blank
|
||||
done
|
||||
#
|
||||
# send the resulting email
|
||||
send_email_report
|
||||
;;
|
||||
help)
|
||||
if test $CONF_ROOT; then
|
||||
echo "error: please specify a period for egbackup"
|
||||
fi
|
||||
echo ""
|
||||
echo "$EGBU_NAME, version $VERSION, copyright 2005 Egressive Ltd, www.egressive.com"
|
||||
echo "==================="
|
||||
echo "usage: $EGBU_NAME period"
|
||||
echo " where 'period' is one of hourly, daily, weekly, monthly, yearly, etc."
|
||||
echo " corresponding to named configurations, e.g. daily-backup.conf, in the "
|
||||
echo " conf dir, currently set to $EGBU_CONF_DIR"
|
||||
echo "== other options =="
|
||||
echo "-v or --verbose - give extra feedback on progress to stdout"
|
||||
echo "-c or --configroot config_filename - root for configuration filenames"
|
||||
echo "--dryrun - do everything else, but *don't* delete anything or run the backup"
|
||||
echo ""
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
17
egbackup/egbackup-cron
Executable file
17
egbackup/egbackup-cron
Executable file
|
@ -0,0 +1,17 @@
|
|||
#
|
||||
# egbackup, copyright 2005 egressive limited, www.egressive.com
|
||||
#
|
||||
# run system backups
|
||||
#
|
||||
# daily - at 2:30 am, mon-sat
|
||||
30 2 * * mon,tue,wed,thu,fri,sat root /etc/egscripts/egbackup/egbackup daily
|
||||
#
|
||||
# weekly - at 2:30 am, sun
|
||||
30 2 * * sun root /etc/egscripts/egbackup/egbackup weekly
|
||||
#
|
||||
# monthly - at 3:30 am, on the first of the last of the month
|
||||
30 3 1 * * root /etc/egscripts/egbackup/egbackup monthly
|
||||
#
|
||||
# yearly - at 1:30 am, on the last day of the year
|
||||
30 1 1 1 * root /etc/egscripts/egbackup/egbackup yearly
|
||||
|
9
egbackup/egbackup.logrotate
Normal file
9
egbackup/egbackup.logrotate
Normal file
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# egbackup, copyright 2005 egressive limited, www.egressive.com
|
||||
#
|
||||
/var/log/egbackup.log {
|
||||
monthly
|
||||
rotate 4
|
||||
compress
|
||||
notifyempty
|
||||
}
|
41
egcreateusers/create-users.log
Normal file
41
egcreateusers/create-users.log
Normal file
|
@ -0,0 +1,41 @@
|
|||
Creating new users!
|
||||
creating user user00 with the password user00->satVqBJbsl8P2
|
||||
creating user user01 with the password user01->sat.ASgcemzQA
|
||||
creating user user02 with the password user02->saIKei78eRe52
|
||||
creating user user03 with the password user03->sap2N84FY8GUg
|
||||
creating user user04 with the password user04->sa5E2kwqNmCLc
|
||||
creating user user05 with the password user05->saPpvaZ8R0t7A
|
||||
creating user user06 with the password user06->saEOnqvahEH9I
|
||||
creating user user07 with the password user07->saYRdmFS8m0EU
|
||||
creating user user08 with the password user08->saz3ZyJbhtdVo
|
||||
creating user user09 with the password user09->safp3RTdv.b0g
|
||||
creating user user10 with the password user10->sacUwRXkq/J2U
|
||||
creating user user11 with the password user11->sa8Lg5EooG8NE
|
||||
creating user user12 with the password user12->salxbXMIKVCwY
|
||||
creating user user13 with the password user13->saIfdEeUrc2m.
|
||||
creating user user14 with the password user14->sas8yroe8scoM
|
||||
creating user user15 with the password user15->saTwGZoKAc0Is
|
||||
creating user user16 with the password user16->sa3tj5i0goCAI
|
||||
creating user user17 with the password user17->saufjrTdFgMfk
|
||||
creating user user18 with the password user18->sa8MGoGw3A0.k
|
||||
creating user user19 with the password user19->saTp0UOzHiTQ.
|
||||
creating user user20 with the password user20->saqwTJUgmLeyw
|
||||
creating user user21 with the password user21->saP1k5iqiEz0Y
|
||||
creating user user22 with the password user22->saWjiptjUTCYE
|
||||
creating user user23 with the password user23->sajMsjGnBNNBw
|
||||
creating user user24 with the password user24->satanFahhJIRM
|
||||
creating user user25 with the password user25->sa1/S4R.QqAYw
|
||||
creating user user26 with the password user26->sa.6jNYNJ48f2
|
||||
creating user user27 with the password user27->sat.2V8rVipEc
|
||||
creating user user28 with the password user28->saz8NKw.urGa6
|
||||
creating user user29 with the password user29->sa3kdJYiDMg.c
|
||||
creating user user30 with the password user30->sazI/Lk//Womw
|
||||
creating user user31 with the password user31->saooP7/6Z4Wuc
|
||||
creating user user32 with the password user32->saDkooessBvjg
|
||||
creating user user33 with the password user33->saTaw8DEmYwxw
|
||||
creating user user34 with the password user34->sayYAYwUKAuIY
|
||||
creating user user35 with the password user35->sa14clLyWniuE
|
||||
creating user user36 with the password user36->satmMIiFy7DYA
|
||||
creating user user37 with the password user37->saINDkSZMDa9s
|
||||
creating user user38 with the password user38->saPeUjIH4rBMM
|
||||
creating user user39 with the password user39->saILNmB3drjVE
|
19
egcreateusers/egcreateusers.sh
Executable file
19
egcreateusers/egcreateusers.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
#
|
||||
TENS="0 1 2 3"
|
||||
ONES="0 1 2 3 4 5 6 7 8 9"
|
||||
echo "Creating new users!" > create-users.log
|
||||
for TEN in $TENS
|
||||
do
|
||||
for ONE in $ONES
|
||||
do
|
||||
USER="user$TEN$ONE"
|
||||
echo "creating $USER"
|
||||
PASSWORD=`perl -e "print crypt(\"$USER\", 'salt'),\"\n\""`
|
||||
echo "encrypted password $PASSWORD"
|
||||
echo "creating user $USER with the password $USER->$PASSWORD" >> create-users.log
|
||||
useradd -s /bin/bash -d /home/$USER -p $PASSWORD -m $USER
|
||||
done
|
||||
done
|
||||
exit 0
|
BIN
egdbback.tgz
Normal file
BIN
egdbback.tgz
Normal file
Binary file not shown.
2
egdbback/Makefile.am
Normal file
2
egdbback/Makefile.am
Normal file
|
@ -0,0 +1,2 @@
|
|||
dist_sbin_SCRIPTS = egdbback
|
||||
EXTRA_DIST = egdbback-cron logrotate.d/egdbback site.conf
|
473
egdbback/egdbback
Executable file
473
egdbback/egdbback
Executable file
|
@ -0,0 +1,473 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# egdbback, copyright 2005-2008 Egressive Limited, http://egressive.com
|
||||
#
|
||||
# this script runs periodic database backups...
|
||||
#
|
||||
#==========================================
|
||||
# The Variables - these must be define
|
||||
# before they're referenced
|
||||
#==========================================
|
||||
VERSION="0.3"
|
||||
EGDB_NAME=`basename $0`
|
||||
EGDB_DIR=/etc/egscripts/egdbback
|
||||
EGDB_CMD=$EGDB_DIR/egdbback
|
||||
SITE_CONF="$EGDB_DIR/site.conf"
|
||||
# the appropriate mysql paths
|
||||
MYDIR=/var/lib/mysql
|
||||
#
|
||||
# this provides values for MACHINE_NAME and EMAIL
|
||||
. $SITE_CONF
|
||||
#
|
||||
LOGS=/var/log
|
||||
LOG=$LOGS/egdbback.log
|
||||
#==========================================
|
||||
# Defaults - these shouldn't need changing
|
||||
#==========================================
|
||||
PERIODS="hourly daily weekly monthly yearly"
|
||||
hourlyNUM="24"
|
||||
dailyNUM="7"
|
||||
weeklyNUM="4"
|
||||
monthlyNUM="12"
|
||||
yearlyNUM="7"
|
||||
|
||||
hourlyNEXT="daily"
|
||||
dailyNEXT="weekly"
|
||||
weeklyNEXT="monthly"
|
||||
monthlyNEXT="yearly"
|
||||
|
||||
# required programs
|
||||
MAIL=`which mail`
|
||||
GREP=`which grep`
|
||||
LS=`which ls`
|
||||
ID=`which id`
|
||||
DATE=`which date`
|
||||
DF=`which df`
|
||||
GZIP=`which gzip`
|
||||
GZIPSUF=gz
|
||||
RM=`which rm`
|
||||
LN=`which ln`
|
||||
CUT=`which cut`
|
||||
AWK=`which awk`
|
||||
CP=`which cp`
|
||||
# determine today's date
|
||||
TODAY=`$DATE '+%Y-%m-%d-%a'`
|
||||
# determine today's date
|
||||
NOW=`$DATE '+%H-%M-%S'`
|
||||
# a timestamp for logging purposes
|
||||
TIMESTAMP=`$DATE '+%Y-%m-%d %H:%M.%S'`
|
||||
# temporary holding point for email
|
||||
TMP_DIR=/tmp
|
||||
TMP_EMAIL=$TMP_DIR/$EGDB_NAME"_tmp_email_"$TODAY.$TIME
|
||||
#
|
||||
#==========================================
|
||||
# MySQL vars...
|
||||
MYTMP=$MYBKP/tmp-$DATE
|
||||
MYDUMP=`which mysqldump`
|
||||
MYSQL=`which mysql`
|
||||
MYSHOW=`which mysqlshow`
|
||||
#==========================================
|
||||
# The Functions - these have to be defined
|
||||
# before they're called! Note, refer
|
||||
# to them without the "()" and provide
|
||||
# up to one argument, referred to as "$@"
|
||||
# in the function...
|
||||
#==========================================
|
||||
#
|
||||
# function to direct a message...
|
||||
message() {
|
||||
# a timestamp for logging purposes
|
||||
timestamp
|
||||
if test -w $LOG ; then
|
||||
echo "$EGDB_NAME: $TIMESTAMP $@" >> $LOG
|
||||
fi
|
||||
if test -w $TMP_EMAIL ; then
|
||||
echo "$EGDB_NAME: $TIMESTAMP $@" >> $TMP_EMAIL
|
||||
fi
|
||||
verbose "$TIMESTAMP $@"
|
||||
}
|
||||
#
|
||||
# function to direct a message...
|
||||
verbose() {
|
||||
if test $VERBOSE ; then
|
||||
echo "$@"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# insert a blank line into the log and on the console
|
||||
insert_blank() {
|
||||
echo "" >> $TMP_EMAIL
|
||||
verbose ""
|
||||
}
|
||||
#
|
||||
# update date and time info..
|
||||
today() {
|
||||
# determine today's date
|
||||
TODAY=`$DATE '+%Y-%m-%d-%a'`
|
||||
}
|
||||
#
|
||||
#
|
||||
now() {
|
||||
# determine today's date
|
||||
NOW=`$DATE '+%H-%M-%S'`
|
||||
}
|
||||
#
|
||||
#
|
||||
timestamp() {
|
||||
# a timestamp for logging purposes
|
||||
TIMESTAMP=`$DATE '+%Y-%m-%d %H:%M.%S'`
|
||||
}
|
||||
#
|
||||
# create the temporary email file
|
||||
create_tmp_email() {
|
||||
if test -d $TMP_DIR ; then
|
||||
if test -w $TMP_DIR ; then
|
||||
touch $TMP_EMAIL 2>&1
|
||||
else
|
||||
error "Email tmp directory $TMP_DIR is not writable"
|
||||
fi
|
||||
else
|
||||
error "Email tmp directory $TMP_DIR does not exist"
|
||||
fi
|
||||
|
||||
if test -w $TMP_EMAIL ; then
|
||||
message "created temporary email $TMP_EMAIL"
|
||||
else
|
||||
error "Failed to create temporary email $TMP_EMAIL"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# send the contents of the temporary file to the
|
||||
# designated report recipient
|
||||
send_email_report() {
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "sending email report to $EMAIL_TO"
|
||||
if test $ERROR_STATUS == 1 ; then
|
||||
EMAIL_SUBJ="[ERROR] $MACHINE_NAME $DEFAULT_EMAIL_SUBJ"
|
||||
else
|
||||
EMAIL_SUBJ="[SUCCESS] $MACHINE_NAME $DEFAULT_EMAIL_SUBJ"
|
||||
fi
|
||||
# check space again to see how close things are to full
|
||||
|
||||
message "Printing disk space for reference purposes:"
|
||||
DISK_SPACE=`$DF`
|
||||
message "$DISK_SPACE"
|
||||
# send it to each email address in the list...
|
||||
for EMAIL_ADD in $EMAIL_TO
|
||||
do
|
||||
RES=`$MAIL -s "$EMAIL_SUBJ" $EMAIL_ADD < $TMP_EMAIL`
|
||||
if test -z $RES ; then
|
||||
if test $ERROR_STATUS == 1 ; then
|
||||
message "Error email report successfully sent to $EMAIL_ADD"
|
||||
else
|
||||
message "Email report successfully sent to $EMAIL_ADD"
|
||||
fi
|
||||
else
|
||||
if ! test $ERROR_STATUS == 1 ; then
|
||||
error "Email report send to $EMAIL_ADD failed with this message: $RES"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if test -w $TMP_EMAIL ; then
|
||||
$RM $TMP_EMAIL 2>&1
|
||||
else
|
||||
if ! test $ERROR_STATUS == 1 ; then
|
||||
error "Failed to remove email message file, $TMP_EMAIL: permission denied."
|
||||
fi
|
||||
fi
|
||||
if test -f $TMP_EMAIL ; then
|
||||
error "Failed to remove email message file $TMP_EMAIL for an unknown reason"
|
||||
else
|
||||
message "successfully removed temporary email $TMP_EMAIL"
|
||||
fi
|
||||
else
|
||||
if ! test $ERROR_STATUS == 1 ; then
|
||||
error "Email message file, $TMP_EMAIL, does not exist."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
#
|
||||
# function to direct an error...
|
||||
error() {
|
||||
#
|
||||
# recognise that the system experienced
|
||||
# an error and send out a special email, and halt
|
||||
# the program!
|
||||
timestamp
|
||||
ERROR_STATUS=1
|
||||
#
|
||||
# get current user details
|
||||
USER_DETAILS=`$ID`
|
||||
if test -w $LOG ; then
|
||||
echo "$EGDB_NAME: **ERROR** $TIMESTAMP $@" >> $LOG
|
||||
echo "$EGDB_NAME: user details - $USER_DETAILS" >> $LOG
|
||||
fi
|
||||
if test -w $TMP_EMAIL ; then
|
||||
echo "$EGDB_NAME: **ERROR** $TIMESTAMP $@" >> $TMP_EMAIL
|
||||
echo " user details: $USER_DETAILS" >> $LOG
|
||||
fi
|
||||
verbose "$TIMESTAMP **ERROR** $@"
|
||||
verbose " user details: $USER_DETAILS"
|
||||
send_email_report
|
||||
exit 1
|
||||
}
|
||||
#
|
||||
# delete old backups
|
||||
delete_old() {
|
||||
for PERIOD in $PERIODS
|
||||
do
|
||||
BU_TO_KEEP=$((${PERIOD}NUM))
|
||||
PATTERN="$PERIOD-$DB-*.*"
|
||||
message "keeping $BU_TO_KEEP files for $PERIOD based on the pattern $PATTERN"
|
||||
PRUNEABLES=`$LS -t1 $BU_DIR/$PATTERN`
|
||||
#echo "pruneable files: $PRUNEABLES"
|
||||
NUM=0
|
||||
for FILE in $PRUNEABLES
|
||||
do
|
||||
NUM=$(($NUM + 1))
|
||||
if test $NUM -gt $BU_TO_KEEP ; then
|
||||
message "removing $FILE ($NUM/$BU_TO_KEEP)"
|
||||
$RM $FILE
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
#
|
||||
# convert last monthly into daily, daily->weekly, weekly->monthly, monthly->yearly
|
||||
roll_over() {
|
||||
# First figure out if this backup is a "roll" one
|
||||
# by conducting a few tests
|
||||
hourly_ROLL=0
|
||||
daily_ROLL=0
|
||||
weekly_ROLL=0
|
||||
monthly_ROLL=0
|
||||
message "checking for roll overs"
|
||||
# hour of the day " 0"-"23"
|
||||
TEST=`$DATE '+%k'`
|
||||
#TEST=`$DATE '+%k' --date="2008-01-01 00:00"`
|
||||
if test $TEST -eq " 0" ; then # note the "[space]0"
|
||||
# if test "0" -eq "0" ; then
|
||||
message "time ($TEST) to create a new daily backup!"
|
||||
hourly_ROLL=1
|
||||
fi
|
||||
message "new day? $TEST"
|
||||
# day of the week 0-6
|
||||
TEST=`$DATE '+%w'`
|
||||
if test $TEST -eq "0" && test $hourly_ROLL == 1 ; then
|
||||
message "time ($TEST) to create a new weekly backup!"
|
||||
daily_ROLL=1
|
||||
fi
|
||||
message "new week? $TEST"
|
||||
# day of month 0-31ish
|
||||
TEST=`$DATE '+%d'`
|
||||
# should also be at the start of a day... not necessarily a week.
|
||||
if test $TEST -eq "01" && test $hourly_ROLL == 1 ; then
|
||||
message "time ($TEST) to create a new monthly backup!"
|
||||
weekly_ROLL=1
|
||||
fi
|
||||
message "new month? $TEST"
|
||||
# day of year 0-366ish
|
||||
TEST=`$DATE '+%j'`
|
||||
# should also be at the start of a day... not necessarily a week.
|
||||
if test $TEST -eq "001" && test $hourly_ROLL == 1 ; then
|
||||
message "time ($TEST) to create a new yearly backup!"
|
||||
monthly_ROLL=1
|
||||
fi
|
||||
message "new year? $TEST"
|
||||
# organise the actual rolling of files.
|
||||
ROLL=0
|
||||
for PERIOD in $PERIODS
|
||||
do
|
||||
# do we roll this period's backup?
|
||||
ROLL=$((${PERIOD}_ROLL))
|
||||
echo "checking $PERIOD for rollover: $ROLL"
|
||||
if test $ROLL -eq "1" ; then
|
||||
echo "rollover for $PERIOD"
|
||||
# Use the dynamic variable approach...
|
||||
VAR=${PERIOD}NEXT
|
||||
# ...to set value of NEXT to the *value* of $VAR
|
||||
eval NEXT=\$$VAR
|
||||
if ! test -z $NEXT; then
|
||||
echo "rolling $PERIOD to $NEXT"
|
||||
# get the root name for the most recent $PERIOD file
|
||||
PATTERN="$FROOT-*.*"
|
||||
PERIOD_FILES=`$LS -qt1 $BU_DIR/$PATTERN`
|
||||
RET=$?
|
||||
echo "\$?=$RET"
|
||||
# only proceed with the copy if there's a suitable file
|
||||
# ls return 0 if it finds files, 1 or 2 if not
|
||||
if test $RET == 0 ; then
|
||||
for FILE in $PERIOD_FILES
|
||||
do
|
||||
echo "copying $FILE"
|
||||
break
|
||||
done
|
||||
# the echo "" is required to launch awk properly...
|
||||
NEW_FILE=`echo "" | $AWK -v fn=$FILE -v nxt=$NEXT '{
|
||||
split(fn,filepath,"/");
|
||||
num=0; for (val in filepath) num++;
|
||||
filename = filepath[num];
|
||||
split(filename,filenameparts,"-");
|
||||
filecut = length(filenameparts[1]);
|
||||
pathcut = length(filename);
|
||||
path = substr(fn,1,length(fn)-pathcut);
|
||||
subname = substr(filename, filecut + 1);
|
||||
print path nxt subname; }'`
|
||||
echo "to $NEW_FILE"
|
||||
$CP $FILE $NEW_FILE
|
||||
else
|
||||
echo "no suitable file to copy!"
|
||||
fi
|
||||
else
|
||||
echo "there is no 'next' for $PERIOD"
|
||||
fi
|
||||
else
|
||||
echo "no rollover for $PERIOD this time"
|
||||
fi
|
||||
done
|
||||
}
|
||||
#
|
||||
# Make sure there's sufficient disk space (or at least that it's not full!)
|
||||
check_space() {
|
||||
RES=`$DF -h`
|
||||
#message "$RES"
|
||||
TEST=0
|
||||
PCENT="100%"
|
||||
TEST=`echo "$RES" | $GREP -c "$PCENT"`
|
||||
if test $TEST == 1 ; then
|
||||
PART_LINE=`echo "$RES" | $GREP "$PCENT"`
|
||||
# get the device name which is showing $PCENT
|
||||
TEST=`echo $PART_LINE | $CUT -f 1 -d ' '`
|
||||
# if it has a partition number in the name, it's probably a block
|
||||
# device rather than, say, a CDROM...
|
||||
TEST2=`echo $TEST | $GREP -c [0-9]`
|
||||
echo "Test2 = $TEST2"
|
||||
if test $TEST2 == 1 ; then
|
||||
error "Partition $TEST is full - detail: $PART_LINE"
|
||||
else
|
||||
message "false alarm - it's only the $TEST volume..."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
#
|
||||
# this is where we do all the backup-related stuff - what ebu used to do...
|
||||
do_backup() {
|
||||
# first, find out what dbs there are
|
||||
DBLIST=`$MYSHOW -u $USER -p$PASSWORD | $AWK '{ if ($2!~/^$/&&$2!="Databases") { print $2;}}'`
|
||||
#message "List of databases: $DBLIST"
|
||||
# for each db in the list, create a compressed backup in the right place
|
||||
message "creating a backup of the MySQL databases on $MACHINE_NAME..."
|
||||
for DB in $DBLIST
|
||||
do
|
||||
FROOT=hourly-$DB
|
||||
# work out which backups should be turned into dailies, weeklies, monthlies, etc.
|
||||
roll_over
|
||||
# we only create hourlies
|
||||
now
|
||||
today
|
||||
FNAME=$FROOT-$TODAY.$NOW
|
||||
# --opt is same as --add-drop-table --add-locks --all --extended-insert --quick --lock-tables
|
||||
CMD="$MYDUMP -u $USER -p$PASSWORD --opt $DB"
|
||||
# create the new backup!
|
||||
if test $DRY_RUN == 1 ; then
|
||||
message "I would be doing this (if it was not a dry run):"
|
||||
message "$CMD > $BU_DIR/$FNAME"
|
||||
else
|
||||
message "backing up database $DB..."
|
||||
message "running $MYDUMP with user $USER, creating $BU_DIR/$FNAME"
|
||||
$CMD > $BU_DIR/$FNAME
|
||||
if test -f $BU_DIR/$FNAME ; then
|
||||
$GZIP $BU_DIR/$FNAME
|
||||
else
|
||||
error "backup sql file, $BU_DIR/$FNAME, doesn't exist!"
|
||||
fi
|
||||
fi
|
||||
# delete old backups, so that only BU_TO_KEEP of them are stored at once
|
||||
delete_old
|
||||
done
|
||||
}
|
||||
#========================================
|
||||
# The Error Checking
|
||||
#========================================
|
||||
#
|
||||
# first, check that all the necessary files and stuff are there and usable
|
||||
#
|
||||
# if the log doesn't exist, create it
|
||||
if ! test -f $LOG ; then
|
||||
message "creating non-existent log file $LOG"
|
||||
RET=`touch $LOG 2>&1 /dev/null`
|
||||
TEST=`echo $RET | $GREP -c "Permission denied" -`
|
||||
if test $TEST == 1 ; then
|
||||
error "Failed to create log file $LOG, user cannot write to that directory"
|
||||
fi
|
||||
fi
|
||||
# checking whether it's there an is writable
|
||||
if ! test -w $LOG ; then
|
||||
error "Log file $LOG not writable"
|
||||
fi
|
||||
|
||||
#========================================
|
||||
# The Functional Part of the Script
|
||||
#========================================
|
||||
# set variable defaults
|
||||
ERROR_STATUS=0 # initially assume no errors
|
||||
VERBOSE=0 # initially assume quiet output
|
||||
DRY_RUN=0 # assume this is not a dry run...
|
||||
MODE=help
|
||||
# process any arguments
|
||||
while test $# -ne 0 ; do # while there are arguments
|
||||
message "argument: $1"
|
||||
case $1 in
|
||||
--verbose|-v)
|
||||
verbose "setting verbostity to ON"
|
||||
VERBOSE=1
|
||||
;;
|
||||
--dryrun)
|
||||
verbose "setting dryrun to ON"
|
||||
DRY_RUN=1
|
||||
;;
|
||||
--run|-r)
|
||||
verbose "setting run to ON"
|
||||
MODE=run
|
||||
;;
|
||||
--help|-h|-?)
|
||||
verbose "setting mode to HELP"
|
||||
MODE=help
|
||||
;;
|
||||
*)
|
||||
verbose "unknown option: $1"
|
||||
message "unknown option: $1"
|
||||
MODE=help
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
if ! test $MODE == "help" ; then
|
||||
MODE=run
|
||||
fi
|
||||
#
|
||||
# set things in motion based on the script arguments
|
||||
case $MODE in
|
||||
run)
|
||||
create_tmp_email
|
||||
do_backup
|
||||
# put a space in the email to separate tasks
|
||||
insert_blank
|
||||
#
|
||||
# send the resulting email
|
||||
send_email_report
|
||||
;;
|
||||
help)
|
||||
echo ""
|
||||
echo "$EGDB_NAME, version $VERSION, copyright 2005-7 Egressive Ltd, http://egressive.com"
|
||||
echo "==================="
|
||||
echo "usage: $EGDB_NAME"
|
||||
echo "== options =="
|
||||
echo "-r or --run - actually run the backups!"
|
||||
echo "-v or --verbose - give extra feedback on progress to stdout"
|
||||
echo "-c or --configroot config_filename - root for configuration filenames"
|
||||
echo "--dryrun - do everything else, but *don't* delete anything or run the backup"
|
||||
echo ""
|
||||
;;
|
||||
esac
|
||||
|
4
egdbback/egdbback-cron
Executable file
4
egdbback/egdbback-cron
Executable file
|
@ -0,0 +1,4 @@
|
|||
# run the egdb backup programs every day to backup our MySQL database.
|
||||
# hourlies - every hour at 5 past the hour...
|
||||
5 * * * * root /etc/egscripts/egdbback/egdbback --run
|
||||
|
471
egdbback/egdbback-new
Executable file
471
egdbback/egdbback-new
Executable file
|
@ -0,0 +1,471 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# egdbback, copyright 2005-2008 Egressive Limited, http://egressive.com
|
||||
#
|
||||
# this script runs periodic database backups...
|
||||
#
|
||||
#==========================================
|
||||
# The Variables - these must be define
|
||||
# before they're referenced
|
||||
#==========================================
|
||||
VERSION="0.3"
|
||||
EGDB_NAME=`basename $0`
|
||||
EGDB_DIR=/etc/egscripts/egdbback
|
||||
EGDB_CMD=$EGDB_DIR/egdbback
|
||||
EGDB_CONF_DIR=$EGDB_DIR/conf
|
||||
SITE_CONF="$EGDB_CONF_DIR/site.conf"
|
||||
# the appropriate mysql paths
|
||||
MYDIR=/var/lib/mysql
|
||||
#
|
||||
# this provides values for MACHINE_NAME and EMAIL
|
||||
. $SITE_CONF
|
||||
#
|
||||
LOGS=/var/log
|
||||
LOG=$LOGS/egdbback.log
|
||||
#==========================================
|
||||
# Defaults - these shouldn't need changing
|
||||
#==========================================
|
||||
PERIODS="hourly daily weekly monthly yearly"
|
||||
hourlyNUM="24"
|
||||
dailyNUM="7"
|
||||
weeklyNUM="4"
|
||||
monthlyNUM="12"
|
||||
yearlyNUM="7"
|
||||
|
||||
hourlyNEXT="daily"
|
||||
dailyNEXT="weekly"
|
||||
weeklyNEXT="monthly"
|
||||
monthlyNEXT="yearly"
|
||||
|
||||
# required programs
|
||||
MAIL=`which mail`
|
||||
GREP=`which grep`
|
||||
LS=`which ls`
|
||||
ID=`which id`
|
||||
DATE=`which date`
|
||||
DF=`which df`
|
||||
GZIP=`which gzip`
|
||||
GZIPSUF=gz
|
||||
RM=`which rm`
|
||||
LN=`which ln`
|
||||
CUT=`which cut`
|
||||
AWK=`which awk`
|
||||
# determine today's date
|
||||
TODAY=`$DATE '+%Y-%m-%d-%a'`
|
||||
# determine today's date
|
||||
NOW=`$DATE '+%H-%M-%S'`
|
||||
# a timestamp for logging purposes
|
||||
TIMESTAMP=`$DATE '+%Y-%m-%d %H:%M.%S'`
|
||||
# temporary holding point for email
|
||||
TMP_DIR=/tmp
|
||||
TMP_EMAIL=$TMP_DIR/$EGDB_NAME"_tmp_email_"$TODAY.$TIME
|
||||
#
|
||||
#==========================================
|
||||
# MySQL vars...
|
||||
MYTMP=$MYBKP/tmp-$DATE
|
||||
MYDUMP=`which mysqldump`
|
||||
MYSQL=`which mysql`
|
||||
MYSHOW=`which mysqlshow`
|
||||
#==========================================
|
||||
# The Functions - these have to be defined
|
||||
# before they're called! Note, refer
|
||||
# to them without the "()" and provide
|
||||
# up to one argument, referred to as "$@"
|
||||
# in the function...
|
||||
#==========================================
|
||||
#
|
||||
# function to direct a message...
|
||||
message() {
|
||||
# a timestamp for logging purposes
|
||||
timestamp
|
||||
if test -w $LOG ; then
|
||||
echo "$EGDB_NAME: $TIMESTAMP $@" >> $LOG
|
||||
fi
|
||||
if test -w $TMP_EMAIL ; then
|
||||
echo "$EGDB_NAME: $TIMESTAMP $@" >> $TMP_EMAIL
|
||||
fi
|
||||
verbose "$TIMESTAMP $@"
|
||||
}
|
||||
#
|
||||
# function to direct a message...
|
||||
verbose() {
|
||||
if test $VERBOSE ; then
|
||||
echo "$@"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# insert a blank line into the log and on the console
|
||||
insert_blank() {
|
||||
echo "" >> $TMP_EMAIL
|
||||
verbose ""
|
||||
}
|
||||
#
|
||||
# update date and time info..
|
||||
today() {
|
||||
# determine today's date
|
||||
TODAY=`$DATE '+%Y-%m-%d-%a'`
|
||||
}
|
||||
#
|
||||
#
|
||||
now() {
|
||||
# determine today's date
|
||||
NOW=`$DATE '+%H-%M-%S'`
|
||||
}
|
||||
#
|
||||
#
|
||||
timestamp() {
|
||||
# a timestamp for logging purposes
|
||||
TIMESTAMP=`$DATE '+%Y-%m-%d %H:%M.%S'`
|
||||
}
|
||||
#
|
||||
# create the temporary email file
|
||||
create_tmp_email() {
|
||||
if test -d $TMP_DIR ; then
|
||||
if test -w $TMP_DIR ; then
|
||||
touch $TMP_EMAIL 2>&1
|
||||
else
|
||||
error "Email tmp directory $TMP_DIR is not writable"
|
||||
fi
|
||||
else
|
||||
error "Email tmp directory $TMP_DIR does not exist"
|
||||
fi
|
||||
|
||||
if test -w $TMP_EMAIL ; then
|
||||
message "created temporary email $TMP_EMAIL"
|
||||
else
|
||||
error "Failed to create temporary email $TMP_EMAIL"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# send the contents of the temporary file to the
|
||||
# designated report recipient
|
||||
send_email_report() {
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "sending email report to $EMAIL_TO"
|
||||
if test $ERROR_STATUS == 1 ; then
|
||||
EMAIL_SUBJ="[ERROR] $MACHINE_NAME $DEFAULT_EMAIL_SUBJ"
|
||||
else
|
||||
EMAIL_SUBJ="[SUCCESS] $MACHINE_NAME $DEFAULT_EMAIL_SUBJ"
|
||||
fi
|
||||
# check space again to see how close things are to full
|
||||
|
||||
message "Printing disk space for reference purposes:"
|
||||
DISK_SPACE=`$DF`
|
||||
message "$DISK_SPACE"
|
||||
# send it to each email address in the list...
|
||||
for EMAIL_ADD in $EMAIL_TO
|
||||
do
|
||||
RES=`$MAIL -s "$EMAIL_SUBJ" $EMAIL_ADD < $TMP_EMAIL`
|
||||
if test -z $RES ; then
|
||||
if test $ERROR_STATUS == 1 ; then
|
||||
message "Error email report successfully sent to $EMAIL_ADD"
|
||||
else
|
||||
message "Email report successfully sent to $EMAIL_ADD"
|
||||
fi
|
||||
else
|
||||
if ! test $ERROR_STATUS == 1 ; then
|
||||
error "Email report send to $EMAIL_ADD failed with this message: $RES"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if test -w $TMP_EMAIL ; then
|
||||
$RM $TMP_EMAIL 2>&1
|
||||
else
|
||||
if ! test $ERROR_STATUS == 1 ; then
|
||||
error "Failed to remove email message file, $TMP_EMAIL: permission denied."
|
||||
fi
|
||||
fi
|
||||
if test -f $TMP_EMAIL ; then
|
||||
error "Failed to remove email message file $TMP_EMAIL for an unknown reason"
|
||||
else
|
||||
message "successfully removed temporary email $TMP_EMAIL"
|
||||
fi
|
||||
else
|
||||
if ! test $ERROR_STATUS == 1 ; then
|
||||
error "Email message file, $TMP_EMAIL, does not exist."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
#
|
||||
# function to direct an error...
|
||||
error() {
|
||||
#
|
||||
# recognise that the system experienced
|
||||
# an error and send out a special email, and halt
|
||||
# the program!
|
||||
timestamp
|
||||
ERROR_STATUS=1
|
||||
#
|
||||
# get current user details
|
||||
USER_DETAILS=`$ID`
|
||||
if test -w $LOG ; then
|
||||
echo "$EGDB_NAME: **ERROR** $TIMESTAMP $@" >> $LOG
|
||||
echo "$EGDB_NAME: user details - $USER_DETAILS" >> $LOG
|
||||
fi
|
||||
if test -w $TMP_EMAIL ; then
|
||||
echo "$EGDB_NAME: **ERROR** $TIMESTAMP $@" >> $TMP_EMAIL
|
||||
echo " user details: $USER_DETAILS" >> $LOG
|
||||
fi
|
||||
verbose "$TIMESTAMP **ERROR** $@"
|
||||
verbose " user details: $USER_DETAILS"
|
||||
send_email_report
|
||||
exit 1
|
||||
}
|
||||
#
|
||||
# build list of backup configuration files
|
||||
get_confs() {
|
||||
CONFS=`$LS -1 $EGDB_CONF_DIR/$CONF_ROOT*.conf 2>&1`
|
||||
TEST=`echo $CONFS | $GREP -c "No such file or directory" -`
|
||||
if test $TEST == 1 ; then
|
||||
error "No configuration files found with root $CONF_ROOT in $EGDB_CONF_DIR"
|
||||
fi
|
||||
}
|
||||
# delete old backups
|
||||
delete_old() {
|
||||
for PERIOD in $PERIODS
|
||||
do
|
||||
BU_TO_KEEP=$((${PERIOD}NUM))
|
||||
echo "keeping $BU_TO_KEEP files for $PERIOD"
|
||||
PATTERN="$FROOT-*.*"
|
||||
PRUNEABLES=`$LS -tr1 $BU_DIR/$PATTERN`
|
||||
#echo "pruneable files: $PRUNEABLES"
|
||||
NUM=0
|
||||
for FILE in $PRUNEABLES
|
||||
do
|
||||
NUM=$(($NUM + 1))
|
||||
if test $NUM -gt $BU_TO_KEEP ; then
|
||||
echo "removing $FILE ($NUM/$BU_TO_KEEP)"
|
||||
$RM $FILE
|
||||
# else
|
||||
# echo "not removing $FILE ($NUM/$BU_TO_KEEP)"
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
#
|
||||
# convert last monthly into daily, daily->weekly, weekly->monthly, monthly->yearly
|
||||
roll_over() {
|
||||
# First figure out if this backup is a "roll" one
|
||||
# by conducting a few tests
|
||||
hourly_ROLL=0
|
||||
daily_ROLL=0
|
||||
weekly_ROLL=0
|
||||
monthly_ROLL=0
|
||||
# hour of the day 0-23
|
||||
if test `$DATE '+%k'` -eq "0" ; then
|
||||
message "it's time to create a new daily backup!"
|
||||
hourly_ROLL=1
|
||||
fi
|
||||
# day of the week 0-6
|
||||
if test `$DATE '+%w'` -eq "0" ; then
|
||||
message "it's time to create a new weekly backup!"
|
||||
daily_ROLL=1
|
||||
fi
|
||||
# day of month 0-31ish
|
||||
if test `$DATE '+%d'` -eq "00" ; then
|
||||
message "it's time to create a new monthly backup!"
|
||||
weekly_ROLL=1
|
||||
fi
|
||||
# day of year 0-366ish
|
||||
if test `$DATE '+%j'` -eq "000" ; then
|
||||
message "it's time to create a new yearly backup!"
|
||||
monthly_ROLL=1
|
||||
fi
|
||||
for PERIOD in $PERIODS
|
||||
do
|
||||
ROLL=$((${PERIOD}_ROLL))
|
||||
echo "checking $PERIOD for rollover: $ROLL"
|
||||
if test $ROLL -eq "1" ; then
|
||||
echo "rollover for $PERIOD"
|
||||
# Use the dynamic variable approach...
|
||||
VAR=${PERIOD}NEXT
|
||||
# ...to set value of NEXT to the *value* of $VAR
|
||||
eval NEXT=\$$VAR
|
||||
if ! test -z $NEXT; then
|
||||
echo "rolling $PERIOD to the value of $VAR ($NEXT)"
|
||||
# get the root name for the most recent $PERIOD file
|
||||
PATTERN="$FROOT-*.*"
|
||||
PERIOD_FILES=`$LS -qt1 $BU_DIR/$PATTERN`
|
||||
echo "\$?=$?"
|
||||
# only proceed with the copy if there's a suitable file
|
||||
if test $? ; then
|
||||
for FILE in $PERIOD_FILES
|
||||
do
|
||||
echo "copying $FILE"
|
||||
break
|
||||
done
|
||||
# the echo "" is required to launch awk properly...
|
||||
NEW_FILE=`echo "" | $AWK -v fn=$FILE -v nxt="NEXT" '{
|
||||
split(fn,filepath,"/");
|
||||
filename = filepath[length(filepath)];
|
||||
split(filename,filenameparts,"-");
|
||||
filecut = length(filenameparts[1]);
|
||||
pathcut = length(filename);
|
||||
path = substr(fn,1,length(fn)-pathcut);
|
||||
subname = substr(filename, filecut + 1);
|
||||
print path nxt subname; }'`
|
||||
echo "to $NEW_FILE"
|
||||
$CP $FILE $NEW_FILE
|
||||
else
|
||||
echo "there's no suitable file to copy!"
|
||||
fi
|
||||
else
|
||||
echo "there is no 'next' for $PERIOD"
|
||||
fi
|
||||
else
|
||||
echo "no rollover for $PERIOD this time"
|
||||
fi
|
||||
done
|
||||
}
|
||||
#
|
||||
# Make sure there's sufficient disk space (or at least that it's not full!)
|
||||
check_space() {
|
||||
RES=`$DF -h`
|
||||
#message "$RES"
|
||||
TEST=0
|
||||
PCENT="100%"
|
||||
TEST=`echo "$RES" | $GREP -c "$PCENT"`
|
||||
if test $TEST == 1 ; then
|
||||
PART_LINE=`echo "$RES" | $GREP "$PCENT"`
|
||||
# get the device name which is showing $PCENT
|
||||
TEST=`echo $PART_LINE | $CUT -f 1 -d ' '`
|
||||
# if it has a partition number in the name, it's probably a block
|
||||
# device rather than, say, a CDROM...
|
||||
TEST2=`echo $TEST | $GREP -c [0-9]`
|
||||
echo "Test2 = $TEST2"
|
||||
if test $TEST2 == 1 ; then
|
||||
error "Partition $TEST is full - detail: $PART_LINE"
|
||||
else
|
||||
message "false alarm - it's only the $TEST volume..."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
#
|
||||
# this is where we do all the backup-related stuff - what ebu used to do...
|
||||
do_backup() {
|
||||
# first, find out what dbs there are
|
||||
DBLIST=`$MYSHOW -u $USER -p$PASSWORD | $AWK '{ if ($2!~/^$/&&$2!="Databases") { print $2;}}'`
|
||||
#message "List of databases: $DBLIST"
|
||||
# for each db in the list, create a compressed backup in the right place
|
||||
message "creating a backup of the MySQL databases on $MACHINE_NAME..."
|
||||
for DB in $DBLIST
|
||||
do
|
||||
FROOT=hourly-$DB
|
||||
# work out which backups should be turned into dailies, weeklies, monthlies, etc.
|
||||
roll_over
|
||||
# we only create hourlies
|
||||
now
|
||||
today
|
||||
FNAME=$FROOT-$TODAY.$NOW
|
||||
# --opt is same as --add-drop-table --add-locks --all --extended-insert --quick --lock-tables
|
||||
CMD="$MYDUMP -u $USER -p$PASSWORD --opt $DB"
|
||||
# create the new backup!
|
||||
if test $DRY_RUN == 1 ; then
|
||||
message "I would be doing this (if it was not a dry run):"
|
||||
message "$CMD > $BU_DIR/$FNAME"
|
||||
else
|
||||
message "backing up table $DB..."
|
||||
message "running $MYDUMP with user $USER, creating $BU_DIR/$FNAME"
|
||||
$CMD > $BU_DIR/$FNAME
|
||||
if test -f $BU_DIR/$FNAME ; then
|
||||
$GZIP $BU_DIR/$FNAME
|
||||
else
|
||||
error "backup sql file, $BU_DIR/$FNAME, doesn't exist!"
|
||||
fi
|
||||
fi
|
||||
# delete old backups, so that only BU_TO_KEEP of them are stored at once
|
||||
delete_old
|
||||
done
|
||||
}
|
||||
#========================================
|
||||
# The Error Checking
|
||||
#========================================
|
||||
#
|
||||
# first, check that all the necessary files and stuff are there and usable
|
||||
#
|
||||
# if the log doesn't exist, create it
|
||||
if ! test -f $LOG ; then
|
||||
message "creating non-existent log file $LOG"
|
||||
RET=`touch $LOG 2>&1 /dev/null`
|
||||
TEST=`echo $RET | $GREP -c "Permission denied" -`
|
||||
if test $TEST == 1 ; then
|
||||
error "Failed to create log file $LOG, user cannot write to that directory"
|
||||
fi
|
||||
fi
|
||||
# checking whether it's there an is writable
|
||||
if ! test -w $LOG ; then
|
||||
error "Log file $LOG not writable"
|
||||
fi
|
||||
|
||||
#========================================
|
||||
# The Functional Part of the Script
|
||||
#========================================
|
||||
# set variable defaults
|
||||
ERROR_STATUS=0 # initially assume no errors
|
||||
VERBOSE=0 # initially assume quiet output
|
||||
CONF_ROOT="hourly" # set it to something we know so we can test if it's changed
|
||||
DRY_RUN=0 # assume this is not a dry run...
|
||||
CURRENT_LINK="none"
|
||||
MODE=help
|
||||
# process any arguments
|
||||
while test $# -ne 0 ; do # while there are arguments
|
||||
message "argument: $1"
|
||||
case $1 in
|
||||
--help|-h|-?)
|
||||
verbose "setting mode to HELP"
|
||||
MODE=help
|
||||
;;
|
||||
--verbose|-v)
|
||||
verbose "setting verbostity to ON"
|
||||
VERBOSE=1
|
||||
;;
|
||||
--dryrun)
|
||||
verbose "setting dryrun to ON"
|
||||
DRY_RUN=1
|
||||
;;
|
||||
*)
|
||||
verbose "unknown option: $1"
|
||||
message "unknown option: $1"
|
||||
MODE=help
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
if ! test $MODE == "help" ; then
|
||||
MODE=run
|
||||
fi
|
||||
#
|
||||
# set things in motion based on the script arguments
|
||||
case $MODE in
|
||||
run)
|
||||
create_tmp_email
|
||||
get_confs
|
||||
# run backup for each file
|
||||
for BU_CONF in $CONFS
|
||||
do
|
||||
message "do backup with conf: $BU_CONF"
|
||||
. $BU_CONF # grab the current variables for this conf file...
|
||||
do_backup
|
||||
# put a space in the email to separate tasks
|
||||
insert_blank
|
||||
done
|
||||
#
|
||||
# send the resulting email
|
||||
send_email_report
|
||||
;;
|
||||
help)
|
||||
if test $CONF_ROOT; then
|
||||
echo "error: please specify a period for egbackup"
|
||||
fi
|
||||
echo ""
|
||||
echo "$EGDB_NAME, version $VERSION, copyright 2005-7 Egressive Ltd, http://egressive.com"
|
||||
echo "==================="
|
||||
echo "usage: $EGDB_NAME"
|
||||
echo "== options =="
|
||||
echo "-v or --verbose - give extra feedback on progress to stdout"
|
||||
echo "-c or --configroot config_filename - root for configuration filenames"
|
||||
echo "--dryrun - do everything else, but *don't* delete anything or run the backup"
|
||||
echo ""
|
||||
;;
|
||||
esac
|
||||
|
473
egdbback/egdbback-new.bak
Executable file
473
egdbback/egdbback-new.bak
Executable file
|
@ -0,0 +1,473 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# egdbback, copyright 2005-2008 Egressive Limited, http://egressive.com
|
||||
#
|
||||
# this script runs periodic database backups...
|
||||
#
|
||||
#==========================================
|
||||
# The Variables - these must be define
|
||||
# before they're referenced
|
||||
#==========================================
|
||||
VERSION="0.3"
|
||||
EGDB_NAME=`basename $0`
|
||||
EGDB_DIR=/etc/egscripts/egdbback
|
||||
EGDB_CMD=$EGDB_DIR/egdbback
|
||||
EGDB_CONF_DIR=$EGDB_DIR/conf
|
||||
SITE_CONF="$EGDB_CONF_DIR/site.conf"
|
||||
# the appropriate mysql paths
|
||||
MYDIR=/var/lib/mysql
|
||||
#
|
||||
# this provides values for MACHINE_NAME and EMAIL
|
||||
. $SITE_CONF
|
||||
#
|
||||
LOGS=/var/log
|
||||
LOG=$LOGS/egdbback.log
|
||||
#==========================================
|
||||
# Defaults - these shouldn't need changing
|
||||
#==========================================
|
||||
PERIODS="hourly daily weekly monthly yearly"
|
||||
hourlyNUM="24"
|
||||
dailyNUM="7"
|
||||
weeklyNUM="4"
|
||||
monthlyNUM="12"
|
||||
yearlyNUM="7"
|
||||
# required programs
|
||||
MAIL=`which mail`
|
||||
GREP=`which grep`
|
||||
LS=`which ls`
|
||||
ID=`which id`
|
||||
DATE=`which date`
|
||||
DF=`which df`
|
||||
GZIP=`which gzip`
|
||||
GZIPSUF=gz
|
||||
RM=`which rm`
|
||||
LN=`which ln`
|
||||
CUT=`which cut`
|
||||
AWK=`which awk`
|
||||
# determine today's date
|
||||
TODAY=`$DATE '+%Y-%m-%d-%a'`
|
||||
# determine today's date
|
||||
NOW=`$DATE '+%H-%M-%S'`
|
||||
# a timestamp for logging purposes
|
||||
TIMESTAMP=`$DATE '+%Y-%m-%d %H:%M.%S'`
|
||||
# temporary holding point for email
|
||||
TMP_DIR=/tmp
|
||||
TMP_EMAIL=$TMP_DIR/$EGDB_NAME"_tmp_email_"$TODAY.$TIME
|
||||
#
|
||||
#==========================================
|
||||
# MySQL vars...
|
||||
MYTMP=$MYBKP/tmp-$DATE
|
||||
MYDUMP=`which mysqldump`
|
||||
MYSQL=`which mysql`
|
||||
MYSHOW=`which mysqlshow`
|
||||
# pattern for "ls" command to build list of
|
||||
# pruneable backup files...
|
||||
# -1t = 1 column, ordered by time of last mod
|
||||
PRUNEABLES_CMD="ls -1t"
|
||||
#
|
||||
#==========================================
|
||||
# The Functions - these have to be defined
|
||||
# before they're called! Note, refer
|
||||
# to them without the "()" and provide
|
||||
# up to one argument, referred to as "$@"
|
||||
# in the function...
|
||||
#==========================================
|
||||
#
|
||||
# function to direct a message...
|
||||
message() {
|
||||
# a timestamp for logging purposes
|
||||
timestamp
|
||||
if test -w $LOG ; then
|
||||
echo "$EGDB_NAME: $TIMESTAMP $@" >> $LOG
|
||||
fi
|
||||
if test -w $TMP_EMAIL ; then
|
||||
echo "$EGDB_NAME: $TIMESTAMP $@" >> $TMP_EMAIL
|
||||
fi
|
||||
verbose "$TIMESTAMP $@"
|
||||
}
|
||||
#
|
||||
# function to direct a message...
|
||||
verbose() {
|
||||
if test $VERBOSE ; then
|
||||
echo "$@"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# insert a blank line into the log and on the console
|
||||
insert_blank() {
|
||||
echo "" >> $TMP_EMAIL
|
||||
verbose ""
|
||||
}
|
||||
#
|
||||
# update date and time info..
|
||||
today() {
|
||||
# determine today's date
|
||||
TODAY=`$DATE '+%Y-%m-%d-%a'`
|
||||
}
|
||||
#
|
||||
#
|
||||
now() {
|
||||
# determine today's date
|
||||
NOW=`$DATE '+%H-%M-%S'`
|
||||
}
|
||||
#
|
||||
#
|
||||
timestamp() {
|
||||
# a timestamp for logging purposes
|
||||
TIMESTAMP=`$DATE '+%Y-%m-%d %H:%M.%S'`
|
||||
}
|
||||
#
|
||||
#
|
||||
roll_tests() {
|
||||
hourly_ROLL=0
|
||||
daily_ROLL=0
|
||||
weekly_ROLL=0
|
||||
monthly_ROLL=0
|
||||
# hour of the day 0-23
|
||||
if test `$DATE '+%k'` -eq "0" ; then
|
||||
message "it's time to create a new daily backup!"
|
||||
hourly_ROLL=1
|
||||
fi
|
||||
# day of the week 0-6
|
||||
if test `$DATE '+%w'` -eq "0" ; then
|
||||
message "it's time to create a new weekly backup!"
|
||||
daily_ROLL=1
|
||||
fi
|
||||
# day of month 0-31ish
|
||||
if test `$DATE '+%w'` -eq "00" ; then
|
||||
message "it's time to create a new monthly backup!"
|
||||
weekly_ROLL=1
|
||||
fi
|
||||
# day of year 0-366ish
|
||||
if test `$DATE '+%j'` -eq "000" ; then
|
||||
message "it's time to create a new yearly backup!"
|
||||
yearly_ROLL=1
|
||||
fi
|
||||
}
|
||||
#
|
||||
# create the temporary email file
|
||||
create_tmp_email() {
|
||||
if test -d $TMP_DIR ; then
|
||||
if test -w $TMP_DIR ; then
|
||||
touch $TMP_EMAIL 2>&1
|
||||
else
|
||||
error "Email tmp directory $TMP_DIR is not writable"
|
||||
fi
|
||||
else
|
||||
error "Email tmp directory $TMP_DIR does not exist"
|
||||
fi
|
||||
|
||||
if test -w $TMP_EMAIL ; then
|
||||
message "created temporary email $TMP_EMAIL"
|
||||
else
|
||||
error "Failed to create temporary email $TMP_EMAIL"
|
||||
fi
|
||||
}
|
||||
#
|
||||
# send the contents of the temporary file to the
|
||||
# designated report recipient
|
||||
send_email_report() {
|
||||
if test -f $TMP_EMAIL ; then
|
||||
message "sending email report to $EMAIL_TO"
|
||||
if test $ERROR_STATUS == 1 ; then
|
||||
EMAIL_SUBJ="[ERROR] $MACHINE_NAME $DEFAULT_EMAIL_SUBJ"
|
||||
else
|
||||
EMAIL_SUBJ="[SUCCESS] $MACHINE_NAME $DEFAULT_EMAIL_SUBJ"
|
||||
fi
|
||||
# check space again to see how close things are to full
|
||||
|
||||
message "Printing disk space for reference purposes:"
|
||||
DISK_SPACE=`$DF`
|
||||
message "$DISK_SPACE"
|
||||
# send it to each email address in the list...
|
||||
for EMAIL_ADD in $EMAIL_TO
|
||||
do
|
||||
RES=`$MAIL -s "$EMAIL_SUBJ" $EMAIL_ADD < $TMP_EMAIL`
|
||||
if test -z $RES ; then
|
||||
if test $ERROR_STATUS == 1 ; then
|
||||
message "Error email report successfully sent to $EMAIL_ADD"
|
||||
else
|
||||
message "Email report successfully sent to $EMAIL_ADD"
|
||||
fi
|
||||
else
|
||||
if ! test $ERROR_STATUS == 1 ; then
|
||||
error "Email report send to $EMAIL_ADD failed with this message: $RES"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if test -w $TMP_EMAIL ; then
|
||||
$RM $TMP_EMAIL 2>&1
|
||||
else
|
||||
if ! test $ERROR_STATUS == 1 ; then
|
||||
error "Failed to remove email message file, $TMP_EMAIL: permission denied."
|
||||
fi
|
||||
fi
|
||||
if test -f $TMP_EMAIL ; then
|
||||
error "Failed to remove email message file $TMP_EMAIL for an unknown reason"
|
||||
else
|
||||
message "successfully removed temporary email $TMP_EMAIL"
|
||||
fi
|
||||
else
|
||||
if ! test $ERROR_STATUS == 1 ; then
|
||||
error "Email message file, $TMP_EMAIL, does not exist."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
#
|
||||
# function to direct an error...
|
||||
error() {
|
||||
#
|
||||
# recognise that the system experienced
|
||||
# an error and send out a special email, and halt
|
||||
# the program!
|
||||
timestamp
|
||||
ERROR_STATUS=1
|
||||
#
|
||||
# get current user details
|
||||
USER_DETAILS=`$ID`
|
||||
if test -w $LOG ; then
|
||||
echo "$EGDB_NAME: **ERROR** $TIMESTAMP $@" >> $LOG
|
||||
echo "$EGDB_NAME: user details - $USER_DETAILS" >> $LOG
|
||||
fi
|
||||
if test -w $TMP_EMAIL ; then
|
||||
echo "$EGDB_NAME: **ERROR** $TIMESTAMP $@" >> $TMP_EMAIL
|
||||
echo " user details: $USER_DETAILS" >> $LOG
|
||||
fi
|
||||
verbose "$TIMESTAMP **ERROR** $@"
|
||||
verbose " user details: $USER_DETAILS"
|
||||
send_email_report
|
||||
exit 1
|
||||
}
|
||||
#
|
||||
# build list of backup configuration files
|
||||
get_confs() {
|
||||
CONFS=`$LS -1 $EGDB_CONF_DIR/$CONF_ROOT*.conf 2>&1`
|
||||
TEST=`echo $CONFS | $GREP -c "No such file or directory" -`
|
||||
#TEST2=`echo $CONFS | $GREP -c "$EGDB_CONF_DIR" -`
|
||||
if test $TEST == 1 ; then
|
||||
error "No configuration files found with root $CONF_ROOT in $EGDB_CONF_DIR"
|
||||
fi
|
||||
#echo "CONFS = $CONFS"
|
||||
}
|
||||
#
|
||||
# convert last monthly into daily, daily->weekly, weekly->monthly, monthly->yearly
|
||||
roll_over() {
|
||||
for PERIOD in $PERIODS
|
||||
do
|
||||
# Clean out old backups
|
||||
verbose "sorting out $PERIOD"
|
||||
# this subsitutes the PERIOD, e.g. hourly, weekly, etc. to build the variable compounded with NUM
|
||||
BU_TO_KEEP=$[${PERIOD}NUM]
|
||||
message "keeping last $BU_TO_KEEP backups"
|
||||
PATTERN="$BU_DIR/$PERIOD-$DB.*"
|
||||
# build the list, with the suffix...
|
||||
PRUNEABLES=`$PRUNEABLES_CMD $PATTERN.$GZIPSUF`
|
||||
message "pruning older files based on $PATTERN.$GZIPSUF"
|
||||
message "pruneable files: $PRUNEABLES"
|
||||
if test "$?" -eq "0" ; then
|
||||
#
|
||||
# set counter
|
||||
NUM=0
|
||||
# go through the list of files and remove those we don't want
|
||||
for PRUNEABLE in $PRUNEABLES
|
||||
do
|
||||
NUM=$(($NUM + 1))
|
||||
if test $NUM -gt $BU_TO_KEEP ; then
|
||||
message "deleting $PRUNEABLE"
|
||||
if test $DRY_RUN == 1 ; then
|
||||
message "would delete $PRUNEABLE if this wasn't a dry run"
|
||||
else
|
||||
rm $PRUNEABLE 2>&1 > /dev/null
|
||||
fi
|
||||
else
|
||||
message "keeping $PRUNEABLE"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# delete old backups
|
||||
delete_old() {
|
||||
#
|
||||
if test -n $FROOT && test -n $BU_TO_KEEP ; then
|
||||
# pattern to search for to build the list...
|
||||
PATTERN="$BU_DIR/$FROOT.*"
|
||||
# build the list, with the suffix...
|
||||
PRUNEABLES=`$PRUNEABLES_CMD $PATTERN.$GZIPSUF`
|
||||
if test "$?" -eq "0" ; then
|
||||
message "pruning older files based on $PATTERN.$GZIPSUF"
|
||||
message "keeping last $BU_TO_KEEP backups"
|
||||
#
|
||||
# set counter
|
||||
NUM=0
|
||||
# go through the list of files and remove those we don't want
|
||||
for PRUNEABLE in $PRUNEABLES
|
||||
do
|
||||
NUM=$(($NUM + 1))
|
||||
if test $NUM -gt $BU_TO_KEEP ; then
|
||||
message "deleting $PRUNEABLE"
|
||||
if test $DRY_RUN == 1 ; then
|
||||
message "would delete $PRUNEABLE if this wasn't a dry run"
|
||||
else
|
||||
rm $PRUNEABLE 2>&1 > /dev/null
|
||||
fi
|
||||
else
|
||||
message "keeping $PRUNEABLE"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
else
|
||||
message "keeping older backups, missing root_filename..."
|
||||
fi
|
||||
}
|
||||
#
|
||||
#
|
||||
check_space() {
|
||||
RES=`$DF -h`
|
||||
#message "$RES"
|
||||
TEST=0
|
||||
PCENT="100%"
|
||||
TEST=`echo "$RES" | $GREP -c "$PCENT"`
|
||||
if test $TEST == 1 ; then
|
||||
PART_LINE=`echo "$RES" | $GREP "$PCENT"`
|
||||
# get the device name which is showing $PCENT
|
||||
TEST=`echo $PART_LINE | $CUT -f 1 -d ' '`
|
||||
# if it has a partition number in the name, it's probably a block
|
||||
# device rather than, say, a CDROM...
|
||||
TEST2=`echo $TEST | $GREP -c [0-9]`
|
||||
echo "Test2 = $TEST2"
|
||||
if test $TEST2 == 1 ; then
|
||||
error "Partition $TEST is full - detail: $PART_LINE"
|
||||
else
|
||||
message "false alarm - it's only the $TEST volume..."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
#
|
||||
# this is where we do all the backup-related stuff - what ebu used to do...
|
||||
do_backup() {
|
||||
# first, find out what dbs there are
|
||||
DBLIST=`$MYSHOW -u $USER -p$PASSWORD | $AWK '{ if ($2!~/^$/&&$2!="Databases") { print $2;}}'`
|
||||
#message "List of databases: $DBLIST"
|
||||
# for each db in the list, create a compressed backup in the right place
|
||||
message "creating a backup of the MySQL databases on $MACHINE_NAME..."
|
||||
for DB in $DBLIST
|
||||
do
|
||||
FROOT=$CONF_ROOT-$DB
|
||||
now
|
||||
today
|
||||
FNAME=$FROOT.$TODAY.$NOW
|
||||
# --opt is same as --add-drop-table --add-locks --all --extended-insert --quick --lock-tables
|
||||
CMD="$MYDUMP -u $USER -p$PASSWORD --opt $DB"
|
||||
# create the new backup!
|
||||
if test $DRY_RUN == 1 ; then
|
||||
message "I would be doing this (if it was not a dry run):"
|
||||
message "$CMD > $BU_DIR/$FNAME"
|
||||
else
|
||||
message "backing up table $DB..."
|
||||
message "running $MYDUMP with user $USER, creating $BU_DIR/$FNAME"
|
||||
$CMD > $BU_DIR/$FNAME
|
||||
if test -f $BU_DIR/$FNAME ; then
|
||||
$GZIP $BU_DIR/$FNAME
|
||||
else
|
||||
error "backup sql file, $BU_DIR/$FNAME, doesn't exist!"
|
||||
fi
|
||||
fi
|
||||
# delete old backups, so that only BU_TO_KEEP of them are stored at once
|
||||
roll_over
|
||||
delete_old
|
||||
done
|
||||
}
|
||||
#========================================
|
||||
# The Error Checking
|
||||
#========================================
|
||||
#
|
||||
# first, check that all the necessary files and stuff are there and usable
|
||||
#
|
||||
# if the log doesn't exist, create it
|
||||
if ! test -f $LOG ; then
|
||||
message "creating non-existent log file $LOG"
|
||||
RET=`touch $LOG 2>&1 /dev/null`
|
||||
TEST=`echo $RET | $GREP -c "Permission denied" -`
|
||||
if test $TEST == 1 ; then
|
||||
error "Failed to create log file $LOG, user cannot write to that directory"
|
||||
fi
|
||||
fi
|
||||
# checking whether it's there an is writable
|
||||
if ! test -w $LOG ; then
|
||||
error "Log file $LOG not writable"
|
||||
fi
|
||||
|
||||
#========================================
|
||||
# The Functional Part of the Script
|
||||
#========================================
|
||||
# set variable defaults
|
||||
ERROR_STATUS=0 # initially assume no errors
|
||||
VERBOSE=0 # initially assume quiet output
|
||||
CONF_ROOT="hourly" # set it to something we know so we can test if it's changed
|
||||
DRY_RUN=0 # assume this is not a dry run...
|
||||
CURRENT_LINK="none"
|
||||
MODE=help
|
||||
# process any arguments
|
||||
while test $# -ne 0 ; do # while there are arguments
|
||||
message "argument: $1"
|
||||
case $1 in
|
||||
--help|-h|-?)
|
||||
verbose "setting mode to HELP"
|
||||
MODE=help
|
||||
;;
|
||||
--verbose|-v)
|
||||
verbose "setting verbostity to ON"
|
||||
VERBOSE=1
|
||||
;;
|
||||
--dryrun)
|
||||
verbose "setting dryrun to ON"
|
||||
DRY_RUN=1
|
||||
;;
|
||||
*)
|
||||
verbose "unknown option: $1"
|
||||
message "unknown option: $1"
|
||||
MODE=help
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
if ! test $MODE == "help" ; then
|
||||
MODE=run
|
||||
fi
|
||||
#
|
||||
# set things in motion based on the script arguments
|
||||
case $MODE in
|
||||
run)
|
||||
create_tmp_email
|
||||
get_confs
|
||||
# run backup for each file
|
||||
for BU_CONF in $CONFS
|
||||
do
|
||||
message "do backup with conf: $BU_CONF"
|
||||
. $BU_CONF # grab the current variables for this conf file...
|
||||
do_backup
|
||||
# put a space in the email to separate tasks
|
||||
insert_blank
|
||||
done
|
||||
#
|
||||
# send the resulting email
|
||||
send_email_report
|
||||
;;
|
||||
help)
|
||||
if test $CONF_ROOT; then
|
||||
echo "error: please specify a period for egbackup"
|
||||
fi
|
||||
echo ""
|
||||
echo "$EGDB_NAME, version $VERSION, copyright 2005-7 Egressive Ltd, http://egressive.com"
|
||||
echo "==================="
|
||||
echo "usage: $EGDB_NAME"
|
||||
echo "== options =="
|
||||
echo "-v or --verbose - give extra feedback on progress to stdout"
|
||||
echo "-c or --configroot config_filename - root for configuration filenames"
|
||||
echo "--dryrun - do everything else, but *don't* delete anything or run the backup"
|
||||
echo ""
|
||||
;;
|
||||
esac
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue