summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorSean Bright <sean.bright@gmail.com>2017-12-22 09:23:22 -0500
committerSean Bright <sean.bright@gmail.com>2017-12-22 09:23:22 -0500
commitfd0ca1c3f9b972a52d48a82b492fd6bac772dc78 (patch)
tree42d2a87726d196f4db1c68489007520a4c597062 /contrib
parent9ef97b5a9191e51f1edc66bb17728fd9fe552c35 (diff)
Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
Diffstat (limited to 'contrib')
-rw-r--r--contrib/README.festival18
-rw-r--r--contrib/ast-db-manage/cdr/versions/210693f3123d_create_cdr_table.py1
-rw-r--r--contrib/ast-db-manage/config/versions/1758e8bbf6b_increase_useragent_column_size.py1
-rw-r--r--contrib/ast-db-manage/config/versions/28887f25a46f_create_queue_tables.py1
-rw-r--r--contrib/ast-db-manage/config/versions/4a6c67fa9b7a_add_fax_detect_timeout_option.py1
-rw-r--r--contrib/ast-db-manage/config/versions/837aa67461fb_ps_contacts_add_authenticate_qualify.py1
-rw-r--r--contrib/ast-db-manage/config/versions/a6ef36f1309_ps_globals_add_ignore_uri_user_options.py1
-rw-r--r--contrib/ast-db-manage/config/versions/d39508cb8d8_create_queue_rules.py1
-rw-r--r--contrib/ast-db-manage/env.py1
-rw-r--r--contrib/ast-db-manage/voicemail/versions/39428242f7f5_increase_recording_column_size.py1
-rw-r--r--contrib/asterisk-ices.xml6
-rwxr-xr-xcontrib/init.d/rc.debian.asterisk2
-rwxr-xr-xcontrib/init.d/rc.mandriva.asterisk15
-rwxr-xr-xcontrib/init.d/rc.mandriva.zaptel1
-rwxr-xr-xcontrib/init.d/rc.redhat.asterisk2
-rwxr-xr-xcontrib/init.d/rc.slackware.asterisk1
-rwxr-xr-xcontrib/init.d/rc.suse.asterisk2
-rw-r--r--contrib/scripts/README.messages-expire6
-rwxr-xr-xcontrib/scripts/ast_tls_cert2
-rwxr-xr-xcontrib/scripts/astcli5
-rw-r--r--contrib/scripts/astgenkey.844
-rwxr-xr-xcontrib/scripts/autosupport52
-rw-r--r--contrib/scripts/autosupport.820
-rwxr-xr-xcontrib/scripts/dbsep.cgi1
-rw-r--r--contrib/scripts/managerproxy.pl5
-rw-r--r--contrib/scripts/messages-expire.pl6
-rw-r--r--contrib/scripts/retrieve_extensions_from_mysql.pl7
-rw-r--r--contrib/scripts/retrieve_extensions_from_sql.pl2
-rw-r--r--contrib/scripts/retrieve_sip_conf_from_mysql.pl5
-rw-r--r--contrib/scripts/safe_asterisk.838
-rwxr-xr-xcontrib/scripts/sip_nat_settings14
-rw-r--r--contrib/upstart/asterisk.user.conf1
-rw-r--r--contrib/utils/README.rawplayer9
-rw-r--r--contrib/utils/eagi_proxy.c40
-rw-r--r--contrib/utils/rawplayer.c5
-rw-r--r--contrib/utils/zones2indications.c16
36 files changed, 156 insertions, 178 deletions
diff --git a/contrib/README.festival b/contrib/README.festival
index 24912827c..bd9d17bde 100644
--- a/contrib/README.festival
+++ b/contrib/README.festival
@@ -1,15 +1,15 @@
app_festival is an application that allows one to send text-to-speech commands
to a background festival server, and to obtain the resulting waveform which
-gets sent down to the respective channel. app_festival also employs a waveform
-cache, so invariant text-to-speech strings ("Please press 1 for instructions")
-do not need to be dynamically generated all the time.
+gets sent down to the respective channel. app_festival also employs a waveform
+cache, so invariant text-to-speech strings ("Please press 1 for instructions")
+do not need to be dynamically generated all the time.
-You need :
+You need :
1) festival, patched to produce 8khz waveforms on output. Patch for Festival
-1.4.2 RELEASE are included. The patch adds a new command to festival
-(asterisk_tts).
+1.4.2 RELEASE are included. The patch adds a new command to festival
+(asterisk_tts).
It is possible to run Festival without patches in the source-code. Just
add this to your /etc/festival.scm or /usr/share/festival/festival/scm:
@@ -30,7 +30,7 @@ add this to your /etc/festival.scm or /usr/share/festival/festival/scm:
original mentioning of it]
2) You may wish to obtain and install the asterisk-perl
-module by James Golovich <james@gnuinter.net>, from
+module by James Golovich <james@gnuinter.net>, from
either CPAN, or his site: http://asterisk.gnuinter.net,
as this contains a good example of how variable text
can be tts'd via asterisk, namely the examples/tts-*.agi
@@ -41,7 +41,7 @@ can be ideal for these sorts of needs. For simpler usage,
fixed, pre-recorded messages may be more amenable for your
purposes.
-3) Before running asterisk, you have to run festival-server with a command
-like :
+3) Before running asterisk, you have to run festival-server with a command
+like :
/usr/local/festival/bin/festival --server > /dev/null 2>&1 &
diff --git a/contrib/ast-db-manage/cdr/versions/210693f3123d_create_cdr_table.py b/contrib/ast-db-manage/cdr/versions/210693f3123d_create_cdr_table.py
index 3ea9ed153..650015f2a 100644
--- a/contrib/ast-db-manage/cdr/versions/210693f3123d_create_cdr_table.py
+++ b/contrib/ast-db-manage/cdr/versions/210693f3123d_create_cdr_table.py
@@ -61,4 +61,3 @@ def upgrade():
def downgrade():
op.drop_table('cdr')
-
diff --git a/contrib/ast-db-manage/config/versions/1758e8bbf6b_increase_useragent_column_size.py b/contrib/ast-db-manage/config/versions/1758e8bbf6b_increase_useragent_column_size.py
index 215726fa0..9fa09f061 100644
--- a/contrib/ast-db-manage/config/versions/1758e8bbf6b_increase_useragent_column_size.py
+++ b/contrib/ast-db-manage/config/versions/1758e8bbf6b_increase_useragent_column_size.py
@@ -38,4 +38,3 @@ def upgrade():
def downgrade():
op.alter_column('sippeers', 'useragent', type_=sa.String(20))
-
diff --git a/contrib/ast-db-manage/config/versions/28887f25a46f_create_queue_tables.py b/contrib/ast-db-manage/config/versions/28887f25a46f_create_queue_tables.py
index 59ddac7cd..084952d71 100644
--- a/contrib/ast-db-manage/config/versions/28887f25a46f_create_queue_tables.py
+++ b/contrib/ast-db-manage/config/versions/28887f25a46f_create_queue_tables.py
@@ -138,4 +138,3 @@ def downgrade():
sa.Enum(name=QUEUE_STRATEGY_NAME).drop(op.get_bind(), checkfirst=False)
sa.Enum(name=QUEUE_AUTOPAUSE_NAME).drop(op.get_bind(), checkfirst=False)
-
diff --git a/contrib/ast-db-manage/config/versions/4a6c67fa9b7a_add_fax_detect_timeout_option.py b/contrib/ast-db-manage/config/versions/4a6c67fa9b7a_add_fax_detect_timeout_option.py
index 91774c447..42f39779c 100644
--- a/contrib/ast-db-manage/config/versions/4a6c67fa9b7a_add_fax_detect_timeout_option.py
+++ b/contrib/ast-db-manage/config/versions/4a6c67fa9b7a_add_fax_detect_timeout_option.py
@@ -20,4 +20,3 @@ def upgrade():
def downgrade():
op.drop_column('ps_endpoints', 'fax_detect_timeout')
-
diff --git a/contrib/ast-db-manage/config/versions/837aa67461fb_ps_contacts_add_authenticate_qualify.py b/contrib/ast-db-manage/config/versions/837aa67461fb_ps_contacts_add_authenticate_qualify.py
index 033a999af..5fde44ffb 100644
--- a/contrib/ast-db-manage/config/versions/837aa67461fb_ps_contacts_add_authenticate_qualify.py
+++ b/contrib/ast-db-manage/config/versions/837aa67461fb_ps_contacts_add_authenticate_qualify.py
@@ -31,4 +31,3 @@ def downgrade():
if op.get_context().bind.dialect.name == 'mssql':
op.drop_constraint('ck_ps_contacts_authenticate_qualify_yesno_values','ps_contacts')
op.drop_column('ps_contacts', 'authenticate_qualify')
-
diff --git a/contrib/ast-db-manage/config/versions/a6ef36f1309_ps_globals_add_ignore_uri_user_options.py b/contrib/ast-db-manage/config/versions/a6ef36f1309_ps_globals_add_ignore_uri_user_options.py
index 55d3d3811..f9412a655 100644
--- a/contrib/ast-db-manage/config/versions/a6ef36f1309_ps_globals_add_ignore_uri_user_options.py
+++ b/contrib/ast-db-manage/config/versions/a6ef36f1309_ps_globals_add_ignore_uri_user_options.py
@@ -31,4 +31,3 @@ def downgrade():
if op.get_context().bind.dialect.name == 'mssql':
op.drop_constraint('ck_ps_globals_ignore_uri_user_options_yesno_values','ps_globals')
op.drop_column('ps_globals', 'ignore_uri_user_options')
-
diff --git a/contrib/ast-db-manage/config/versions/d39508cb8d8_create_queue_rules.py b/contrib/ast-db-manage/config/versions/d39508cb8d8_create_queue_rules.py
index 740972103..fd0f35ad4 100644
--- a/contrib/ast-db-manage/config/versions/d39508cb8d8_create_queue_rules.py
+++ b/contrib/ast-db-manage/config/versions/d39508cb8d8_create_queue_rules.py
@@ -28,4 +28,3 @@ def downgrade():
########################## drop tables ###########################
op.drop_table('queue_rules')
-
diff --git a/contrib/ast-db-manage/env.py b/contrib/ast-db-manage/env.py
index 186423913..5036f4ccf 100644
--- a/contrib/ast-db-manage/env.py
+++ b/contrib/ast-db-manage/env.py
@@ -150,4 +150,3 @@ if context.is_offline_mode():
run_migrations_offline()
else:
run_migrations_online()
-
diff --git a/contrib/ast-db-manage/voicemail/versions/39428242f7f5_increase_recording_column_size.py b/contrib/ast-db-manage/voicemail/versions/39428242f7f5_increase_recording_column_size.py
index f06cbf10e..2b8942761 100644
--- a/contrib/ast-db-manage/voicemail/versions/39428242f7f5_increase_recording_column_size.py
+++ b/contrib/ast-db-manage/voicemail/versions/39428242f7f5_increase_recording_column_size.py
@@ -41,4 +41,3 @@ def upgrade():
def downgrade():
op.alter_column('voicemail_messages', 'recording', type_=sa.LargeBinary)
-
diff --git a/contrib/asterisk-ices.xml b/contrib/asterisk-ices.xml
index abc028c75..afbc87db7 100644
--- a/contrib/asterisk-ices.xml
+++ b/contrib/asterisk-ices.xml
@@ -70,7 +70,7 @@
and samplerate given in the parameters to the oss input
module above or the remsaple/downmix section below. -->
- <encode>
+ <encode>
<quality>0</quality>
<samplerate>8000</samplerate>
<channels>1</channels>
@@ -80,9 +80,9 @@
<downmix>0</downmix>
<!-- resampling.
-
+
Set to the frequency (in Hz) you wish to resample to, -->
-
+
<!-- <resample>
<in-rate>44100</in-rate>
<out-rate>22050</out-rate>
diff --git a/contrib/init.d/rc.debian.asterisk b/contrib/init.d/rc.debian.asterisk
index 211737fa9..6c1474ac8 100755
--- a/contrib/init.d/rc.debian.asterisk
+++ b/contrib/init.d/rc.debian.asterisk
@@ -15,7 +15,7 @@
# - Added test for safe_asterisk
# - Changed "stop gracefully" to "stop now"
# - Added support for -U and -G command line options
-# - Modified "reload" to call asterisk -rx 'reload'
+# - Modified "reload" to call asterisk -rx 'reload'
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=asterisk
diff --git a/contrib/init.d/rc.mandriva.asterisk b/contrib/init.d/rc.mandriva.asterisk
index e095ccf75..8ac3aefe8 100755
--- a/contrib/init.d/rc.mandriva.asterisk
+++ b/contrib/init.d/rc.mandriva.asterisk
@@ -1,14 +1,14 @@
#!/bin/sh
-#
+#
# asterisk: Starts the asterisk service
-#
+#
# Version: @(#) /etc/rc.d/init.d/asterisk 1.0
-#
+#
# chkconfig: 2345 95 10
# description: Starts the asterisk service
-#
+#
# processname: asterisk
-#
+#
### BEGIN INIT INFO
# Provides: asterisk
@@ -75,7 +75,7 @@ if [ "$TTY" != "" ]; then
ASTARGS="${ASTARGS} -c"
fi
fi
-if [ ! -w ${DUMPDROP} ]; then
+if [ ! -w ${DUMPDROP} ]; then
echo "Cannot write to ${DUMPDROP}" >&2
exit 1
fi
@@ -93,7 +93,7 @@ SIGMSG=("None", "Hangup" "Interrupt" "Quit" "Illegal instruction" "Trace trap" "
run_asterisk()
{
- while :; do
+ while :; do
if [ "$TTY" != "" ]; then
cd /tmp
@@ -204,4 +204,3 @@ case "$1" in
esac
exit 0
-
diff --git a/contrib/init.d/rc.mandriva.zaptel b/contrib/init.d/rc.mandriva.zaptel
index 14a658b41..f55ef7f5e 100755
--- a/contrib/init.d/rc.mandriva.zaptel
+++ b/contrib/init.d/rc.mandriva.zaptel
@@ -105,4 +105,3 @@ case "$1" in
esac
exit 0
-
diff --git a/contrib/init.d/rc.redhat.asterisk b/contrib/init.d/rc.redhat.asterisk
index 45ea9bccf..4b2a289b1 100755
--- a/contrib/init.d/rc.redhat.asterisk
+++ b/contrib/init.d/rc.redhat.asterisk
@@ -18,7 +18,7 @@
# - Added test for safe_asterisk
# - Verified SIGTERM issued by "killproc" ensures "stop gracefully"
# - Added support for -U and -G command line options
-# - Modified "reload" to call asterisk -rx 'reload'
+# - Modified "reload" to call asterisk -rx 'reload'
### BEGIN INIT INFO
# Provides: asterisk
diff --git a/contrib/init.d/rc.slackware.asterisk b/contrib/init.d/rc.slackware.asterisk
index 79c2b927f..5f5058f5e 100755
--- a/contrib/init.d/rc.slackware.asterisk
+++ b/contrib/init.d/rc.slackware.asterisk
@@ -60,4 +60,3 @@ case "$1" in
*)
echo "usage $0 start|stop|restart" ;;
esac
-
diff --git a/contrib/init.d/rc.suse.asterisk b/contrib/init.d/rc.suse.asterisk
index 16530968e..aa54930de 100755
--- a/contrib/init.d/rc.suse.asterisk
+++ b/contrib/init.d/rc.suse.asterisk
@@ -18,7 +18,7 @@
# - Added test for safe_asterisk
# - Verified SIGTERM issued by "killproc" ensures "stop gracefully"
# - Added support for -U and -G command line options
-# - Modified "reload" to call asterisk -rx 'reload'
+# - Modified "reload" to call asterisk -rx 'reload'
### BEGIN INIT INFO
# Provides: asterisk
diff --git a/contrib/scripts/README.messages-expire b/contrib/scripts/README.messages-expire
index 12f2b0e9c..40df8583e 100644
--- a/contrib/scripts/README.messages-expire
+++ b/contrib/scripts/README.messages-expire
@@ -1,10 +1,10 @@
messages-expire.pl
-messages-expire finds messages more than X days old and deletes them.
+messages-expire finds messages more than X days old and deletes them.
Because the older messages will be the lower numbers in the folder (msg0000
-will be older than msg0005), just deleting msg0000 will not work.
+will be older than msg0005), just deleting msg0000 will not work.
expire-messages then runs a routine that goes into every folder in every
-mailbox to reorganize. If the folder contains msg0000, no action is taken.
+mailbox to reorganize. If the folder contains msg0000, no action is taken.
If the folder does not, the rename routine takes the oldest message and
names it msg0000, the next oldest message and names it msg0001 and so on.
diff --git a/contrib/scripts/ast_tls_cert b/contrib/scripts/ast_tls_cert
index fe7d6ab1f..116f110e2 100755
--- a/contrib/scripts/ast_tls_cert
+++ b/contrib/scripts/ast_tls_cert
@@ -93,7 +93,7 @@ OPTIONS:
names.
-O Org name (cert field)
An informational string (company name)
- -o Output filename base (defaults to asterisk)
+ -o Output filename base (defaults to asterisk)
-d Output directory (defaults to the current directory)
Example:
diff --git a/contrib/scripts/astcli b/contrib/scripts/astcli
index 0ea245f14..cb5f81b5d 100755
--- a/contrib/scripts/astcli
+++ b/contrib/scripts/astcli
@@ -102,7 +102,7 @@ if ($action eq '-' || !defined $action || $action eq '') {
while (defined($_ = $term->readline($prompt))) {
(logoff() and exit) if $_ =~ /exit|quit/; # Give them a way to exit the "terminal"
print send_command($_) if $_ !~ m/^\s*$/;
- }
+ }
} else {
while (<>) {
chomp;
@@ -159,9 +159,8 @@ sub tab_completion {
foreach my $item (split /\s+/, $res) {
$items{$item}++ unless ($item eq '_EOF_' or $item eq '' or $item eq $lastword);
}
-
+
#print STDERR "\nword=\"$word\" buffer=\"$buffer\" offset=\"$offset\" res=\"$res\"\n";
return sort keys %items;
}
-
diff --git a/contrib/scripts/astgenkey.8 b/contrib/scripts/astgenkey.8
index b32bf5d91..520c44233 100644
--- a/contrib/scripts/astgenkey.8
+++ b/contrib/scripts/astgenkey.8
@@ -49,31 +49,31 @@
.ds f2\"
.ds f3\"
.ds f4\"
-'\" t
-.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
+'\" t
+.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
.TH ASTGENKEY 8 "May 14th, 2005" "Asterisk" "Linux Programmer's Manual"
.SH NAME
.B astgenkey \- generates keys for for Asterisk IAX2 RSA authentication
.SH SYNOPSIS
-.PP
+.PP
.B astgenkey
[ \-q ] [ \-n ] [ \fIkeyname\fP ]
.SH DESCRIPTION
-.B astgenkey
-This script generates an RSA private and public key pair in PEM format
-for use by Asterisk. The private key should be kept a secret, as it can
-be used to fake your system's identity. Thus by default (without the
-option
+.B astgenkey
+This script generates an RSA private and public key pair in PEM format
+for use by Asterisk. The private key should be kept a secret, as it can
+be used to fake your system's identity. Thus by default (without the
+option
.I \-n
-) the script will create a passphrase-encrypted copy of your secret key:
-without entering the passphrase you won't be able to use it.
+) the script will create a passphrase-encrypted copy of your secret key:
+without entering the passphrase you won't be able to use it.
-However if you want to use such a key with Asterisk, you'll have to start
+However if you want to use such a key with Asterisk, you'll have to start
it interactively, because the scripts that start asterisk can't use that
encrypted key.
-The key is identified by a name. If you don't write the name on the
+The key is identified by a name. If you don't write the name on the
command-line you'll be prompted for one. The outputs of the script are:
.I name\fB.pub
@@ -86,7 +86,7 @@ The public key: not secret. Send this to the other side.
The private key: secret.
.RE
-Those files should be copied to
+Those files should be copied to
.I /var/lib/asterisk/keys
(The private key: on your system. The public key: on other systems)
@@ -128,16 +128,16 @@ user "asterisk").
.RS
.RE
-.SH "SEE ALSO"
-asterisk(8), genrsa(1), rsa(1),
+.SH "SEE ALSO"
+asterisk(8), genrsa(1), rsa(1),
http://www.voip\-info.org/wiki\-Asterisk+iax+rsa+auth
-.SH "AUTHOR"
-This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
-Permission is granted to copy, distribute and/or modify this document under
-the terms of the GNU General Public License, Version 2 any
-later version published by the Free Software Foundation.
+.SH "AUTHOR"
+This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
+Permission is granted to copy, distribute and/or modify this document under
+the terms of the GNU General Public License, Version 2 any
+later version published by the Free Software Foundation.
-On Debian systems, the complete text of the GNU General Public
-License can be found in /usr/share/common\-licenses/GPL\-2.
+On Debian systems, the complete text of the GNU General Public
+License can be found in /usr/share/common\-licenses/GPL\-2.
diff --git a/contrib/scripts/autosupport b/contrib/scripts/autosupport
index 948f628c9..414cb49f6 100755
--- a/contrib/scripts/autosupport
+++ b/contrib/scripts/autosupport
@@ -208,26 +208,26 @@ if [ -e /var/run/asterisk.ctl ] || [ -e /var/run/asterisk/asterisk.ctl ]; then
fi
-for type in alerts applications firmwares lines networks phones translations;
-do
- echo "------------------" >> $OUTPUT;
- echo "DIGIUM PHONE: $type " >> $OUTPUT;
- echo "------------------" >> $OUTPUT;
- TEMP=$(asterisk -rx "digium_phones show $type");
+for type in alerts applications firmwares lines networks phones translations;
+do
+ echo "------------------" >> $OUTPUT;
+ echo "DIGIUM PHONE: $type " >> $OUTPUT;
+ echo "------------------" >> $OUTPUT;
+ TEMP=$(asterisk -rx "digium_phones show $type");
if [ "$type" = "lines" ];
then
NUM=$(echo $TEMP | tail -n 1 | awk -F' ' '{print $(NF-4)}');
if [ $NUM -gt 0 ];
then
- for l in $(echo $TEMP | sed 's/^--- [[:alpha:]]\+ --- //;
- s/Lines \(Un-\)\?Mapped to Phones --- //g;
- s/ Internal//g;
+ for l in $(echo $TEMP | sed 's/^--- [[:alpha:]]\+ --- //;
+ s/Lines \(Un-\)\?Mapped to Phones --- //g;
+ s/ Internal//g;
s/---- [a-zA-Z0-9 ]\+ ----$//;
s/--- //g');
do
- asterisk -rx "digium_phones show line $l" >> $OUTPUT;
- echo "--------" >> $OUTPUT;
- echo >> $OUTPUT;
+ asterisk -rx "digium_phones show line $l" >> $OUTPUT;
+ echo "--------" >> $OUTPUT;
+ echo >> $OUTPUT;
done
else
echo "No configurations of type $type..." >> $OUTPUT;
@@ -238,28 +238,28 @@ do
for f in $(echo $TEMP | sed 's/--- Configured Firmware Options --- //');
do
asterisk -rx "digium_phones show firmware $f" >> $OUTPUT;
- echo "--------" >> $OUTPUT;
- echo >> $OUTPUT;
+ echo "--------" >> $OUTPUT;
+ echo >> $OUTPUT;
done
elif [ "$type" = "translations" ];
then
for t in $(echo $TEMP | sed 's/--- Translation tables ---//');
do
- asterisk -rx "digium_phones show translation $t"
+ asterisk -rx "digium_phones show translation $t"
done
else
- NUM=$(echo $TEMP | tail -n 1 | awk -F' ' '{print $(NF-3)}');
- if [ $NUM -gt 0 ];
- then
- for t in $(echo $TEMP | sed 's/^--- [[:alpha:]]\+ --- //;
+ NUM=$(echo $TEMP | tail -n 1 | awk -F' ' '{print $(NF-3)}');
+ if [ $NUM -gt 0 ];
+ then
+ for t in $(echo $TEMP | sed 's/^--- [[:alpha:]]\+ --- //;
s/---- [a-zA-Z0-9 ]\+ ----$//
- s/---- Digium Phones ---- //');
- do
- asterisk -rx "digium_phones show $(echo $type | sed 's/s\b//') $t" >> $OUTPUT;
- echo "--------" >> $OUTPUT;
- echo >> $OUTPUT;
- done;
- else
+ s/---- Digium Phones ---- //');
+ do
+ asterisk -rx "digium_phones show $(echo $type | sed 's/s\b//') $t" >> $OUTPUT;
+ echo "--------" >> $OUTPUT;
+ echo >> $OUTPUT;
+ done;
+ else
echo "No configurations of type $type..." >> $OUTPUT;
echo >> $OUTPUT;
fi;
diff --git a/contrib/scripts/autosupport.8 b/contrib/scripts/autosupport.8
index d0e9d1c93..9de1f6ef2 100644
--- a/contrib/scripts/autosupport.8
+++ b/contrib/scripts/autosupport.8
@@ -3,7 +3,7 @@
.B autosupport
\(em interactive script to provide Digium[tm]'s support with information
.SH SYNOPSIS
-.PP
+.PP
.B autosupport [OPTION] [prefix]
.SH DESCRIPTION
@@ -13,11 +13,11 @@ system for some run\-time and system information, and generate a backup
of Asterisk related configuration. An optional parameter for a prefix
may be specified which is typically used to specify a Digium Technical
Support Ticket ID.
-.PP
-The script requires root privileges to run, and writes all output in the
-home directory of the user running the script. For the purposes of this
+.PP
+The script requires root privileges to run, and writes all output in the
+home directory of the user running the script. For the purposes of this
document, this will be referred to as /root/ henceforth.
-.PP
+.PP
The system information is written to /root/digiuminfo.txt and the backup
of configuration (and the system information file) are written to a tarball
in /root/ with a base name of digium\-info. A Date Stamp will be appended,
@@ -38,7 +38,7 @@ Run without requiring user input
Show help about options
.SH FILES
.B /root/digiuminfo.txt
-.br
+.br
.B /root/digium\-info_YYYYMMDD.tar.gz
.SH SEE ALSO
@@ -50,7 +50,7 @@ Charles Moye and Trey Blancher. This manual page was written by
Tzafrir Cohen <tzafrir.cohen@xorcom.com> and updated by Charles Moye. Permission
is granted to copy, distribute and/or modify this document under the terms of
the GNU General Public License, Version 2 any later version published by the
-Free Software Foundation.
-.PP
-On Debian systems, the complete text of the GNU General Public
-License can be found in /usr/share/common\-licenses/GPL\-2.
+Free Software Foundation.
+.PP
+On Debian systems, the complete text of the GNU General Public
+License can be found in /usr/share/common\-licenses/GPL\-2.
diff --git a/contrib/scripts/dbsep.cgi b/contrib/scripts/dbsep.cgi
index d15390c23..a9448e183 100755
--- a/contrib/scripts/dbsep.cgi
+++ b/contrib/scripts/dbsep.cgi
@@ -248,4 +248,3 @@ sub throw_error {
print STDERR $msg . "\n";
exit;
}
-
diff --git a/contrib/scripts/managerproxy.pl b/contrib/scripts/managerproxy.pl
index 8c5f58cfa..9752cc654 100644
--- a/contrib/scripts/managerproxy.pl
+++ b/contrib/scripts/managerproxy.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl -w
#
# Simple Asterisk Manager Proxy, Version 1.01
# 2004-09-26
@@ -132,7 +132,7 @@ while (1)
{
log_debug("** New client connection", 16);
my $C = $m->accept;
- $proxy_clients{$C} = \$C;
+ $proxy_clients{$C} = \$C;
print "New Connection: $C\n" if $debug;
$O->add($C);
} else {
@@ -239,4 +239,3 @@ sub list_clients()
}
print "$cnt clients.\n\n";
}
-
diff --git a/contrib/scripts/messages-expire.pl b/contrib/scripts/messages-expire.pl
index 993997899..4862171b7 100644
--- a/contrib/scripts/messages-expire.pl
+++ b/contrib/scripts/messages-expire.pl
@@ -2,7 +2,7 @@
#
# Script to expire voicemail after a specified number of days
# by Steve Creel <screel@turbs.com>
-#
+#
# Directory housing the voicemail spool for asterisk
$dir = "/var/spool/asterisk/voicemail";
@@ -19,7 +19,7 @@ $unheardage = $age;
# Delete all files older than $age and $unheardage
-# (named msg????.??? to get the audio and txt files,
+# (named msg????.??? to get the audio and txt files,
# but we don't delete greetings or the user's name)
if($age==$unheardage) {
@@ -50,7 +50,7 @@ $fnbase = sprintf "msg%04d", $start;
# Make $dir include the context too
$dir.="/".$context;
-( -d $dir ) || die "Can't read list of mailboxes ($dir): $!\n";
+( -d $dir ) || die "Can't read list of mailboxes ($dir): $!\n";
@mailboxes = `ls -A1 $dir`;
chomp(@mailboxes);
diff --git a/contrib/scripts/retrieve_extensions_from_mysql.pl b/contrib/scripts/retrieve_extensions_from_mysql.pl
index ca195cfe5..0f7d3f7d3 100644
--- a/contrib/scripts/retrieve_extensions_from_mysql.pl
+++ b/contrib/scripts/retrieve_extensions_from_mysql.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl -Tw
# Use these commands to create the appropriate tables in MySQL
# If flags is 1 then this record is not included in the output extensions file
-#
+#
#CREATE TABLE extensions (
# context CHAR(20) DEFAULT 'default' NOT NULL,
# extension CHAR(20) NOT NULL,
@@ -92,7 +92,7 @@ foreach my $row ( @{ $result } ) {
}
my @resSet = @{$result};
- if ( $#resSet == -1 ) {
+ if ( $#resSet == -1 ) {
print "no results\n";
exit;
}
@@ -105,9 +105,8 @@ foreach my $row ( @{ $result } ) {
print EXTEN "\t; $result[5]" if defined $result[5];
print EXTEN "\n";
}
- }
+ }
print EXTEN "\n";
}
exit 0;
-
diff --git a/contrib/scripts/retrieve_extensions_from_sql.pl b/contrib/scripts/retrieve_extensions_from_sql.pl
index cf17d0351..47210ebf3 100644
--- a/contrib/scripts/retrieve_extensions_from_sql.pl
+++ b/contrib/scripts/retrieve_extensions_from_sql.pl
@@ -20,7 +20,7 @@
#
# Use these commands to create the appropriate SQL tables
# If flags is 1 then the record is not included in the output extensions file
-#
+#
#CREATE TABLE extensions (
# context VARCHAR(20) DEFAULT 'default' NOT NULL,
# extension VARCHAR(20) NOT NULL,
diff --git a/contrib/scripts/retrieve_sip_conf_from_mysql.pl b/contrib/scripts/retrieve_sip_conf_from_mysql.pl
index 03395a125..6bf775eac 100644
--- a/contrib/scripts/retrieve_sip_conf_from_mysql.pl
+++ b/contrib/scripts/retrieve_sip_conf_from_mysql.pl
@@ -78,16 +78,15 @@ foreach my $row ( @{ $result } ) {
}
my @resSet = @{$result};
- if ( $#resSet == -1 ) {
+ if ( $#resSet == -1 ) {
print "no results\n";
exit;
}
foreach my $row ( @{ $result } ) {
my @result = @{ $row };
print EXTEN "$result[0]=$result[1]\n";
- }
+ }
print EXTEN "$additional\n";
}
exit 0;
-
diff --git a/contrib/scripts/safe_asterisk.8 b/contrib/scripts/safe_asterisk.8
index b5395cd81..19e1728a6 100644
--- a/contrib/scripts/safe_asterisk.8
+++ b/contrib/scripts/safe_asterisk.8
@@ -3,30 +3,30 @@
.B safe_asterisk
\(em A wrapper to run the asterisk executable in a loop
.SH SYNOPSIS
-.PP
+.PP
.B safe_asterisk
.I [ asterisk_params ]
.SH DESCRIPTION
-.B safe_asterisk
-is a script that runs asterisk in a loop, which can be useful if you
+.B safe_asterisk
+is a script that runs asterisk in a loop, which can be useful if you
fear asterisk may crash.
-The script does not run in the background like a standard service. Rather,
+The script does not run in the background like a standard service. Rather,
it runs in its own linux virtual console (9, by default).
-It also uses the option '\-c' of asterisk(8) to avoid detaching asterisk
+It also uses the option '\-c' of asterisk(8) to avoid detaching asterisk
from that terminal.
-safe_asterisk also runs asterisk with unlimited core file size, and thus
+safe_asterisk also runs asterisk with unlimited core file size, and thus
asterisk will dump core in case of a crash.
-To get a "picture" of console 9, from another terminal (e.g: from a
+To get a "picture" of console 9, from another terminal (e.g: from a
remote shell session) you can use:
screendump 9
-The init script of the Debian package should be able to run safe_asterisk
-as the asterisk service, if so configured. See coments in
+The init script of the Debian package should be able to run safe_asterisk
+as the asterisk service, if so configured. See coments in
/etc/default/asterisk
.SH FILES
@@ -37,7 +37,7 @@ safe_asterisk runs in that directory, rather than in / as usual.
.B /tmp/core
.RS
-If core files were generated there, they may be
+If core files were generated there, they may be
.RE
.B /etc/asterisk/startup.d
@@ -48,22 +48,22 @@ or run any other steps that are needed for your system.
.RE
.SH BUGS
-While showing the output on a console is useful, using screen(1) as
+While showing the output on a console is useful, using screen(1) as
the terminal may be better.
The script does not read configuration from standard location under /etc
-It uses fixed locations under /tmp , and thus may be exposed to a
+It uses fixed locations under /tmp , and thus may be exposed to a
symlink attacks.
.SH SEE ALSO
asterisk(8), screendump(9)
-.SH "AUTHOR"
-This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
-Permission is granted to copy, distribute and/or modify this document under
-the terms of the GNU General Public License, Version 2 any
-later version published by the Free Software Foundation.
+.SH "AUTHOR"
+This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
+Permission is granted to copy, distribute and/or modify this document under
+the terms of the GNU General Public License, Version 2 any
+later version published by the Free Software Foundation.
-On Debian systems, the complete text of the GNU General Public
-License can be found in /usr/share/common\-licenses/GPL\-2.
+On Debian systems, the complete text of the GNU General Public
+License can be found in /usr/share/common\-licenses/GPL\-2.
diff --git a/contrib/scripts/sip_nat_settings b/contrib/scripts/sip_nat_settings
index 09e0ac858..2a4fc07ea 100755
--- a/contrib/scripts/sip_nat_settings
+++ b/contrib/scripts/sip_nat_settings
@@ -3,16 +3,16 @@
# sip_nat_settings: generate NAT settings for sip.conf of an Asterisk system
# that is behind a NAT router.
#
-# This is a script to generate sane defaults for externip and localnet
-# of sip.conf. The output should be included in the [general] section of
+# This is a script to generate sane defaults for externip and localnet
+# of sip.conf. The output should be included in the [general] section of
# sip.conf .
#
-# Multiple network interfaces: If you have multiple network interfaces,
-# this script will generate a 'localnet' line for each of them that has a
-# broadcast (ipv4) address, except the loopback interface (lo). You can
+# Multiple network interfaces: If you have multiple network interfaces,
+# this script will generate a 'localnet' line for each of them that has a
+# broadcast (ipv4) address, except the loopback interface (lo). You can
# later rem-out all of those you don't need.
-#
-# Alternatively, provide a network interface as a parameter an a localnet
+#
+# Alternatively, provide a network interface as a parameter an a localnet
# line will only be generated for its network.
#
# Copyright (C) 2005 by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
diff --git a/contrib/upstart/asterisk.user.conf b/contrib/upstart/asterisk.user.conf
index 0161d2ee0..62d9296c3 100644
--- a/contrib/upstart/asterisk.user.conf
+++ b/contrib/upstart/asterisk.user.conf
@@ -37,4 +37,3 @@ end script
#console output
respawn
exec /usr/sbin/asterisk -U asterisk -g -f
-
diff --git a/contrib/utils/README.rawplayer b/contrib/utils/README.rawplayer
index 146898a5c..46211fd8b 100644
--- a/contrib/utils/README.rawplayer
+++ b/contrib/utils/README.rawplayer
@@ -23,15 +23,12 @@ and set up a class in musiconhold.conf like so:
default => custom:/var/lib/asterisk/holdmusic_raw,/usr/bin/rawplayer
-This is the most efficient way to implement moh because no cpu usage is required to
+This is the most efficient way to implement moh because no cpu usage is required to
explode the very compressed mp3 data then downsample the music to the 8khz mono on the fly
-instead the data is already stored on the disk in the format that asterisk needs it to be
-and the player does little more than pick up frames from the file and hand them to right
+instead the data is already stored on the disk in the format that asterisk needs it to be
+and the player does little more than pick up frames from the file and hand them to right
to the asterisk pipe where the audio is shared into all the channels who require it.
If you have cpu to spare and want a simple mp3 solution consider the format_mp3 from
asterisk-addons and the files based moh.
-
-
-
diff --git a/contrib/utils/eagi_proxy.c b/contrib/utils/eagi_proxy.c
index 0a96d5a2f..117d51e72 100644
--- a/contrib/utils/eagi_proxy.c
+++ b/contrib/utils/eagi_proxy.c
@@ -71,10 +71,10 @@ char window[WINSIZE];
#define WINBUF_NUM 2400 /* number of WINSIZE windows = 1 minute */
char* winbuf;
char *end, *bs, *be;
-/* winbuf - start of buffer
- * end - end of buffer
+/* winbuf - start of buffer
+ * end - end of buffer
* bs - start of data
- * be - end of data
+ * be - end of data
*/
int command_desc; /* command transfer descriptor */
@@ -107,7 +107,7 @@ void* readSignal(void* ptr);
int main()
{
int ret;
-
+
atexit(finalize);
setlinebuf(stdin);
@@ -118,7 +118,7 @@ int main()
bs=be=winbuf;
speech_desc=connect_to_host("localhost",SIGNAL_PORT);
- if(speech_desc<0)
+ if(speech_desc<0)
{
perror("signal socket");
return -1;
@@ -126,7 +126,7 @@ int main()
command_desc=connect_to_host("localhost",COMMAND_PORT);
- if(command_desc<0)
+ if(command_desc<0)
{
perror("command socket");
return -1;
@@ -137,14 +137,14 @@ int main()
pthread_create(&signal_thread,NULL,readSignal,NULL);
while(connected)
- {
+ {
pthread_mutex_lock(&command_mutex);
ret=read_some(command_desc,buf,BUFSIZE);
pthread_mutex_unlock(&command_mutex);
if(ret>0)
{
buf[ret]=0;
- printf("%s",buf);
+ printf("%s",buf);
}
}
@@ -155,7 +155,7 @@ void finalize()
{
close(command_desc);
close(speech_desc);
- free(winbuf);
+ free(winbuf);
}
void* readStdin(void* ptr)
@@ -168,7 +168,7 @@ void* readStdin(void* ptr)
write_buf(command_desc,buf,strlen(buf));
pthread_mutex_unlock(&command_mutex);
#endif
- if(feof(stdin) || buf[0]=='\n')
+ if(feof(stdin) || buf[0]=='\n')
{
break;
}
@@ -221,9 +221,9 @@ int connect_to_host(char* name, int port)
int res,desc;
int opts;
struct sockaddr_in host;
-
- /* get address */
+
+ /* get address */
if(!strcmp(name,"localhost"))
address=htonl(2130706433); /*127.0.0.1*/
else
@@ -232,7 +232,7 @@ int connect_to_host(char* name, int port)
if(address==(in_addr_t)-1)
{
host_entity = gethostbyname(name); /* search for the host under this name */
-
+
if(!host_entity)
{
fprintf(stderr,"EAGI proxy: Wrong address!\n"); /* can't find anything*/
@@ -250,11 +250,11 @@ int connect_to_host(char* name, int port)
}
memset((void*)&host,0,sizeof(struct sockaddr_in));
-
+
host.sin_family=AF_INET;
host.sin_port=htons(port);
host.sin_addr.s_addr=address;
-
+
res=connect(desc,(struct sockaddr*)&host,sizeof(host));
if(res<0)
{
@@ -292,15 +292,15 @@ int read_some(int desc, char* buffer, int size)
{
perror("Error reading");
connected=0;
- }
+ }
break;
}
- if(res==0)
+ if(res==0)
{
connected=0;
break;
}
-
+
buffer[i]=c;
i++;
}
@@ -385,7 +385,7 @@ int write_amap(int desc, char* buf, int size)
ret=write(desc,buf,size);
if(ret<0)
{
- if(errno!=EAGAIN)
+ if(errno!=EAGAIN)
{
perror("Error writing");
connected=0;
@@ -402,7 +402,7 @@ int write_amap(int desc, char* buf, int size)
void setnonblocking(int desc)
{
int opts;
-
+
opts = fcntl(desc,F_GETFL);
if(opts < 0)
{
diff --git a/contrib/utils/rawplayer.c b/contrib/utils/rawplayer.c
index 2733264a0..14f9de435 100644
--- a/contrib/utils/rawplayer.c
+++ b/contrib/utils/rawplayer.c
@@ -27,9 +27,9 @@ static int deliver_file(char *path, int fdout) {
}
if(fd)
close(fd);
- } else
+ } else
return -1;
-
+
return error;
}
@@ -43,4 +43,3 @@ int main(int argc, char *argv[]) {
exit(1);
}
}
-
diff --git a/contrib/utils/zones2indications.c b/contrib/utils/zones2indications.c
index 74c937527..d1def5300 100644
--- a/contrib/utils/zones2indications.c
+++ b/contrib/utils/zones2indications.c
@@ -18,7 +18,7 @@
/*! \file
* \brief print libtonozone data as Asterisk indications.conf
- */
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -27,7 +27,7 @@
#define PROGRAM "zones2indication"
-void print_tone_zone_sound(struct ind_tone_zone *zone_data, const char* name,
+void print_tone_zone_sound(struct ind_tone_zone *zone_data, const char* name,
int toneid) {
int i;
for (i=0; i<DAHDI_TONE_MAX; i++) {
@@ -40,7 +40,7 @@ void print_tone_zone_sound(struct ind_tone_zone *zone_data, const char* name,
void print_indications(struct ind_tone_zone *zone_data) {
int i;
-
+
printf (
"[%s]\n"
"; Source: libtonezone.\n"
@@ -48,8 +48,8 @@ void print_indications(struct ind_tone_zone *zone_data) {
"\n",
zone_data->country, zone_data->description
);
-
- printf(
+
+ printf(
"ringcadence = "
);
for(i=0; ; i++) {
@@ -60,7 +60,7 @@ void print_indications(struct ind_tone_zone *zone_data) {
printf("%d",zone_data->ringcadence[i]);
}
putchar('\n');
-
+
print_tone_zone_sound(zone_data, "dial", DAHDI_TONE_DIALTONE);
print_tone_zone_sound(zone_data, "busy", DAHDI_TONE_BUSY);
print_tone_zone_sound(zone_data, "ring", DAHDI_TONE_RINGTONE);
@@ -122,7 +122,7 @@ int main(int argc, char* argv[]){
int opt_print_all = 0;
int opt;
char* endptr = NULL;
-
+
while((opt = getopt(argc, argv, "ac:hn:")) != -1) {
switch(opt) {
case 'a':
@@ -146,7 +146,7 @@ int main(int argc, char* argv[]){
break;
}
}
-
+
/* If we got here, the user selected no option */
usage();
return 2;