Changed CIDname for 3way calls

git-svn-id: svn://192.168.202.10@1556 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2010-11-26 02:59:40 +00:00
parent bfa8bd03e5
commit a18d030ce0
4 changed files with 81 additions and 17 deletions
+5 -2
View File
@@ -14,6 +14,7 @@
# Copyright (C) 2010 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# 100811-2119 - First build, based upon AST_conf_update.pl script
# 100928-1506 - Changed from hard-coded 60 minute limit to servers.vicidial_recording_limit
#
# constants
@@ -137,7 +138,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
or die "Couldn't connect to database: " . DBI->errstr;
### Grab Server values from the database
$stmtA = "SELECT telnet_host,telnet_port,ASTmgrUSERNAME,ASTmgrSECRET,ASTmgrUSERNAMEupdate,ASTmgrUSERNAMElisten,ASTmgrUSERNAMEsend,max_vicidial_trunks,answer_transfer_agent,local_gmt,ext_context FROM servers where server_ip = '$server_ip';";
$stmtA = "SELECT telnet_host,telnet_port,ASTmgrUSERNAME,ASTmgrSECRET,ASTmgrUSERNAMEupdate,ASTmgrUSERNAMElisten,ASTmgrUSERNAMEsend,max_vicidial_trunks,answer_transfer_agent,local_gmt,ext_context,vicidial_recording_limit FROM servers where server_ip = '$server_ip';";
if ($DB) {print "|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -157,6 +158,7 @@ if ($sthArows > 0)
$DBanswer_transfer_agent= $aryA[8];
$DBSERVER_GMT = $aryA[9];
$DBext_context = $aryA[10];
$vicidial_recording_limit = $aryA[11];
if ($DBtelnet_host) {$telnet_host = $DBtelnet_host;}
if ($DBtelnet_port) {$telnet_port = $DBtelnet_port;}
if ($DBASTmgrUSERNAME) {$ASTmgrUSERNAME = $DBASTmgrUSERNAME;}
@@ -168,6 +170,7 @@ if ($sthArows > 0)
if ($DBanswer_transfer_agent) {$answer_transfer_agent = $DBanswer_transfer_agent;}
if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;}
if ($DBext_context) {$ext_context = $DBext_context;}
if ($vicidial_recording_limit < 60) {$vicidial_recording_limit=60;}
}
$sthA->finish();
@@ -195,7 +198,7 @@ while ($loops > $loop_counter)
##### Find date-time one hour in the past
$secX = time();
$TDtarget = ($secX - 3600);
$TDtarget = ($secX - ($vicidial_recording_limit * 60));
($Tsec,$Tmin,$Thour,$Tmday,$Tmon,$Tyear,$Twday,$Tyday,$Tisdst) = localtime($TDtarget);
$Tyear = ($Tyear + 1900);
$Tmon++;