updated docs
changed manager send scripts to add more logging and send more commands per second git-svn-id: svn://192.168.202.10@842 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
# 60814-1712 - added option for no logging to file
|
||||
# 60817-1211 - added more ARGS to go to child process to remove DBI from child
|
||||
# 61221-1926 - optimize and clean code, lc
|
||||
# 80418-0901 - reduced time between Actions being sent, raised endless loop timer
|
||||
#
|
||||
|
||||
$|++;
|
||||
@@ -97,9 +98,9 @@ my $event_string='LOGGED INTO MYSQL SERVER ON 1 CONNECTION|';
|
||||
eventLogger($conf{PATHlogs}, 'process', $event_string);
|
||||
|
||||
|
||||
my $one_day_interval = 90; # 1 day loops for 3 months
|
||||
my $one_day_interval = 182; # 2 day loops for 12 months
|
||||
while ($one_day_interval > 0) {
|
||||
my $endless_loop = 864000; # 10 days at .20 seconds per loop
|
||||
my $endless_loop = 864000; # 2 days at .20 seconds per loop
|
||||
my $affected_rows;
|
||||
my $NEW_actions;
|
||||
while ($endless_loop > 0) {
|
||||
@@ -185,6 +186,7 @@ while ($one_day_interval > 0) {
|
||||
$launch .= " --ASTmgrUSERNAME=" . $servConf->{ASTmgrUSERNAME};
|
||||
$launch .= " --ASTmgrSECRET=" . $servConf->{ASTmgrSECRET};
|
||||
$launch .= " --ASTmgrUSERNAMEsend=" . $servConf->{ASTmgrUSERNAMEsend};
|
||||
$launch .= " --man_id=" . $vdm->{man_id};
|
||||
$launch .= " --action=" . $vdm->{action};
|
||||
$launch .= " --cmd_line_b=" . $vdm->{cmd_line_b} if ($vdm->{cmd_line_b});
|
||||
$launch .= " --cmd_line_c=" . $vdm->{cmd_line_c} if ($vdm->{cmd_line_c});
|
||||
@@ -224,10 +226,10 @@ while ($one_day_interval > 0) {
|
||||
}
|
||||
|
||||
if ($affected_rows) {
|
||||
### sleep for 10 hundredths of a second
|
||||
usleep(1*100*1000);
|
||||
### sleep for 5 hundredths of a second if just send an ACTION
|
||||
usleep(1*50*1000);
|
||||
} else {
|
||||
### sleep for 20 hundredths of a second
|
||||
### sleep for 20 hundredths of a second if no actions sent
|
||||
usleep(1*200*1000);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# AST_send_action_child.pl version 0.5 *DBI-version
|
||||
# AST_send_action_child.pl version 2.0.5 *DBI-version
|
||||
#
|
||||
# Part of the Asterisk Central Queue System (ACQS)
|
||||
#
|
||||
@@ -27,6 +27,7 @@
|
||||
# 61004-1728 - added ability to parse volume control and lookup meetme IDs
|
||||
# 61220-1720 - optimize and clean code, lc.
|
||||
# 61221-1942 - additional modification to structure, lc.
|
||||
# 80418-0927 - added man_id to logging output for better tracking, raised sleep times
|
||||
#
|
||||
|
||||
$|++;
|
||||
@@ -39,7 +40,7 @@ my $secX = time(); #Start time
|
||||
|
||||
### Initialize run-time variables ###
|
||||
my ($CLOhelp, $SYSLOG, $PATHlogs, $telnet_host, $telnet_port, $ASTmgrUSERNAME);
|
||||
my ($ASTmgrSECRET, $ASTmgrUSERNAMEsend, $action, $cmd_line_b, $cmd_line_c);
|
||||
my ($ASTmgrSECRET, $ASTmgrUSERNAMEsend, $man_id, $action, $cmd_line_b, $cmd_line_c);
|
||||
my ($cmd_line_d, $cmd_line_e, $cmd_line_f, $cmd_line_g, $cmd_line_h);
|
||||
my ($cmd_line_i, $cmd_line_j, $cmd_line_k, $DB, $DBX);
|
||||
my $FULL_LOG = 1;
|
||||
@@ -54,6 +55,7 @@ if (scalar @ARGV) {
|
||||
'ASTmgrUSERNAME=s' => \$ASTmgrUSERNAME,
|
||||
'ASTmgrSECRET=s' => \$ASTmgrSECRET,
|
||||
'ASTmgrUSERNAMEsend=s' => \$ASTmgrUSERNAMEsend,
|
||||
'man_id=s' => \$man_id,
|
||||
'action=s' => \$action,
|
||||
'cmd_line_b=s' => \$cmd_line_b,
|
||||
'cmd_line_c=s' => \$cmd_line_c,
|
||||
@@ -79,6 +81,7 @@ if (scalar @ARGV) {
|
||||
print " ASTmgrUSERNAME: $ASTmgrUSERNAME\n" if ($ASTmgrUSERNAME);
|
||||
print " ASTmgrSECRET: $ASTmgrSECRET\n" if ($ASTmgrSECRET);
|
||||
print " ASTmgrUSERNAMEsend: $ASTmgrUSERNAMEsend\n" if ($ASTmgrUSERNAMEsend);
|
||||
print " man_id: $man_id\n" if ($man_id);
|
||||
print " cmd_line_b: $cmd_line_b\n" if ($cmd_line_b);
|
||||
print " cmd_line_c: $cmd_line_c\n" if ($cmd_line_c);
|
||||
print " cmd_line_d: $cmd_line_d\n" if ($cmd_line_d);
|
||||
@@ -102,6 +105,7 @@ if (scalar @ARGV) {
|
||||
print " [--ASTmgrUSERNAME] = username for Asterisk Manager login\n";
|
||||
print " [--ASTmgrSECRET] = secret or password for Asterisk Manager login\n";
|
||||
print " [--ASTmgrUSERNAMEsend] = username specific for sending actions for Asterisk Manager login\n";
|
||||
print " [--man_id] = ID of the action in the vicidial_manager table\n";
|
||||
print " [--action] = type of manager action to send\n";
|
||||
print " [--cmd_line_X] = lines to send to Manager after action\n";
|
||||
print " X replaced with b-k (10 lines)\n";
|
||||
@@ -132,6 +136,7 @@ if ($action) {
|
||||
print " ASTmgrUSERNAME: $ASTmgrUSERNAME\n" if ($ASTmgrUSERNAME);
|
||||
print " ASTmgrSECRET: $ASTmgrSECRET\n" if ($ASTmgrSECRET);
|
||||
print " ASTmgrUSERNAMEsend: $ASTmgrUSERNAMEsend\n" if ($ASTmgrUSERNAMEsend);
|
||||
print " man_id: $man_id\n" if ($man_id);
|
||||
print " cmd_line_b: $cmd_line_b\n" if ($cmd_line_b);
|
||||
print " cmd_line_c: $cmd_line_c\n" if ($cmd_line_c);
|
||||
print " cmd_line_d: $cmd_line_d\n" if ($cmd_line_d);
|
||||
@@ -209,8 +214,8 @@ if ($action) {
|
||||
$originate_command .= "\n";
|
||||
|
||||
|
||||
print nowDate() . "|$SYSLOG|\n$originate_command";
|
||||
my $event_string = "0|" . $SYSLOG . "|";
|
||||
print nowDate() . "|$SYSLOG|$man_id|\n$originate_command";
|
||||
my $event_string = $man_id . "|0|" . $SYSLOG . "|";
|
||||
$event_string .= "\n" . $originate_command;
|
||||
|
||||
eventLogger($PATHlogs,'full',$event_string) if ($FULL_LOG and $SYSLOG);
|
||||
@@ -218,11 +223,11 @@ if ($action) {
|
||||
my @list_channels = $tn->cmd(String => $originate_command,
|
||||
Prompt => '/.*/');
|
||||
|
||||
sleep(3);
|
||||
sleep(4);
|
||||
|
||||
my $data1; # ? Useless ?
|
||||
if ($FULL_LOG and $SYSLOG) {
|
||||
my $event_string = "1|" . $data1 . "|";
|
||||
my $event_string = $man_id . "|1|" . $data1 . "|";
|
||||
foreach my $channel (@list_channels) {
|
||||
$event_string .= $channel;
|
||||
}
|
||||
@@ -235,10 +240,10 @@ if ($action) {
|
||||
$tn->buffer_empty;
|
||||
#@hangup = $tn->cmd(String => "Action: Logoff\n\n", Prompt => "/.*/");
|
||||
$tn->cmd(String => "Action: Logoff\n\n", Prompt => "/.*/");
|
||||
sleep(2);
|
||||
sleep(3);
|
||||
|
||||
if ($FULL_LOG and $SYSLOG) {
|
||||
my $event_string = "2|" . $data1 . "|";
|
||||
my $event_string = $man_id . "|2|" . $data1 . "|";
|
||||
foreach my $channel (@list_channels) {
|
||||
$event_string .= $channel;
|
||||
}
|
||||
|
||||
@@ -655,6 +655,8 @@ You may want to reduce the exposure of some of the elements of VICIDIAL. Here ar
|
||||
- Change the WWW writable in the admin.php server settings to "0"
|
||||
- Change the default admin user "6666" or it's password from the default
|
||||
- Change the Default secret(password) for the default SIP and IAX accounts that are set up with astGUIclient
|
||||
- Change the default password for the Asterisk manager connection in manager.conf then change it in the server modification screen
|
||||
- Change the default password for the mysql cron user in mysql and change it to match in /etc/astguiclient.conf on each server
|
||||
- Possibly use static IP addresses for the IAX/SIP conf account entries
|
||||
- Change the default port for Apache in httpd.conf from 80 to something else
|
||||
- Change the default port for IAX in iax.conf from 4569 to something else
|
||||
|
||||
@@ -337,15 +337,15 @@ make install
|
||||
mkdir /usr/src/asterisk
|
||||
cd /usr/src/asterisk
|
||||
wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.2.27.tar.gz
|
||||
wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.2.24.tar.gz
|
||||
wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.2.25.tar.gz
|
||||
wget http://ftp.digium.com/pub/libpri/releases/libpri-1.2.7.tar.gz
|
||||
gunzip asterisk-1.2.27.tar.gz
|
||||
tar xvf asterisk-1.2.27.tar
|
||||
gunzip zaptel-1.2.24.tar.gz
|
||||
tar xvf zaptel-1.2.24.tar
|
||||
gunzip zaptel-1.2.25.tar.gz
|
||||
tar xvf zaptel-1.2.25.tar
|
||||
gunzip libpri-1.2.7.tar.gz
|
||||
tar xvf libpri-1.2.7.tar
|
||||
cd ./zaptel-1.2.24
|
||||
cd ./zaptel-1.2.25
|
||||
wget http://www.freedomphones.net/files/newt-0.51.6.tar.gz
|
||||
gunzip newt-0.51.6.tar.gz
|
||||
tar xvf newt-0.51.6.tar
|
||||
|
||||
Reference in New Issue
Block a user