mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
This commit is contained in:
@@ -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 &
|
||||
|
@@ -61,4 +61,3 @@ def upgrade():
|
||||
|
||||
def downgrade():
|
||||
op.drop_table('cdr')
|
||||
|
||||
|
@@ -38,4 +38,3 @@ def upgrade():
|
||||
|
||||
def downgrade():
|
||||
op.alter_column('sippeers', 'useragent', type_=sa.String(20))
|
||||
|
||||
|
@@ -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)
|
||||
|
||||
|
@@ -20,4 +20,3 @@ def upgrade():
|
||||
|
||||
def downgrade():
|
||||
op.drop_column('ps_endpoints', 'fax_detect_timeout')
|
||||
|
||||
|
@@ -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')
|
||||
|
||||
|
@@ -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')
|
||||
|
||||
|
@@ -28,4 +28,3 @@ def downgrade():
|
||||
########################## drop tables ###########################
|
||||
|
||||
op.drop_table('queue_rules')
|
||||
|
||||
|
@@ -150,4 +150,3 @@ if context.is_offline_mode():
|
||||
run_migrations_offline()
|
||||
else:
|
||||
run_migrations_online()
|
||||
|
||||
|
@@ -41,4 +41,3 @@ def upgrade():
|
||||
|
||||
def downgrade():
|
||||
op.alter_column('voicemail_messages', 'recording', type_=sa.LargeBinary)
|
||||
|
||||
|
@@ -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>
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -105,4 +105,3 @@ case "$1" in
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -60,4 +60,3 @@ case "$1" in
|
||||
*)
|
||||
echo "usage $0 start|stop|restart" ;;
|
||||
esac
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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.
|
||||
|
||||
|
@@ -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:
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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.
|
||||
|
@@ -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;
|
||||
|
@@ -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.
|
||||
|
@@ -248,4 +248,3 @@ sub throw_error {
|
||||
print STDERR $msg . "\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
@@ -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";
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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,
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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.
|
||||
|
@@ -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>
|
||||
|
@@ -37,4 +37,3 @@ end script
|
||||
#console output
|
||||
respawn
|
||||
exec /usr/sbin/asterisk -U asterisk -g -f
|
||||
|
||||
|
@@ -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.
|
||||
|
||||
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user