mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
This commit is contained in:
		| @@ -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> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user