added mtop instructions to SCRATCH_INSTALL

added fields to vicidial_auto_calls table to be used for LIVE call Jams tracking
added code in all VDAD transfer AGI scripts to use and update stage field in vicidial_auto_calls

git-svn-id: svn://192.168.202.10@388 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2006-11-13 19:48:32 +00:00
parent 657e308c77
commit 5221606652
26 changed files with 174 additions and 49 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
and comments are added to the astguiclient.conf file
7. Experimental FastAGI replacement for call_log and VD_hangup AGI scripts:
FastAGI_log.pl
FastAGI_log.pl - requires cpan module Net::Server to run
If you want to use it, read the comments at the top of the script
Look at the docs/conf_examples/extensions.conf.sample file for examples
of how to use this new feature in your dialplan
+7 -2
View File
@@ -307,7 +307,7 @@ $sthA->finish();
### insert a LIVE record to the vicidial_auto_calls table
$stmtA = "INSERT INTO vicidial_auto_calls values('','$VARserver_ip','$channel_group','LIVE','$CIDlead_id','$uniqueid','$callerid','$channel','$VDADphone_code','$VDADphone','$SQLdate','IN')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage) values('$VARserver_ip','$channel_group','LIVE','$CIDlead_id','$uniqueid','$callerid','$channel','$VDADphone_code','$VDADphone','$SQLdate','IN','LIVE-0')";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
@@ -406,7 +406,7 @@ if ($channel_status < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER', stage='CLOSER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDCL XFER : |$affected_rows|$callerid\n|$stmtA|"; &agi_output;}
@@ -492,6 +492,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+7 -2
View File
@@ -344,7 +344,7 @@ $sthA->finish();
### insert a LIVE record to the vicidial_auto_calls table
$stmtA = "INSERT INTO vicidial_auto_calls values('','$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage) values('$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','LIVE-0')";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
@@ -451,7 +451,7 @@ if ($channel_status < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER', stage='CLOSER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDCL XFER : |$affected_rows|$callerid\n|$stmtA|"; &agi_output;}
@@ -542,6 +542,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+7 -3
View File
@@ -341,10 +341,9 @@ while ($sthArows > $cbc)
$cbc++;
}
$sthA->finish();
### insert a LIVE record to the vicidial_auto_calls table
$stmtA = "INSERT INTO vicidial_auto_calls values('','$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage) values('$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','LIVE-0')";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
@@ -451,7 +450,7 @@ if ($channel_status < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER', stage='CLOSER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDCL XFER : |$affected_rows|$callerid\n|$stmtA|"; &agi_output;}
@@ -542,6 +541,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+7 -2
View File
@@ -265,7 +265,7 @@ exit;
### Grab call parameters from vicidial_auto_calls table
$stmtA = "UPDATE vicidial_auto_calls set uniqueid='$unique_id', channel='$channel',status='LIVE' where callerid='$callerid' order by call_time desc limit 1;";
$stmtA = "UPDATE vicidial_auto_calls set uniqueid='$unique_id', channel='$channel',status='LIVE',stage='LIVE-0' where callerid='$callerid' order by call_time desc limit 1;";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
if ($affected_rows > 0)
@@ -393,7 +393,7 @@ if ($rec_countWAIT < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='XFER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='XFER', stage='XFER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD XFER : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
@@ -459,6 +459,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+8 -3
View File
@@ -308,7 +308,7 @@ $sthA->finish();
### insert a LIVE record to the vicidial_auto_calls table
$stmtA = "INSERT INTO vicidial_auto_calls values('','$VARserver_ip','$channel_group','LIVE','$CIDlead_id','$uniqueid','$callerid','$channel','$VDADphone_code','$VDADphone','$SQLdate','IN')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage) values('$VARserver_ip','$channel_group','LIVE','$CIDlead_id','$uniqueid','$callerid','$channel','$VDADphone_code','$VDADphone','$SQLdate','IN','LIVE-0')";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
@@ -406,7 +406,7 @@ if ($channel_status < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER', stage='CLOSER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDCL XFER : |$affected_rows|$callerid\n|$stmtA|"; &agi_output;}
@@ -496,7 +496,7 @@ if ($channel_status < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER', stage='CLOSER-$drop_timer' where callerid='$callerid';";
my $affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDCL XFER REMOTE: |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
@@ -581,6 +581,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+8 -3
View File
@@ -346,7 +346,7 @@ $sthA->finish();
### insert a LIVE record to the vicidial_auto_calls table
$stmtA = "INSERT INTO vicidial_auto_calls values('','$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage) values('$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','LIVE-0')";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
@@ -452,7 +452,7 @@ if ($channel_status < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER', stage='CLOSER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDCL XFER : |$affected_rows|$callerid\n|$stmtA|"; &agi_output;}
@@ -545,7 +545,7 @@ if ($channel_status < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER', stage='CLOSER-$drop_timer' where callerid='$callerid';";
my $affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDCL XFER REMOTE: |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
@@ -634,6 +634,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+8 -3
View File
@@ -265,7 +265,7 @@ exit;
### Grab call parameters from vicidial_auto_calls table
$stmtA = "UPDATE vicidial_auto_calls set uniqueid='$unique_id', channel='$channel',status='LIVE' where callerid='$callerid' order by call_time desc limit 1;";
$stmtA = "UPDATE vicidial_auto_calls set uniqueid='$unique_id', channel='$channel',status='LIVE',stage='LIVE-0' where callerid='$callerid' order by call_time desc limit 1;";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
if ($affected_rows > 0)
@@ -392,7 +392,7 @@ if ($rec_countWAIT < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='XFER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='XFER', stage='XFER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD XFER : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
@@ -472,7 +472,7 @@ if ($rec_countWAITrem < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='XFER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='XFER', stage='XFER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD XFER REMOTE: |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
@@ -537,6 +537,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+2 -2
View File
@@ -283,7 +283,7 @@ while ($sthArows > $rec_count)
$sthA->finish();
### Grab call parameters from vicidial_auto_calls table
$stmtA = "UPDATE vicidial_auto_calls set uniqueid='$unique_id', channel='$channel',status='LIVE' where callerid='$callerid' order by call_time desc limit 1;";
$stmtA = "UPDATE vicidial_auto_calls set uniqueid='$unique_id', channel='$channel',status='LIVE',stage='LIVE-0' where callerid='$callerid' order by call_time desc limit 1;";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
if ($affected_rows > 0)
@@ -368,7 +368,7 @@ if ($pin == "1") ### send call to voicemail
# # Thank you for your response, we will now transfer you to your agent's voicemail box.
# $AGI->stream_file("$voicemail_xfer_file");
$stmtA = "UPDATE vicidial_auto_calls set status='XFER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='XFER', stage='XFER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD XFER : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
+2 -2
View File
@@ -285,7 +285,7 @@ while ($sthArows > $rec_count)
$sthA->finish();
### Grab call parameters from vicidial_auto_calls table
$stmtA = "UPDATE vicidial_auto_calls set uniqueid='$unique_id', channel='$channel',status='LIVE' where callerid='$callerid' order by call_time desc limit 1;";
$stmtA = "UPDATE vicidial_auto_calls set uniqueid='$unique_id', channel='$channel',status='LIVE',stage='LIVE-0' where callerid='$callerid' order by call_time desc limit 1;";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
if ($affected_rows > 0)
@@ -370,7 +370,7 @@ if ($pin == "1") ### send call to voicemail
# # Thank you for your response, we will now transfer you to your agent's voicemail box.
# $AGI->stream_file("$voicemail_xfer_file");
$stmtA = "UPDATE vicidial_auto_calls set status='XFER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='XFER', stage='XFER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD XFER : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
+7 -2
View File
@@ -304,7 +304,7 @@ $sthA->finish();
### insert a LIVE record to the vicidial_auto_calls table
$stmtA = "INSERT INTO vicidial_auto_calls values('','$VARserver_ip','$channel_group','LIVE','$CIDlead_id','$uniqueid','$callerid','$channel','$VDADphone_code','$VDADphone','$SQLdate','IN')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage) values('$VARserver_ip','$channel_group','LIVE','$CIDlead_id','$uniqueid','$callerid','$channel','$VDADphone_code','$VDADphone','$SQLdate','IN','LIVE-0')";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
@@ -400,7 +400,7 @@ if ($channel_status < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER', stage='CLOSER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDCL XFER : |$affected_rows|$callerid\n|$stmtA|"; &agi_output;}
@@ -473,6 +473,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+7 -2
View File
@@ -345,7 +345,7 @@ $sthA->finish();
### insert a LIVE record to the vicidial_auto_calls table
$stmtA = "INSERT INTO vicidial_auto_calls values('','$VARserver_ip','$channel_group','LIVE','$CIDlead_id','$uniqueid','$callerid','$channel','$VDADphone_code','$VDADphone','$SQLdate','IN')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage) values('$VARserver_ip','$channel_group','LIVE','$CIDlead_id','$uniqueid','$callerid','$channel','$VDADphone_code','$VDADphone','$SQLdate','IN','LIVE-0')";
$affected_rows = $dbhA->do($stmtA);
$stmtA = "INSERT INTO vicidial_closer_log (lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed) values('$CIDlead_id','$VDADcampaign','$SQLdate','$now_date_epoch','QUEUE','$VDADphone_code','$VDADphone','VDCL','N')";
@@ -444,7 +444,7 @@ if ($channel_status < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER', stage='CLOSER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDCL XFER : |$affected_rows|$callerid\n|$stmtA|"; &agi_output;}
@@ -517,6 +517,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+7 -2
View File
@@ -343,7 +343,7 @@ $sthA->finish();
### insert a LIVE record to the vicidial_auto_calls table
$stmtA = "INSERT INTO vicidial_auto_calls values('','$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage) values('$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','LIVE-0')";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
@@ -450,7 +450,7 @@ if ($channel_status < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER', stage='CLOSER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDCL XFER : |$affected_rows|$callerid\n|$stmtA|"; &agi_output;}
@@ -527,6 +527,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+7 -2
View File
@@ -343,7 +343,7 @@ $sthA->finish();
### insert a LIVE record to the vicidial_auto_calls table
$stmtA = "INSERT INTO vicidial_auto_calls values('','$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage) values('$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','LIVE-0')";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
@@ -439,7 +439,7 @@ if ($channel_status < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER', stage='CLOSER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDCL XFER : |$affected_rows|$callerid\n|$stmtA|"; &agi_output;}
@@ -512,6 +512,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+7 -2
View File
@@ -359,7 +359,7 @@ while ($sthArows > $cbc)
$sthA->finish();
### insert a LIVE record to the vicidial_auto_calls table
$stmtA = "INSERT INTO vicidial_auto_calls values('','$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage) values('$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','LIVE-0')";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
@@ -455,7 +455,7 @@ if ($channel_status < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER', stage='CLOSER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDCL XFER : |$affected_rows|$callerid\n|$stmtA|"; &agi_output;}
@@ -528,6 +528,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+7 -2
View File
@@ -379,7 +379,7 @@ $sthA->finish();
### insert a LIVE record to the vicidial_auto_calls table
$stmtA = "INSERT INTO vicidial_auto_calls values('','$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage) values('$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','LIVE-0')";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
@@ -476,7 +476,7 @@ if ($channel_status < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER', stage='CLOSER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDCL XFER : |$affected_rows|$callerid\n|$stmtA|"; &agi_output;}
@@ -549,6 +549,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+7 -2
View File
@@ -342,7 +342,7 @@ while ($sthArows > $cbc)
$sthA->finish();
### insert a LIVE record to the vicidial_auto_calls table
$stmtA = "INSERT INTO vicidial_auto_calls values('','$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage) values('$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','LIVE-0')";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
@@ -448,7 +448,7 @@ if ($channel_status < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER', stage='CLOSER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDCL XFER : |$affected_rows|$callerid\n|$stmtA|"; &agi_output;}
@@ -525,6 +525,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+7 -2
View File
@@ -341,7 +341,7 @@ while ($sthArows > $cbc)
$sthA->finish();
### insert a LIVE record to the vicidial_auto_calls table
$stmtA = "INSERT INTO vicidial_auto_calls values('','$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN')";
$stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,uniqueid,callerid,channel,phone_code,phone_number,call_time,call_type,stage) values('$VARserver_ip','$channel_group','LIVE','$new_lead_id','$uniqueid','$callerid','$channel','$phone_code','$phone_number','$SQLdate','IN','LIVE-0')";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
@@ -447,7 +447,7 @@ if ($channel_status < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='CLOSER', stage='CLOSER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDCL XFER : |$affected_rows|$callerid\n|$stmtA|"; &agi_output;}
@@ -524,6 +524,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+7 -2
View File
@@ -255,7 +255,7 @@ exit;
### Grab call parameters from vicidial_auto_calls table
$stmtA = "UPDATE vicidial_auto_calls set uniqueid='$unique_id', channel='$channel',status='LIVE' where callerid='$callerid' order by call_time desc limit 1;";
$stmtA = "UPDATE vicidial_auto_calls set uniqueid='$unique_id', channel='$channel',status='LIVE',stage='LIVE-0' where callerid='$callerid' order by call_time desc limit 1;";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
if ($affected_rows > 0)
@@ -382,7 +382,7 @@ if ($rec_countWAIT < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='XFER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='XFER', stage='XFER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD XFER : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
@@ -435,6 +435,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+7 -2
View File
@@ -256,7 +256,7 @@ exit;
### Grab call parameters from vicidial_auto_calls table
$stmtA = "UPDATE vicidial_auto_calls set uniqueid='$unique_id', channel='$channel',status='LIVE' where callerid='$callerid' order by call_time desc limit 1;";
$stmtA = "UPDATE vicidial_auto_calls set uniqueid='$unique_id', channel='$channel',status='LIVE',stage='LIVE-0' where callerid='$callerid' order by call_time desc limit 1;";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
if ($affected_rows > 0)
@@ -388,7 +388,7 @@ if ($rec_countWAIT < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='XFER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='XFER', stage='XFER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD XFER : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
@@ -441,6 +441,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+7 -2
View File
@@ -292,7 +292,7 @@ if ($AGILOG) {$agi_string = "-- VDAD vicidial_list VOTER update: |$affected_r
$AGI->stream_file('US_pol_survey_transfer');
### Grab call parameters from vicidial_auto_calls table
$stmtA = "UPDATE vicidial_auto_calls set uniqueid='$unique_id', channel='$channel',status='LIVE' where callerid='$callerid' order by call_time desc limit 1;";
$stmtA = "UPDATE vicidial_auto_calls set uniqueid='$unique_id', channel='$channel',status='LIVE',stage='LIVE-0' where callerid='$callerid' order by call_time desc limit 1;";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
if ($affected_rows > 0)
@@ -419,7 +419,7 @@ if ($rec_countWAIT < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='XFER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='XFER', stage='XFER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD XFER : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
@@ -490,6 +490,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+7 -2
View File
@@ -257,7 +257,7 @@ exit;
### Grab call parameters from vicidial_auto_calls table
$stmtA = "UPDATE vicidial_auto_calls set uniqueid='$unique_id', channel='$channel',status='LIVE' where callerid='$callerid' order by call_time desc limit 1;";
$stmtA = "UPDATE vicidial_auto_calls set uniqueid='$unique_id', channel='$channel',status='LIVE',stage='LIVE-0' where callerid='$callerid' order by call_time desc limit 1;";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
if ($affected_rows > 0)
@@ -384,7 +384,7 @@ if ($rec_countWAIT < 1)
}
$sthA->finish();
$stmtA = "UPDATE vicidial_auto_calls set status='XFER' where callerid='$callerid';";
$stmtA = "UPDATE vicidial_auto_calls set status='XFER', stage='XFER-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD XFER : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
@@ -441,6 +441,11 @@ else
$drop_timer++;
}
$stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';";
$affected_rows = $dbhA->do($stmtA);
#if ($AGILOG) {$agi_string = "-- VDAD : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
}
+22
View File
@@ -732,6 +732,28 @@ this loaded on your system.
- make install
mtop is a great utility for real-time monitoring of mysql and the queries that
are running in it.
*OPTIONAL*
14. Go to http://mtop.sourceforge.net to download the most recent version
- to install this directly on the command line type:
- cd /usr/local
- wget http://superb-east.dl.sourceforge.net/sourceforge/mtop/mtop-0.6.6.tar.gz
- gunzip mtop-0.6.6.tar.gz
- tar xvf mtop-0.6.6.tar
- cd mtop-0.6.6
- cpan
- install Curses
- install Getopt::Long
- install Net::Domain
- quit
- perl Makefile.PL
- make
- make install
- /usr/local/bin/mtop --dbuser=root --seconds=3
PHASE 4: INSTALLING ASTERISK
+4 -1
View File
@@ -320,9 +320,12 @@ phone_code VARCHAR(10),
phone_number VARCHAR(12),
call_time DATETIME,
call_type ENUM('IN','OUT') default 'OUT',
stage VARCHAR(20) default 'START',
last_update_time TIMESTAMP,
index (uniqueid),
index (callerid),
index (call_time)
index (call_time),
index (last_update_time)
);
CREATE TABLE vicidial_log (
+6
View File
@@ -22,3 +22,9 @@ ALTER TABLE servers ADD vicidial_balance_active ENUM('Y','N') default 'N';
ALTER TABLE servers ADD balance_trunks_offlimits SMALLINT(5) UNSIGNED default '0';
DELETE from vicidial_phone_codes;
ALTER TABLE vicidial_auto_calls ADD stage VARCHAR(20) default 'START';
ALTER TABLE vicidial_auto_calls ADD last_update_time TIMESTAMP;
ALTER TABLE vicidial_auto_calls ADD index (last_update_time);
+1 -1
View File
@@ -2755,7 +2755,7 @@ echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
echo "<br>ADD A NEW CAMPAIGN<form action=$PHP_SELF method=POST>\n";
echo "<input type=hidden name=ADD value=21>\n";
echo "<center><TABLE width=600 cellspacing=3>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Campaign ID: </td><td align=left><input type=text name=campaign_id size=8 maxlength=8>$NWB#vicidial_campaigns-campaign_id$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Campaign ID: </td><td align=left><input type=text name=campaign_id size=10 maxlength=8>$NWB#vicidial_campaigns-campaign_id$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Campaign Name: </td><td align=left><input type=text name=campaign_name size=30 maxlength=30>$NWB#vicidial_campaigns-campaign_name$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Active: </td><td align=left><select size=1 name=active><option>Y</option><option>N</option></select>$NWB#vicidial_campaigns-active$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Park Extension: </td><td align=left><input type=text name=park_ext size=10 maxlength=10>$NWB#vicidial_campaigns-park_ext$NWE</td></tr>\n";